7 #include "findwindow.h"
8 #include "historywindow.h"
10 #include "texteditor.h"
13 enum ModMode {ModModeNone,ModModeColor,ModModeCopy,ModModeXLink};
15 class Main : public QMainWindow
20 Main(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
23 void statusMessage (const QString &);
29 void closeEvent( QCloseEvent* );
32 void setupFileActions();
33 void setupEditActions();
34 void setupFormatActions();
35 void setupViewActions();
36 void setupModeActions();
37 void setupWindowActions();
38 void setupFlagActions();
39 void setupSettingsActions();
40 void setupTestActions();
41 void setupHelpActions();
42 void setupContextMenus();
43 void setupRecentMapsMenu();
44 void hideEvent (QHideEvent * );
45 void showEvent (QShowEvent * );
46 bool reallyWriteDirectory(const QString&);
47 QString browseDirectory(const QString&);
48 MapEditor* currentMapEditor() const;
51 void editorChanged(QWidget*);
53 ErrorCode fileLoad(QString ,const LoadMode &);
54 void fileLoad(const LoadMode &);
56 void fileLoadRecent();
57 void addRecentMap (const QString &);
58 void fileSave(const SaveMode & );
60 void fileSaveAs(const SaveMode &);
62 void fileImportKDEBookmarks();
63 void fileImportFirefoxBookmarks();
67 void fileExportXHTML();
68 void fileExportImage();
69 void fileExportASCII();
70 void fileExportLaTeX();
71 void fileExportKDEBookmarks();
72 void fileExportTaskjuggler();
73 void fileExportOOPresentation();
81 void gotoHistoryStep (int);
86 void editOpenFindWindow();
87 void editFind(QString);
88 void editFindChanged();
90 void openTabs(QStringList);
93 void editOpenURLTab();
95 void editOpenMultipleURLTabs();
97 void editHeading2URL();
98 void editBugzilla2URL();
100 void openVymLinks(const QStringList &);
102 void editOpenMultipleVymLinks();
103 void editHeadingFinished();
106 void editOpenVymLink();
108 void editDeleteVymLink();
109 void editToggleHideExport();
113 void editToggleScroll();
114 void editUnScrollAll();
115 void editNewBranch();
116 void editNewBranchBefore();
117 void editNewBranchAbove();
118 void editNewBranchBelow();
119 void editImportAdd();
120 void editImportReplace();
121 void editSaveBranch();
122 void editDeleteKeepChilds();
123 void editDeleteChilds();
124 void editDeleteSelection();
125 void editUpperBranch();
126 void editLowerBranch();
127 void editLeftBranch();
128 void editRightBranch();
129 void editFirstBranch();
130 void editLastBranch();
131 void editLoadImage();
132 void editSaveImage();
133 void editFollowXLink (QAction *);
134 void editEditXLink (QAction *);
136 void formatSelectColor();
137 void formatPickColor();
138 void colorChanged(QColor);
139 void formatColorItem();
140 void formatColorBranch();
141 void formatLinkStyleLine();
142 void formatLinkStyleParabel();
143 void formatLinkStylePolyLine();
144 void formatLinkStylePolyParabel();
145 void formatSelectBackColor();
146 void formatSelectBackImage();
147 void formatSelectLinkColor();
148 void formatToggleLinkColorHint();
149 void formatFrameNone();
150 void formatFrameRectangle();
151 void formatIncludeImagesVer();
152 void formatIncludeImagesHor();
153 void formatHideLinkUnselected();
155 void viewZoomReset();
162 void settingsToggleDelKey();
164 void windowToggleNoteEditor();
165 void windowToggleHistory();
166 void updateHistory(SimpleSettings &);
167 void windowToggleAntiAlias();
168 void windowToggleSmoothPixmap();
169 void updateNoteFlag();
170 void updateActions();
171 ModMode getModMode();
173 bool autoSelectHeading();
174 bool useFlagGroups();
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 QList <QAction*> actionListBranches;
207 QMenu *recentFilesMenu;
208 enum { MaxRecentFiles = 9 };
209 QAction *recentFileActs[MaxRecentFiles];
211 QAction* actionFileSave;
212 QAction* actionFilePrint;
213 QAction* actionEditUndo;
214 QAction* actionEditRedo;
215 QAction *actionEditCopy;
216 QAction *actionEditCut;
217 QAction *actionEditPaste;
218 QAction *actionEditMoveUp;
219 QAction *actionEditMoveDown;
220 QAction *actionEditToggleScroll;
221 QAction* actionEditOpenURL;
222 QAction* actionEditOpenURLTab;
223 QAction* actionEditOpenMultipleURLTabs;
224 QAction* actionEditURL;
225 QAction* actionEditHeading2URL;
226 QAction* actionEditBugzilla2URL;
227 QAction* actionEditFATE2URL;
228 QAction *actionEditOpenVymLink;
229 QAction *actionEditOpenMultipleVymLinks;
230 QAction *actionEditVymLink;
231 QAction *actionEditDeleteVymLink;
232 QAction *actionEditToggleHideExport;
233 QAction *actionEditMapInfo;
234 QAction *actionEditHeading;
235 QAction *actionEditDelete;
236 QAction *actionEditAddBranch;
237 QAction *actionEditAddBranchBefore;
238 QAction *actionEditAddBranchAbove;
239 QAction *actionEditAddBranchBelow;
240 QAction *actionEditDeleteKeepChilds;
241 QAction *actionEditDeleteChilds;
242 QAction *actionEditImportAdd;
243 QAction *actionEditImportReplace;
244 QAction *actionEditSaveBranch;
245 QAction *actionEditSelectFirst;
246 QAction *actionEditSelectLast;
247 QAction *actionEditLoadImage;
249 QAction* actionFormatColor;
250 QAction* actionFormatPickColor;
251 QAction* actionFormatColorBranch;
252 QAction* actionFormatColorSubtree;
253 QAction* actionFormatLinkColorHint;
254 QAction* actionFormatBackColor;
255 QAction* actionFormatBackImage;
256 QAction* actionFormatLinkColor;
257 QAction *actionFormatIncludeImagesVer;
258 QAction *actionFormatIncludeImagesHor;
260 QActionGroup* actionGroupModModes;
261 QAction* actionModModeColor;
262 QAction* actionModModeXLink;
263 QAction* actionModModeCopy;
265 QActionGroup *actionGroupFormatFrameTypes;
266 QAction *actionFormatFrameNone;
267 QAction *actionFormatFrameRectangle;
269 QActionGroup *actionGroupFormatLinkStyles;
270 QAction *actionFormatLinkStyleLine;
271 QAction *actionFormatLinkStyleParabel;
272 QAction *actionFormatLinkStylePolyLine;
273 QAction *actionFormatLinkStylePolyParabel;
274 QAction *actionFormatHideLinkUnselected;
276 QAction *actionViewToggleNoteEditor;
277 QAction *actionViewToggleHistoryWindow;
278 QAction *actionViewToggleAntiAlias;
279 QAction *actionViewToggleSmoothPixmapTransform;
281 QAction* actionSettingsAutoEdit;
282 QAction* actionSettingsAutoSelectHeading;
283 QAction* actionSettingsAutoSelectText;
284 QAction* actionSettingsUseDelKey;
285 QAction* actionSettingsUseFlagGroups;
286 QAction* actionSettingsUseHideExport;