6 #include "branchpropwindow.h"
8 #include "findwindow.h"
9 #include "historywindow.h"
10 #include "mapeditor.h"
11 #include "simplescripteditor.h"
12 #include "texteditor.h"
15 enum ModMode {ModModeNone,ModModeColor,ModModeCopy,ModModeXLink};
17 class Main : public QMainWindow
22 Main(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
25 void statusMessage (const QString &);
31 void closeEvent( QCloseEvent* );
34 void setupFileActions();
35 void setupEditActions();
36 void setupFormatActions();
37 void setupViewActions();
38 void setupModeActions();
39 void setupWindowActions();
40 void setupFlagActions();
41 void setupSettingsActions();
42 void setupTestActions();
43 void setupHelpActions();
44 void setupContextMenus();
45 void setupRecentMapsMenu();
46 void hideEvent (QHideEvent * );
47 void showEvent (QShowEvent * );
48 bool reallyWriteDirectory(const QString&);
49 QString browseDirectory(const QString&);
50 MapEditor* currentMapEditor() const;
53 void editorChanged(QWidget*);
55 ErrorCode fileLoad(QString ,const LoadMode &);
56 void fileLoad(const LoadMode &);
58 void fileLoadRecent();
59 void addRecentMap (const QString &);
60 void fileSave(const SaveMode & );
62 void fileSaveAs(const SaveMode &);
64 void fileImportKDEBookmarks();
65 void fileImportFirefoxBookmarks();
69 void fileExportXHTML();
70 void fileExportImage();
71 void fileExportASCII();
72 void fileExportLaTeX();
73 void fileExportKDEBookmarks();
74 void fileExportTaskjuggler();
75 void fileExportOOPresentation();
83 void gotoHistoryStep (int);
88 void editOpenFindWindow();
89 void editFind(QString);
90 void editFindChanged();
92 void openTabs(QStringList);
95 void editOpenURLTab();
97 void editOpenMultipleURLTabs();
99 void editHeading2URL();
100 void editBugzilla2URL();
102 void openVymLinks(const QStringList &);
104 void editOpenMultipleVymLinks();
105 void editHeadingFinished();
108 void editOpenVymLink();
110 void editDeleteVymLink();
111 void editToggleHideExport();
115 void editToggleScroll();
116 void editUnScrollAll();
117 void editNewBranch();
118 void editNewBranchBefore();
119 void editNewBranchAbove();
120 void editNewBranchBelow();
121 void editImportAdd();
122 void editImportReplace();
123 void editSaveBranch();
124 void editDeleteKeepChilds();
125 void editDeleteChilds();
126 void editDeleteSelection();
127 void editUpperBranch();
128 void editLowerBranch();
129 void editLeftBranch();
130 void editRightBranch();
131 void editFirstBranch();
132 void editLastBranch();
133 void editLoadImage();
134 void editSaveImage();
135 void editFollowXLink (QAction *);
136 void editEditXLink (QAction *);
138 void formatSelectColor();
139 void formatPickColor();
140 void colorChanged(QColor);
141 void formatColorBranch();
142 void formatColorSubtree();
143 void formatLinkStyleLine();
144 void formatLinkStyleParabel();
145 void formatLinkStylePolyLine();
146 void formatLinkStylePolyParabel();
147 void formatSelectBackColor();
148 void formatSelectBackImage();
149 void formatSelectLinkColor();
150 void formatToggleLinkColorHint();
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 runScript(QString);
178 void showPropertyDialog();
179 void windowNextEditor();
180 void windowPreviousEditor();
181 void windowShowNoteEditor();
182 void windowHideNoteEditor();
184 void standardFlagChanged();
194 QTabWidget *tabWidget;
195 FindWindow *findWindow;
196 QProcess *procBrowser;
198 QStringList imageTypes;
200 QLineEdit *lineedit; // to enter headings of branches
201 QString prevSelection;
203 HistoryWindow *historyWindow;
205 BranchPropertyWindow *branchPropertyWindow;
206 SimpleScriptEditor *scriptEditor;
208 QList <QAction*> actionListBranches;
212 QMenu *recentFilesMenu;
213 enum { MaxRecentFiles = 9 };
214 QAction *recentFileActs[MaxRecentFiles];
216 QAction* actionFileSave;
217 QAction* actionFilePrint;
218 QAction* actionEditUndo;
219 QAction* actionEditRedo;
220 QAction *actionEditCopy;
221 QAction *actionEditCut;
222 QAction *actionEditPaste;
223 QAction *actionEditMoveUp;
224 QAction *actionEditMoveDown;
225 QAction *actionEditToggleScroll;
226 QAction* actionEditOpenURL;
227 QAction* actionEditOpenURLTab;
228 QAction* actionEditOpenMultipleURLTabs;
229 QAction* actionEditURL;
230 QAction* actionEditHeading2URL;
231 QAction* actionEditBugzilla2URL;
232 QAction* actionEditFATE2URL;
233 QAction *actionEditOpenVymLink;
234 QAction *actionEditOpenMultipleVymLinks;
235 QAction *actionEditVymLink;
236 QAction *actionEditDeleteVymLink;
237 QAction *actionEditToggleHideExport;
238 QAction *actionEditMapInfo;
239 QAction *actionEditHeading;
240 QAction *actionEditDelete;
241 QAction *actionEditAddBranch;
242 QAction *actionEditAddBranchBefore;
243 QAction *actionEditAddBranchAbove;
244 QAction *actionEditAddBranchBelow;
245 QAction *actionEditDeleteKeepChilds;
246 QAction *actionEditDeleteChilds;
247 QAction *actionEditImportAdd;
248 QAction *actionEditImportReplace;
249 QAction *actionEditSaveBranch;
250 QAction *actionEditSelectFirst;
251 QAction *actionEditSelectLast;
252 QAction *actionEditLoadImage;
254 QAction* actionFormatColor;
255 QAction* actionFormatPickColor;
256 QAction* actionFormatColorBranch;
257 QAction* actionFormatColorSubtree;
258 QAction* actionFormatLinkColorHint;
259 QAction* actionFormatBackColor;
260 QAction* actionFormatBackImage;
261 QAction* actionFormatLinkColor;
262 QAction *actionFormatIncludeImagesVer;
263 QAction *actionFormatIncludeImagesHor;
265 QActionGroup* actionGroupModModes;
266 QAction* actionModModeColor;
267 QAction* actionModModeXLink;
268 QAction* actionModModeCopy;
270 QActionGroup *actionGroupFormatFrameTypes;
272 QAction *actionOpenPropertyDialog;
274 QActionGroup *actionGroupFormatLinkStyles;
275 QAction *actionFormatLinkStyleLine;
276 QAction *actionFormatLinkStyleParabel;
277 QAction *actionFormatLinkStylePolyLine;
278 QAction *actionFormatLinkStylePolyParabel;
279 QAction *actionFormatHideLinkUnselected;
281 QAction *actionViewToggleNoteEditor;
282 QAction *actionViewToggleHistoryWindow;
283 QAction *actionViewToggleAntiAlias;
284 QAction *actionViewToggleSmoothPixmapTransform;
286 QAction* actionSettingsAutoEdit;
287 QAction* actionSettingsAutoSelectHeading;
288 QAction* actionSettingsAutoSelectText;
289 QAction* actionSettingsUseDelKey;
290 QAction* actionSettingsUseFlagGroups;
291 QAction* actionSettingsUseHideExport;