mainwindow.h
author insilmaril
Wed, 08 Mar 2006 12:59:08 +0000
changeset 236 22a885118d50
parent 228 654ad4b03c5a
child 243 fad762341d2d
permissions -rw-r--r--
Fixed Image Preview in FileDialog
     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 fileExportHTML();
    73     void fileExportXHTML();
    74     void fileExportImage(int);
    75     void fileExportASCII();
    76     void fileExportLaTeX();
    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 private slots:
    94 	void editURL();
    95 	void editHeading2URL();
    96 	void editBugzilla2URL();
    97 	void editFATE2URL();
    98 	void editVymLink();
    99 public slots:
   100 	void editOpenVymLink();
   101 private slots:
   102 	void editDeleteVymLink();
   103 	void editMapInfo();
   104     void editMoveUp();	
   105     void editMoveDown();	
   106     void editToggleScroll();
   107     void editUnScrollAll();
   108     void editHeading();
   109     void editNewBranch();
   110     void editNewBranchHere();
   111     void editNewBranchAbove();
   112     void editNewBranchBelow();
   113     void editImportAdd();
   114     void editImportReplace();
   115     void editSaveBranch();
   116     void editRemoveBranchHere();
   117     void editRemoveChilds();
   118     void editDeleteSelection();
   119     void editUpperBranch();
   120     void editLowerBranch();
   121     void editLeftBranch();
   122     void editRightBranch();
   123     void editFirstBranch();
   124     void editLastBranch();
   125     void editLoadImage();
   126     void editSaveImage(int);
   127     void editToggleFloatExport();
   128     void editFollowXLink (int);
   129     void editEditXLink (int);
   130 
   131     void formatSelectColor();
   132     void formatPickColor();
   133     void colorChanged(QColor);
   134     void formatColorItem();
   135     void formatColorBranch();
   136 	void formatLinkStyleLine();
   137 	void formatLinkStyleParabel();
   138 	void formatLinkStylePolyLine();
   139 	void formatLinkStylePolyParabel();
   140     void formatSelectBackColor();
   141     void formatSelectLinkColor();
   142     void formatToggleLinkColorHint();
   143 	void formatFrameNone();
   144 	void formatFrameRectangle();
   145 	void formatIncludeImagesVer();
   146 	void formatIncludeImagesHor();
   147 	void formatHideLinkUnselected();
   148 
   149     void viewZoomReset();
   150     void viewZoomIn();
   151     void viewZoomOut();
   152 
   153 	void modModeColor();
   154 	void modModeLink();
   155 
   156 public slots:
   157 	bool settingsPDF();
   158 	bool settingsURL();
   159 
   160 	void windowToggleNoteEditor();
   161 	void updateNoteFlag();
   162 
   163 private slots:
   164 	void windowNextEditor();
   165 	void windowPreviousEditor();
   166 	void windowShowNoteEditor();
   167 	void windowHideNoteEditor();
   168 
   169 	void standardFlagChanged();
   170 
   171     void testFunction();
   172 
   173     void helpDoc();
   174     void helpAbout();
   175     void helpAboutQT();
   176 
   177 private:
   178     QCanvas* canvas;
   179 	QTabWidget *tabWidget;
   180 	FindWindow *findWindow;
   181 	QStringList lastMaps;
   182 	int maxLastMaps;
   183 	QString lastFileDir;
   184 };
   185 
   186 
   187 #endif
   188