1.11.2 split up of xml helper functions. started to work on attributes
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 class Main : public QMainWindow
20 /*! Modifier modes are used when CTRL together with a mouse button is pressed */
22 ModModeNone, //!< Unused
23 ModModeColor, //!< Pick color from object
24 ModModeCopy, //!< Copy object
25 ModModeXLink //!< Create a XLink (XLinkObj) from selected object
28 Main(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
31 void statusMessage (const QString &);
38 void closeEvent( QCloseEvent* );
41 void setupFileActions();
42 void setupEditActions();
43 void setupFormatActions();
44 void setupViewActions();
45 void setupModeActions();
46 void setupWindowActions();
47 void setupFlag(FlagObj *fo, QToolBar *tb, bool aw, const QString &name, const QString &tooltip);
48 void setupFlagActions();
49 void setupNetworkActions();
50 void setupSettingsActions();
51 void setupTestActions();
52 void setupHelpActions();
53 void setupContextMenus();
54 void setupRecentMapsMenu();
56 void hideEvent (QHideEvent * );
57 void showEvent (QShowEvent * );
58 MapEditor* currentMapEditor() const;
61 void editorChanged(QWidget*);
63 ErrorCode fileLoad(QString ,const LoadMode &, const FileType & ftype=VymMap);
64 void fileLoad(const LoadMode &);
66 void fileLoadRecent();
67 void addRecentMap (const QString &);
68 void fileSave(MapEditor*, const SaveMode & );
71 void fileSave(MapEditor *); // autosave from MapEditor
73 void fileSaveAs(const SaveMode &);
75 void fileImportKDEBookmarks();
76 void fileImportFirefoxBookmarks();
77 void fileImportFreemind();
81 void fileExportXHTML();
82 void fileExportImage();
83 void fileExportASCII();
85 void fileExportLaTeX();
86 void fileExportKDEBookmarks();
87 void fileExportTaskjuggler();
88 void fileExportOOPresentation();
96 void gotoHistoryStep (int);
101 void editOpenFindWindow();
102 void editFind(QString);
103 void editFindChanged();
105 void openTabs(QStringList);
108 void editOpenURLTab();
110 void editOpenMultipleURLTabs();
113 void editHeading2URL();
114 void editBugzilla2URL();
116 void openVymLinks(const QStringList &);
118 void editOpenMultipleVymLinks();
119 void editHeadingFinished();
120 void editAttributeFinished();
123 void editAttribute();
124 void editOpenVymLink();
126 void editDeleteVymLink();
127 void editToggleHideExport();
131 void editSortChildren();
132 void editToggleScroll();
133 void editUnscrollChilds();
134 void editNewBranch();
135 void editNewBranchBefore();
136 void editNewBranchAbove();
137 void editNewBranchBelow();
138 void editImportAdd();
139 void editImportReplace();
140 void editSaveBranch();
141 void editDeleteKeepChilds();
142 void editDeleteChilds();
143 void editDeleteSelection();
144 void editUpperBranch();
145 void editLowerBranch();
146 void editLeftBranch();
147 void editRightBranch();
148 void editFirstBranch();
149 void editLastBranch();
150 void editLoadImage();
151 void editSaveImage();
152 void editFollowXLink (QAction *);
153 void editEditXLink (QAction *);
155 void formatSelectColor();
156 void formatPickColor();
157 void colorChanged(QColor);
158 void formatColorBranch();
159 void formatColorSubtree();
160 void formatLinkStyleLine();
161 void formatLinkStyleParabel();
162 void formatLinkStylePolyLine();
163 void formatLinkStylePolyParabel();
164 void formatSelectBackColor();
165 void formatSelectBackImage();
166 void formatSelectLinkColor();
167 void formatSelectSelectionColor();
168 void formatToggleLinkColorHint();
169 void formatHideLinkUnselected();
171 void viewZoomReset();
177 void networkStartServer();
178 void networkConnect();
181 void settingsMacroDir();
182 void settingsToggleDelKey();
183 void settingsUndoLevels();
184 void settingsAutosaveToggle();
185 void settingsAutosaveTime();
187 void windowToggleNoteEditor();
188 void windowToggleHistory();
189 void windowToggleProperty();
190 void updateHistory(SimpleSettings &);
191 void windowToggleAntiAlias();
192 void windowToggleSmoothPixmap();
193 void updateNoteFlag();
194 void updateSatellites(MapEditor *);
195 void updateActions();
196 ModMode getModMode();
197 bool autoEditNewBranch();
198 bool autoSelectNewBranch();
199 bool useFlagGroups();
200 void setScript(const QString &);
201 void runScript(const QString &);
202 void runScriptEverywhere (const QString &);
205 void windowNextEditor();
206 void windowPreviousEditor();
207 void windowShowNoteEditor();
208 void windowHideNoteEditor();
210 void standardFlagChanged();
212 void testFunction1();
213 void testFunction2();
224 QTabWidget *tabWidget;
225 FindWindow *findWindow;
226 QProcess *procBrowser;
228 QStringList imageTypes;
230 QLineEdit *lineedit; // to enter headings of branches
231 QString prevSelection;
233 HistoryWindow *historyWindow;
235 BranchPropertyWindow *branchPropertyWindow;
236 SimpleScriptEditor *scriptEditor;
238 QList <QAction*> actionListBranches;
244 QMenu *recentFilesMenu;
245 enum { MaxRecentFiles = 9 };
246 QAction *recentFileActions[MaxRecentFiles];
248 QAction *macroActions[12];
251 QAction* actionFileSave;
252 QAction* actionFilePrint;
253 QAction* actionEditUndo;
254 QAction* actionEditRedo;
255 QAction *actionEditCopy;
256 QAction *actionEditCut;
257 QAction *actionEditPaste;
258 QAction *actionEditMoveUp;
259 QAction *actionEditMoveDown;
260 QAction *actionEditSortChildren;
261 QAction *actionEditToggleScroll;
262 QAction* actionEditOpenURL;
263 QAction* actionEditOpenURLTab;
264 QAction* actionEditOpenMultipleURLTabs;
265 QAction* actionEditURL;
266 QAction* actionEditLocalURL;
267 QAction* actionEditHeading2URL;
268 QAction* actionEditBugzilla2URL;
269 QAction* actionEditFATE2URL;
270 QAction *actionEditOpenVymLink;
271 QAction *actionEditOpenMultipleVymLinks;
272 QAction *actionEditVymLink;
273 QAction *actionEditDeleteVymLink;
274 QAction *actionEditToggleHideExport;
275 QAction *actionEditMapInfo;
276 QAction *actionEditHeading;
277 QAction *actionEditDelete;
278 QAction *actionEditAddBranch;
279 QAction *actionEditAddBranchBefore;
280 QAction *actionEditAddBranchAbove;
281 QAction *actionEditAddBranchBelow;
282 QAction *actionEditDeleteKeepChilds;
283 QAction *actionEditDeleteChilds;
284 QAction *actionEditImportAdd;
285 QAction *actionEditImportReplace;
286 QAction *actionEditSaveBranch;
287 QAction *actionEditSelectFirst;
288 QAction *actionEditSelectLast;
289 QAction *actionEditLoadImage;
291 QAction* actionFormatColor;
292 QAction* actionFormatPickColor;
293 QAction* actionFormatColorBranch;
294 QAction* actionFormatColorSubtree;
295 QAction* actionFormatLinkColorHint;
296 QAction* actionFormatBackColor;
297 QAction* actionFormatBackImage;
298 QAction* actionFormatLinkColor;
299 QAction* actionFormatSelectionColor;
301 QActionGroup* actionGroupModModes;
302 QAction* actionModModeColor;
303 QAction* actionModModeXLink;
304 QAction* actionModModeCopy;
306 QActionGroup *actionGroupFormatFrameTypes;
309 QActionGroup *actionGroupFormatLinkStyles;
310 QAction *actionFormatLinkStyleLine;
311 QAction *actionFormatLinkStyleParabel;
312 QAction *actionFormatLinkStylePolyLine;
313 QAction *actionFormatLinkStylePolyParabel;
314 QAction *actionFormatHideLinkUnselected;
316 QAction *actionViewToggleNoteEditor;
317 QAction *actionViewToggleHistoryWindow;
318 QAction *actionViewTogglePropertyWindow;
319 QAction *actionViewToggleAntiAlias;
320 QAction *actionViewToggleSmoothPixmapTransform;
321 QAction* actionViewCenter;
323 QAction* actionSettingsAutoEditNewBranch;
324 QAction* actionSettingsAutoSelectNewBranch;
325 QAction* actionSettingsAutoSelectText;
326 QAction* actionSettingsUseDelKey;
327 QAction* actionSettingsUseFlagGroups;
328 QAction* actionSettingsUseHideExport;
329 QAction* actionSettingsAutosaveToggle;
330 QAction* actionSettingsAutosaveTime;