Subversion Repositories Scribus

Rev

Rev 2911 | Rev 3331 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1809 subik 1
/* $Id: cwdialog.h 3107 2005-08-28 13:47:16Z subik $ */
2
#ifndef CWDIALOG_H
3
#define CWDIALOG_H
4
 
5
#include <qvariant.h>
6
#include <qdialog.h>
7
#include "colorwheelwidget.h"
8
#include <scribus.h>
9
 
10
class QVBoxLayout;
11
class QHBoxLayout;
12
class QGridLayout;
13
class QSpacerItem;
14
class QComboBox;
15
class QListView;
16
class QListViewItem;
17
class QPushButton;
18
class QSpinBox;
19
 
20
/** \brief GUI dialog for Color Wheel Plugin.
21
Quite everything in this class is self explanatory (except few things ;)).
22
\author Petr Vanek; petr@yarpen.cz
23
\date April 2005
24
*/
25
class ColorWheelDialog : public QDialog
26
{
27
        Q_OBJECT
28
 
29
        public:
30
                ColorWheelDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
31
                ~ColorWheelDialog();
32
 
33
                QLabel* typeLabel;
34
                QComboBox* typeCombo;
35
                QListView* colorList;
36
                ColorWheel* colorWheel;
37
                QLabel* previewLabel;
38
                QLabel* angleLabel;
39
                QSpinBox* angleSpin;
40
                QPushButton* addButton;
1811 subik 41
                QPushButton* replaceButton;
1809 subik 42
                QPushButton* cancelButton;
2911 subik 43
                QLabel* defectLabel;
44
                QComboBox* defectCombo;
1809 subik 45
 
46
        protected:
47
                /** It fills a colors into list view. It takes colors
48
                    from ColorWheel widget. */
49
                void fillColorList();
50
                QGridLayout* formLayout;
51
                QHBoxLayout* mainLayout;
52
                QVBoxLayout* wheelLayout;
53
                QSpacerItem* spacer1;
54
                QHBoxLayout* angleLayout;
55
                QVBoxLayout* listLayout;
56
                QHBoxLayout* buttonLayout;
2911 subik 57
                QHBoxLayout* defectLayout;
1809 subik 58
                /** Configuration structure */
59
                PrefsContext* prefs;
60
                /** Draws a strange colorful things as preview of the color schema. */
61
                void setPreview();
2911 subik 62
                /*! Main color manipulator for preview.
63
                \param c input color. QColor from sample list.
64
                \retval QColor It returns c for normalVision. It calls transformations for other filters*/
65
                QColor computeDefect(QColor c);
1809 subik 66
 
67
        public slots:
68
                virtual void typeCombo_activated(int);
2911 subik 69
                virtual void defectCombo_activated(int);
1809 subik 70
                virtual void colorWheel_clicked(int, const QPoint &);
71
                virtual void addButton_clicked();
1811 subik 72
                virtual void replaceButton_clicked();
1809 subik 73
                virtual void cancelButton_clicked();
74
                virtual void angleSpin_valueChanged(int);
75
 
76
        protected slots:
77
                virtual void languageChange();
78
 
79
};
80
 
81
#endif // CWDIALOG_H