34 #include <QActionGroup>
37 #include <QMainWindow>
42 #include <QPushButton>
47 class QDragEnterEvent;
57 #include "scribusapi.h"
58 #include "scribusdoc.h"
59 #include "styleoptions.h"
60 #include "ui/customfdialog.h"
61 #include "ui/scmessagebox.h"
85 class NotesStylesEditor;
135 int initScMW(
bool primaryMainwWindow);
136 void addScToolBar(
ScToolBar *tb, QString name);
137 bool warningVersion(QWidget *parent);
139 void startUpDialog();
140 void setDefaultPrinter(
const QString&,
const QString&,
const QString&);
141 void getDefaultPrinter(QString& name, QString& file, QString& command);
143 inline bool scriptIsRunning(
void)
const {
return (ScriptRunning > 0); }
144 inline void setScriptRunning(
bool value) { ScriptRunning += (value ? 1 : -1); }
146 ScribusDoc *doFileNew(
double width,
double height,
double topMargin,
double leftMargin,
double rightMargin,
double bottomMargin,
double columnDistance,
double columnCount,
bool autoTextFrames,
int pageArrangement,
int unitIndex,
int firstPageLocation,
int orientation,
int firstPageNumber,
const QString& defaultPageSize,
bool requiresGUI,
int pageCount=1,
bool showView=
true,
int marginPreset=0);
147 ScribusDoc *newDoc(
double width,
double height,
double topMargin,
double leftMargin,
double rightMargin,
double bottomMargin,
double columnDistance,
double columnCount,
bool autoTextFrames,
int pageArrangement,
int unitIndex,
int firstPageLocation,
int orientation,
int firstPageNumber,
const QString& defaultPageSize,
bool requiresGUI,
int pageCount=1,
bool showView=
true,
int marginPreset=0);
148 bool DoFileSave(
const QString& fileName, QString* savedFileName = NULL);
149 void changeEvent(QEvent *e);
150 void closeEvent(QCloseEvent *ce);
151 void keyPressEvent(QKeyEvent *k);
152 void keyReleaseEvent(QKeyEvent *k);
153 void inputMethodEvent ( QInputMethodEvent * event );
154 QVariant inputMethodQuery ( Qt::InputMethodQuery query )
const ;
155 void requestUpdate(
int);
158 void applyNewMaster(QString name);
159 void updateRecent(QString fn);
160 void doPasteRecent(QString data);
161 bool getPDFDriver(
const QString & filename,
const QString & name,
int components,
const std::vector<int> & pageNumbers,
const QMap<int,QPixmap> & thumbs, QString& error,
bool* cancelled = NULL);
162 bool DoSaveAsEps(QString fn, QString& error);
163 QString CFileDialog(QString workingDirectory =
".", QString dialogCaption =
"", QString fileFilter =
"", QString defNa =
"",
164 int optionFlags = fdExistingFiles,
bool *useCompression = 0,
bool *useFonts = 0,
bool *useProfiles = 0);
168 void recalcColors(QProgressBar *dia = 0);
170 void RestoreBookMarks();
171 QStringList scrapbookNames();
172 void updateLayerMenu();
173 void emergencySave();
184 bool isObjectSpecificUndo();
186 void restoreGrouping(
SimpleState *state,
bool isUndo);
187 void restoreUngrouping(
SimpleState *state,
bool isUndo);
188 void restoreAddPage(
SimpleState *state,
bool isUndo);
189 void restoreDeletePage(
SimpleState *state,
bool isUndo);
190 void setPreviewToolbar();
193 QString internalCopyBuffer;
210 QProgressBar* mainWindowProgressBar;
213 QPushButton *zoomDefaultToolbarButton;
214 QPushButton *zoomOutToolbarButton;
215 QPushButton *zoomInToolbarButton;
216 QComboBox *layerMenu;
217 QComboBox *unitSwitcher;
223 QLabel* mainWindowXPosLabel;
224 QLabel* mainWindowXPosDataLabel;
225 QLabel* mainWindowYPosLabel;
226 QLabel* mainWindowYPosDataLabel;
228 CharSelect *charPalette;
230 MarksManager *marksManager;
254 QProcess *ExternalApp;
256 QMap<QString, QPointer<ScrAction> > scrActions;
257 QMap<QString, QPointer<ScrAction> > scrRecentFileActions;
258 QMap<QString, QPointer<ScrAction> > scrWindowsActions;
259 QMap<QString, QPointer<ScrAction> > scrScrapActions;
260 QMap<QString, QPointer<ScrAction> > scrLayersActions;
261 QMap<QString, QPointer<ScrAction> > scrRecentPasteActions;
262 QMap<QString, QPointer<ScToolBar> > scrToolBars;
263 QMultiHash<QString, QActionGroup*> scrActionGroups;
266 QStringList RecentDocs;
267 QStringList patternsDependingOnThis;
270 void languageChange();
271 void statusBarLanguageChange();
272 void specialActionKeyEvent(
int unicodevalue);
274 void ToggleStickyTools();
275 void ToggleAllGuides();
276 void ToggleAllPalettes();
277 void slotStoryEditor(
bool fromTable);
278 void slotCharSelect();
280 QString fileCollect(
const bool compress =
false,
const bool withFonts =
false,
const bool withProfiles =
false,
const QString& newDirectory=QString::null);
284 void StoreBookmarks();
285 void setStatusBarMousePosition(
double xp,
double yp);
286 void setStatusBarTextPosition(
double base,
double xp);
287 void setStatusBarTextSelectedItemInfo();
288 void setTempStatusBarText(
const QString &text);
289 void setStatusBarInfoText(QString newText);
291 void windowsMenuAboutToShow();
293 void extrasMenuAboutToShow();
294 void newActWin(QMdiSubWindow *w);
295 void closeActiveWindowMasterPageEditor();
296 void updateActiveWindowCaption(
const QString &newCaption);
297 void windowsMenuActivated(
int id);
298 void PutScrap(
int scID);
299 void PutToInline(QString
buffer);
301 void PutToPatterns();
302 void ConvertToSymbol();
303 void changeLayer(
int);
304 void setLayerMenuText(
const QString &);
306 void slotSetCurrentPage(
int Seite);
307 void setCurrentPage(
int p);
309 void editSelectedSymbolStart();
310 void editSymbolStart(QString temp);
311 void editSymbolEnd();
312 void editInlineStart(
int id);
313 void editInlineEnd();
314 void editMasterPagesStart(QString temp =
"");
315 void editMasterPagesEnd();
318 void newFileFromTemplate();
319 bool slotPageImport();
320 bool loadPage(QString fileName,
int Nr,
bool Mpa,
const QString& renamedPageName=QString::null);
322 void slotGetContent();
323 void slotGetContent2();
324 void slotGetClipboardImage();
325 void toogleInlineState();
330 void slotFileAppend();
332 void removeRecent(QString fn,
bool fromFileWatcher =
false);
333 void removeRecentFromWatcher(QString filename);
334 void loadRecent(QString filename);
335 void rebuildRecentFileMenu();
336 void rebuildRecentPasteMenu();
337 void rebuildScrapbookMenu();
338 void pasteRecent(QString fn);
339 void pasteFromScrapbook(QString fn);
340 void importVectorFile();
341 void rebuildLayersList();
343 bool loadDoc(QString);
348 void slotAutoSaved();
352 bool slotFileSaveAs();
353 void slotFileRevert();
357 bool slotFileClose();
359 void slotFilePrint();
360 void slotReallyPrint();
361 void slotEndSpecialEdit();
378 void slotEditPaste();
379 void slotEditCopyContents();
380 void slotEditPasteContents(
int absolute=0);
382 void DisableTxEdit();
383 void SelectAll(
bool docWideSelect=
false);
384 void SelectAllOnLayer();
388 void slotHelpAbout();
389 void slotHelpAboutPlugins();
390 void slotHelpAboutQt();
391 void slotHelpCheckUpdates();
392 void slotRaiseOnlineHelp();
393 void slotOnlineHelp(
const QString & jumpToSection=QString::null,
const QString & jumpToFile=QString::null);
394 void slotOnlineHelpClosed();
395 void slotResourceManager();
397 void ToggleMouseTips();
399 void slotNewPageP(
int wo, QString templ);
401 void slotNewMasterPage(
int w,
const QString &);
402 void slotNewPage(
int w,
const QString& masterPageName=QString::null,
bool mov =
true);
403 void duplicateToMasterPage();
411 void deletePage(
int from,
int to);
412 void deletePage2(
int pg);
416 void changePageProperties();
424 void slotZoom(
double zoomFactor);
429 void toggleLayerMarkers();
430 void toggleTextLinks();
431 void toggleTextControls();
432 void toggleColumnBorders();
434 void toggleRulerMode();
435 void togglePagePalette();
436 void toggleUndoPalette();
437 void setUndoPalette(
bool visible);
438 void toggleCheckPal();
440 void toggleImageVisibility();
444 void toggleSnapGrid();
446 void toggleNodeEdit();
451 void setAppModeByToggle(
bool isOn,
int newMode);
456 void slotDocCh(
bool reb =
true);
461 void SetNewFont(
const QString& nf);
463 void setItemFontSize(
int fontSize);
465 void slotReplaceColors();
469 void MakeFrame(
int f,
int c,
double *vals);
471 void duplicateItem();
473 void duplicateItemMulti();
475 void objectAttributes();
477 void generateTableOfContents();
478 void updateDocument();
481 void setNewAlignment(
int a);
482 void setNewParStyle(
const QString& name);
483 void setNewCharStyle(
const QString& name);
484 void setAlignmentValue(
int a);
485 void editItemsFromOutlines(
PageItem *ite);
487 void selectItemsFromOutlines(
PageItem *ite,
bool single =
false,
int position = 0);
488 void selectItemFromOutlines(
PageItem *ite,
bool single,
int cPos);
489 void selectPagesFromOutlines(
int ScPage);
490 void doPrintPreview();
493 void reallySaveAsEps();
496 void setMainWindowActive();
497 void setItemEffects(
int h);
498 void setStyleEffects(
int s);
499 void setItemTypeStyle(
int id);
500 void slotElemRead(QString Name,
double x,
double y,
bool art,
bool loca,
ScribusDoc* docc,
ScribusView* vie);
501 void slotChangeUnit(
int art,
bool draw =
true);
506 void ApplyMasterPage();
507 void Apply_MasterPage(QString pageName,
int pageNumber,
bool reb =
true);
508 void GroupObj(
bool showLockDia =
true);
510 void AdjustGroupObj();
515 void toggleSnapGuides();
516 void toggleSnapElements();
517 void SetSnapElements(
bool b);
520 void imageEditorExited(
int, QProcess::ExitStatus);
522 void callImageEditor();
523 void docCheckToggle(
bool visible);
526 void setUndoMode(
bool isObjectSpecific);
528 void insertSampleText();
529 void updateItemLayerList();
530 void updateColorLists();
538 void slotInsertFrame();
540 void slotItemTransform();
544 StyleManager *
styleMgr()
const {
return styleManager;};
546 void updateGUIAfterPagesChanged();
553 void updateTableMenuActions();
554 void emitUpdateRequest(
int updateFlags) { emit UpdateRequest(updateFlags); }
557 void slotInsertMark2Mark() { insertMark(MARK2MarkType); }
558 void slotInsertMarkAnchor() { insertMark(MARKAnchorType); }
559 void slotInsertMarkVariableText() { insertMark(MARKVariableTextType); }
560 void slotInsertMarkItem() { insertMark(MARK2ItemType); }
561 void slotInsertMarkNote();
562 void slotInsertMarkIndex() { insertMark(MARKIndexType); }
565 void slotUpdateMarks();
567 void testQTQuick2_1();
568 void testQT_slot1(QString);
569 void testQT_slot2(
double);
570 void testQT_slot3(
int);
573 void changePreviewQuality(
int index);
574 void enablePalettes(
bool b);
575 void ToggleFrameEdit();
582 void TextEffects(
int);
583 void UpdateRequest(
int updateFlags);
584 void changeLayers(
int);
590 bool eventFilter( QObject *o, QEvent *e );
591 virtual void dragEnterEvent( QDragEnterEvent* e);
592 virtual void dropEvent( QDropEvent* e);
596 void initSplash(
bool showSplash);
598 void createMenuBar();
599 void addDefaultWindowMenuItems();
600 void initStatusBar();
602 void setStyleSheet();
604 void initHyphenator();
605 void initDefaultValues();
606 void initKeyboardShortcuts();
608 void initScrapbook();
610 void updateColorMenu(QProgressBar* progressBar=NULL);
614 QLabel* mainWindowStatusLabel;
615 QString statusLabelText;
618 int toolbarMenuTools;
619 int toolbarMenuPDFTools;
621 int viewPropertiesPalette;
622 int viewOutlinePalette;
625 int viewLayerPalette;
630 bool palettesStatus[11];
631 bool guidesStatus[13];
637 bool objectSpecificUndo;
640 void addNewPages(
int wo,
int where,
int numPages,
double height,
double width,
int orient, QString siz,
bool mov, QStringList* basedOn = 0,
bool overrideMasterPageSizing=
true);
653 double storedViewScale;
654 StyleManager *styleManager;
659 QPointer<HelpBrowser> helpBrowser;
660 QString osgFilterString;
662 void insertMark(MarkType);
666 bool m_pagePalVisible;
StyleManager * styleMgr() const
allow SE to get the SM for edit stlyes
Definition: scribus.h:544
Definition: downloadspalette.h:34
Definition: scrapbookpalette.h:69
Definition: measurements.h:14
Definition: pageitem_textframe.h:45
UndoGui subclass which creates an undo history window.
Definition: undogui.h:259
Definition: pagepalette.h:33
UndoState describes an undoable state (action).
Definition: undostate.h:59
This Class is the base class for your application. It sets up the main window and providing a menubar...
Definition: scribus.h:123
Definition: undostate.h:305
Align/Distribute palette.
Definition: aligndistribute.h:54
Definition: outlinepalette.h:56
The ColorCombo widget is a combo box for displaying list of colors.
Definition: colorcombo.h:33
Definition: storyeditor.h:377
Definition: symbolpalette.h:73
Definition: paragraphstyle.h:27
Definition: tocgenerator.h:34
Definition: notesstyleseditor.h:11
ScribusDoc * doc
doc represents your actual document and is created only once. It keeps information such as filename a...
Definition: scribus.h:205
the Document Class
Definition: scribusdoc.h:90
Definition: scribusapp.h:34
Definition: scribuswin.h:40
Preflight Verifier GUI (P.V.) A tool to check document for errors (in P.V. profiles) which can be set...
Definition: checkDocument.h:37
Definition: scribusstructs.h:213
Definition: pageselector.h:24
A Bookmark Palette.
Definition: bookmarkpalette.h:39
GuideManager is the dialog for guides managing ;). It's scribus non-modal palette now...
Definition: guidemanager.h:32
ScrSpinBox is a Qt4 replacement for our old ScrSpinBox using Qt3.
Definition: scrspinbox.h:21
Definition: nodeeditpalette.h:33
Superclass for all objects that are wanted to have undoable actions.
Definition: undoobject.h:59
The core functions moved from the old ScribusMainWindow class NO WINDOWS NO VIEWS NO DOCS NO PAGEITEM...
Definition: scribuscore.h:52
Definition: propertiespalette.h:51
Definition: scraction.h:33
Definition: prefscontext.h:40
Definition: inlinepalette.h:70
Definition: appmodehelper.h:30
Binary buffer.
Definition: pdbim.h:93
Definition: pageitem.h:92
UndoManager handles the undo stack.
Definition: undomanager.h:81
ScribusDoc * m_doc
private doc for managing default patterns.
Definition: scribus.h:207
Definition: scribusstructs.h:58
Definition: scribusview.h:87
Definition: fontcombo.h:43
ScribusView * view
view is the main widget which represents your working area. The View class should handle all events o...
Definition: scribus.h:201
Manage Scribus preferences here, and here alone Start to move the preferences out of scribus...
Definition: prefsmanager.h:43
Definition: actionmanager.h:50
SimpleState provides a simple implementation of the UndoState.
Definition: undostate.h:145
Definition: resourcemanager.h:38
virtual void restore(UndoState *state, bool isUndo)=0
Method used when an undo/redo is requested.