mainwindow.h
author insilmaril
Tue, 15 Aug 2006 12:01:14 +0000
branchqt4-port
changeset 15 699f28529079
parent 13 9aadd0f58300
child 16 41c3d7f9f532
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 "xml.h"
    25 
    26 class Main : public QMainWindow 
    27 {
    28     Q_OBJECT
    29 
    30 public:
    31     Main(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
    32     ~Main();
    33 	void loadCmdLine();
    34 	void statusMessage (const QString &);
    35 
    36 public slots:
    37     void fileNew();
    38 
    39 protected:
    40 	void closeEvent( QCloseEvent* );
    41 
    42 private:
    43     void setupFileActions();
    44     void setupEditActions();
    45     void setupFormatActions();
    46     void setupViewActions();
    47     void setupModeActions();
    48     void setupWindowActions();
    49     void setupFlagActions();
    50     void setupSettingsActions();
    51     void setupTestActions();
    52     void setupHelpActions();
    53     void setupContextMenus();
    54 	void setupLastMapsMenu();
    55 	void hideEvent (QHideEvent * );
    56 	void showEvent (QShowEvent * );
    57 	bool reallyWriteDirectory(const QString&);
    58 	QString browseDirectory(const QString&);
    59 	MapEditor* currentMapEditor() const;
    60     
    61 private slots:
    62     void newView();
    63 	void editorChanged(QWidget*);
    64 
    65     ErrorCode fileLoad(QString ,const LoadMode &);
    66     void fileLoad(const LoadMode &);
    67     void fileLoad();
    68 	void fileLoadLast(QAction *);
    69     void fileSave(const SaveMode & );
    70     void fileSave();
    71     void fileSaveAs(const SaveMode &);
    72     void fileSaveAs();
    73     void fileImportKDEBookmarks();
    74     void fileImportFirefoxBookmarks();
    75     void fileImportMM();
    76     void fileImportDir();
    77     void fileExportXML();
    78     void fileExportXHTML();
    79     void fileExportImage();
    80     void fileExportASCII();
    81     void fileExportLaTeX();
    82     void fileExportKDEBookmarks();
    83     void fileExportTaskjuggler();
    84     void fileExportOOPresentation();
    85     void fileCloseMap();
    86     void filePrint();
    87     void fileExitVYM();
    88 
    89     void editUndo();	
    90     void editRedo();	
    91     void editCopy();	
    92     void editPaste();	
    93     void editCut();	
    94     void editOpenFindWindow();
    95 	void editFind(QString);
    96 	void editFindChanged();
    97 public slots:
    98 	void editOpenURL();
    99 	void editOpenURLTab();
   100 private slots:
   101 	void editURL();
   102 	void editHeading2URL();
   103 	void editBugzilla2URL();
   104 	void editFATE2URL();
   105 	void editVymLink();
   106 public slots:
   107 	void editOpenVymLink();
   108 private slots:
   109 	void editDeleteVymLink();
   110 	void editToggleHideExport();
   111 	void editMapInfo();
   112     void editMoveUp();	
   113     void editMoveDown();	
   114     void editToggleScroll();
   115     void editUnScrollAll();
   116     void editHeading();
   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 	Q3Process *procBrowser;
   192 
   193 	QStringList imageTypes;
   194 };
   195 
   196 
   197 #endif
   198