Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scribuscore.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008                           pageitem.h  -  description
00009                              -------------------
00010     copyright            : Scribus Team
00011  ***************************************************************************/
00012 
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021  
00022 #ifndef SCRIBUSCORE_H
00023 #define SCRIBUSCORE_H
00024 
00025 #include <qobject.h>
00026 #include "scribus.h"
00027 #include "scribusapi.h"
00028 
00029 class QWidget;
00030 class FileWatcher;
00031 class PluginManager;
00032 class SplashScreen;
00033 class ScribusMainWindow;
00034 class PrefsManager;
00035 class UndoManager;
00036 
00037 extern SCRIBUS_API ScribusCore* ScCore;
00038 
00048 class SCRIBUS_API ScribusCore : public QObject
00049 {
00050 Q_OBJECT
00051 
00052 public:
00053        ScribusCore();
00054        ~ScribusCore();
00055        
00056        SplashScreen* splash() {return m_SplashScreen;};
00057        /*
00058        int exportToPDF() {return 0;}
00059        int exportToEPS() {return 0;}
00060        int exportToSVG() {return 0;}
00061        int runScript() {return 0;}
00062        */     
00063        int init(bool useGUI, bool swapDialogButtonOrder, const QString fileToUse);
00064        int initScribusCore(bool showSplash, bool showFontInfo, bool showProfileInfo, const QString newGuiLanguage, const QString prefsUserFile);
00065        bool initialized() const {return m_ScribusInitialized;};
00066        const QString getGuiLanguage() const {return m_GuiLanguage;};
00067        void initSplash(bool showSplash);
00068        bool initFonts(bool showFontInfo);
00069        void showSplash(bool);
00070        bool splashShowing() const;
00071        void closeSplash();
00072        void setSplashStatus(const QString&);
00073        bool usingGUI() const;
00074        int startGUI(bool showSplash, bool showFontInfo, bool showProfileInfo, const QString newGuiLanguage, const QString prefsUserFile);
00079        bool isMacGUI() const;
00084        bool isWinGUI() const;
00089        bool reverseDialogButtons() const;
00090        bool haveCMS() const { return m_HaveCMS; }
00091        int haveGS() const {return m_HaveGS;};
00092        int havePNGAlpha() const {return m_HavePngAlpha;}
00093        int haveTIFFSep() const {return m_HaveTiffSep;}
00094        void getCMSProfiles(bool showInfo);
00095        void getCMSProfilesDir(QString pfad, bool showInfo, bool recursive);
00096        bool fileWatcherActive() const;
00097        void recheckGS();
00098        
00099        //Main Window members
00100        ScribusMainWindow* primaryMainWindow();
00101        
00102        PluginManager* pluginManager;      
00103        FileWatcher* fileWatcher;
00104        
00105        ProfilesL InputProfiles;
00106        ProfilesL InputProfilesCMYK;
00107        ProfilesL MonitorProfiles;
00108        ProfilesL PrinterProfiles;
00109        ProfilesL PDFXProfiles;
00110        //CB FIXME protect
00111        QWidget *m_PaletteParent;
00112        
00113 protected:
00114        void initCMS();
00115        
00116        QPtrList<ScribusMainWindow> ScMWList;
00117        uint m_currScMW;
00118        
00119        SplashScreen *m_SplashScreen;
00120        UndoManager *undoManager;
00121        PrefsManager *prefsManager;
00122        QString m_GuiLanguage;
00123        bool m_ScribusInitialized;
00124        bool m_UseGUI;
00125        bool m_SwapDialogButtonOrder;
00126        QString m_File;
00127        bool m_HaveCMS;
00128        int m_HaveGS;
00129        int m_HavePngAlpha;
00130        int m_HaveTiffSep;
00131        
00132        
00133 signals:
00134        void appStarted();
00135 
00136 };
00137 
00138 /*
00139 
00140 
00141 */
00142 
00143 #endif