Rev 2556 | Rev 2627 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3 | paul | 1 | /*************************************************************************** |
2 | scribus.h - description |
||
3 | ------------------- |
||
4 | begin : Fre Apr 6 21:09:31 CEST 2001 |
||
5 | copyright : (C) 2001 by Franz Schmid |
||
6 | email : Franz.Schmid@altmuehlnet.de |
||
7 | ***************************************************************************/ |
||
8 | |||
9 | /*************************************************************************** |
||
10 | * * |
||
11 | * This program is free software; you can redistribute it and/or modify * |
||
12 | * it under the terms of the GNU General Public License as published by * |
||
13 | * the Free Software Foundation; either version 2 of the License, or * |
||
14 | * (at your option) any later version. * |
||
15 | * * |
||
16 | ***************************************************************************/ |
||
17 | |||
18 | #ifndef SCRIBUS_H |
||
19 | #define SCRIBUS_H |
||
20 | |||
516 | fschmid | 21 | #define VERS13x |
3 | paul | 22 | |
326 | Franz | 23 | // include from stl |
24 | #include <vector> |
||
25 | |||
3 | paul | 26 | // include files for QT |
27 | #include <qapplication.h> |
||
28 | #include <qmainwindow.h> |
||
29 | #include <qaction.h> |
||
30 | #include <qmenubar.h> |
||
31 | #include <qpopupmenu.h> |
||
32 | #include <qtoolbar.h> |
||
33 | #include <qtoolbutton.h> |
||
34 | #include <qstatusbar.h> |
||
35 | #include <qtooltip.h> |
||
36 | #include <qstring.h> |
||
37 | #include <qpixmap.h> |
||
38 | #include <qmessagebox.h> |
||
39 | #include <qpainter.h> |
||
40 | #include <qmap.h> |
||
1208 | cbradney | 41 | #include <qdict.h> |
1478 | cbradney | 42 | #include <qguardedptr.h> |
3 | paul | 43 | #include <qfont.h> |
44 | #include <qtimer.h> |
||
45 | #include <qintdict.h> |
||
46 | #include <qprogressdialog.h> |
||
47 | #include <qprogressbar.h> |
||
48 | #include <qworkspace.h> |
||
49 | #include <qptrlist.h> |
||
50 | #include <qclipboard.h> |
||
1155 | fschmid | 51 | #include <qprocess.h> |
3 | paul | 52 | |
53 | // application specific includes |
||
54 | #include "scribusview.h" |
||
55 | #include "scribusdoc.h" |
||
56 | #include "scribuswin.h" |
||
1525 | cbradney | 57 | |
58 | class NodePalette; |
||
59 | class LayerPalette; |
||
60 | class SeitenPal; |
||
61 | class BookPalette; |
||
62 | class SplashScreen; |
||
63 | |||
415 | Franz | 64 | #include "prefscontext.h" |
1429 | subik | 65 | #include "scribusstructs.h" |
1208 | cbradney | 66 | |
169 | Franz | 67 | class Autoforms; |
68 | class FontCombo; |
||
222 | Franz | 69 | class StilFormate; |
225 | Franz | 70 | class LineFormate; |
265 | Franz | 71 | class Mpalette; |
284 | Franz | 72 | class Measurements; |
355 | Franz | 73 | class StoryEditor; |
910 | fschmid | 74 | class PSLib; |
75 | class WerkToolB; |
||
76 | class WerkToolBP; |
||
1114 | tsoots | 77 | class UndoPalette; |
1151 | fschmid | 78 | class FileWatcher; |
1247 | tsoots | 79 | class UndoManager; |
1293 | tsoots | 80 | class UndoState; |
81 | class SimpleState; |
||
1208 | cbradney | 82 | class ScrAction; |
83 | class MenuManager; |
||
1232 | fschmid | 84 | class CheckDocument; |
1414 | fschmid | 85 | class Tree; |
1500 | cbradney | 86 | class Biblio; |
1549 | subik | 87 | class PluginManager; |
1993 | cbradney | 88 | class ActionManager; |
2355 | cbradney | 89 | class AlignDistributePalette; |
2441 | cbradney | 90 | class TOCGenerator; |
411 | Franz | 91 | |
3 | paul | 92 | /** |
93 | * This Class is the base class for your application. It sets up the main |
||
94 | * window and providing a menubar, toolbar |
||
95 | * and statusbar. For the main view, an instance of class ScribusView is |
||
96 | * created which creates your view. |
||
97 | */ |
||
1293 | tsoots | 98 | class ScribusApp : public QMainWindow, public UndoObject |
3 | paul | 99 | { |
162 | Franz | 100 | Q_OBJECT |
1429 | subik | 101 | |
168 | Franz | 102 | public: |
188 | Franz | 103 | /** constructor */ |
162 | Franz | 104 | ScribusApp(); |
105 | /** destructor */ |
||
106 | ~ScribusApp() {}; |
||
2295 | cbradney | 107 | int initScribus(bool showSplash, bool showFontInfo, const QString newGuiLanguage); |
770 | cbradney | 108 | const QString getGuiLanguage(); |
1525 | cbradney | 109 | bool warningVersion(QWidget *parent); |
162 | Franz | 110 | void SetShortCut(); |
1437 | cbradney | 111 | void SetKeyEntry(QString actName, QString cleanMenuText, QString keyseq, int rowNumber); |
2150 | cbradney | 112 | bool doFileNew(double width, double h, double tpr, double lr, double rr, double br, double ab, double sp, |
1325 | cbradney | 113 | bool atf, bool fp, int einh, bool firstleft, int Ori, int SNr, QString pagesize); |
162 | Franz | 114 | bool DoFileSave(QString fn); |
115 | void closeEvent(QCloseEvent *ce); |
||
116 | void keyPressEvent(QKeyEvent *k); |
||
1204 | tsoots | 117 | void keyReleaseEvent(QKeyEvent *k); |
1814 | cbradney | 118 | void mouseReleaseEvent(QMouseEvent *m); |
162 | Franz | 119 | void wheelEvent(QWheelEvent *w); |
2150 | cbradney | 120 | void deleteSelectedTextFromFrame(PageItem *currItem); |
1957 | cbradney | 121 | void setTBvals(PageItem *currItem); |
162 | Franz | 122 | void SavePrefs(); |
498 | cbradney | 123 | void SavePrefsXML(); |
162 | Franz | 124 | void ShowSubs(); |
125 | void applyNewMaster(QString name); |
||
1208 | cbradney | 126 | void updateRecent(QString fn); |
369 | Franz | 127 | QString GetLang(QString inLang); |
1065 | cbradney | 128 | PSLib* getPSDriver(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, ColorList DocColors, bool pdf); |
162 | Franz | 129 | void closePSDriver(); |
328 | Franz | 130 | bool getPDFDriver(QString fn, QString nam, int Components, std::vector<int> &pageNs, QMap<int,QPixmap> thumbs); |
162 | Franz | 131 | bool DoSaveAsEps(QString fn); |
415 | Franz | 132 | QString CFileDialog(QString wDir = ".", QString caption = "", QString filter = "", QString defNa = "", |
1325 | cbradney | 133 | bool Pre = false, bool mod = true, bool comp = false, bool cod = false, |
134 | bool onlyDirs = false, bool *docom = 0, bool *doFont = 0); |
||
162 | Franz | 135 | void GetCMSProfiles(); |
136 | void GetCMSProfilesDir(QString pfad); |
||
137 | void RecalcColors(QProgressBar *dia = 0); |
||
138 | void SwitchWin(); |
||
139 | void RestoreBookMarks(); |
||
140 | void AdjustBM(); |
||
141 | void ReorgFonts(); |
||
1235 | fschmid | 142 | void GetUsedFonts(QMap<QString,QFont> *Really); |
2536 | cbradney | 143 | |
162 | Franz | 144 | void emergencySave(); |
359 | Franz | 145 | void parsePagesString(QString pages, std::vector<int>* pageNs, int sourcePageCount); |
1204 | tsoots | 146 | /** |
147 | * @brief Returns true if an arrow key is pressed down. |
||
148 | * @return true if an arrow key is pressed down otherwise returns false |
||
149 | */ |
||
150 | bool arrowKeyDown(); |
||
1549 | subik | 151 | /** |
1443 | tsoots | 152 | * @brief Returns true if application is in object specific undo mode, other wise returns false. |
153 | * @return true if application is in object specific undo mode, other wise returns false |
||
154 | */ |
||
155 | bool isObjectSpecificUndo(); |
||
1293 | tsoots | 156 | void restore(UndoState* state, bool isUndo); |
157 | void restoreGroupping(SimpleState *state, bool isUndo); |
||
158 | void restoreUngroupping(SimpleState *state, bool isUndo); |
||
1658 | tsoots | 159 | void restoreAddPage(SimpleState *state, bool isUndo); |
1663 | tsoots | 160 | void restoreDeletePage(SimpleState *state, bool isUndo); |
1065 | cbradney | 161 | struct CopyPasteBuffer Buffer; |
162 | Franz | 162 | QString Buffer2; |
163 | QString Buffer3; |
||
164 | bool BuFromApp; |
||
165 | ProfilesL MonitorProfiles; |
||
166 | ProfilesL PrinterProfiles; |
||
167 | ProfilesL PDFXProfiles; |
||
168 | double DispX; |
||
169 | double DispY; |
||
170 | bool NoFonts; |
||
171 | int HaveDoc; |
||
415 | Franz | 172 | PrefsContext* dirs; |
1065 | cbradney | 173 | struct ApplicationPrefs Prefs; |
162 | Franz | 174 | /** view is the main widget which represents your working area. The View |
175 | * class should handle all events of the view widget. It is kept empty so |
||
176 | * you can create your view according to your application's needs by |
||
177 | * changing the view class. |
||
178 | */ |
||
179 | ScribusView *view; |
||
180 | /** doc represents your actual document and is created only once. It keeps |
||
181 | * information such as filename and does the serialization of your files. |
||
182 | */ |
||
183 | ScribusDoc *doc; |
||
382 | Franz | 184 | /** the splash screen */ |
669 | cbradney | 185 | SplashScreen *splashScreen; |
2433 | cbradney | 186 | QLabel* mainWindowStatusLabel; |
187 | QProgressBar* mainWindowProgressBar; |
||
188 | QLabel* mainWindowXPosLabel; |
||
189 | QLabel* mainWindowXPosDataLabel; |
||
190 | QLabel* mainWindowYPosLabel; |
||
191 | QLabel* mainWindowYPosDataLabel; |
||
1545 | cbradney | 192 | Mpalette *propertiesPalette; |
193 | NodePalette *nodePalette; |
||
194 | Tree *outlinePalette; |
||
195 | Biblio *scrapbookPalette; |
||
196 | LayerPalette* layerPalette; |
||
197 | SeitenPal *pagePalette; |
||
198 | BookPalette *bookmarkPalette; |
||
199 | Measurements* measurementPalette; |
||
200 | CheckDocument * docCheckerPalette; |
||
1114 | tsoots | 201 | UndoPalette* undoPalette; |
2355 | cbradney | 202 | AlignDistributePalette *alignDistributePalette; |
2494 | cbradney | 203 | StoryEditor* storyEditor; |
355 | Franz | 204 | StoryEditor* CurrStED; |
162 | Franz | 205 | QMap<QString,QString> Sprachen; |
206 | QWorkspace *wsp; |
||
207 | ScribusWin* ActWin; |
||
208 | QString PrefsPfad; |
||
209 | QClipboard *ClipB; |
||
210 | QString LoadEnc; |
||
211 | bool singleClose; |
||
173 | Franz | 212 | bool ScriptRunning; |
188 | Franz | 213 | Autoforms* SCustom; |
214 | WerkToolB* WerkTools; |
||
214 | Franz | 215 | int HavePngAlpha; |
253 | Franz | 216 | bool UniCinp; |
217 | int UniCinC; |
||
218 | QString UniCinS; |
||
1208 | cbradney | 219 | |
369 | Franz | 220 | QMap<QString, QStringList> InstLang; |
221 | QMap<QString,QString> LangTransl; |
||
1151 | fschmid | 222 | FileWatcher* fileWatcher; |
1155 | fschmid | 223 | QProcess *ExternalApp; |
1478 | cbradney | 224 | |
225 | QMap<QString, QGuardedPtr<ScrAction> > scrActions; |
||
226 | QMap<QString, QGuardedPtr<ScrAction> > scrRecentFileActions; |
||
227 | QMap<QString, QGuardedPtr<ScrAction> > scrWindowsActions; |
||
2408 | cbradney | 228 | QMap<QString, QGuardedPtr<ScrAction> > scrLayersActions; |
1325 | cbradney | 229 | QDict<QActionGroup> scrActionGroups; |
1208 | cbradney | 230 | MenuManager* scrMenuMgr; |
1993 | cbradney | 231 | ActionManager* actionManager; |
1549 | subik | 232 | PluginManager* pluginManager; |
3 | paul | 233 | |
162 | Franz | 234 | public slots: |
2161 | cbradney | 235 | void languageChange(); |
1903 | cbradney | 236 | void specialActionKeyEvent(QString actionName, int unicodevalue); |
1330 | fschmid | 237 | void newView(); |
1525 | cbradney | 238 | void ToggleAllGuides(); |
356 | Franz | 239 | void ToggleAllPalettes(); |
162 | Franz | 240 | void slotStoryEditor(); |
1202 | fschmid | 241 | void slotCharSelect(); |
2056 | fschmid | 242 | void ImageEffects(); |
310 | Franz | 243 | QString Collect(bool compress = false, bool withFonts = false); |
162 | Franz | 244 | void ChBookmarks(int s, int e, int n); |
245 | void AddBookMark(PageItem *ite); |
||
246 | void DelBookMark(PageItem *ite); |
||
247 | void BookMarkTxT(PageItem *ite); |
||
248 | void StoreBookmarks(); |
||
1392 | cbradney | 249 | void ReadPrefs(bool import12); |
498 | cbradney | 250 | void ReadPrefsXML(); |
162 | Franz | 251 | void ManageGuides(); |
2026 | cbradney | 252 | void setItemFillTransparency(double t); |
253 | void setItemLineTransparency(double t); |
||
2150 | cbradney | 254 | void setMousePositionOnStatusBar(double xp, double yp); |
162 | Franz | 255 | bool DoFileClose(); |
268 | Franz | 256 | bool DoSaveClose(); |
162 | Franz | 257 | void windowsMenuAboutToShow(); |
258 | void newActWin(QWidget *w); |
||
259 | void windowsMenuActivated(int id); |
||
260 | void UnDoAction(); |
||
1114 | tsoots | 261 | void RedoAction(); |
162 | Franz | 262 | void doHyphenate(); |
2621 | fschmid | 263 | void doDeHyphenate(); |
162 | Franz | 264 | void slotTest(); |
265 | void slotTest2(); |
||
1981 | cbradney | 266 | void PutScrap(); |
162 | Franz | 267 | void changeLayer(int l); |
268 | void showLayer(); |
||
216 | Franz | 269 | void LayerRemove(int l, bool dl = false); |
162 | Franz | 270 | void ManageJava(); |
2093 | cbradney | 271 | void manageMasterPages(QString temp = ""); |
272 | void manageMasterPagesEnd(); |
||
273 | /** generate a new document in the current view */ |
||
162 | Franz | 274 | bool slotFileNew(); |
2093 | cbradney | 275 | bool slotPageImport(); |
2150 | cbradney | 276 | bool loadPage(QString fileName, int Nr, bool Mpa); |
162 | Franz | 277 | /** open a document */ |
278 | void slotFileOpen(); |
||
218 | Franz | 279 | void slotFileAppend(); |
162 | Franz | 280 | /** open a document */ |
1208 | cbradney | 281 | void removeRecent(QString fn); |
282 | void loadRecent(QString fn); |
||
283 | void rebuildRecentFileMenu(); |
||
2408 | cbradney | 284 | void rebuildLayersList(); |
162 | Franz | 285 | bool slotDocOpen(); |
2150 | cbradney | 286 | bool loadDoc(QString); |
162 | Franz | 287 | void slotAutoSaved(); |
288 | /** save a document */ |
||
268 | Franz | 289 | bool slotFileSave(); |
162 | Franz | 290 | /** save a document under a different filename*/ |
268 | Franz | 291 | bool slotFileSaveAs(); |
162 | Franz | 292 | void slotFileRevert(); |
293 | /** Sichert den Text eines Elements */ |
||
294 | void SaveText(); |
||
295 | /** close the actual file */ |
||
296 | bool slotFileClose(); |
||
297 | /** print the actual file */ |
||
298 | void slotFilePrint(); |
||
1825 | fschmid | 299 | void slotReallyPrint(); |
411 | Franz | 300 | bool doPrint(PrintOptions *options); |
162 | Franz | 301 | /** exits the application */ |
302 | void slotFileQuit(); |
||
303 | /** put the marked text/object into the clipboard and remove |
||
304 | * it from the document */ |
||
305 | void slotEditCut(); |
||
306 | /** put the marked text/object into the clipboard*/ |
||
307 | void slotEditCopy(); |
||
308 | /** paste the clipboard into the document*/ |
||
309 | void slotEditPaste(); |
||
310 | void EnableTxEdit(); |
||
311 | void DisableTxEdit(); |
||
312 | void SelectAll(); |
||
1837 | cbradney | 313 | void deselectAll(); |
162 | Franz | 314 | void ClipChange(); |
1963 | cbradney | 315 | void clearContents(); |
162 | Franz | 316 | /** shows an about dlg*/ |
317 | void slotHelpAbout(); |
||
3 | paul | 318 | void slotHelpAboutQt(); |
162 | Franz | 319 | void slotOnlineHelp(); |
320 | void ToggleTips(); |
||
321 | /** Erzeugt eine neue Seite */ |
||
3 | paul | 322 | void slotNewPageP(int wo, QString templ); |
162 | Franz | 323 | void slotNewPageM(); |
2150 | cbradney | 324 | void slotNewMasterPage(int w); |
162 | Franz | 325 | void slotNewPage(int w); |
326 | /** Loescht die aktuelle Seite */ |
||
327 | void DeletePage(); |
||
2246 | subik | 328 | /** |
329 | * Delete pages |
||
1658 | tsoots | 330 | * @param from First page to delete |
331 | * @param to Last page to delete |
||
332 | */ |
||
333 | void DeletePage(int from, int to); |
||
3 | paul | 334 | void DeletePage2(int pg); |
162 | Franz | 335 | /** Verschiebt Seiten */ |
336 | void MovePage(); |
||
337 | void CopyPage(); |
||
1326 | cbradney | 338 | /** Zoom the view */ |
339 | void slotZoom(double zoomFactor); // 20, 50, 100, or -100 for Fit |
||
3 | paul | 340 | /** Schaltet Raender ein/aus */ |
341 | void ToggleMarks(); |
||
342 | void ToggleFrames(); |
||
705 | fschmid | 343 | void ToggleTextLinks(); |
2353 | fschmid | 344 | void ToggleTextControls(); |
3 | paul | 345 | /** Schaltet Werkzeuge ein/aus */ |
119 | Franz | 346 | void setTools(bool visible); |
3 | paul | 347 | void ToggleTools(); |
119 | Franz | 348 | void setPDFTools(bool visible); |
14 | Franz | 349 | void TogglePDFTools(); |
3 | paul | 350 | /** Schaltet Masspalette ein/aus */ |
2144 | cbradney | 351 | //void togglePropertiesPalette(); |
3 | paul | 352 | /** Schaltet Uebersichtspalette ein/aus*/ |
2144 | cbradney | 353 | //void toggleOutlinePalette(); |
354 | //void toggleScrapbookPalette(); |
||
355 | //void toggleLayerPalette(); |
||
1545 | cbradney | 356 | void togglePagePalette(); |
357 | void setPagePalette(bool visible); |
||
2144 | cbradney | 358 | //void toggleBookmarkPalette(); |
1545 | cbradney | 359 | void toggleUndoPalette(); |
1114 | tsoots | 360 | void setUndoPalette(bool visible); |
1493 | cbradney | 361 | void toggleCheckPal(); |
1208 | cbradney | 362 | /** Schaltet M_ViewShowImages ein/aus */ |
3 | paul | 363 | void TogglePics(); |
364 | /** Schaltet Raster ein/aus */ |
||
365 | void ToggleRaster(); |
||
366 | /** Schaltet Rasterbenutzung ein/aus */ |
||
367 | void ToggleURaster(); |
||
368 | /** Schaltet Rahmenbearbeitung ein/aus */ |
||
369 | void ToggleFrameEdit(); |
||
370 | void slotSelect(); |
||
1065 | cbradney | 371 | /** Switch appMode */ |
3 | paul | 372 | void setAppMode(int mode); |
1525 | cbradney | 373 | void setAppModeByToggle(bool isOn, int newMode); |
3 | paul | 374 | /** Neues Dokument erzeugt */ |
375 | void HaveNewDoc(); |
||
376 | /** Element ausgewaehlt */ |
||
377 | void HaveNewSel(int Nr); |
||
378 | /** Dokument ist geaendert worden */ |
||
379 | void slotDocCh(bool reb = true); |
||
380 | /** Setzt die Farbe */ |
||
381 | void setItemFarbe(int id); |
||
382 | /** Setzt die Abstufung */ |
||
383 | void setItemShade(int id); |
||
384 | /** Setzt den Font */ |
||
385 | void setItemFont(int id); |
||
169 | Franz | 386 | void setItemFont2(int id); |
3 | paul | 387 | /** Korrigiert das FontMenu */ |
388 | void AdjustFontMenu(QString nf); |
||
389 | void SetNewFont(QString nf); |
||
390 | /** Setz die Zeichensatzgroesse */ |
||
391 | void setItemFSize(int id); |
||
392 | void setFSizeMenu(int size); |
||
393 | /** Farbeditor */ |
||
394 | void slotEditColors(); |
||
395 | /** Setzt den Pen-Tonwert */ |
||
396 | void setPenShade(int sh); |
||
397 | /** Setzt den Brush-Tonwert */ |
||
398 | void setBrushShade(int sh); |
||
295 | Franz | 399 | void setGradFill(int typ); |
400 | void updtGradFill(); |
||
3 | paul | 401 | /** Setzt die Pen-Farbe */ |
402 | void setPenFarbe(QString farbe); |
||
403 | /** Setzt die Brush-Farbe */ |
||
404 | void setBrushFarbe(QString farbe); |
||
405 | void setCSMenu(QString f, QString l, int fs, int ls); |
||
406 | /** Fragt nach den Farben */ |
||
407 | void GetBrushPen(); |
||
169 | Franz | 408 | /** Erzeugt einen Rahmen */ |
409 | void MakeFrame(int f, int c, double *vals); |
||
3 | paul | 410 | /** Loescht ein Element */ |
411 | void DeleteObjekt(); |
||
412 | /** Dupliziert das Element */ |
||
413 | void ObjektDup(); |
||
414 | /** Dupliziert das Element mehrfach*/ |
||
415 | void ObjektDupM(); |
||
416 | /** Reformatiert das Dokument */ |
||
417 | bool SetupDoc(); |
||
1644 | cbradney | 418 | void objectAttributes(); |
1694 | cbradney | 419 | void generateTableOfContents(); |
2295 | cbradney | 420 | const bool GetAllFonts(bool showFontInfo); |
770 | cbradney | 421 | void buildFontMenu(); |
3 | paul | 422 | void slotPrefsOrg(); |
423 | void slotEditStyles(); |
||
222 | Franz | 424 | void saveStyles(StilFormate *dia); |
27 | Franz | 425 | void slotEditLineStyles(); |
225 | Franz | 426 | void saveLStyles(LineFormate *dia); |
3 | paul | 427 | void setNewAbStyle(int a); |
428 | void setAbsValue(int a); |
||
1427 | fschmid | 429 | void SelectFromOutl(int Page, int Item, bool single = false); |
3 | paul | 430 | void SelectFromOutlS(int Page); |
431 | void SaveAsEps(); |
||
1825 | fschmid | 432 | void reallySaveAsEps(); |
3 | paul | 433 | void SaveAsPDF(); |
1816 | fschmid | 434 | void doSaveAsPDF(); |
3 | paul | 435 | void Aktiv(); |
436 | void setItemHoch(int h); |
||
437 | void setStilvalue(int s); |
||
438 | void setItemTypeStyle(int id); |
||
456 | fschmid | 439 | void slotElemRead(QString Name, int x, int y, bool art, bool loca, ScribusDoc* docc, ScribusView* vie); |
51 | Franz | 440 | void slotChangeUnit(int art, bool draw = true); |
3 | paul | 441 | void NoFrameEdit(); |
2093 | cbradney | 442 | void ApplyMasterPage(); |
443 | void Apply_MasterPage(QString in, int Snr, bool reb = true); |
||
1293 | tsoots | 444 | void GroupObj(bool showLockDia = true); |
3 | paul | 445 | void UnGroupObj(); |
446 | void StatusPic(); |
||
447 | void ModifyAnnot(); |
||
448 | void ToggleGuides(); |
||
241 | Franz | 449 | void ToggleBase(); |
3 | paul | 450 | void ToggleUGuides(); |
27 | Franz | 451 | void HaveRaster(bool art); |
140 | Franz | 452 | void EditTabs(); |
164 | Franz | 453 | void SearchText(); |
2150 | cbradney | 454 | void imageEditorExited(); |
455 | void callImageEditor(); |
||
1825 | fschmid | 456 | void docCheckToggle(bool visible); |
1232 | fschmid | 457 | void scanDocument(); |
1443 | tsoots | 458 | void setUndoMode(bool isObjectSpecific); |
1818 | cbradney | 459 | void insertSampleText(); |
2408 | cbradney | 460 | void sendToLayer(int layerNumber); |
461 | void updateItemLayerList(); |
||
3 | paul | 462 | |
463 | signals: |
||
464 | void TextISize(int); |
||
465 | void TextIFont(QString); |
||
2382 | fschmid | 466 | void TextUSval(int); |
3 | paul | 467 | void TextStil(int); |
468 | void TextFarben(QString, QString, int, int); |
||
68 | Franz | 469 | void TextScale(int); |
2230 | fschmid | 470 | void TextScaleV(int); |
2234 | fschmid | 471 | void TextBase(int); |
2247 | fschmid | 472 | void TextShadow(int, int); |
2257 | fschmid | 473 | void TextOutline(int); |
2262 | fschmid | 474 | void TextUnderline(int, int); |
2272 | fschmid | 475 | void TextStrike(int, int); |
1549 | subik | 476 | |
1441 | cbradney | 477 | void prefsChanged(); |
1549 | subik | 478 | |
1493 | cbradney | 479 | protected: |
480 | bool eventFilter( QObject *o, QEvent *e ); |
||
80 | Franz | 481 | |
3 | paul | 482 | private: |
188 | Franz | 483 | /** init methods */ |
767 | cbradney | 484 | void initSplash(bool showSplash); |
485 | void closeSplash(); |
||
486 | void initMenuBar(); // initMenuBar creates the menu_bar and inserts the menuitems |
||
487 | void initStatusBar(); // setup the statusbar |
||
488 | void initToolBars(); // setup the toolbars |
||
2295 | cbradney | 489 | void initFonts(bool showFontInfo); // setup the toolbars |
767 | cbradney | 490 | void initHyphenator(); |
770 | cbradney | 491 | void initDefaultPrefs(); |
801 | cbradney | 492 | void initDefaultValues(); |
493 | void initKeyboardShortcuts(); |
||
494 | void initPalettes(); |
||
495 | void initArrowStyles(); |
||
496 | void initScrapbook(); |
||
803 | cbradney | 497 | void initCMS(); |
767 | cbradney | 498 | |
770 | cbradney | 499 | QString guiLanguage; |
1208 | cbradney | 500 | QString recentFileMenuName; |
2408 | cbradney | 501 | QString layerMenuName; |
2199 | cbradney | 502 | bool scribusInitialized; |
2556 | craig | 503 | /// Find and return preferences location |
504 | QString getPreferencesLocation(); |
||
505 | /// copy 1.2 prefs XML before loading, and old .rc files that we don't yet convert |
||
506 | bool copy12Preferences(const QString prefsLocation); |
||
507 | /// convert 1.2 style preferences to new XML format |
||
508 | void convert12Preferences(const QString prefsLocation); |
||
162 | Franz | 509 | QComboBox *ColorMenC; |
510 | /** ShapeMenu enthaelt die Rahmenformen */ |
||
511 | QPopupMenu *ShapeMenu; |
||
512 | /** FontMenu enthaelt die Fonts */ |
||
513 | QPopupMenu *FontMenu; |
||
247 | Franz | 514 | FontCombo* FontSub; |
162 | Franz | 515 | QToolBar *WerkTools2; |
1114 | tsoots | 516 | QToolBar *editToolBar; |
162 | Franz | 517 | WerkToolBP* WerkToolsP; |
518 | QToolButton* DatOpe; |
||
519 | QToolButton* DatSav; |
||
520 | QToolButton* DatClo; |
||
521 | QToolButton* DatPri; |
||
522 | QToolButton* DatPDF; |
||
523 | QToolButton* DatNeu; |
||
524 | int KeyMod; |
||
247 | Franz | 525 | int toolbarMenuTools; |
526 | int toolbarMenuPDFTools; |
||
527 | int viewToolbars; |
||
1545 | cbradney | 528 | int viewPropertiesPalette; |
529 | int viewOutlinePalette; |
||
530 | int viewNodePalette; |
||
162 | Franz | 531 | int viewBpal; |
1545 | cbradney | 532 | int viewLayerPalette; |
533 | int viewPagePalette; |
||
162 | Franz | 534 | int viewBopal; |
1114 | tsoots | 535 | int viewUndoPalette; |
1325 | cbradney | 536 | |
1232 | fschmid | 537 | bool PalettesStat[10]; |
2353 | fschmid | 538 | bool GuidesStat[8]; |
1325 | cbradney | 539 | |
162 | Franz | 540 | bool keyrep; |
1204 | tsoots | 541 | /** @brief Tells if an arrow key is pressed down */ |
542 | bool _arrowKeyDown; |
||
1443 | tsoots | 543 | /** @brief tells the undo mode */ |
544 | bool objectSpecificUndo; |
||
1325 | cbradney | 545 | |
326 | Franz | 546 | void addNewPages(int wo, int where, int numPages, QString based1 = tr("Normal"), QString based2 = tr("Normal")); |
162 | Franz | 547 | QMap<int,QString> FontID; |
548 | int HaveGS; |
||
549 | void *PSDriver; |
||
550 | int DocNr; |
||
551 | QStringList RecentDocs; |
||
1247 | tsoots | 552 | UndoManager *undoManager; |
162 | Franz | 553 | bool PrinterUsed; |
1429 | subik | 554 | struct PDe { |
168 | Franz | 555 | QString Pname; |
1325 | cbradney | 556 | QString Dname; |
557 | QString Command; |
||
558 | } PDef ; |
||
2441 | cbradney | 559 | TOCGenerator *tocGenerator; |
3 | paul | 560 | }; |
1429 | subik | 561 | #endif |
767 | cbradney | 562 |