Scribus
Open source desktop publishing at your fingertips
colorchart.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  colorchart.h - description
9  -------------------
10  begin : Sat Sep 15 2001
11  copyright : (C) 2001 by Franz Schmid
12  email : Franz.Schmid@altmuehlnet.de
13  ***************************************************************************/
14 
15 /***************************************************************************
16  * *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or *
20  * (at your option) any later version. *
21  * *
22  ***************************************************************************/
23 
24 #ifndef COLORCHART_H
25 #define COLORCHART_H
26 
27 #include <QWidget>
28 #include <QPixmap>
29 #include <QPaintEvent>
30 #include <QMouseEvent>
31 #include "scribusapi.h"
32 
33 class ScribusDoc;
34 
39 class SCRIBUS_API ColorChart : public QWidget
40 {
41 
42 Q_OBJECT
43 
44 public:
45  ColorChart(QWidget *parent);
46  ColorChart(QWidget *parent, ScribusDoc* doc);
47  ~ColorChart() {};
48 
49  void mouseMoveEvent(QMouseEvent *m);
50  void mousePressEvent(QMouseEvent *m);
51  void mouseReleaseEvent(QMouseEvent *m);
52  void paintEvent(QPaintEvent *e);
53 
54  void setDoc(ScribusDoc* doc) { m_doc = doc; }
55  void drawMark(int x, int y);
56  void setMark(int h, int s);
57  void drawPalette(int val);
58 
59  int Xp;
60  int Yp;
61  bool doDrawMark;
62  int drawMode;
63  QPixmap pmx;
64 
65 protected:
66  ScribusDoc* m_doc;
67 
68 signals:
69  void ColorVal(int h, int s, bool ende);
70 };
71 
72 #endif
the Document Class
Definition: scribusdoc.h:90
Definition: ColorChart.py:1