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