historywindow moved to mainwindow. Started to get rid of Q3PtrList finally
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 formatSelectLinkColor();
147 void formatToggleLinkColorHint();
148 void formatFrameNone();
149 void formatFrameRectangle();
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 updateNoteFlag();
167 void updateActions();
168 ModMode getModMode();
170 bool autoSelectHeading();
171 bool useFlagGroups();
174 void windowNextEditor();
175 void windowPreviousEditor();
176 void windowShowNoteEditor();
177 void windowHideNoteEditor();
179 void standardFlagChanged();
189 QTabWidget *tabWidget;
190 FindWindow *findWindow;
191 QProcess *procBrowser;
193 QStringList imageTypes;
195 QLineEdit *lineedit; // to enter headings of branches
196 QString prevSelection;
198 HistoryWindow *historyWindow;
200 Q3PtrList <QAction> actionListBranches;
204 QMenu *recentFilesMenu;
205 enum { MaxRecentFiles = 9 };
206 QAction *recentFileActs[MaxRecentFiles];
208 QAction* actionFileSave;
209 QAction* actionFilePrint;
210 QAction* actionEditUndo;
211 QAction* actionEditRedo;
212 QAction *actionEditCopy;
213 QAction *actionEditCut;
214 QAction *actionEditPaste;
215 QAction *actionEditMoveUp;
216 QAction *actionEditMoveDown;
217 QAction *actionEditToggleScroll;
218 QAction* actionEditOpenURL;
219 QAction* actionEditOpenURLTab;
220 QAction* actionEditOpenMultipleURLTabs;
221 QAction* actionEditURL;
222 QAction* actionEditHeading2URL;
223 QAction* actionEditBugzilla2URL;
224 QAction* actionEditFATE2URL;
225 QAction *actionEditOpenVymLink;
226 QAction *actionEditOpenMultipleVymLinks;
227 QAction *actionEditVymLink;
228 QAction *actionEditDeleteVymLink;
229 QAction *actionEditToggleHideExport;
230 QAction *actionEditMapInfo;
231 QAction *actionEditHeading;
232 QAction *actionEditDelete;
233 QAction *actionEditAddBranch;
234 QAction *actionEditAddBranchBefore;
235 QAction *actionEditAddBranchAbove;
236 QAction *actionEditAddBranchBelow;
237 QAction *actionEditDeleteKeepChilds;
238 QAction *actionEditDeleteChilds;
239 QAction *actionEditImportAdd;
240 QAction *actionEditImportReplace;
241 QAction *actionEditSaveBranch;
242 QAction *actionEditSelectFirst;
243 QAction *actionEditSelectLast;
244 QAction *actionEditLoadImage;
246 QAction* actionFormatColor;
247 QAction* actionFormatPickColor;
248 QAction* actionFormatColorBranch;
249 QAction* actionFormatColorSubtree;
250 QAction* actionFormatLinkColorHint;
251 QAction* actionFormatBackColor;
252 QAction* actionFormatLinkColor;
253 QAction *actionFormatIncludeImagesVer;
254 QAction *actionFormatIncludeImagesHor;
256 QActionGroup* actionGroupModModes;
257 QAction* actionModModeColor;
258 QAction* actionModModeXLink;
259 QAction* actionModModeCopy;
261 QActionGroup *actionGroupFormatFrameTypes;
262 QAction *actionFormatFrameNone;
263 QAction *actionFormatFrameRectangle;
265 QActionGroup *actionGroupFormatLinkStyles;
266 QAction *actionFormatLinkStyleLine;
267 QAction *actionFormatLinkStyleParabel;
268 QAction *actionFormatLinkStylePolyLine;
269 QAction *actionFormatLinkStylePolyParabel;
270 QAction *actionFormatHideLinkUnselected;
272 QAction *actionViewToggleNoteEditor;
273 QAction *actionViewToggleHistoryWindow;
275 QAction* actionSettingsAutoEdit;
276 QAction* actionSettingsAutoSelectHeading;
277 QAction* actionSettingsAutoSelectText;
278 QAction* actionSettingsUseDelKey;
279 QAction* actionSettingsUseFlagGroups;
280 QAction* actionSettingsUseHideExport;