Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

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                           scribuscore.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>
00026 #include <QList>
00027 #include "scribus.h"
00028 #include "scribusapi.h"
00029 
00030 #include CMS_INC
00031 
00032 class QWidget;
00033 class FileWatcher;
00034 class PluginManager;
00035 class SplashScreen;
00036 class ScribusMainWindow;
00037 class PrefsManager;
00038 class UndoManager;
00039 
00040 extern SCRIBUS_API ScribusCore* ScCore;
00041 
00051 class SCRIBUS_API ScribusCore : public QObject
00052 {
00053 Q_OBJECT
00054 
00055 public:
00056     ScribusCore();
00057     ~ScribusCore();
00058     
00059     SplashScreen* splash() {return m_SplashScreen;};
00060     /*
00061     int exportToPDF() {return 0;}
00062     int exportToEPS() {return 0;}
00063     int exportToSVG() {return 0;}
00064     int runScript() {return 0;}
00065     */  
00066     int init(bool useGUI, bool swapDialogButtonOrder, const QString fileToUse);
00067     int initScribusCore(bool showSplash, bool showFontInfo, bool showProfileInfo, const QString newGuiLanguage, const QString prefsUserFile);
00068     bool initialized() const {return m_ScribusInitialized;};
00069     const QString& getGuiLanguage() const;
00070     void initSplash(bool showSplash);
00071     bool initFonts(bool showFontInfo);
00072     void showSplash(bool);
00073     bool splashShowing() const;
00074     void closeSplash();
00075     void setSplashStatus(const QString&);
00076     bool usingGUI() const;
00077     int startGUI(bool showSplash, bool showFontInfo, bool showProfileInfo, const QString newGuiLanguage, const QString prefsUserFile);
00082     bool isMacGUI() const;
00087     bool isWinGUI() const;
00092     bool reverseDialogButtons() const;
00093     bool haveCMS() const {return m_HaveCMS;}
00094     bool haveGS() const {return m_HaveGS;};
00095     bool havePNGAlpha() const {return m_HavePngAlpha;}
00096     bool haveTIFFSep() const {return m_HaveTiffSep;}
00097     void getCMSProfiles(bool showInfo);
00098     void getCMSProfilesDir(QString pfad, bool showInfo, bool recursive);
00099     void InitDefaultColorTransforms(void);
00100     void TermDefaultColorTransforms(void);
00101     bool IsDefaultProfile(cmsHPROFILE prof);
00102     bool IsDefaultTransform(cmsHTRANSFORM trans);
00103     bool fileWatcherActive() const;
00104     void recheckGS();
00105     
00106     //Main Window members
00107     ScribusMainWindow* primaryMainWindow();
00108     
00109     PluginManager* pluginManager;   
00110     FileWatcher* fileWatcher;
00111     
00112     ProfilesL InputProfiles;
00113     ProfilesL InputProfilesCMYK;
00114     ProfilesL MonitorProfiles;
00115     ProfilesL PrinterProfiles;
00116     ProfilesL PDFXProfiles;
00117 
00118     cmsHPROFILE   defaultRGBProfile;
00119     cmsHPROFILE   defaultCMYKProfile;
00120     cmsHTRANSFORM defaultRGBToScreenSolidTrans;
00121     cmsHTRANSFORM defaultRGBToScreenImageTrans;
00122     cmsHTRANSFORM defaultCMYKToScreenImageTrans;
00123     cmsHTRANSFORM defaultRGBToCMYKTrans;
00124     cmsHTRANSFORM defaultCMYKToRGBTrans;
00125     //CB FIXME protect
00126 //  QWidget *m_PaletteParent;
00127     
00128 protected:
00129     void initCMS();
00130     
00131     QList<ScribusMainWindow*> ScMWList;
00132     int m_currScMW;
00133     
00134     SplashScreen *m_SplashScreen;
00135     UndoManager *undoManager;
00136     PrefsManager *prefsManager;
00137     bool m_ScribusInitialized;
00138     bool m_UseGUI;
00139     bool m_SwapDialogButtonOrder;
00140     QString m_File;
00141     bool m_HaveCMS;
00142     bool m_HaveGS;
00143     bool m_HavePngAlpha;
00144     bool m_HaveTiffSep;
00145     
00146     
00147 signals:
00148     void appStarted();
00149 
00150 };
00151 
00152 /*
00153 
00154 
00155 */
00156 
00157 #endif
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.