Rev 3566 | Rev 3623 | 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 |
||
2969 | craig | 54 | #include "scribusapi.h" |
3 | paul | 55 | #include "scribusview.h" |
56 | #include "scribusdoc.h" |
||
1525 | cbradney | 57 | |
1429 | subik | 58 | #include "scribusstructs.h" |
1208 | cbradney | 59 | |
169 | Franz | 60 | class Autoforms; |
61 | class FontCombo; |
||
222 | Franz | 62 | class StilFormate; |
225 | Franz | 63 | class LineFormate; |
265 | Franz | 64 | class Mpalette; |
284 | Franz | 65 | class Measurements; |
355 | Franz | 66 | class StoryEditor; |
910 | fschmid | 67 | class PSLib; |
68 | class WerkToolB; |
||
69 | class WerkToolBP; |
||
1114 | tsoots | 70 | class UndoPalette; |
1151 | fschmid | 71 | class FileWatcher; |
1247 | tsoots | 72 | class UndoManager; |
1293 | tsoots | 73 | class UndoState; |
74 | class SimpleState; |
||
1208 | cbradney | 75 | class ScrAction; |
76 | class MenuManager; |
||
1232 | fschmid | 77 | class CheckDocument; |
1414 | fschmid | 78 | class Tree; |
1500 | cbradney | 79 | class Biblio; |
1549 | subik | 80 | class PluginManager; |
1993 | cbradney | 81 | class ActionManager; |
2355 | cbradney | 82 | class AlignDistributePalette; |
2441 | cbradney | 83 | class TOCGenerator; |
2834 | cbradney | 84 | class PrefsManager; |
3251 | craig | 85 | class PrefsContext; |
3565 | cbradney | 86 | class NodePalette; |
87 | class LayerPalette; |
||
88 | class SeitenPal; |
||
89 | class BookPalette; |
||
90 | class SplashScreen; |
||
91 | class ScribusWin; |
||
411 | Franz | 92 | |
3205 | craig | 93 | class ScribusApp; |
94 | |||
95 | extern ScribusApp* ScApp; |
||
96 | |||
3207 | craig | 97 | |
3 | paul | 98 | /** |
99 | * This Class is the base class for your application. It sets up the main |
||
100 | * window and providing a menubar, toolbar |
||
101 | * and statusbar. For the main view, an instance of class ScribusView is |
||
102 | * created which creates your view. |
||
103 | */ |
||
2969 | craig | 104 | class SCRIBUS_API ScribusApp : public QMainWindow, public UndoObject |
3 | paul | 105 | { |
162 | Franz | 106 | Q_OBJECT |
1429 | subik | 107 | |
168 | Franz | 108 | public: |
188 | Franz | 109 | /** constructor */ |
162 | Franz | 110 | ScribusApp(); |
111 | /** destructor */ |
||
112 | ~ScribusApp() {}; |
||
2295 | cbradney | 113 | int initScribus(bool showSplash, bool showFontInfo, const QString newGuiLanguage); |
2835 | cbradney | 114 | void showSplash(bool); |
3171 | craig | 115 | bool splashShowing() const; |
2707 | subik | 116 | void closeSplash(); |
3566 | fschmid | 117 | void setSplashStatus(const QString&); |
770 | cbradney | 118 | const QString getGuiLanguage(); |
1525 | cbradney | 119 | bool warningVersion(QWidget *parent); |
162 | Franz | 120 | void SetShortCut(); |
2833 | fschmid | 121 | void startUpDialog(); |
2859 | cbradney | 122 | void setDefaultPrinter(const QString&, const QString&, const QString&); |
123 | void getDefaultPrinter(QString*, QString*, QString*); |
||
124 | const bool mainToolBarVisible(); |
||
125 | const bool pdfToolBarVisible(); |
||
126 | const bool editToolBarVisible(); |
||
127 | const bool fileToolBarVisible(); |
||
3020 | cbradney | 128 | const bool fileWatcherActive(); |
2859 | cbradney | 129 | |
2150 | cbradney | 130 | bool doFileNew(double width, double h, double tpr, double lr, double rr, double br, double ab, double sp, |
2908 | fschmid | 131 | bool atf, int fp, int einh, int firstleft, int Ori, int SNr, const QString&); |
162 | Franz | 132 | bool DoFileSave(QString fn); |
133 | void closeEvent(QCloseEvent *ce); |
||
134 | void keyPressEvent(QKeyEvent *k); |
||
1204 | tsoots | 135 | void keyReleaseEvent(QKeyEvent *k); |
1814 | cbradney | 136 | void mouseReleaseEvent(QMouseEvent *m); |
162 | Franz | 137 | void wheelEvent(QWheelEvent *w); |
2150 | cbradney | 138 | void deleteSelectedTextFromFrame(PageItem *currItem); |
1957 | cbradney | 139 | void setTBvals(PageItem *currItem); |
162 | Franz | 140 | void ShowSubs(); |
141 | void applyNewMaster(QString name); |
||
1208 | cbradney | 142 | void updateRecent(QString fn); |
369 | Franz | 143 | QString GetLang(QString inLang); |
328 | Franz | 144 | bool getPDFDriver(QString fn, QString nam, int Components, std::vector<int> &pageNs, QMap<int,QPixmap> thumbs); |
162 | Franz | 145 | bool DoSaveAsEps(QString fn); |
415 | Franz | 146 | QString CFileDialog(QString wDir = ".", QString caption = "", QString filter = "", QString defNa = "", |
1325 | cbradney | 147 | bool Pre = false, bool mod = true, bool comp = false, bool cod = false, |
148 | bool onlyDirs = false, bool *docom = 0, bool *doFont = 0); |
||
162 | Franz | 149 | void GetCMSProfiles(); |
150 | void GetCMSProfilesDir(QString pfad); |
||
3123 | cbradney | 151 | //Recalculate the colors after changing CMS settings. Call the appropriate document function and then update the GUI elements. |
152 | void recalcColors(QProgressBar *dia = 0); |
||
162 | Franz | 153 | void SwitchWin(); |
154 | void RestoreBookMarks(); |
||
155 | void AdjustBM(); |
||
156 | void ReorgFonts(); |
||
2536 | cbradney | 157 | |
162 | Franz | 158 | void emergencySave(); |
359 | Franz | 159 | void parsePagesString(QString pages, std::vector<int>* pageNs, int sourcePageCount); |
1204 | tsoots | 160 | /** |
161 | * @brief Returns true if an arrow key is pressed down. |
||
162 | * @return true if an arrow key is pressed down otherwise returns false |
||
163 | */ |
||
164 | bool arrowKeyDown(); |
||
1549 | subik | 165 | /** |
1443 | tsoots | 166 | * @brief Returns true if application is in object specific undo mode, other wise returns false. |
167 | * @return true if application is in object specific undo mode, other wise returns false |
||
168 | */ |
||
169 | bool isObjectSpecificUndo(); |
||
1293 | tsoots | 170 | void restore(UndoState* state, bool isUndo); |
171 | void restoreGroupping(SimpleState *state, bool isUndo); |
||
172 | void restoreUngroupping(SimpleState *state, bool isUndo); |
||
1658 | tsoots | 173 | void restoreAddPage(SimpleState *state, bool isUndo); |
1663 | tsoots | 174 | void restoreDeletePage(SimpleState *state, bool isUndo); |
1065 | cbradney | 175 | struct CopyPasteBuffer Buffer; |
162 | Franz | 176 | QString Buffer2; |
177 | QString Buffer3; |
||
178 | bool BuFromApp; |
||
2891 | cbradney | 179 | ProfilesL InputProfiles; |
2989 | fschmid | 180 | ProfilesL InputProfilesCMYK; |
162 | Franz | 181 | ProfilesL MonitorProfiles; |
182 | ProfilesL PrinterProfiles; |
||
183 | ProfilesL PDFXProfiles; |
||
184 | double DispX; |
||
185 | double DispY; |
||
186 | int HaveDoc; |
||
2894 | fschmid | 187 | QString noneString; |
415 | Franz | 188 | PrefsContext* dirs; |
162 | Franz | 189 | /** view is the main widget which represents your working area. The View |
190 | * class should handle all events of the view widget. It is kept empty so |
||
191 | * you can create your view according to your application's needs by |
||
192 | * changing the view class. |
||
193 | */ |
||
194 | ScribusView *view; |
||
195 | /** doc represents your actual document and is created only once. It keeps |
||
196 | * information such as filename and does the serialization of your files. |
||
197 | */ |
||
198 | ScribusDoc *doc; |
||
382 | Franz | 199 | /** the splash screen */ |
669 | cbradney | 200 | SplashScreen *splashScreen; |
2433 | cbradney | 201 | QLabel* mainWindowStatusLabel; |
202 | QProgressBar* mainWindowProgressBar; |
||
203 | QLabel* mainWindowXPosLabel; |
||
204 | QLabel* mainWindowXPosDataLabel; |
||
205 | QLabel* mainWindowYPosLabel; |
||
206 | QLabel* mainWindowYPosDataLabel; |
||
1545 | cbradney | 207 | Mpalette *propertiesPalette; |
208 | NodePalette *nodePalette; |
||
209 | Tree *outlinePalette; |
||
210 | Biblio *scrapbookPalette; |
||
211 | LayerPalette* layerPalette; |
||
212 | SeitenPal *pagePalette; |
||
213 | BookPalette *bookmarkPalette; |
||
214 | Measurements* measurementPalette; |
||
215 | CheckDocument * docCheckerPalette; |
||
1114 | tsoots | 216 | UndoPalette* undoPalette; |
2355 | cbradney | 217 | AlignDistributePalette *alignDistributePalette; |
2494 | cbradney | 218 | StoryEditor* storyEditor; |
355 | Franz | 219 | StoryEditor* CurrStED; |
162 | Franz | 220 | QMap<QString,QString> Sprachen; |
221 | QWorkspace *wsp; |
||
222 | ScribusWin* ActWin; |
||
223 | QString PrefsPfad; |
||
224 | QClipboard *ClipB; |
||
225 | QString LoadEnc; |
||
226 | bool singleClose; |
||
173 | Franz | 227 | bool ScriptRunning; |
188 | Franz | 228 | Autoforms* SCustom; |
2859 | cbradney | 229 | WerkToolB* mainToolBar; |
214 | Franz | 230 | int HavePngAlpha; |
3169 | fschmid | 231 | int HaveTiffSep; |
3034 | cbradney | 232 | bool unicodeTextEditMode; |
233 | int unicodeInputCount; |
||
234 | QString unicodeInputString; |
||
1208 | cbradney | 235 | |
369 | Franz | 236 | QMap<QString, QStringList> InstLang; |
237 | QMap<QString,QString> LangTransl; |
||
1151 | fschmid | 238 | FileWatcher* fileWatcher; |
1155 | fschmid | 239 | QProcess *ExternalApp; |
1478 | cbradney | 240 | |
241 | QMap<QString, QGuardedPtr<ScrAction> > scrActions; |
||
242 | QMap<QString, QGuardedPtr<ScrAction> > scrRecentFileActions; |
||
243 | QMap<QString, QGuardedPtr<ScrAction> > scrWindowsActions; |
||
2408 | cbradney | 244 | QMap<QString, QGuardedPtr<ScrAction> > scrLayersActions; |
1325 | cbradney | 245 | QDict<QActionGroup> scrActionGroups; |
1208 | cbradney | 246 | MenuManager* scrMenuMgr; |
1993 | cbradney | 247 | ActionManager* actionManager; |
1549 | subik | 248 | PluginManager* pluginManager; |
2833 | fschmid | 249 | QStringList RecentDocs; |
3 | paul | 250 | |
162 | Franz | 251 | public slots: |
2161 | cbradney | 252 | void languageChange(); |
1903 | cbradney | 253 | void specialActionKeyEvent(QString actionName, int unicodevalue); |
1330 | fschmid | 254 | void newView(); |
1525 | cbradney | 255 | void ToggleAllGuides(); |
356 | Franz | 256 | void ToggleAllPalettes(); |
162 | Franz | 257 | void slotStoryEditor(); |
1202 | fschmid | 258 | void slotCharSelect(); |
2056 | fschmid | 259 | void ImageEffects(); |
3020 | cbradney | 260 | QString Collect(const bool compress = false, const bool withFonts = false, const QString& newDirectory=QString::null); |
162 | Franz | 261 | void ChBookmarks(int s, int e, int n); |
262 | void AddBookMark(PageItem *ite); |
||
263 | void DelBookMark(PageItem *ite); |
||
264 | void BookMarkTxT(PageItem *ite); |
||
265 | void StoreBookmarks(); |
||
266 | void ManageGuides(); |
||
2026 | cbradney | 267 | void setItemFillTransparency(double t); |
268 | void setItemLineTransparency(double t); |
||
2150 | cbradney | 269 | void setMousePositionOnStatusBar(double xp, double yp); |
162 | Franz | 270 | bool DoFileClose(); |
268 | Franz | 271 | bool DoSaveClose(); |
162 | Franz | 272 | void windowsMenuAboutToShow(); |
273 | void newActWin(QWidget *w); |
||
3565 | cbradney | 274 | void closeActiveWindowMasterPageEditor(); |
275 | void updateActiveWindowCaption(const QString &newCaption); |
||
162 | Franz | 276 | void windowsMenuActivated(int id); |
277 | void UnDoAction(); |
||
1114 | tsoots | 278 | void RedoAction(); |
162 | Franz | 279 | void doHyphenate(); |
2621 | fschmid | 280 | void doDeHyphenate(); |
162 | Franz | 281 | void slotTest(); |
282 | void slotTest2(); |
||
1981 | cbradney | 283 | void PutScrap(); |
2952 | cbradney | 284 | void changeLayer(int); |
162 | Franz | 285 | void showLayer(); |
216 | Franz | 286 | void LayerRemove(int l, bool dl = false); |
162 | Franz | 287 | void ManageJava(); |
2093 | cbradney | 288 | void manageMasterPages(QString temp = ""); |
289 | void manageMasterPagesEnd(); |
||
290 | /** generate a new document in the current view */ |
||
162 | Franz | 291 | bool slotFileNew(); |
2093 | cbradney | 292 | bool slotPageImport(); |
2150 | cbradney | 293 | bool loadPage(QString fileName, int Nr, bool Mpa); |
162 | Franz | 294 | /** open a document */ |
295 | void slotFileOpen(); |
||
218 | Franz | 296 | void slotFileAppend(); |
162 | Franz | 297 | /** open a document */ |
1208 | cbradney | 298 | void removeRecent(QString fn); |
299 | void loadRecent(QString fn); |
||
300 | void rebuildRecentFileMenu(); |
||
2408 | cbradney | 301 | void rebuildLayersList(); |
162 | Franz | 302 | bool slotDocOpen(); |
2150 | cbradney | 303 | bool loadDoc(QString); |
162 | Franz | 304 | void slotAutoSaved(); |
305 | /** save a document */ |
||
268 | Franz | 306 | bool slotFileSave(); |
162 | Franz | 307 | /** save a document under a different filename*/ |
268 | Franz | 308 | bool slotFileSaveAs(); |
162 | Franz | 309 | void slotFileRevert(); |
310 | /** Sichert den Text eines Elements */ |
||
311 | void SaveText(); |
||
312 | /** close the actual file */ |
||
313 | bool slotFileClose(); |
||
314 | /** print the actual file */ |
||
315 | void slotFilePrint(); |
||
1825 | fschmid | 316 | void slotReallyPrint(); |
411 | Franz | 317 | bool doPrint(PrintOptions *options); |
162 | Franz | 318 | /** exits the application */ |
319 | void slotFileQuit(); |
||
320 | /** put the marked text/object into the clipboard and remove |
||
321 | * it from the document */ |
||
322 | void slotEditCut(); |
||
323 | /** put the marked text/object into the clipboard*/ |
||
324 | void slotEditCopy(); |
||
325 | /** paste the clipboard into the document*/ |
||
326 | void slotEditPaste(); |
||
327 | void EnableTxEdit(); |
||
328 | void DisableTxEdit(); |
||
329 | void SelectAll(); |
||
1837 | cbradney | 330 | void deselectAll(); |
162 | Franz | 331 | void ClipChange(); |
1963 | cbradney | 332 | void clearContents(); |
162 | Franz | 333 | /** shows an about dlg*/ |
334 | void slotHelpAbout(); |
||
3247 | craig | 335 | void slotHelpAboutPlugins(); |
3 | paul | 336 | void slotHelpAboutQt(); |
162 | Franz | 337 | void slotOnlineHelp(); |
338 | void ToggleTips(); |
||
339 | /** Erzeugt eine neue Seite */ |
||
3 | paul | 340 | void slotNewPageP(int wo, QString templ); |
162 | Franz | 341 | void slotNewPageM(); |
2150 | cbradney | 342 | void slotNewMasterPage(int w); |
2880 | fschmid | 343 | void slotNewPage(int w, bool mov = true); |
3187 | fschmid | 344 | void duplicateToMasterPage(); |
162 | Franz | 345 | /** Loescht die aktuelle Seite */ |
346 | void DeletePage(); |
||
2246 | subik | 347 | /** |
348 | * Delete pages |
||
1658 | tsoots | 349 | * @param from First page to delete |
350 | * @param to Last page to delete |
||
351 | */ |
||
352 | void DeletePage(int from, int to); |
||
3 | paul | 353 | void DeletePage2(int pg); |
162 | Franz | 354 | /** Verschiebt Seiten */ |
355 | void MovePage(); |
||
356 | void CopyPage(); |
||
2777 | fschmid | 357 | void changePageMargins(); |
1326 | cbradney | 358 | /** Zoom the view */ |
359 | void slotZoom(double zoomFactor); // 20, 50, 100, or -100 for Fit |
||
3 | paul | 360 | /** Schaltet Raender ein/aus */ |
361 | void ToggleMarks(); |
||
362 | void ToggleFrames(); |
||
705 | fschmid | 363 | void ToggleTextLinks(); |
2353 | fschmid | 364 | void ToggleTextControls(); |
2863 | fschmid | 365 | void ToggleRuler(); |
3 | paul | 366 | /** Schaltet Werkzeuge ein/aus */ |
119 | Franz | 367 | void setTools(bool visible); |
3 | paul | 368 | void ToggleTools(); |
119 | Franz | 369 | void setPDFTools(bool visible); |
14 | Franz | 370 | void TogglePDFTools(); |
3 | paul | 371 | /** Schaltet Masspalette ein/aus */ |
2144 | cbradney | 372 | //void togglePropertiesPalette(); |
3 | paul | 373 | /** Schaltet Uebersichtspalette ein/aus*/ |
2144 | cbradney | 374 | //void toggleOutlinePalette(); |
375 | //void toggleScrapbookPalette(); |
||
376 | //void toggleLayerPalette(); |
||
1545 | cbradney | 377 | void togglePagePalette(); |
378 | void setPagePalette(bool visible); |
||
2144 | cbradney | 379 | //void toggleBookmarkPalette(); |
1545 | cbradney | 380 | void toggleUndoPalette(); |
1114 | tsoots | 381 | void setUndoPalette(bool visible); |
1493 | cbradney | 382 | void toggleCheckPal(); |
1208 | cbradney | 383 | /** Schaltet M_ViewShowImages ein/aus */ |
3 | paul | 384 | void TogglePics(); |
385 | /** Schaltet Raster ein/aus */ |
||
386 | void ToggleRaster(); |
||
387 | /** Schaltet Rasterbenutzung ein/aus */ |
||
388 | void ToggleURaster(); |
||
389 | /** Schaltet Rahmenbearbeitung ein/aus */ |
||
390 | void ToggleFrameEdit(); |
||
391 | void slotSelect(); |
||
1065 | cbradney | 392 | /** Switch appMode */ |
3 | paul | 393 | void setAppMode(int mode); |
1525 | cbradney | 394 | void setAppModeByToggle(bool isOn, int newMode); |
3 | paul | 395 | /** Neues Dokument erzeugt */ |
396 | void HaveNewDoc(); |
||
397 | /** Element ausgewaehlt */ |
||
398 | void HaveNewSel(int Nr); |
||
399 | /** Dokument ist geaendert worden */ |
||
400 | void slotDocCh(bool reb = true); |
||
401 | /** Setzt die Farbe */ |
||
402 | void setItemFarbe(int id); |
||
403 | /** Setzt die Abstufung */ |
||
404 | void setItemShade(int id); |
||
405 | /** Setzt den Font */ |
||
406 | void setItemFont(int id); |
||
169 | Franz | 407 | void setItemFont2(int id); |
3 | paul | 408 | /** Korrigiert das FontMenu */ |
409 | void AdjustFontMenu(QString nf); |
||
3135 | cbradney | 410 | void SetNewFont(const QString& nf); |
3 | paul | 411 | /** Setz die Zeichensatzgroesse */ |
412 | void setItemFSize(int id); |
||
413 | void setFSizeMenu(int size); |
||
414 | /** Farbeditor */ |
||
415 | void slotEditColors(); |
||
416 | /** Setzt den Pen-Tonwert */ |
||
417 | void setPenShade(int sh); |
||
418 | /** Setzt den Brush-Tonwert */ |
||
419 | void setBrushShade(int sh); |
||
295 | Franz | 420 | void setGradFill(int typ); |
421 | void updtGradFill(); |
||
3 | paul | 422 | /** Setzt die Pen-Farbe */ |
423 | void setPenFarbe(QString farbe); |
||
424 | /** Setzt die Brush-Farbe */ |
||
425 | void setBrushFarbe(QString farbe); |
||
426 | void setCSMenu(QString f, QString l, int fs, int ls); |
||
427 | /** Fragt nach den Farben */ |
||
428 | void GetBrushPen(); |
||
169 | Franz | 429 | /** Erzeugt einen Rahmen */ |
430 | void MakeFrame(int f, int c, double *vals); |
||
3 | paul | 431 | /** Loescht ein Element */ |
432 | void DeleteObjekt(); |
||
433 | /** Dupliziert das Element */ |
||
434 | void ObjektDup(); |
||
435 | /** Dupliziert das Element mehrfach*/ |
||
436 | void ObjektDupM(); |
||
437 | /** Reformatiert das Dokument */ |
||
438 | bool SetupDoc(); |
||
1644 | cbradney | 439 | void objectAttributes(); |
1694 | cbradney | 440 | void generateTableOfContents(); |
770 | cbradney | 441 | void buildFontMenu(); |
3 | paul | 442 | void slotPrefsOrg(); |
443 | void slotEditStyles(); |
||
222 | Franz | 444 | void saveStyles(StilFormate *dia); |
27 | Franz | 445 | void slotEditLineStyles(); |
225 | Franz | 446 | void saveLStyles(LineFormate *dia); |
3 | paul | 447 | void setNewAbStyle(int a); |
448 | void setAbsValue(int a); |
||
3025 | cbradney | 449 | void selectItemsFromOutlines(int Page, int Item, bool single = false); |
450 | void selectPagesFromOutlines(int Page); |
||
3165 | fschmid | 451 | void doPrintPreview(); |
452 | void printPreview(); |
||
3 | paul | 453 | void SaveAsEps(); |
1825 | fschmid | 454 | void reallySaveAsEps(); |
3 | paul | 455 | void SaveAsPDF(); |
1816 | fschmid | 456 | void doSaveAsPDF(); |
3135 | cbradney | 457 | void setMainWindowActive(); |
3 | paul | 458 | void setItemHoch(int h); |
459 | void setStilvalue(int s); |
||
460 | void setItemTypeStyle(int id); |
||
456 | fschmid | 461 | void slotElemRead(QString Name, int x, int y, bool art, bool loca, ScribusDoc* docc, ScribusView* vie); |
51 | Franz | 462 | void slotChangeUnit(int art, bool draw = true); |
3 | paul | 463 | void NoFrameEdit(); |
2093 | cbradney | 464 | void ApplyMasterPage(); |
465 | void Apply_MasterPage(QString in, int Snr, bool reb = true); |
||
1293 | tsoots | 466 | void GroupObj(bool showLockDia = true); |
3 | paul | 467 | void UnGroupObj(); |
468 | void StatusPic(); |
||
469 | void ModifyAnnot(); |
||
470 | void ToggleGuides(); |
||
241 | Franz | 471 | void ToggleBase(); |
3 | paul | 472 | void ToggleUGuides(); |
27 | Franz | 473 | void HaveRaster(bool art); |
140 | Franz | 474 | void EditTabs(); |
164 | Franz | 475 | void SearchText(); |
2150 | cbradney | 476 | void imageEditorExited(); |
477 | void callImageEditor(); |
||
1825 | fschmid | 478 | void docCheckToggle(bool visible); |
1232 | fschmid | 479 | void scanDocument(); |
1443 | tsoots | 480 | void setUndoMode(bool isObjectSpecific); |
2707 | subik | 481 | //! Apply a Lorem Ipsum to the each item in a selection |
1818 | cbradney | 482 | void insertSampleText(); |
2408 | cbradney | 483 | void sendToLayer(int layerNumber); |
484 | void updateItemLayerList(); |
||
3 | paul | 485 | |
486 | signals: |
||
487 | void TextISize(int); |
||
488 | void TextIFont(QString); |
||
2382 | fschmid | 489 | void TextUSval(int); |
3 | paul | 490 | void TextStil(int); |
491 | void TextFarben(QString, QString, int, int); |
||
68 | Franz | 492 | void TextScale(int); |
2230 | fschmid | 493 | void TextScaleV(int); |
2234 | fschmid | 494 | void TextBase(int); |
2247 | fschmid | 495 | void TextShadow(int, int); |
2257 | fschmid | 496 | void TextOutline(int); |
2262 | fschmid | 497 | void TextUnderline(int, int); |
2272 | fschmid | 498 | void TextStrike(int, int); |
1549 | subik | 499 | |
1441 | cbradney | 500 | void prefsChanged(); |
1549 | subik | 501 | |
1493 | cbradney | 502 | protected: |
503 | bool eventFilter( QObject *o, QEvent *e ); |
||
80 | Franz | 504 | |
3 | paul | 505 | private: |
188 | Franz | 506 | /** init methods */ |
767 | cbradney | 507 | void initSplash(bool showSplash); |
508 | void initMenuBar(); // initMenuBar creates the menu_bar and inserts the menuitems |
||
3097 | cbradney | 509 | void addDefaultWindowMenuItems(); // addDefaultWindowMenuItems adds the basic Windows menu items, excluding the actual list of windows |
767 | cbradney | 510 | void initStatusBar(); // setup the statusbar |
511 | void initToolBars(); // setup the toolbars |
||
2870 | cbradney | 512 | const bool initFonts(const bool showFontInfo); |
767 | cbradney | 513 | void initHyphenator(); |
801 | cbradney | 514 | void initDefaultValues(); |
515 | void initKeyboardShortcuts(); |
||
516 | void initPalettes(); |
||
517 | void initScrapbook(); |
||
803 | cbradney | 518 | void initCMS(); |
3034 | cbradney | 519 | void updateColorMenu(QProgressBar* progressBar=NULL); |
767 | cbradney | 520 | |
770 | cbradney | 521 | QString guiLanguage; |
1208 | cbradney | 522 | QString recentFileMenuName; |
2408 | cbradney | 523 | QString layerMenuName; |
3580 | avox | 524 | QPixmap noIcon; |
2199 | cbradney | 525 | bool scribusInitialized; |
162 | Franz | 526 | QComboBox *ColorMenC; |
527 | /** ShapeMenu enthaelt die Rahmenformen */ |
||
528 | QPopupMenu *ShapeMenu; |
||
529 | /** FontMenu enthaelt die Fonts */ |
||
530 | QPopupMenu *FontMenu; |
||
247 | Franz | 531 | FontCombo* FontSub; |
2859 | cbradney | 532 | QToolBar *fileToolBar; |
1114 | tsoots | 533 | QToolBar *editToolBar; |
2859 | cbradney | 534 | WerkToolBP* pdfToolBar; |
162 | Franz | 535 | QToolButton* DatOpe; |
536 | QToolButton* DatSav; |
||
537 | QToolButton* DatClo; |
||
538 | QToolButton* DatPri; |
||
539 | QToolButton* DatPDF; |
||
540 | QToolButton* DatNeu; |
||
541 | int KeyMod; |
||
247 | Franz | 542 | int toolbarMenuTools; |
543 | int toolbarMenuPDFTools; |
||
544 | int viewToolbars; |
||
1545 | cbradney | 545 | int viewPropertiesPalette; |
546 | int viewOutlinePalette; |
||
547 | int viewNodePalette; |
||
162 | Franz | 548 | int viewBpal; |
1545 | cbradney | 549 | int viewLayerPalette; |
550 | int viewPagePalette; |
||
162 | Franz | 551 | int viewBopal; |
1114 | tsoots | 552 | int viewUndoPalette; |
1325 | cbradney | 553 | |
1232 | fschmid | 554 | bool PalettesStat[10]; |
2863 | fschmid | 555 | bool GuidesStat[9]; |
1325 | cbradney | 556 | |
162 | Franz | 557 | bool keyrep; |
1204 | tsoots | 558 | /** @brief Tells if an arrow key is pressed down */ |
559 | bool _arrowKeyDown; |
||
1443 | tsoots | 560 | /** @brief tells the undo mode */ |
561 | bool objectSpecificUndo; |
||
1325 | cbradney | 562 | |
3032 | fschmid | 563 | void addNewPages(int wo, int where, int numPages, double height, double width, int orient, QString siz, bool mov, QStringList* basedOn = 0); |
162 | Franz | 564 | QMap<int,QString> FontID; |
565 | int HaveGS; |
||
566 | void *PSDriver; |
||
567 | int DocNr; |
||
1247 | tsoots | 568 | UndoManager *undoManager; |
2834 | cbradney | 569 | PrefsManager *prefsManager; |
162 | Franz | 570 | bool PrinterUsed; |
1429 | subik | 571 | struct PDe { |
168 | Franz | 572 | QString Pname; |
1325 | cbradney | 573 | QString Dname; |
574 | QString Command; |
||
575 | } PDef ; |
||
2441 | cbradney | 576 | TOCGenerator *tocGenerator; |
3 | paul | 577 | }; |
3207 | craig | 578 | |
1429 | subik | 579 | #endif |
767 | cbradney | 580 |