mainwindow.h
author insilmaril
Tue, 05 Sep 2006 11:53:54 +0000
changeset 373 92a0fb4a5230
parent 366 e95081c21da2
child 390 0e1aeb21cb78
permissions -rw-r--r--
fixed default shortcut in findwindow
     1 #ifndef MAINWINDOW_H 
     2 #define MAINWINDOW_H
     3 
     4 #include <QAction>
     5 #include <QCursor>
     6 #include <QMainWindow>
     7 #include <QProcess>
     8 #include <QToolBar>
     9 #include <QTabWidget>
    10 //Added by qt3to4:
    11 #include <QCloseEvent>
    12 #include <QShowEvent>
    13 #include <QHideEvent>
    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, Qt::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(QAction *);
    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();
    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 private:
    93 	void openTabs(QStringList);
    94 public slots:
    95 	void editOpenURL();
    96 	void editOpenURLTab();
    97 private slots:
    98 	void editOpenMultipleURLTabs();
    99 	void editURL();
   100 	void editHeading2URL();
   101 	void editBugzilla2URL();
   102 	void editFATE2URL();
   103 	void openVymLinks(const QStringList &);
   104 	void editVymLink();
   105 	void editOpenMultipleVymLinks();
   106 public slots:
   107     void editHeading();
   108 	void editOpenVymLink();
   109 private slots:
   110 	void editDeleteVymLink();
   111 	void editToggleHideExport();
   112 	void editMapInfo();
   113     void editMoveUp();	
   114     void editMoveDown();	
   115     void editToggleScroll();
   116     void editUnScrollAll();
   117     void editNewBranch();
   118     void editNewBranchHere();
   119     void editNewBranchAbove();
   120     void editNewBranchBelow();
   121     void editImportAdd();
   122     void editImportReplace();
   123     void editSaveBranch();
   124     void editRemoveBranchKeepChilds();
   125     void editRemoveChilds();
   126     void editDeleteSelection();
   127     void editUpperBranch();
   128     void editLowerBranch();
   129     void editLeftBranch();
   130     void editRightBranch();
   131     void editFirstBranch();
   132     void editLastBranch();
   133     void editLoadImage();
   134     void editSaveImage();
   135     void editFollowXLink (QAction *);
   136     void editEditXLink (QAction *);
   137 
   138     void formatSelectColor();
   139     void formatPickColor();
   140     void colorChanged(QColor);
   141     void formatColorItem();
   142     void formatColorBranch();
   143 	void formatLinkStyleLine();
   144 	void formatLinkStyleParabel();
   145 	void formatLinkStylePolyLine();
   146 	void formatLinkStylePolyParabel();
   147     void formatSelectBackColor();
   148     void formatSelectLinkColor();
   149     void formatToggleLinkColorHint();
   150 	void formatFrameNone();
   151 	void formatFrameRectangle();
   152 	void formatIncludeImagesVer();
   153 	void formatIncludeImagesHor();
   154 	void formatHideLinkUnselected();
   155 
   156     void viewZoomReset();
   157     void viewZoomIn();
   158     void viewZoomOut();
   159 
   160 	void modModeColor();
   161 	void modModeLink();
   162 
   163 public slots:
   164 	bool settingsPDF();
   165 	bool settingsURL();
   166 	void settingsToggleDelKey();
   167 
   168 	void windowToggleNoteEditor();
   169 	void windowToggleHistory();
   170 	void updateNoteFlag();
   171 
   172 private slots:
   173 	void windowNextEditor();
   174 	void windowPreviousEditor();
   175 	void windowShowNoteEditor();
   176 	void windowHideNoteEditor();
   177 
   178 	void standardFlagChanged();
   179 
   180     void testFunction();
   181 
   182     void helpDoc();
   183     void helpAbout();
   184     void helpAboutQT();
   185 
   186 private:
   187 	QTabWidget *tabWidget;
   188 	FindWindow *findWindow;
   189 	QStringList lastMaps;
   190 	int maxLastMaps;
   191 	QProcess *procBrowser;
   192 
   193 	QStringList imageTypes;
   194 
   195 	QLineEdit *lineedit;	// to enter headings of branches
   196 	QString editSel;
   197 	
   198 };
   199 
   200 
   201 #endif
   202