mainwindow.h
author insilmaril
Mon Apr 24 11:31:16 2006 +0000 (2006-04-24)
changeset 309 1f41709aa387
parent 269 4c3e9fa0093b
child 314 549bb67a8ab2
permissions -rw-r--r--
corrected wrong vymBaseDir
     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 fileImportKDEBookmarks();
    69     void fileImportMM();
    70     void fileImportDir();
    71     void fileExportXML();
    72     void fileExportXHTML();
    73     void fileExportImage(int);
    74     void fileExportASCII();
    75     void fileExportLaTeX();
    76     void fileExportKDEBookmarks();
    77     void fileExportTaskjuggler();
    78     void fileExportOOPresentation();
    79     void fileCloseMap();
    80     void filePrint();
    81     void fileExitVYM();
    82 
    83     void editUndo();	
    84     void editRedo();	
    85     void editCopy();	
    86     void editPaste();	
    87     void editCut();	
    88     void editOpenFindWindow();
    89 	void editFind(QString);
    90 	void editFindChanged();
    91 public slots:
    92 	void editOpenURL();
    93 	void editOpenURLTab();
    94 private slots:
    95 	void editURL();
    96 	void editHeading2URL();
    97 	void editBugzilla2URL();
    98 	void editFATE2URL();
    99 	void editVymLink();
   100 public slots:
   101 	void editOpenVymLink();
   102 private slots:
   103 	void editDeleteVymLink();
   104 	void editToggleHideExport();
   105 	void editMapInfo();
   106     void editMoveUp();	
   107     void editMoveDown();	
   108     void editToggleScroll();
   109     void editUnScrollAll();
   110     void editHeading();
   111     void editNewBranch();
   112     void editNewBranchHere();
   113     void editNewBranchAbove();
   114     void editNewBranchBelow();
   115     void editImportAdd();
   116     void editImportReplace();
   117     void editSaveBranch();
   118     void editRemoveBranchKeepChilds();
   119     void editRemoveChilds();
   120     void editDeleteSelection();
   121     void editUpperBranch();
   122     void editLowerBranch();
   123     void editLeftBranch();
   124     void editRightBranch();
   125     void editFirstBranch();
   126     void editLastBranch();
   127     void editLoadImage();
   128     void editSaveImage(int);
   129     void editFollowXLink (int);
   130     void editEditXLink (int);
   131 
   132     void formatSelectColor();
   133     void formatPickColor();
   134     void colorChanged(QColor);
   135     void formatColorItem();
   136     void formatColorBranch();
   137 	void formatLinkStyleLine();
   138 	void formatLinkStyleParabel();
   139 	void formatLinkStylePolyLine();
   140 	void formatLinkStylePolyParabel();
   141     void formatSelectBackColor();
   142     void formatSelectLinkColor();
   143     void formatToggleLinkColorHint();
   144 	void formatFrameNone();
   145 	void formatFrameRectangle();
   146 	void formatIncludeImagesVer();
   147 	void formatIncludeImagesHor();
   148 	void formatHideLinkUnselected();
   149 
   150     void viewZoomReset();
   151     void viewZoomIn();
   152     void viewZoomOut();
   153 
   154 	void modModeColor();
   155 	void modModeLink();
   156 
   157 public slots:
   158 	bool settingsPDF();
   159 	bool settingsURL();
   160 
   161 	void windowToggleNoteEditor();
   162 	void windowToggleHistory();
   163 	void updateNoteFlag();
   164 
   165 private slots:
   166 	void windowNextEditor();
   167 	void windowPreviousEditor();
   168 	void windowShowNoteEditor();
   169 	void windowHideNoteEditor();
   170 
   171 	void standardFlagChanged();
   172 
   173     void testFunction();
   174 
   175     void helpDoc();
   176     void helpAbout();
   177     void helpAboutQT();
   178 
   179 private:
   180 // not needed?    QCanvas* canvas;
   181 	QTabWidget *tabWidget;
   182 	FindWindow *findWindow;
   183 	QStringList lastMaps;
   184 	int maxLastMaps;
   185 	QString lastFileDir;
   186 	QProcess *procBrowser;
   187 };
   188 
   189 
   190 #endif
   191