7 #include "findwindow.h"
9 #include "texteditor.h"
12 enum ModMode {ModModeNone,ModModeColor,ModModeCopy,ModModeXLink};
14 class Main : public QMainWindow
19 Main(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
22 void statusMessage (const QString &);
28 void closeEvent( QCloseEvent* );
31 void setupFileActions();
32 void setupEditActions();
33 void setupFormatActions();
34 void setupViewActions();
35 void setupModeActions();
36 void setupWindowActions();
37 void setupFlagActions();
38 void setupSettingsActions();
39 void setupTestActions();
40 void setupHelpActions();
41 void setupContextMenus();
42 void setupLastMapsMenu();
43 void hideEvent (QHideEvent * );
44 void showEvent (QShowEvent * );
45 bool reallyWriteDirectory(const QString&);
46 QString browseDirectory(const QString&);
47 MapEditor* currentMapEditor() const;
51 void editorChanged(QWidget*);
53 ErrorCode fileLoad(QString ,const LoadMode &);
54 void fileLoad(const LoadMode &);
56 void fileLoadLast(QAction *);
57 void fileSave(const SaveMode & );
59 void fileSaveAs(const SaveMode &);
61 void fileImportKDEBookmarks();
62 void fileImportFirefoxBookmarks();
66 void fileExportXHTML();
67 void fileExportImage();
68 void fileExportASCII();
69 void fileExportLaTeX();
70 void fileExportKDEBookmarks();
71 void fileExportTaskjuggler();
72 void fileExportOOPresentation();
82 void editOpenFindWindow();
83 void editFind(QString);
84 void editFindChanged();
86 void openTabs(QStringList);
89 void editOpenURLTab();
91 void editOpenMultipleURLTabs();
93 void editHeading2URL();
94 void editBugzilla2URL();
96 void openVymLinks(const QStringList &);
98 void editOpenMultipleVymLinks();
101 void editOpenVymLink();
103 void editDeleteVymLink();
104 void editToggleHideExport();
108 void editToggleScroll();
109 void editUnScrollAll();
110 void editNewBranch();
111 void editNewBranchHere();
112 void editNewBranchAbove();
113 void editNewBranchBelow();
114 void editImportAdd();
115 void editImportReplace();
116 void editSaveBranch();
117 void editRemoveBranchKeepChilds();
118 void editRemoveChilds();
119 void editDeleteSelection();
120 void editUpperBranch();
121 void editLowerBranch();
122 void editLeftBranch();
123 void editRightBranch();
124 void editFirstBranch();
125 void editLastBranch();
126 void editLoadImage();
127 void editSaveImage();
128 void editFollowXLink (QAction *);
129 void editEditXLink (QAction *);
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();
149 void viewZoomReset();
156 void settingsToggleDelKey();
158 void windowToggleNoteEditor();
159 void windowToggleHistory();
160 void updateNoteFlag();
161 void updateActions();
162 ModMode getModMode();
164 bool autoSelectHeading();
165 bool useFlagGroups();
168 void windowNextEditor();
169 void windowPreviousEditor();
170 void windowShowNoteEditor();
171 void windowHideNoteEditor();
173 void standardFlagChanged();
182 QTabWidget *tabWidget;
183 FindWindow *findWindow;
184 QStringList lastMaps;
186 QProcess *procBrowser;
188 QStringList imageTypes;
190 QLineEdit *lineedit; // to enter headings of branches
193 Q3PtrList <QAction> actionListBranches;
195 QAction* actionFileSave;
196 QAction* actionFilePrint;
197 QAction* actionEditUndo;
198 QAction* actionEditRedo;
199 QAction *actionEditCopy;
200 QAction *actionEditCut;
201 QAction *actionEditPaste;
202 QAction *actionEditMoveUp;
203 QAction *actionEditMoveDown;
204 QAction *actionEditToggleScroll;
205 QAction* actionEditOpenURL;
206 QAction* actionEditOpenURLTab;
207 QAction* actionEditOpenMultipleURLTabs;
208 QAction* actionEditURL;
209 QAction* actionEditHeading2URL;
210 QAction* actionEditBugzilla2URL;
211 QAction* actionEditFATE2URL;
212 QAction *actionEditOpenVymLink;
213 QAction *actionEditOpenMultipleVymLinks;
214 QAction *actionEditVymLink;
215 QAction *actionEditDeleteVymLink;
216 QAction *actionEditToggleHideExport;
217 QAction *actionEditMapInfo;
218 QAction *actionEditHeading;
219 QAction *actionEditDelete;
220 QAction *actionEditAddBranch;
221 QAction *actionEditAddBranchHere;
222 QAction *actionEditAddBranchAbove;
223 QAction *actionEditAddBranchBelow;
224 QAction *actionEditRemoveBranchKeepChilds;
225 QAction *actionEditRemoveChilds;
226 QAction *actionEditImportAdd;
227 QAction *actionEditImportReplace;
228 QAction *actionEditSaveBranch;
229 QAction *actionEditSelectFirst;
230 QAction *actionEditSelectLast;
231 QAction *actionEditLoadImage;
233 QAction* actionFormatColor;
234 QAction* actionFormatPickColor;
235 QAction* actionFormatColorBranch;
236 QAction* actionFormatColorSubtree;
237 QAction* actionFormatLinkColorHint;
238 QAction* actionFormatBackColor;
239 QAction* actionFormatLinkColor;
240 QAction *actionFormatIncludeImagesVer;
241 QAction *actionFormatIncludeImagesHor;
243 QActionGroup* actionGroupModModes;
244 QAction* actionModModeColor;
245 QAction* actionModModeXLink;
246 QAction* actionModModeCopy;
248 QActionGroup *actionGroupFormatFrameTypes;
249 QAction *actionFormatFrameNone;
250 QAction *actionFormatFrameRectangle;
252 QActionGroup *actionGroupFormatLinkStyles;
253 QAction *actionFormatLinkStyleLine;
254 QAction *actionFormatLinkStyleParabel;
255 QAction *actionFormatLinkStylePolyLine;
256 QAction *actionFormatLinkStylePolyParabel;
257 QAction *actionFormatHideLinkUnselected;
259 QAction *actionViewToggleNoteEditor;
260 QAction *actionViewToggleHistoryWindow;
262 QAction* actionSettingsAutoEdit;
263 QAction* actionSettingsAutoSelectHeading;
264 QAction* actionSettingsAutoSelectText;
265 QAction* actionSettingsUseDelKey;
266 QAction* actionSettingsUseFlagGroups;
267 QAction* actionSettingsUseHideExport;