Scribus
Open source desktop publishing at your fingertips
colorsetmanager.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  copyright : (C) 2006 by Craig Bradney
9  email : cbradney@zip.com.au
10 ***************************************************************************/
11 
12 #ifndef COLORSETMANAGER_H
13 #define COLORSETMANAGER_H
14 
15 #include "scribusapi.h"
16 #include "sccolor.h"
17 #include "scribusdoc.h"
18 #include "vgradient.h"
19 #include "scpattern.h"
20 #include <QMap>
21 #include <QString>
22 #include <QStringList>
23 #include <QTreeWidget>
24 
25 struct ApplicationPrefs;
26 
27 class SCRIBUS_API ColorSetManager
28 {
29  public:
31  ~ColorSetManager();
32 
33  void initialiseDefaultPrefs(struct ApplicationPrefs& appPrefs);
34  void findPaletteLocations();
35  void searchDir(QString path, QMap<QString, QString> &pList, QTreeWidgetItem* parent = NULL);
36  void findPalettes(QTreeWidgetItem* parent = NULL);
37  void findUserPalettes(QTreeWidgetItem* parent = NULL);
38  QStringList paletteNames();
39  QStringList userPaletteNames();
40 
41  QString paletteFileFromName(const QString& paletteName);
42  QString userPaletteFileFromName(const QString& paletteName);
43  bool paletteLocationLocked(const QString& palettePath);
44  bool checkPaletteFormat(const QString& paletteFileName);
45  bool loadPalette(const QString& paletteFileName, ScribusDoc *doc, ColorList &colors, QHash<QString,VGradient> &gradients, QHash<QString, ScPattern> &patterns, bool merge);
46 
47  protected:
48  QStringList paletteLocations;
49  QMap<QString, QString> palettes;
50  QMap<QString, QString> userPalettes;
51  QMap<QString, bool> paletteLocationLocks;
52 };
53 #endif
Definition: prefsstructs.h:453
Definition: sccolor.h:155
the Document Class
Definition: scribusdoc.h:90
Definition: colorsetmanager.h:27