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