6 #include "branchpropwindow.h"
8 #include "findwindow.h"
9 #include "historywindow.h"
10 #include "mapeditor.h"
11 #include "texteditor.h"
14 enum ModMode {ModModeNone,ModModeColor,ModModeCopy,ModModeXLink};
16 class Main : public QMainWindow
21 Main(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
24 void statusMessage (const QString &);
30 void closeEvent( QCloseEvent* );
33 void setupFileActions();
34 void setupEditActions();
35 void setupFormatActions();
36 void setupViewActions();
37 void setupModeActions();
38 void setupWindowActions();
39 void setupFlagActions();
40 void setupSettingsActions();
41 void setupTestActions();
42 void setupHelpActions();
43 void setupContextMenus();
44 void setupRecentMapsMenu();
45 void hideEvent (QHideEvent * );
46 void showEvent (QShowEvent * );
47 bool reallyWriteDirectory(const QString&);
48 QString browseDirectory(const QString&);
49 MapEditor* currentMapEditor() const;
52 void editorChanged(QWidget*);
54 ErrorCode fileLoad(QString ,const LoadMode &);
55 void fileLoad(const LoadMode &);
57 void fileLoadRecent();
58 void addRecentMap (const QString &);
59 void fileSave(const SaveMode & );
61 void fileSaveAs(const SaveMode &);
63 void fileImportKDEBookmarks();
64 void fileImportFirefoxBookmarks();
68 void fileExportXHTML();
69 void fileExportImage();
70 void fileExportASCII();
71 void fileExportLaTeX();
72 void fileExportKDEBookmarks();
73 void fileExportTaskjuggler();
74 void fileExportOOPresentation();
82 void gotoHistoryStep (int);
87 void editOpenFindWindow();
88 void editFind(QString);
89 void editFindChanged();
91 void openTabs(QStringList);
94 void editOpenURLTab();
96 void editOpenMultipleURLTabs();
98 void editHeading2URL();
99 void editBugzilla2URL();
101 void openVymLinks(const QStringList &);
103 void editOpenMultipleVymLinks();
104 void editHeadingFinished();
107 void editOpenVymLink();
109 void editDeleteVymLink();
110 void editToggleHideExport();
114 void editToggleScroll();
115 void editUnScrollAll();
116 void editNewBranch();
117 void editNewBranchBefore();
118 void editNewBranchAbove();
119 void editNewBranchBelow();
120 void editImportAdd();
121 void editImportReplace();
122 void editSaveBranch();
123 void editDeleteKeepChilds();
124 void editDeleteChilds();
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();
134 void editFollowXLink (QAction *);
135 void editEditXLink (QAction *);
137 void formatSelectColor();
138 void formatPickColor();
139 void colorChanged(QColor);
140 void formatColorBranch();
141 void formatColorSubtree();
142 void formatLinkStyleLine();
143 void formatLinkStyleParabel();
144 void formatLinkStylePolyLine();
145 void formatLinkStylePolyParabel();
146 void formatSelectBackColor();
147 void formatSelectBackImage();
148 void formatSelectLinkColor();
149 void formatToggleLinkColorHint();
150 void formatIncludeImagesVer();
151 void formatIncludeImagesHor();
152 void formatHideLinkUnselected();
154 void viewZoomReset();
161 void settingsToggleDelKey();
163 void windowToggleNoteEditor();
164 void windowToggleHistory();
165 void updateHistory(SimpleSettings &);
166 void windowToggleAntiAlias();
167 void windowToggleSmoothPixmap();
168 void updateNoteFlag();
169 void updateActions();
170 ModMode getModMode();
172 bool autoSelectHeading();
173 bool useFlagGroups();
176 void showPropertyDialog();
177 void windowNextEditor();
178 void windowPreviousEditor();
179 void windowShowNoteEditor();
180 void windowHideNoteEditor();
182 void standardFlagChanged();
192 QTabWidget *tabWidget;
193 FindWindow *findWindow;
194 QProcess *procBrowser;
196 QStringList imageTypes;
198 QLineEdit *lineedit; // to enter headings of branches
199 QString prevSelection;
201 HistoryWindow *historyWindow;
203 BranchPropertyWindow *branchPropertyWindow;
205 QList <QAction*> actionListBranches;
209 QMenu *recentFilesMenu;
210 enum { MaxRecentFiles = 9 };
211 QAction *recentFileActs[MaxRecentFiles];
213 QAction* actionFileSave;
214 QAction* actionFilePrint;
215 QAction* actionEditUndo;
216 QAction* actionEditRedo;
217 QAction *actionEditCopy;
218 QAction *actionEditCut;
219 QAction *actionEditPaste;
220 QAction *actionEditMoveUp;
221 QAction *actionEditMoveDown;
222 QAction *actionEditToggleScroll;
223 QAction* actionEditOpenURL;
224 QAction* actionEditOpenURLTab;
225 QAction* actionEditOpenMultipleURLTabs;
226 QAction* actionEditURL;
227 QAction* actionEditHeading2URL;
228 QAction* actionEditBugzilla2URL;
229 QAction* actionEditFATE2URL;
230 QAction *actionEditOpenVymLink;
231 QAction *actionEditOpenMultipleVymLinks;
232 QAction *actionEditVymLink;
233 QAction *actionEditDeleteVymLink;
234 QAction *actionEditToggleHideExport;
235 QAction *actionEditMapInfo;
236 QAction *actionEditHeading;
237 QAction *actionEditDelete;
238 QAction *actionEditAddBranch;
239 QAction *actionEditAddBranchBefore;
240 QAction *actionEditAddBranchAbove;
241 QAction *actionEditAddBranchBelow;
242 QAction *actionEditDeleteKeepChilds;
243 QAction *actionEditDeleteChilds;
244 QAction *actionEditImportAdd;
245 QAction *actionEditImportReplace;
246 QAction *actionEditSaveBranch;
247 QAction *actionEditSelectFirst;
248 QAction *actionEditSelectLast;
249 QAction *actionEditLoadImage;
251 QAction* actionFormatColor;
252 QAction* actionFormatPickColor;
253 QAction* actionFormatColorBranch;
254 QAction* actionFormatColorSubtree;
255 QAction* actionFormatLinkColorHint;
256 QAction* actionFormatBackColor;
257 QAction* actionFormatBackImage;
258 QAction* actionFormatLinkColor;
259 QAction *actionFormatIncludeImagesVer;
260 QAction *actionFormatIncludeImagesHor;
262 QActionGroup* actionGroupModModes;
263 QAction* actionModModeColor;
264 QAction* actionModModeXLink;
265 QAction* actionModModeCopy;
267 QActionGroup *actionGroupFormatFrameTypes;
269 QAction *actionOpenPropertyDialog;
271 QActionGroup *actionGroupFormatLinkStyles;
272 QAction *actionFormatLinkStyleLine;
273 QAction *actionFormatLinkStyleParabel;
274 QAction *actionFormatLinkStylePolyLine;
275 QAction *actionFormatLinkStylePolyParabel;
276 QAction *actionFormatHideLinkUnselected;
278 QAction *actionViewToggleNoteEditor;
279 QAction *actionViewToggleHistoryWindow;
280 QAction *actionViewToggleAntiAlias;
281 QAction *actionViewToggleSmoothPixmapTransform;
283 QAction* actionSettingsAutoEdit;
284 QAction* actionSettingsAutoSelectHeading;
285 QAction* actionSettingsAutoSelectText;
286 QAction* actionSettingsUseDelKey;
287 QAction* actionSettingsUseFlagGroups;
288 QAction* actionSettingsUseHideExport;