ScribusMainWindow Class Reference
This Class is the base class for your application. It sets up the main window and providing a menubar, toolbar and statusbar. For the main view, an instance of class ScribusView is created which creates your view. More...
#include <scribus.h>


Public Slots | |
| void | languageChange () |
| void | specialActionKeyEvent (const QString &actionName, int unicodevalue) |
| void | newView () |
| void | ToggleStickyTools () |
| void | ToggleAllGuides () |
| void | ToggleAllPalettes () |
| void | slotStoryEditor () |
| void | slotCharSelect () |
| void | ImageEffects () |
| QString | Collect (const bool compress=false, const bool withFonts=false, const bool withProfiles=false, const QString &newDirectory=QString::null) |
| void | AddBookMark (PageItem *ite) |
| void | DelBookMark (PageItem *ite) |
| void | BookMarkTxT (PageItem *ite) |
| void | StoreBookmarks () |
| void | setStatusBarMousePosition (double xp, double yp) |
| void | setStatusBarInfoText (QString newText) |
| bool | DoFileClose () |
| void | windowsMenuAboutToShow () |
| void | extrasMenuAboutToShow () |
| Handle the Extras menu for its items availability. | |
| void | newActWin (QWidget *w) |
| void | closeActiveWindowMasterPageEditor () |
| void | updateActiveWindowCaption (const QString &newCaption) |
| void | windowsMenuActivated (int id) |
| void | UnDoAction () |
| void | RedoAction () |
| void | slotTest () |
| void | slotTest2 () |
| void | PutScrap () |
| void | PutToPatterns () |
| void | changeLayer (int) |
| void | showLayer () |
| void | ManageJava () |
| void | manageMasterPages (QString temp="") |
| void | manageMasterPagesEnd () |
| bool | slotFileNew () |
| generate a new document in the current view | |
| bool | slotPageImport () |
| bool | loadPage (QString fileName, int Nr, bool Mpa, const QString &renamedPageName=QString::null) |
| void | slotGetContent () |
| void | slotGetContent2 () |
| void | slotFileAppend () |
| Appends a Textfile to the Text in the selected Textframe at the Cursorposition. | |
| void | removeRecent (QString fn) |
| void | loadRecent (QString fn) |
| void | rebuildRecentFileMenu () |
| void | rebuildRecentPasteMenu () |
| void | pasteRecent (QString fn) |
| void | pasteFromScrapbook (QString fn) |
| void | rebuildLayersList () |
| bool | slotDocOpen () |
| bool | loadDoc (QString) |
| bool | postLoadDoc () |
| Do post loading functions. | |
| void | slotAutoSaved () |
| bool | slotFileSave () |
| save a document | |
| bool | slotFileSaveAs () |
| save a document under a different filename | |
| void | slotFileRevert () |
| void | SaveText () |
| Sichert den Text eines Elements. | |
| bool | slotFileClose () |
| close the actual file | |
| void | slotFilePrint () |
| print the actual file | |
| void | slotReallyPrint () |
| bool | doPrint (PrintOptions &options, QString &error) |
| Generate and print PostScript from a doc. | |
| void | slotFileQuit () |
| exits the application | |
| void | slotEditCut () |
| put the marked text/object into the clipboard and remove it from the document | |
| void | slotEditCopy () |
| put the marked text/object into the clipboard | |
| void | slotEditPaste () |
| paste the clipboard into the document | |
| void | slotEditCopyContents () |
| void | slotEditPasteContents (int absolute=0) |
| void | EnableTxEdit () |
| void | DisableTxEdit () |
| void | SelectAll () |
| void | deselectAll () |
| void | ClipChange () |
| void | slotHelpAbout () |
| shows an about dialog | |
| void | slotHelpAboutPlugins () |
| void | slotHelpAboutQt () |
| void | slotHelpCheckUpdates () |
| void | slotOnlineHelp () |
| void | slotOnlineHelpClosed () |
| void | ToggleTips () |
| void | slotNewPageP (int wo, QString templ) |
| Erzeugt eine neue Seite. | |
| void | slotNewPageM () |
| void | slotNewMasterPage (int w, const QString &) |
| void | slotNewPage (int w, const QString &masterPageName=QString::null, bool mov=true) |
| void | duplicateToMasterPage () |
| void | DeletePage () |
| Loescht die aktuelle Seite. | |
| void | DeletePage (int from, int to) |
| Delete pages. | |
| void | DeletePage2 (int pg) |
| void | MovePage () |
| Verschiebt Seiten. | |
| void | CopyPage () |
| void | changePageMargins () |
| void | slotZoom (double zoomFactor) |
| Zoom the view. Take the ScMW zoom actions and pass the view a %. Actions have whole number values like 20.0, 100.0, etc. Zoom to Fit uses -100 as a marker. | |
| void | ToggleMarks () |
| Schaltet Raender ein/aus. | |
| void | ToggleBleeds () |
| void | ToggleFrames () |
| void | ToggleLayerMarkers () |
| void | ToggleTextLinks () |
| void | ToggleTextControls () |
| void | ToggleColumnBorders () |
| void | ToggleRulers () |
| void | ToggleRulerMode () |
| void | togglePagePalette () |
| void | setPagePalette (bool visible) |
| void | toggleUndoPalette () |
| void | setUndoPalette (bool visible) |
| void | toggleCheckPal () |
| void | TogglePics () |
| Schaltet M_ViewShowImages ein/aus. | |
| void | ToggleRaster () |
| Schaltet Raster ein/aus. | |
| void | ToggleURaster () |
| Schaltet Rasterbenutzung ein/aus. | |
| void | toggleNodeEdit () |
| Schaltet Rahmenbearbeitung ein/aus. | |
| void | slotSelect () |
| void | setAppMode (int mode) |
| Switch appMode. | |
| void | setAppModeByToggle (bool isOn, int newMode) |
| void | HaveNewDoc () |
| Neues Dokument erzeugt. | |
| void | HaveNewSel (int Nr) |
| void | rebuildStyleMenu (int itemType) |
| void | slotDocCh (bool reb=true) |
| void | setItemShade (int id) |
| void | SetNewFont (const QString &nf) |
| void | setItemFSize (int id) |
| void | slotEditColors () |
| void | updtGradFill () |
| void | setCSMenu () |
| void | MakeFrame (int f, int c, double *vals) |
| void | duplicateItem () |
| void | duplicateItemMulti () |
| bool | slotDocSetup () |
| Refromat the document when user click "OK" in ReformDoc dialog. See docSetup() for more info. | |
| void | objectAttributes () |
| void | getImageInfo () |
| void | generateTableOfContents () |
| void | slotPrefsOrg () |
| Change Preferences dialog. See prefsOrg for more info. It's very similar to docSetup/slotDocSetup. | |
| void | setNewAlignment (int a) |
| void | setNewParStyle (const QString &name) |
| void | setNewCharStyle (const QString &name) |
| void | setAbsValue (int a) |
| void | selectItemsFromOutlines (PageItem *ite) |
| void | selectItemsFromOutlines (int Page, int Item, bool single=false) |
| void | selectPagesFromOutlines (int Page) |
| void | doPrintPreview () |
| void | printPreview () |
| void | SaveAsEps () |
| void | reallySaveAsEps () |
| void | SaveAsPDF () |
| void | doSaveAsPDF () |
| void | setMainWindowActive () |
| void | setItemHoch (int h) |
| void | setStilvalue (int s) |
| void | setItemTypeStyle (int id) |
| void | slotElemRead (QString Name, double x, double y, bool art, bool loca, ScribusDoc *docc, ScribusView *vie) |
| void | slotChangeUnit (int art, bool draw=true) |
| void | ApplyMasterPage () |
| Apply master pages from the Apply Master Page dialog. | |
| void | Apply_MasterPage (QString pageName, int pageNumber, bool reb=true) |
| void | GroupObj (bool showLockDia=true) |
| void | UnGroupObj () |
| void | StatusPic () |
| void | ModifyAnnot () |
| void | ToggleGuides () |
| void | ToggleBase () |
| void | ToggleUGuides () |
| void | HaveRaster (bool art) |
| void | EditTabs () |
| void | SearchText () |
| void | imageEditorExited (int, QProcess::ExitStatus) |
| void | callImageEditor () |
| call gimp and wait upon completion | |
| void | docCheckToggle (bool visible) |
| bool | scanDocument () |
| Scan a document for errors, return true on errors found. | |
| void | setUndoMode (bool isObjectSpecific) |
| void | insertSampleText () |
| Apply a Lorem Ipsum to the each item in a selection. | |
| void | updateItemLayerList () |
| void | docSetup (ReformDoc *dia) |
| Apply changes from ReformDoc dialog. It's called from this->slotDocSetup() or from ReformDoc directly. | |
| void | prefsOrg (Preferences *dia) |
| Apply changes from Preferences dialog. It's called from this->slotPrefsOrg() or from Preferences directly. | |
| void | slotInsertFrame () |
| Insert a frame friendly dialog. | |
| void | managePatterns () |
| manages the documents patterns | |
| void | enableTextActions (QMap< QString, QPointer< ScrAction > > *actionMap, bool enabled, const QString &fontName=QString::null) |
| enable or disable the unicode actions and their menus | |
| StyleManager * | styleMgr () const |
| allow SE to get the SM for edit stlyes | |
Signals | |
| void | TextStyle (const ParagraphStyle &) |
| void | TextISize (double) |
| void | TextIFont (const QString &) |
| void | TextUSval (double) |
| void | TextStil (int) |
| void | TextFarben (QString, QString, double, double) |
| void | TextScale (double) |
| void | TextScaleV (double) |
| void | TextBase (double) |
| void | TextShadow (double, double) |
| void | TextOutline (double) |
| void | TextUnderline (double, double) |
| void | TextStrike (double, double) |
Public Member Functions | |
| ScribusMainWindow () | |
| constructor | |
| ~ScribusMainWindow () | |
| destructor | |
| int | initScMW (bool primaryMainwWindow) |
| void | addScToolBar (ScToolBar *tb, QString name) |
| bool | warningVersion (QWidget *parent) |
| void | SetShortCut () |
| void | startUpDialog () |
| void | setDefaultPrinter (const QString &, const QString &, const QString &) |
| void | getDefaultPrinter (QString &name, QString &file, QString &command) |
| 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) |
| 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) |
| bool | DoFileSave (const QString &fileName, QString *savedFileName=NULL) |
| void | changeEvent (QEvent *e) |
| void | closeEvent (QCloseEvent *ce) |
| void | keyPressEvent (QKeyEvent *k) |
| void | keyReleaseEvent (QKeyEvent *k) |
| void | mouseReleaseEvent (QMouseEvent *m) |
| void | wheelEvent (QWheelEvent *w) |
| void | setTBvals (PageItem *currItem) |
| void | ShowSubs () |
| void | applyNewMaster (QString name) |
| void | updateRecent (QString fn) |
| void | doPasteRecent (QString data) |
| QString | GetLang (QString inLang) |
| bool | getPDFDriver (const QString &fn, const QString &nam, int Components, const std::vector< int > &pageNs, const QMap< int, QPixmap > &thumbs, QString &error, bool *cancelled=NULL) |
| bool | DoSaveAsEps (QString fn, QString &error) |
| QString | CFileDialog (QString wDir=".", QString caption="", QString filter="", QString defNa="", int optionFlags=fdExistingFiles, bool *docom=0, bool *doFont=0, bool *doProfiles=0) |
| void | recalcColors (QProgressBar *dia=0) |
| Recalculate the colors after changing CMS settings. Call the appropriate document function and then update the GUI elements. | |
| void | SwitchWin () |
| void | RestoreBookMarks () |
| void | emergencySave () |
| bool | arrowKeyDown () |
| Returns true if an arrow key is pressed down. | |
| bool | isObjectSpecificUndo () |
| Returns true if application is in object specific undo mode, other wise returns false. | |
| void | restore (UndoState *state, bool isUndo) |
| Method used when an undo/redo is requested. | |
| void | restoreGrouping (SimpleState *state, bool isUndo) |
| void | restoreUngrouping (SimpleState *state, bool isUndo) |
| void | restoreAddPage (SimpleState *state, bool isUndo) |
| void | restoreDeletePage (SimpleState *state, bool isUndo) |
Public Attributes | |
| struct CopyPasteBuffer | Buffer |
| struct CopyContentsBuffer | contentsBuffer |
| QString | Buffer2 |
| QString | Buffer3 |
| bool | BuFromApp |
| bool | internalCopy |
| int | HaveDoc |
| PrefsContext * | dirs |
| ScribusView * | view |
| view is the main widget which represents your working area. The View class should handle all events of the view widget. It is kept empty so you can create your view according to your application's needs by changing the view class. | |
| ScribusDoc * | doc |
| doc represents your actual document and is created only once. It keeps information such as filename and does the serialization of your files. | |
| QProgressBar * | mainWindowProgressBar |
| QLabel * | mainWindowXPosLabel |
| QLabel * | mainWindowXPosDataLabel |
| QLabel * | mainWindowYPosLabel |
| QLabel * | mainWindowYPosDataLabel |
| GuideManager * | guidePalette |
| CharSelect * | charPalette |
| PropertiesPalette * | propertiesPalette |
| NodePalette * | nodePalette |
| OutlinePalette * | outlinePalette |
| Biblio * | scrapbookPalette |
| LayerPalette * | layerPalette |
| PagePalette * | pagePalette |
| BookPalette * | bookmarkPalette |
| Measurements * | measurementPalette |
| CheckDocument * | docCheckerPalette |
| UndoPalette * | undoPalette |
| AlignDistributePalette * | alignDistributePalette |
| StoryEditor * | storyEditor |
| StoryEditor * | CurrStED |
| QMap< QString, QString > | Sprachen |
| QWorkspace * | wsp |
| ScribusWin * | ActWin |
| QClipboard * | ClipB |
| QString | LoadEnc |
| bool | ScriptRunning |
| QMap< QString, QStringList > | InstLang |
| QMap< QString, QString > | LangTransl |
| QProcess * | ExternalApp |
| QMap< QString, QPointer < ScrAction > > | scrActions |
| QMap< QString, QPointer < ScrAction > > | scrRecentFileActions |
| QMap< QString, QPointer < ScrAction > > | scrWindowsActions |
| QMap< QString, QPointer < ScrAction > > | scrLayersActions |
| QMap< QString, QPointer < ScrAction > > | scrRecentPasteActions |
| QMap< QString, QPointer < ScToolBar > > | scrToolBars |
| QMultiHash< QString, QActionGroup * > | scrActionGroups |
| MenuManager * | scrMenuMgr |
| ActionManager * | actionManager |
| QStringList | RecentDocs |
Protected Member Functions | |
| bool | eventFilter (QObject *o, QEvent *e) |
| Receive key events from palettes such as palette hiding events. Possibly easier way but this is cleaner than before. No need to modify all those palettes and each new one in future. | |
| virtual void | dragEnterEvent (QDragEnterEvent *e) |
| virtual void | dropEvent (QDropEvent *e) |
Private Member Functions | |
| void | initSplash (bool showSplash) |
| void | initMenuBar () |
| void | addDefaultWindowMenuItems () |
| void | initStatusBar () |
| void | initToolBars () |
| void | initHyphenator () |
| void | initDefaultValues () |
| void | initKeyboardShortcuts () |
| void | initPalettes () |
| void | initScrapbook () |
| void | updateColorMenu (QProgressBar *progressBar=NULL) |
| void | ToggleFrameEdit () |
| void | NoFrameEdit () |
| void | addNewPages (int wo, int where, int numPages, double height, double width, int orient, QString siz, bool mov, QStringList *basedOn=0) |
Private Attributes | |
| QLabel * | mainWindowStatusLabel |
| QString | recentFileMenuName |
| QString | recentPasteMenuName |
| QString | layerMenuName |
| QPixmap | noIcon |
| EditToolBar * | editToolBar |
| FileToolBar * | fileToolBar |
| ModeToolBar * | modeToolBar |
| PDFToolBar * | pdfToolBar |
| QToolButton * | DatOpe |
| QToolButton * | DatSav |
| QToolButton * | DatClo |
| QToolButton * | DatPri |
| QToolButton * | DatPDF |
| QToolButton * | DatNeu |
| int | toolbarMenuTools |
| int | toolbarMenuPDFTools |
| int | viewToolbars |
| int | viewPropertiesPalette |
| int | viewOutlinePalette |
| int | viewNodePalette |
| int | viewBpal |
| int | viewLayerPalette |
| int | viewPagePalette |
| int | viewBopal |
| int | viewUndoPalette |
| bool | palettesStatus [10] |
| bool | guidesStatus [13] |
| bool | keyrep |
| bool | _arrowKeyDown |
| Tells if an arrow key is pressed down. | |
| bool | objectSpecificUndo |
| tells the undo mode | |
| void * | PSDriver |
| int | DocNr |
| bool | PrinterUsed |
| struct ScribusMainWindow::PDe | PDef |
| TOCGenerator * | tocGenerator |
| int | storedPageNum |
| int | storedViewXCoor |
| int | storedViewYCoor |
| double | storedViewScale |
| StyleManager * | styleManager |
| UndoManager * | undoManager |
| PrefsManager * | prefsManager |
| FormatsManager * | formatsManager |
| HelpBrowser * | helpBrowser |
Classes | |
| struct | PDe |
Detailed Description
This Class is the base class for your application. It sets up the main window and providing a menubar, toolbar and statusbar. For the main view, an instance of class ScribusView is created which creates your view.Definition at line 124 of file scribus.h.
Constructor & Destructor Documentation
| ScribusMainWindow::ScribusMainWindow | ( | ) |
constructor
Definition at line 231 of file scribus.cpp.
References actionManager, ExternalApp, formatsManager, UrlLauncher::instance(), loadIcon(), mainWindowStatusLabel, noIcon, prefsManager, and scrMenuMgr.
| ScribusMainWindow::~ScribusMainWindow | ( | ) |
Member Function Documentation
| int ScribusMainWindow::initScMW | ( | bool | primaryMainwWindow | ) |
- Return values:
-
0 - ok, 1 - no fonts, ...
Definition at line 262 of file scribus.cpp.
References actionManager, PrefsManager::applyLoadedShortCuts(), PrefsManager::appPrefs, BuFromApp, ClipB, ClipChange(), CurrStED, DocDir, PrefsManager::documentDir(), ScribusCore::fileWatcher, formatsManager, ScPaths::getApplicationDataDir(), PrefsContext::getBool(), PrefsFile::getContext(), ActionManager::init(), initDefaultValues(), initHyphenator(), initKeyboardShortcuts(), initMenuBar(), initPalettes(), initScrapbook(), initStatusBar(), initToolBars(), UndoManager::instance(), FormatsManager::instance(), PrefsManager::instance(), internalCopy, ApplicationPrefs::Language, PluginManager::languageChange(), loadIcon(), loadRawText(), newActWin(), objectSpecificUndo, ScribusCore::pluginManager, PrefsManager::prefsFile, prefsManager, previewDinUse, printDinUse, propertiesPalette, removeRecent(), ScCore, scrActionGroups, scrActions, scrLayersActions, scrMenuMgr, scrRecentFileActions, scrRecentPasteActions, scrWindowsActions, ScrPaletteBase::setFontSize(), ScribusCore::setSplashStatus(), UndoManager::setUndoEnabled(), PrefsManager::setupMainWindow(), PluginManager::setupPluginActions(), ApplicationPrefs::showToolTips, Sprachen, ApplicationPrefs::stickyTools, storyEditor, TextBase(), TextFarben(), TextIFont(), TextISize(), TextOutline(), TextScale(), TextScaleV(), TextShadow(), TextStil(), TextStrike(), TextStyle(), TextUnderline(), TextUSval(), tocGenerator, ToggleTips(), tr(), undoManager, and wsp.
Referenced by ScribusCore::startGUI().
| void ScribusMainWindow::addScToolBar | ( | ScToolBar * | tb, | |
| QString | name | |||
| ) |
Definition at line 382 of file scribus.cpp.
References scrToolBars.
Referenced by initToolBars(), and PluginManager::setupPluginActions().
| bool ScribusMainWindow::warningVersion | ( | QWidget * | parent | ) |
Definition at line 572 of file scribus.cpp.
References tr(), and ScMessageBox::warning().
Referenced by slotFileSave(), and slotFileSaveAs()<
