mainwindow.h
author insilmaril
Mon, 10 Oct 2005 11:20:25 +0000
changeset 166 325958acb69b
parent 163 30b22f7bd009
child 175 728f51b71e71
permissions -rw-r--r--
New mechanism for clipboard
     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 fileExportLaTeX();
    74     void fileExportOOPresentation();
    75     void fileCloseMap();
    76     void filePrint();
    77     void fileExitVYM();
    78 
    79     void editUndo();	
    80     void editRedo();	
    81     void editCopy();	
    82     void editPaste();	
    83     void editCut();	
    84     void editOpenFindWindow();
    85 	void editFind(QString);
    86 	void editFindChanged();
    87 public slots:
    88 	void editOpenURL();
    89 private slots:
    90 	void editURL();
    91 	void editHeading2URL();
    92 	void editBugzilla2URL();
    93 	void editVymLink();
    94 public slots:
    95 	void editOpenVymLink();
    96 private slots:
    97 	void editDeleteVymLink();
    98 	void editMapInfo();
    99     void editMoveUp();	
   100     void editMoveDown();	
   101     void editToggleScroll();
   102     void editUnScrollAll();
   103     void editHeading();
   104     void editNewBranch();
   105     void editNewBranchHere();
   106     void editNewBranchAbove();
   107     void editNewBranchBelow();
   108     void editImportAdd();
   109     void editImportReplace();
   110     void editSaveBranch();
   111     void editRemoveBranchHere();
   112     void editRemoveChilds();
   113     void editDeleteSelection();
   114     void editUpperBranch();
   115     void editLowerBranch();
   116     void editLeftBranch();
   117     void editRightBranch();
   118     void editFirstBranch();
   119     void editLastBranch();
   120     void editLoadImage();
   121     void editSaveImage(int);
   122     void editToggleFloatExport();
   123     void editFollowXLink (int);
   124     void editEditXLink (int);
   125 
   126     void formatSelectColor();
   127     void formatPickColor();
   128     void colorChanged(QColor);
   129     void formatColorItem();
   130     void formatColorBranch();
   131 	void formatLinkStyleLine();
   132 	void formatLinkStyleParabel();
   133 	void formatLinkStylePolyLine();
   134 	void formatLinkStylePolyParabel();
   135     void formatSelectBackColor();
   136     void formatSelectLinkColor();
   137     void formatToggleLinkColorHint();
   138 	void formatFrameNone();
   139 	void formatFrameRectangle();
   140 	void formatHideLinkUnselected();
   141 
   142     void viewZoomReset();
   143     void viewZoomIn();
   144     void viewZoomOut();
   145 
   146 	void modModeColor();
   147 	void modModeLink();
   148 
   149 public slots:
   150 	bool settingsPDF();
   151 	bool settingsURL();
   152 
   153 	void windowToggleNoteEditor();
   154 	void updateNoteFlag();
   155 
   156 private slots:
   157 	void windowNextEditor();
   158 	void windowPreviousEditor();
   159 	void windowShowNoteEditor();
   160 	void windowHideNoteEditor();
   161 
   162 	void standardFlagChanged();
   163 
   164     void testFunction();
   165 
   166     void helpDoc();
   167     void helpAbout();
   168     void helpAboutQT();
   169 
   170 private:
   171     QCanvas* canvas;
   172 	QTabWidget *tabWidget;
   173 	FindWindow *findWindow;
   174 	QStringList lastMaps;
   175 	int maxLastMaps;
   176 	QString lastFileDir;
   177 };
   178 
   179 
   180 #endif
   181