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