insilmaril@0
|
1 |
#ifndef MAINWINDOW_H
|
insilmaril@0
|
2 |
#define MAINWINDOW_H
|
insilmaril@0
|
3 |
|
insilmaril@366
|
4 |
#include <QMainWindow>
|
insilmaril@0
|
5 |
|
insilmaril@421
|
6 |
#include "branchpropwindow.h"
|
insilmaril@175
|
7 |
#include "file.h"
|
insilmaril@175
|
8 |
#include "findwindow.h"
|
insilmaril@404
|
9 |
#include "historywindow.h"
|
insilmaril@175
|
10 |
#include "mapeditor.h"
|
insilmaril@432
|
11 |
#include "simplescripteditor.h"
|
insilmaril@175
|
12 |
#include "texteditor.h"
|
insilmaril@600
|
13 |
|
insilmaril@0
|
14 |
|
insilmaril@0
|
15 |
class Main : public QMainWindow
|
insilmaril@0
|
16 |
{
|
insilmaril@0
|
17 |
Q_OBJECT
|
insilmaril@0
|
18 |
|
insilmaril@0
|
19 |
public:
|
insilmaril@473
|
20 |
/*! Modifier modes are used when CTRL together with a mouse button is pressed */
|
insilmaril@473
|
21 |
enum ModMode {
|
insilmaril@473
|
22 |
ModModeNone, //!< Unused
|
insilmaril@473
|
23 |
ModModeColor, //!< Pick color from object
|
insilmaril@473
|
24 |
ModModeCopy, //!< Copy object
|
insilmaril@473
|
25 |
ModModeXLink //!< Create a XLink (XLinkObj) from selected object
|
insilmaril@473
|
26 |
};
|
insilmaril@473
|
27 |
|
insilmaril@366
|
28 |
Main(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
|
insilmaril@0
|
29 |
~Main();
|
insilmaril@0
|
30 |
void loadCmdLine();
|
insilmaril@0
|
31 |
void statusMessage (const QString &);
|
insilmaril@0
|
32 |
|
insilmaril@0
|
33 |
public slots:
|
insilmaril@0
|
34 |
void fileNew();
|
insilmaril@491
|
35 |
void fileNewCopy();
|
insilmaril@0
|
36 |
|
insilmaril@0
|
37 |
protected:
|
insilmaril@0
|
38 |
void closeEvent( QCloseEvent* );
|
insilmaril@0
|
39 |
|
insilmaril@0
|
40 |
private:
|
insilmaril@0
|
41 |
void setupFileActions();
|
insilmaril@0
|
42 |
void setupEditActions();
|
insilmaril@0
|
43 |
void setupFormatActions();
|
insilmaril@0
|
44 |
void setupViewActions();
|
insilmaril@89
|
45 |
void setupModeActions();
|
insilmaril@0
|
46 |
void setupWindowActions();
|
insilmaril@582
|
47 |
void setupFlag(FlagObj *fo, QToolBar *tb, bool aw, const QString &name, const QString &tooltip);
|
insilmaril@0
|
48 |
void setupFlagActions();
|
insilmaril@528
|
49 |
void setupNetworkActions();
|
insilmaril@0
|
50 |
void setupSettingsActions();
|
insilmaril@0
|
51 |
void setupTestActions();
|
insilmaril@0
|
52 |
void setupHelpActions();
|
insilmaril@0
|
53 |
void setupContextMenus();
|
insilmaril@401
|
54 |
void setupRecentMapsMenu();
|
insilmaril@445
|
55 |
void setupMacros();
|
insilmaril@0
|
56 |
void hideEvent (QHideEvent * );
|
insilmaril@0
|
57 |
void showEvent (QShowEvent * );
|
insilmaril@0
|
58 |
MapEditor* currentMapEditor() const;
|
insilmaril@0
|
59 |
|
insilmaril@0
|
60 |
private slots:
|
insilmaril@0
|
61 |
void editorChanged(QWidget*);
|
insilmaril@0
|
62 |
|
insilmaril@571
|
63 |
ErrorCode fileLoad(QString ,const LoadMode &, const FileType & ftype=VymMap);
|
insilmaril@0
|
64 |
void fileLoad(const LoadMode &);
|
insilmaril@0
|
65 |
void fileLoad();
|
insilmaril@401
|
66 |
void fileLoadRecent();
|
insilmaril@401
|
67 |
void addRecentMap (const QString &);
|
insilmaril@473
|
68 |
void fileSave(MapEditor*, const SaveMode & );
|
insilmaril@0
|
69 |
void fileSave();
|
insilmaril@473
|
70 |
public slots:
|
insilmaril@473
|
71 |
void fileSave(MapEditor *); // autosave from MapEditor
|
insilmaril@473
|
72 |
private slots:
|
insilmaril@0
|
73 |
void fileSaveAs(const SaveMode &);
|
insilmaril@0
|
74 |
void fileSaveAs();
|
insilmaril@215
|
75 |
void fileImportKDEBookmarks();
|
insilmaril@314
|
76 |
void fileImportFirefoxBookmarks();
|
insilmaril@571
|
77 |
void fileImportFreemind();
|
insilmaril@215
|
78 |
void fileImportMM();
|
insilmaril@0
|
79 |
void fileImportDir();
|
insilmaril@0
|
80 |
void fileExportXML();
|
insilmaril@0
|
81 |
void fileExportXHTML();
|
insilmaril@366
|
82 |
void fileExportImage();
|
insilmaril@0
|
83 |
void fileExportASCII();
|
insilmaril@497
|
84 |
void fileExportCSV();
|
insilmaril@163
|
85 |
void fileExportLaTeX();
|
insilmaril@243
|
86 |
void fileExportKDEBookmarks();
|
insilmaril@228
|
87 |
void fileExportTaskjuggler();
|
insilmaril@163
|
88 |
void fileExportOOPresentation();
|
insilmaril@0
|
89 |
void fileCloseMap();
|
insilmaril@0
|
90 |
void filePrint();
|
insilmaril@0
|
91 |
void fileExitVYM();
|
insilmaril@0
|
92 |
|
insilmaril@404
|
93 |
public slots:
|
insilmaril@0
|
94 |
void editUndo();
|
insilmaril@0
|
95 |
void editRedo();
|
insilmaril@404
|
96 |
void gotoHistoryStep (int);
|
insilmaril@404
|
97 |
private slots:
|
insilmaril@0
|
98 |
void editCopy();
|
insilmaril@0
|
99 |
void editPaste();
|
insilmaril@0
|
100 |
void editCut();
|
insilmaril@0
|
101 |
void editOpenFindWindow();
|
insilmaril@0
|
102 |
void editFind(QString);
|
insilmaril@0
|
103 |
void editFindChanged();
|
insilmaril@366
|
104 |
private:
|
insilmaril@366
|
105 |
void openTabs(QStringList);
|
insilmaril@0
|
106 |
public slots:
|
insilmaril@0
|
107 |
void editOpenURL();
|
insilmaril@266
|
108 |
void editOpenURLTab();
|
insilmaril@0
|
109 |
private slots:
|
insilmaril@366
|
110 |
void editOpenMultipleURLTabs();
|
insilmaril@0
|
111 |
void editURL();
|
insilmaril@528
|
112 |
void editLocalURL();
|
insilmaril@0
|
113 |
void editHeading2URL();
|
insilmaril@0
|
114 |
void editBugzilla2URL();
|
insilmaril@175
|
115 |
void editFATE2URL();
|
insilmaril@366
|
116 |
void openVymLinks(const QStringList &);
|
insilmaril@0
|
117 |
void editVymLink();
|
insilmaril@366
|
118 |
void editOpenMultipleVymLinks();
|
insilmaril@394
|
119 |
void editHeadingFinished();
|
insilmaril@616
|
120 |
void editAttributeFinished();
|
insilmaril@0
|
121 |
public slots:
|
insilmaril@366
|
122 |
void editHeading();
|
insilmaril@616
|
123 |
void editAttribute();
|
insilmaril@0
|
124 |
void editOpenVymLink();
|
insilmaril@0
|
125 |
private slots:
|
insilmaril@0
|
126 |
void editDeleteVymLink();
|
insilmaril@243
|
127 |
void editToggleHideExport();
|
insilmaril@0
|
128 |
void editMapInfo();
|
insilmaril@0
|
129 |
void editMoveUp();
|
insilmaril@0
|
130 |
void editMoveDown();
|
insilmaril@608
|
131 |
void editSortChildren();
|
insilmaril@0
|
132 |
void editToggleScroll();
|
insilmaril@473
|
133 |
void editUnscrollChilds();
|
insilmaril@0
|
134 |
void editNewBranch();
|
insilmaril@394
|
135 |
void editNewBranchBefore();
|
insilmaril@0
|
136 |
void editNewBranchAbove();
|
insilmaril@0
|
137 |
void editNewBranchBelow();
|
insilmaril@0
|
138 |
void editImportAdd();
|
insilmaril@0
|
139 |
void editImportReplace();
|
insilmaril@0
|
140 |
void editSaveBranch();
|
insilmaril@395
|
141 |
void editDeleteKeepChilds();
|
insilmaril@395
|
142 |
void editDeleteChilds();
|
insilmaril@0
|
143 |
void editDeleteSelection();
|
insilmaril@0
|
144 |
void editUpperBranch();
|
insilmaril@0
|
145 |
void editLowerBranch();
|
insilmaril@0
|
146 |
void editLeftBranch();
|
insilmaril@0
|
147 |
void editRightBranch();
|
insilmaril@0
|
148 |
void editFirstBranch();
|
insilmaril@0
|
149 |
void editLastBranch();
|
insilmaril@0
|
150 |
void editLoadImage();
|
insilmaril@366
|
151 |
void editSaveImage();
|
insilmaril@366
|
152 |
void editFollowXLink (QAction *);
|
insilmaril@366
|
153 |
void editEditXLink (QAction *);
|
insilmaril@0
|
154 |
|
insilmaril@0
|
155 |
void formatSelectColor();
|
insilmaril@0
|
156 |
void formatPickColor();
|
insilmaril@0
|
157 |
void colorChanged(QColor);
|
insilmaril@0
|
158 |
void formatColorBranch();
|
insilmaril@417
|
159 |
void formatColorSubtree();
|
insilmaril@0
|
160 |
void formatLinkStyleLine();
|
insilmaril@0
|
161 |
void formatLinkStyleParabel();
|
insilmaril@0
|
162 |
void formatLinkStylePolyLine();
|
insilmaril@0
|
163 |
void formatLinkStylePolyParabel();
|
insilmaril@0
|
164 |
void formatSelectBackColor();
|
insilmaril@408
|
165 |
void formatSelectBackImage();
|
insilmaril@0
|
166 |
void formatSelectLinkColor();
|
insilmaril@442
|
167 |
void formatSelectSelectionColor();
|
insilmaril@0
|
168 |
void formatToggleLinkColorHint();
|
insilmaril@160
|
169 |
void formatHideLinkUnselected();
|
insilmaril@0
|
170 |
|
insilmaril@0
|
171 |
void viewZoomReset();
|
insilmaril@0
|
172 |
void viewZoomIn();
|
insilmaril@0
|
173 |
void viewZoomOut();
|
insilmaril@526
|
174 |
void viewCenter();
|
insilmaril@0
|
175 |
|
insilmaril@0
|
176 |
public slots:
|
insilmaril@528
|
177 |
void networkStartServer();
|
insilmaril@528
|
178 |
void networkConnect();
|
insilmaril@0
|
179 |
bool settingsPDF();
|
insilmaril@0
|
180 |
bool settingsURL();
|
insilmaril@450
|
181 |
void settingsMacroDir();
|
insilmaril@328
|
182 |
void settingsToggleDelKey();
|
insilmaril@473
|
183 |
void settingsUndoLevels();
|
insilmaril@473
|
184 |
void settingsAutosaveToggle();
|
insilmaril@473
|
185 |
void settingsAutosaveTime();
|
insilmaril@0
|
186 |
|
insilmaril@0
|
187 |
void windowToggleNoteEditor();
|
insilmaril@294
|
188 |
void windowToggleHistory();
|
insilmaril@473
|
189 |
void windowToggleProperty();
|
insilmaril@404
|
190 |
void updateHistory(SimpleSettings &);
|
insilmaril@408
|
191 |
void windowToggleAntiAlias();
|
insilmaril@408
|
192 |
void windowToggleSmoothPixmap();
|
insilmaril@160
|
193 |
void updateNoteFlag();
|
insilmaril@442
|
194 |
void updateSatellites(MapEditor *);
|
insilmaril@390
|
195 |
void updateActions();
|
insilmaril@390
|
196 |
ModMode getModMode();
|
insilmaril@537
|
197 |
bool autoEditNewBranch();
|
insilmaril@537
|
198 |
bool autoSelectNewBranch();
|
insilmaril@390
|
199 |
bool useFlagGroups();
|
insilmaril@434
|
200 |
void setScript(const QString &);
|
insilmaril@434
|
201 |
void runScript(const QString &);
|
insilmaril@514
|
202 |
void runScriptEverywhere (const QString &);
|
insilmaril@160
|
203 |
|
insilmaril@0
|
204 |
private slots:
|
insilmaril@0
|
205 |
void windowNextEditor();
|
insilmaril@0
|
206 |
void windowPreviousEditor();
|
insilmaril@0
|
207 |
void windowShowNoteEditor();
|
insilmaril@0
|
208 |
void windowHideNoteEditor();
|
insilmaril@0
|
209 |
|
insilmaril@0
|
210 |
void standardFlagChanged();
|
insilmaril@0
|
211 |
|
insilmaril@527
|
212 |
void testFunction1();
|
insilmaril@527
|
213 |
void testFunction2();
|
insilmaril@393
|
214 |
void testCommand();
|
insilmaril@0
|
215 |
|
insilmaril@0
|
216 |
void helpDoc();
|
insilmaril@505
|
217 |
void helpDemo();
|
insilmaril@0
|
218 |
void helpAbout();
|
insilmaril@0
|
219 |
void helpAboutQT();
|
insilmaril@0
|
220 |
|
insilmaril@445
|
221 |
void callMacro ();
|
insilmaril@473
|
222 |
|
insilmaril@0
|
223 |
private:
|
insilmaril@0
|
224 |
QTabWidget *tabWidget;
|
insilmaril@0
|
225 |
FindWindow *findWindow;
|
insilmaril@266
|
226 |
QProcess *procBrowser;
|
insilmaril@366
|
227 |
|
insilmaril@366
|
228 |
QStringList imageTypes;
|
insilmaril@366
|
229 |
|
insilmaril@366
|
230 |
QLineEdit *lineedit; // to enter headings of branches
|
insilmaril@394
|
231 |
QString prevSelection;
|
insilmaril@390
|
232 |
|
insilmaril@404
|
233 |
HistoryWindow *historyWindow;
|
insilmaril@404
|
234 |
|
insilmaril@421
|
235 |
BranchPropertyWindow *branchPropertyWindow;
|
insilmaril@432
|
236 |
SimpleScriptEditor *scriptEditor;
|
insilmaril@421
|
237 |
|
insilmaril@406
|
238 |
QList <QAction*> actionListBranches;
|
insilmaril@390
|
239 |
|
insilmaril@395
|
240 |
QColor currentColor;
|
insilmaril@395
|
241 |
|
insilmaril@600
|
242 |
int xLinkMenuWidth;
|
insilmaril@600
|
243 |
|
insilmaril@401
|
244 |
QMenu *recentFilesMenu;
|
insilmaril@401
|
245 |
enum { MaxRecentFiles = 9 };
|
insilmaril@445
|
246 |
QAction *recentFileActions[MaxRecentFiles];
|
insilmaril@445
|
247 |
|
insilmaril@445
|
248 |
QAction *macroActions[12];
|
insilmaril@445
|
249 |
QStringList macro;
|
insilmaril@401
|
250 |
|
insilmaril@390
|
251 |
QAction* actionFileSave;
|
insilmaril@390
|
252 |
QAction* actionFilePrint;
|
insilmaril@390
|
253 |
QAction* actionEditUndo;
|
insilmaril@390
|
254 |
QAction* actionEditRedo;
|
insilmaril@390
|
255 |
QAction *actionEditCopy;
|
insilmaril@390
|
256 |
QAction *actionEditCut;
|
insilmaril@390
|
257 |
QAction *actionEditPaste;
|
insilmaril@390
|
258 |
QAction *actionEditMoveUp;
|
insilmaril@390
|
259 |
QAction *actionEditMoveDown;
|
insilmaril@608
|
260 |
QAction *actionEditSortChildren;
|
insilmaril@390
|
261 |
QAction *actionEditToggleScroll;
|
insilmaril@390
|
262 |
QAction* actionEditOpenURL;
|
insilmaril@390
|
263 |
QAction* actionEditOpenURLTab;
|
insilmaril@390
|
264 |
QAction* actionEditOpenMultipleURLTabs;
|
insilmaril@390
|
265 |
QAction* actionEditURL;
|
insilmaril@528
|
266 |
QAction* actionEditLocalURL;
|
insilmaril@390
|
267 |
QAction* actionEditHeading2URL;
|
insilmaril@390
|
268 |
QAction* actionEditBugzilla2URL;
|
insilmaril@390
|
269 |
QAction* actionEditFATE2URL;
|
insilmaril@390
|
270 |
QAction *actionEditOpenVymLink;
|
insilmaril@390
|
271 |
QAction *actionEditOpenMultipleVymLinks;
|
insilmaril@390
|
272 |
QAction *actionEditVymLink;
|
insilmaril@390
|
273 |
QAction *actionEditDeleteVymLink;
|
insilmaril@390
|
274 |
QAction *actionEditToggleHideExport;
|
insilmaril@390
|
275 |
QAction *actionEditMapInfo;
|
insilmaril@390
|
276 |
QAction *actionEditHeading;
|
insilmaril@390
|
277 |
QAction *actionEditDelete;
|
insilmaril@390
|
278 |
QAction *actionEditAddBranch;
|
insilmaril@394
|
279 |
QAction *actionEditAddBranchBefore;
|
insilmaril@390
|
280 |
QAction *actionEditAddBranchAbove;
|
insilmaril@390
|
281 |
QAction *actionEditAddBranchBelow;
|
insilmaril@395
|
282 |
QAction *actionEditDeleteKeepChilds;
|
insilmaril@395
|
283 |
QAction *actionEditDeleteChilds;
|
insilmaril@390
|
284 |
QAction *actionEditImportAdd;
|
insilmaril@390
|
285 |
QAction *actionEditImportReplace;
|
insilmaril@390
|
286 |
QAction *actionEditSaveBranch;
|
insilmaril@390
|
287 |
QAction *actionEditSelectFirst;
|
insilmaril@390
|
288 |
QAction *actionEditSelectLast;
|
insilmaril@390
|
289 |
QAction *actionEditLoadImage;
|
insilmaril@390
|
290 |
|
insilmaril@390
|
291 |
QAction* actionFormatColor;
|
insilmaril@390
|
292 |
QAction* actionFormatPickColor;
|
insilmaril@390
|
293 |
QAction* actionFormatColorBranch;
|
insilmaril@390
|
294 |
QAction* actionFormatColorSubtree;
|
insilmaril@390
|
295 |
QAction* actionFormatLinkColorHint;
|
insilmaril@390
|
296 |
QAction* actionFormatBackColor;
|
insilmaril@408
|
297 |
QAction* actionFormatBackImage;
|
insilmaril@390
|
298 |
QAction* actionFormatLinkColor;
|
insilmaril@442
|
299 |
QAction* actionFormatSelectionColor;
|
insilmaril@390
|
300 |
|
insilmaril@390
|
301 |
QActionGroup* actionGroupModModes;
|
insilmaril@390
|
302 |
QAction* actionModModeColor;
|
insilmaril@390
|
303 |
QAction* actionModModeXLink;
|
insilmaril@390
|
304 |
QAction* actionModModeCopy;
|
insilmaril@390
|
305 |
|
insilmaril@390
|
306 |
QActionGroup *actionGroupFormatFrameTypes;
|
insilmaril@421
|
307 |
|
insilmaril@390
|
308 |
|
insilmaril@390
|
309 |
QActionGroup *actionGroupFormatLinkStyles;
|
insilmaril@390
|
310 |
QAction *actionFormatLinkStyleLine;
|
insilmaril@390
|
311 |
QAction *actionFormatLinkStyleParabel;
|
insilmaril@390
|
312 |
QAction *actionFormatLinkStylePolyLine;
|
insilmaril@390
|
313 |
QAction *actionFormatLinkStylePolyParabel;
|
insilmaril@390
|
314 |
QAction *actionFormatHideLinkUnselected;
|
insilmaril@390
|
315 |
|
insilmaril@390
|
316 |
QAction *actionViewToggleNoteEditor;
|
insilmaril@390
|
317 |
QAction *actionViewToggleHistoryWindow;
|
insilmaril@486
|
318 |
QAction *actionViewTogglePropertyWindow;
|
insilmaril@408
|
319 |
QAction *actionViewToggleAntiAlias;
|
insilmaril@408
|
320 |
QAction *actionViewToggleSmoothPixmapTransform;
|
insilmaril@526
|
321 |
QAction* actionViewCenter;
|
insilmaril@390
|
322 |
|
insilmaril@537
|
323 |
QAction* actionSettingsAutoEditNewBranch;
|
insilmaril@537
|
324 |
QAction* actionSettingsAutoSelectNewBranch;
|
insilmaril@390
|
325 |
QAction* actionSettingsAutoSelectText;
|
insilmaril@390
|
326 |
QAction* actionSettingsUseDelKey;
|
insilmaril@390
|
327 |
QAction* actionSettingsUseFlagGroups;
|
insilmaril@390
|
328 |
QAction* actionSettingsUseHideExport;
|
insilmaril@473
|
329 |
QAction* actionSettingsAutosaveToggle;
|
insilmaril@473
|
330 |
QAction* actionSettingsAutosaveTime;
|
insilmaril@0
|
331 |
};
|
insilmaril@0
|
332 |
|
insilmaril@0
|
333 |
|
insilmaril@0
|
334 |
#endif
|
insilmaril@0
|
335 |
|