Scribus
Open source desktop publishing at your fingertips
scribuscore.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 /***************************************************************************
8  scribuscore.h - description
9  -------------------
10  copyright : Scribus Team
11  ***************************************************************************/
12 
13 /***************************************************************************
14  * *
15  * This program is free software; you can redistribute it and/or modify *
16  * it under the terms of the GNU General Public License as published by *
17  * the Free Software Foundation; either version 2 of the License, or *
18  * (at your option) any later version. *
19  * *
20  ***************************************************************************/
21 
22 #ifndef SCRIBUSCORE_H
23 #define SCRIBUSCORE_H
24 
25 #include <QObject>
26 #include <QList>
27 #include "scribus.h"
28 #include "scribusapi.h"
29 
30 #include "colormgmt/sccolormgmtengine.h"
31 
32 class QWidget;
33 class FileWatcher;
34 class IconManager;
35 class PluginManager;
36 class ScSplashScreen;
37 class ScribusMainWindow;
38 class PrefsManager;
39 class UndoManager;
40 
41 extern SCRIBUS_API ScribusCore* ScCore;
42 
52 class SCRIBUS_API ScribusCore : public QObject
53 {
54 Q_OBJECT
55 
56 public:
57  ScribusCore();
58  ~ScribusCore();
59 
60  ScSplashScreen* splash() {return m_SplashScreen;};
61  /*
62  int exportToPDF() {return 0;}
63  int exportToEPS() {return 0;}
64  int exportToSVG() {return 0;}
65  int runScript() {return 0;}
66  */
67  int init(bool useGUI, const QList<QString>& filesToUse);
68  int initScribusCore(bool showSplash, bool showFontInfo, bool showProfileInfo, const QString newGuiLanguage, const QString prefsUserFile);
69  bool initialized() const {return m_ScribusInitialized;};
70  const QString& getGuiLanguage() const;
71 
72  void initSplash(bool showSplash);
73  bool initFonts(bool showFontInfo);
74  void showSplash(bool);
75  bool splashShowing() const;
76  void closeSplash();
77  void setSplashStatus(const QString&);
78  bool usingGUI() const;
79  int startGUI(bool showSplash, bool showFontInfo, bool showProfileInfo, const QString newGuiLanguage, const QString prefsUserFile);
84  bool isMacGUI() const;
89  bool isWinGUI() const;
90  bool haveCMS() const {return m_HaveCMS;}
91  bool haveGS() const {return m_HaveGS;};
92  bool havePNGAlpha() const {return m_HavePngAlpha;}
93  bool haveTIFFSep() const {return m_HaveTiffSep;}
94  void getCMSProfiles(bool showInfo);
95  void getCMSProfilesDir(QString pfad, bool showInfo, bool recursive);
96  void InitDefaultColorTransforms(void);
97  void ResetDefaultColorTransforms(void);
98  bool fileWatcherActive() const;
99  void recheckGS();
100 
101  //Main Window members
102  ScribusMainWindow* primaryMainWindow();
103 
104  PluginManager* pluginManager;
105  FileWatcher* fileWatcher;
106 
107  ProfilesL InputProfiles;
108  ProfilesL InputProfilesCMYK;
109  ProfilesL MonitorProfiles;
110  ProfilesL PrinterProfiles;
111  ProfilesL PDFXProfiles;
112 
113  ScColorMgmtEngine defaultEngine;
114  ScColorProfile monitorProfile;
115  ScColorProfile defaultRGBProfile;
116  ScColorProfile defaultCMYKProfile;
117  ScColorProfile defaultLabProfile;
118  ScColorTransform defaultRGBToScreenSolidTrans;
119  ScColorTransform defaultRGBToScreenImageTrans;
120  ScColorTransform defaultCMYKToScreenImageTrans;
121  ScColorTransform defaultRGBToCMYKTrans;
122  ScColorTransform defaultCMYKToRGBTrans;
123  ScColorTransform defaultLabToRGBTrans;
124  ScColorTransform defaultLabToCMYKTrans;
125  //CB FIXME protect
126 // QWidget *m_PaletteParent;
127 
128 protected:
129  void initCMS();
130 
131  QList<ScribusMainWindow*> ScMWList;
132  int m_currScMW;
133 
134  ScSplashScreen *m_SplashScreen;
135  IconManager *iconManager;
136  UndoManager *undoManager;
137  PrefsManager *prefsManager;
138  bool m_ScribusInitialized;
139  bool m_UseGUI;
140  QList<QString> m_Files;
141  bool m_HaveCMS;
142  bool m_HaveGS;
143  bool m_HavePngAlpha;
144  bool m_HaveTiffSep;
145 };
146 
147 /*
148 
149 
150 */
151 
152 #endif
Manage Scribus icons here, and here alone.
Definition: iconmanager.h:34
Definition: sccolorprofile.h:16
This Class is the base class for your application. It sets up the main window and providing a menubar...
Definition: scribus.h:123
Definition: sccolortransform.h:16
Definition: filewatcher.h:20
Scribus splash screen.
Definition: splash.h:18
PluginManager handles plugin loading, unloading, and running.
Definition: pluginmanager.h:35
The core functions moved from the old ScribusMainWindow class NO WINDOWS NO VIEWS NO DOCS NO PAGEITEM...
Definition: scribuscore.h:52
Definition: sccolormgmtengine.h:16
UndoManager handles the undo stack.
Definition: undomanager.h:81
Manage Scribus preferences here, and here alone Start to move the preferences out of scribus...
Definition: prefsmanager.h:43