mainwindow.h
author insilmaril
Thu, 21 Apr 2005 19:14:38 +0000
changeset 97 0b048b6bb6f4
parent 95 f688a9913724
child 98 58adc2d2ed08
permissions -rw-r--r--
xlink color, width and defaults can be saved/ restored now
     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 setupModeActions();
    42     void setupWindowActions();
    43     void setupFlagActions();
    44     void setupSettingsActions();
    45     void setupTestActions();
    46     void setupHelpActions();
    47     void setupContextMenus();
    48 	void setupLastMapsMenu();
    49 	void hideEvent (QHideEvent * );
    50 	void showEvent (QShowEvent * );
    51 	bool reallyWriteDirectory(const QString&);
    52 	QString browseDirectory(const QString&);
    53 	MapEditor* currentMapEditor() const;
    54     
    55 private slots:
    56     void newView();
    57 	void editorChanged(QWidget*);
    58 
    59     void fileLoad(QString ,const LoadMode &);
    60     void fileLoad(const LoadMode &);
    61     void fileLoad();
    62 	void fileLoadLast(int);
    63     void fileSave(const SaveMode & );
    64     void fileSave();
    65     void fileSaveAs(const SaveMode &);
    66     void fileSaveAs();
    67     void fileImportDir();
    68     void fileExportXML();
    69     void fileExportHTML();
    70     void fileExportXHTML();
    71     void fileExportImage(int);
    72     void fileExportASCII();
    73     void fileCloseMap();
    74     void filePrint();
    75     void fileExitVYM();
    76 
    77     void editUndo();	
    78     void editRedo();	
    79     void editCopy();	
    80     void editPaste();	
    81     void editCut();	
    82     void editOpenFindWindow();
    83 	void editFind(QString);
    84 	void editFindChanged();
    85 public slots:
    86 	void editOpenURL();
    87 private slots:
    88 	void editURL();
    89 	void editHeading2URL();
    90 	void editBugzilla2URL();
    91 	void editVymLink();
    92 public slots:
    93 	void editOpenVymLink();
    94 private slots:
    95 	void editDeleteVymLink();
    96 	void editMapInfo();
    97     void editMoveUp();	
    98     void editMoveDown();	
    99     void editToggleScroll();
   100     void editUnScrollAll();
   101     void editHeading();
   102     void editNewBranch();
   103     void editNewBranchAbove();
   104     void editNewBranchBelow();
   105     void editImportAdd();
   106     void editImportReplace();
   107     void editSaveBranch();
   108     void editDeleteSelection();
   109     void editUpperBranch();
   110     void editLowerBranch();
   111     void editLeftBranch();
   112     void editRightBranch();
   113     void editFirstBranch();
   114     void editLastBranch();
   115     void editLoadImage();
   116     void editSaveImage(int);
   117     void editToggleFloatExport();
   118     void editFollowXLink (int);
   119     void editEditXLink (int);
   120 
   121     void formatSelectColor();
   122     void formatPickColor();
   123     void colorChanged(QColor);
   124     void formatColorItem();
   125     void formatColorBranch();
   126 	void formatLinkStyleLine();
   127 	void formatLinkStyleParabel();
   128 	void formatLinkStylePolyLine();
   129 	void formatLinkStylePolyParabel();
   130     void formatSelectBackColor();
   131     void formatSelectLinkColor();
   132     void formatToggleLinkColorHint();
   133 	void formatFrameNone();
   134 	void formatFrameRectangle();
   135 
   136     void viewZoomReset();
   137     void viewZoomIn();
   138     void viewZoomOut();
   139 
   140 	void modModeColor();
   141 	void modModeLink();
   142 
   143 public slots:
   144 	bool settingsPDF();
   145 	bool settingsURL();
   146 
   147 	void windowToggleNoteEditor();
   148 private slots:
   149 	void windowNextEditor();
   150 	void windowPreviousEditor();
   151 	void windowShowNoteEditor();
   152 	void windowHideNoteEditor();
   153 
   154 	void standardFlagChanged();
   155 
   156     void testFunction();
   157     void testShowClipboard();
   158 
   159     void helpDoc();
   160     void helpAbout();
   161     void helpAboutQT();
   162 
   163 private:
   164     QCanvas* canvas;
   165 	QTabWidget *tabWidget;
   166 	FindWindow *findWindow;
   167 	QStringList lastMaps;
   168 	int maxLastMaps;
   169 	QString lastFileDir;
   170 };
   171 
   172 
   173 #endif
   174