Scribus
Open source desktop publishing at your fingertips
api_color.h
1 /*
2  * Copyright (C) 2011 Jain Basil Aliyas <jainbasil@gmail.com>
3  *
4  * For general Scribus (>=1.3.2) copyright and licensing information please refer
5  * to the COPYING file provided with the program. Following this notice may exist
6  * a copyright and/or license notice that predates the release of Scribus 1.3.2
7  * for which a new license (GPL+exception) is in place.
8 */
9 
10 #ifndef API_COLOR_H_
11 #define API_COLOR_H_
12 
13 #include <QObject>
14 #include <QtDebug>
15 #include <QApplication>
16 
17 #include "scripterimpl.h"
18 #include "sccolor.h"
19 
20 class ColorAPI : public QObject
21 {
22  Q_OBJECT
23 
24  Q_PROPERTY(bool spotColor READ isSpotColor WRITE setSpotColor)
25  Q_PROPERTY(QString name READ name WRITE setName)
26 
27 public:
28  ColorAPI(ScColor *l, QString n);
29  virtual ~ColorAPI();
30 
31 public slots:
32  bool isSpotColor();
33  void setSpotColor(bool value);
34 
35  QString name();
36  void setName(QString name);
37 
38  void replace(QString replace);
39  void remove(QString replace);
40 
41  void changeCMYK(int c, int m, int y, int k);
42  void changeRGB(int r, int g, int b);
43 
44 private:
45  ScColor *color;
46  QString colorName;
47 
48 };
49 
50 #endif /*API_COLOR_H_*/
Definition: sccolor.h:51
Definition: api_color.h:20