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