mainwindow.h
author insilmaril
Fri Jul 08 07:24:42 2005 +0000 (2005-07-08)
changeset 115 768eba98451b
parent 95 f688a9913724
child 160 72cc3873306a
permissions -rw-r--r--
changes for 1.6.9
     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 editNewBranchHere();
   104     void editNewBranchAbove();
   105     void editNewBranchBelow();
   106     void editImportAdd();
   107     void editImportReplace();
   108     void editSaveBranch();
   109     void editRemoveBranchHere();
   110     void editRemoveChilds();
   111     void editDeleteSelection();
   112     void editUpperBranch();
   113     void editLowerBranch();
   114     void editLeftBranch();
   115     void editRightBranch();
   116     void editFirstBranch();
   117     void editLastBranch();
   118     void editLoadImage();
   119     void editSaveImage(int);
   120     void editToggleFloatExport();
   121     void editFollowXLink (int);
   122     void editEditXLink (int);
   123 
   124     void formatSelectColor();
   125     void formatPickColor();
   126     void colorChanged(QColor);
   127     void formatColorItem();
   128     void formatColorBranch();
   129 	void formatLinkStyleLine();
   130 	void formatLinkStyleParabel();
   131 	void formatLinkStylePolyLine();
   132 	void formatLinkStylePolyParabel();
   133     void formatSelectBackColor();
   134     void formatSelectLinkColor();
   135     void formatToggleLinkColorHint();
   136 	void formatFrameNone();
   137 	void formatFrameRectangle();
   138 
   139     void viewZoomReset();
   140     void viewZoomIn();
   141     void viewZoomOut();
   142 
   143 	void modModeColor();
   144 	void modModeLink();
   145 
   146 public slots:
   147 	bool settingsPDF();
   148 	bool settingsURL();
   149 
   150 	void windowToggleNoteEditor();
   151 private slots:
   152 	void windowNextEditor();
   153 	void windowPreviousEditor();
   154 	void windowShowNoteEditor();
   155 	void windowHideNoteEditor();
   156 
   157 	void standardFlagChanged();
   158 
   159     void testFunction();
   160     void testShowClipboard();
   161 
   162     void helpDoc();
   163     void helpAbout();
   164     void helpAboutQT();
   165 
   166 private:
   167     QCanvas* canvas;
   168 	QTabWidget *tabWidget;
   169 	FindWindow *findWindow;
   170 	QStringList lastMaps;
   171 	int maxLastMaps;
   172 	QString lastFileDir;
   173 };
   174 
   175 
   176 #endif
   177