mainwindow.h
author insilmaril
Mon, 31 Jan 2005 09:47:43 +0000
changeset 88 9771028de303
parent 0 7a96bd401351
child 2 608f976aa7bb
child 62 85683324f94a
child 89 9db3eaa21237
permissions -rw-r--r--
fixed segfault when loading .vyp
     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 "xml.h"
    16 #include "texteditor.h"
    17 #include "mapeditor.h"
    18 #include "findwindow.h"
    19 
    20 class Main : public QMainWindow 
    21 {
    22     Q_OBJECT
    23 
    24 public:
    25     Main(QWidget* parent=0, const char* name=0, WFlags f=0);
    26     ~Main();
    27 	void loadCmdLine();
    28 	void statusMessage (const QString &);
    29 
    30 public slots:
    31     void fileNew();
    32 
    33 protected:
    34 	void closeEvent( QCloseEvent* );
    35 
    36 private:
    37     void setupFileActions();
    38     void setupEditActions();
    39     void setupFormatActions();
    40     void setupViewActions();
    41     void setupWindowActions();
    42     void setupFlagActions();
    43     void setupSettingsActions();
    44     void setupTestActions();
    45     void setupHelpActions();
    46     void setupContextMenus();
    47 	void setupLastMapsMenu();
    48 	void hideEvent (QHideEvent * );
    49 	void showEvent (QShowEvent * );
    50 	bool reallyWriteDirectory(const QString&);
    51 	QString browseDirectory(const QString&);
    52 	MapEditor* currentMapEditor() const;
    53     
    54 private slots:
    55     void newView();
    56 	void editorChanged(QWidget*);
    57 
    58     void fileLoad(QString ,const LoadMode &);
    59     void fileLoad(const LoadMode &);
    60     void fileLoad();
    61 	void fileLoadLast(int);
    62     void fileSave(const SaveMode & );
    63     void fileSave();
    64     void fileSaveAs(const SaveMode &);
    65     void fileSaveAs();
    66     void fileImportDir();
    67     void fileExportXML();
    68     void fileExportHTML();
    69     void fileExportXHTML();
    70     void fileExportImage(int);
    71     void fileExportASCII();
    72     void fileCloseMap();
    73     void filePrint();
    74     void fileExitVYM();
    75 
    76     void editUndo();	
    77     void editRedo();	
    78     void editCopy();	
    79     void editPaste();	
    80     void editCut();	
    81     void editOpenFindWindow();
    82 	void editFind(QString);
    83 	void editFindChanged();
    84 public slots:
    85 	void editOpenURL();
    86 private slots:
    87 	void editURL();
    88 	void editHeading2URL();
    89 	void editBugzilla2URL();
    90 	void editVymLink();
    91 public slots:
    92 	void editOpenVymLink();
    93 private slots:
    94 	void editDeleteVymLink();
    95 	void editMapInfo();
    96     void editMoveUp();	
    97     void editMoveDown();	
    98     void editToggleScroll();
    99     void editUnScrollAll();
   100     void editHeading();
   101     void editNewBranch();
   102     void editNewBranchAbove();
   103     void editNewBranchBelow();
   104     void editImportAdd();
   105     void editImportReplace();
   106     void editSaveBranch();
   107     void editDeleteSelection();
   108     void editUpperBranch();
   109     void editLowerBranch();
   110     void editLeftBranch();
   111     void editRightBranch();
   112     void editFirstBranch();
   113     void editLastBranch();
   114     void editLoadImage();
   115     void editSaveImage(int);
   116     void editToggleFloatExport();
   117 
   118     void formatSelectColor();
   119     void formatPickColor();
   120     void colorChanged(QColor);
   121     void formatColorItem();
   122     void formatColorBranch();
   123 	void formatLinkStyleLine();
   124 	void formatLinkStyleParabel();
   125 	void formatLinkStylePolyLine();
   126 	void formatLinkStylePolyParabel();
   127     void formatSelectBackColor();
   128     void formatSelectLinkColor();
   129     void formatToggleLinkColorHint();
   130 	void formatFrameNone();
   131 	void formatFrameRectangle();
   132 
   133     void viewZoomReset();
   134     void viewZoomIn();
   135     void viewZoomOut();
   136 
   137 public slots:
   138 	bool settingsPDF();
   139 	bool settingsURL();
   140 
   141 	void windowToggleNoteEditor();
   142 private slots:
   143 	void windowNextEditor();
   144 	void windowPreviousEditor();
   145 	void windowShowNoteEditor();
   146 	void windowHideNoteEditor();
   147 
   148 	void standardFlagChanged();
   149 
   150     void testFunction();
   151     void testShowClipboard();
   152 
   153     void helpDoc();
   154     void helpAbout();
   155     void helpAboutQT();
   156 
   157 private:
   158     QCanvas* canvas;
   159 	QTabWidget *tabWidget;
   160 	FindWindow *findWindow;
   161 	QStringList lastMaps;
   162 	int maxLastMaps;
   163 	QString lastFileDir;
   164 };
   165 
   166 
   167 #endif
   168