mainwindow.h
author insilmaril
Wed May 31 12:36:13 2006 +0000 (2006-05-31)
changeset 341 4e11661e039d
parent 314 549bb67a8ab2
child 366 e95081c21da2
permissions -rw-r--r--
updated documentation
     1 #ifndef MAINWINDOW_H 
     2 #define MAINWINDOW_H
     3 
     4 #include <qpopupmenu.h>
     5 #include <qmainwindow.h>
     6 #include <qtextedit.h>
     7 #include <qintdict.h>
     8 #include <qcanvas.h>
     9 #include <qlineedit.h>
    10 #include <qaction.h>
    11 #include <qcursor.h>
    12 #include <qtabwidget.h>
    13 #include <qmap.h>
    14 
    15 #include "file.h"
    16 #include "findwindow.h"
    17 #include "mapeditor.h"
    18 #include "texteditor.h"
    19 #include "xml.h"
    20 
    21 class Main : public QMainWindow 
    22 {
    23     Q_OBJECT
    24 
    25 public:
    26     Main(QWidget* parent=0, const char* name=0, WFlags f=0);
    27     ~Main();
    28 	void loadCmdLine();
    29 	void statusMessage (const QString &);
    30 
    31 public slots:
    32     void fileNew();
    33 
    34 protected:
    35 	void closeEvent( QCloseEvent* );
    36 
    37 private:
    38     void setupFileActions();
    39     void setupEditActions();
    40     void setupFormatActions();
    41     void setupViewActions();
    42     void setupModeActions();
    43     void setupWindowActions();
    44     void setupFlagActions();
    45     void setupSettingsActions();
    46     void setupTestActions();
    47     void setupHelpActions();
    48     void setupContextMenus();
    49 	void setupLastMapsMenu();
    50 	void hideEvent (QHideEvent * );
    51 	void showEvent (QShowEvent * );
    52 	bool reallyWriteDirectory(const QString&);
    53 	QString browseDirectory(const QString&);
    54 	MapEditor* currentMapEditor() const;
    55     
    56 private slots:
    57     void newView();
    58 	void editorChanged(QWidget*);
    59 
    60     ErrorCode fileLoad(QString ,const LoadMode &);
    61     void fileLoad(const LoadMode &);
    62     void fileLoad();
    63 	void fileLoadLast(int);
    64     void fileSave(const SaveMode & );
    65     void fileSave();
    66     void fileSaveAs(const SaveMode &);
    67     void fileSaveAs();
    68     void fileImportKDEBookmarks();
    69     void fileImportFirefoxBookmarks();
    70     void fileImportMM();
    71     void fileImportDir();
    72     void fileExportXML();
    73     void fileExportXHTML();
    74     void fileExportImage(int);
    75     void fileExportASCII();
    76     void fileExportLaTeX();
    77     void fileExportKDEBookmarks();
    78     void fileExportTaskjuggler();
    79     void fileExportOOPresentation();
    80     void fileCloseMap();
    81     void filePrint();
    82     void fileExitVYM();
    83 
    84     void editUndo();	
    85     void editRedo();	
    86     void editCopy();	
    87     void editPaste();	
    88     void editCut();	
    89     void editOpenFindWindow();
    90 	void editFind(QString);
    91 	void editFindChanged();
    92 public slots:
    93 	void editOpenURL();
    94 	void editOpenURLTab();
    95 private slots:
    96 	void editURL();
    97 	void editHeading2URL();
    98 	void editBugzilla2URL();
    99 	void editFATE2URL();
   100 	void editVymLink();
   101 public slots:
   102 	void editOpenVymLink();
   103 private slots:
   104 	void editDeleteVymLink();
   105 	void editToggleHideExport();
   106 	void editMapInfo();
   107     void editMoveUp();	
   108     void editMoveDown();	
   109     void editToggleScroll();
   110     void editUnScrollAll();
   111     void editHeading();
   112     void editNewBranch();
   113     void editNewBranchHere();
   114     void editNewBranchAbove();
   115     void editNewBranchBelow();
   116     void editImportAdd();
   117     void editImportReplace();
   118     void editSaveBranch();
   119     void editRemoveBranchKeepChilds();
   120     void editRemoveChilds();
   121     void editDeleteSelection();
   122     void editUpperBranch();
   123     void editLowerBranch();
   124     void editLeftBranch();
   125     void editRightBranch();
   126     void editFirstBranch();
   127     void editLastBranch();
   128     void editLoadImage();
   129     void editSaveImage(int);
   130     void editFollowXLink (int);
   131     void editEditXLink (int);
   132 
   133     void formatSelectColor();
   134     void formatPickColor();
   135     void colorChanged(QColor);
   136     void formatColorItem();
   137     void formatColorBranch();
   138 	void formatLinkStyleLine();
   139 	void formatLinkStyleParabel();
   140 	void formatLinkStylePolyLine();
   141 	void formatLinkStylePolyParabel();
   142     void formatSelectBackColor();
   143     void formatSelectLinkColor();
   144     void formatToggleLinkColorHint();
   145 	void formatFrameNone();
   146 	void formatFrameRectangle();
   147 	void formatIncludeImagesVer();
   148 	void formatIncludeImagesHor();
   149 	void formatHideLinkUnselected();
   150 
   151     void viewZoomReset();
   152     void viewZoomIn();
   153     void viewZoomOut();
   154 
   155 	void modModeColor();
   156 	void modModeLink();
   157 
   158 public slots:
   159 	bool settingsPDF();
   160 	bool settingsURL();
   161 	void settingsToggleDelKey();
   162 
   163 	void windowToggleNoteEditor();
   164 	void windowToggleHistory();
   165 	void updateNoteFlag();
   166 
   167 private slots:
   168 	void windowNextEditor();
   169 	void windowPreviousEditor();
   170 	void windowShowNoteEditor();
   171 	void windowHideNoteEditor();
   172 
   173 	void standardFlagChanged();
   174 
   175     void testFunction();
   176 
   177     void helpDoc();
   178     void helpAbout();
   179     void helpAboutQT();
   180 
   181 private:
   182 // not needed?    QCanvas* canvas;
   183 	QTabWidget *tabWidget;
   184 	FindWindow *findWindow;
   185 	QStringList lastMaps;
   186 	int maxLastMaps;
   187 	QString lastFileDir;
   188 	QProcess *procBrowser;
   189 };
   190 
   191 
   192 #endif
   193