-rwxr-xr-x | microkde/fncolordialog.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/microkde/fncolordialog.h b/microkde/fncolordialog.h index 615d2ed..52356be 100755 --- a/microkde/fncolordialog.h +++ b/microkde/fncolordialog.h | |||
@@ -6,132 +6,132 @@ | |||
6 | the Free Software Foundatibannwaon; either version 2 of the License, or | 6 | the Free Software Foundatibannwaon; either version 2 of the License, or |
7 | (at your option) any later version. | 7 | (at your option) any later version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, | 9 | This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License |
15 | along with this program; if not, write to the Free Software | 15 | along with this program; if not, write to the Free Software |
16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | /* | 18 | /* |
19 | 2005/02/27 FreeNote 1.11.10pre | 19 | 2005/02/27 FreeNote 1.11.10pre |
20 | ・PDFの出力形式を一部変更 | 20 | ・PDFの出力形式を一部変更 |
21 | ・インポート時のバグfix | 21 | ・インポート時のバグfix |
22 | 22 | ||
23 | */ | 23 | */ |
24 | #ifndef FNPALETTEDIALOG_H | 24 | #ifndef FNPALETTEDIALOG_H |
25 | #define FNPALETTEDIALOG_H | 25 | #define FNPALETTEDIALOG_H |
26 | #include <qwidget.h> | 26 | #include <qwidget.h> |
27 | #include <qpixmap.h> | 27 | #include <qpixmap.h> |
28 | #include <qpainter.h> | 28 | #include <qpainter.h> |
29 | #include <qcolor.h> | 29 | #include <qcolor.h> |
30 | #include <qdialog.h> | 30 | #include <qdialog.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qslider.h> | 32 | #include <qslider.h> |
33 | #include <qspinbox.h> | 33 | #include <qspinbox.h> |
34 | 34 | ||
35 | //----------------------------------------------------------------------------- | 35 | //----------------------------------------------------------------------------- |
36 | // FNPaletteBase | 36 | // FNPaletteBase |
37 | //----------------------------------------------------------------------------- | 37 | //----------------------------------------------------------------------------- |
38 | class Q_EXPORT FNPaletteBase : public QWidget | 38 | class /* Q_EXPORT */ FNPaletteBase : public QWidget |
39 | { | 39 | { |
40 | Q_OBJECT | 40 | Q_OBJECT |
41 | public: | 41 | public: |
42 | 42 | ||
43 | FNPaletteBase(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); | 43 | FNPaletteBase(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0); |
44 | 44 | ||
45 | 45 | ||
46 | virtual ~FNPaletteBase(); | 46 | virtual ~FNPaletteBase(); |
47 | 47 | ||
48 | 48 | ||
49 | void setBGColor(QColor c) { | 49 | void setBGColor(QColor c) { |
50 | bgcolor_ = c; | 50 | bgcolor_ = c; |
51 | selection_ = c; | 51 | selection_ = c; |
52 | redraw(); | 52 | redraw(); |
53 | }; | 53 | }; |
54 | QColor color() const { | 54 | QColor color() const { |
55 | return selection_; | 55 | return selection_; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | protected: | 58 | protected: |
59 | virtual void paintEvent(QPaintEvent*); | 59 | virtual void paintEvent(QPaintEvent*); |
60 | virtual void resizeEvent(QResizeEvent* evt); | 60 | virtual void resizeEvent(QResizeEvent* evt); |
61 | virtual void redraw(bool force=false); | 61 | virtual void redraw(bool force=false); |
62 | virtual void drawImpl(QPainter& pa); | 62 | virtual void drawImpl(QPainter& pa); |
63 | virtual void mouseReleaseEvent(QMouseEvent* evt); | 63 | virtual void mouseReleaseEvent(QMouseEvent* evt); |
64 | virtual bool pickColor(int x, int y); | 64 | virtual bool pickColor(int x, int y); |
65 | QColor selection_; | 65 | QColor selection_; |
66 | private: | 66 | private: |
67 | QPixmap wbuf_; | 67 | QPixmap wbuf_; |
68 | QColor bgcolor_; | 68 | QColor bgcolor_; |
69 | bool _isblock; | 69 | bool _isblock; |
70 | 70 | ||
71 | signals: | 71 | signals: |
72 | void clicked(FNPaletteBase* sender); | 72 | void clicked(FNPaletteBase* sender); |
73 | }; | 73 | }; |
74 | 74 | ||
75 | 75 | ||
76 | 76 | ||
77 | 77 | ||
78 | //----------------------------------------------------------------------------- | 78 | //----------------------------------------------------------------------------- |
79 | // FNColorPalette | 79 | // FNColorPalette |
80 | //----------------------------------------------------------------------------- | 80 | //----------------------------------------------------------------------------- |
81 | class Q_EXPORT FNColorPalette : public FNPaletteBase | 81 | class /* Q_EXPORT */ FNColorPalette : public FNPaletteBase |
82 | { | 82 | { |
83 | Q_OBJECT | 83 | Q_OBJECT |
84 | public: | 84 | public: |
85 | FNColorPalette(QColor c, QWidget* parent = 0, const char* name = 0, WFlags fl = 0); | 85 | FNColorPalette(QColor c, QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0); |
86 | virtual ~FNColorPalette(); | 86 | virtual ~FNColorPalette(); |
87 | }; | 87 | }; |
88 | 88 | ||
89 | 89 | ||
90 | 90 | ||
91 | 91 | ||
92 | //----------------------------------------------------------------------------- | 92 | //----------------------------------------------------------------------------- |
93 | // FNHSVPalette | 93 | // FNHSVPalette |
94 | //----------------------------------------------------------------------------- | 94 | //----------------------------------------------------------------------------- |
95 | class Q_EXPORT FNHSVPalette : public FNPaletteBase | 95 | class /*Q_EXPORT */ FNHSVPalette : public FNPaletteBase |
96 | { | 96 | { |
97 | Q_OBJECT | 97 | Q_OBJECT |
98 | public: | 98 | public: |
99 | FNHSVPalette(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); | 99 | FNHSVPalette(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0); |
100 | virtual ~FNHSVPalette(); | 100 | virtual ~FNHSVPalette(); |
101 | public slots: | 101 | public slots: |
102 | void hueChanged(int v); | 102 | void hueChanged(int v); |
103 | protected: | 103 | protected: |
104 | virtual void drawImpl(QPainter& pa); | 104 | virtual void drawImpl(QPainter& pa); |
105 | int _hue; | 105 | int _hue; |
106 | }; | 106 | }; |
107 | 107 | ||
108 | 108 | ||
109 | 109 | ||
110 | 110 | ||
111 | //----------------------------------------------------------------------------- | 111 | //----------------------------------------------------------------------------- |
112 | // FNColorDialog | 112 | // FNColorDialog |
113 | //----------------------------------------------------------------------------- | 113 | //----------------------------------------------------------------------------- |
114 | class Q_EXPORT FNColorDialog : public QDialog | 114 | class /*Q_EXPORT */FNColorDialog : public QDialog |
115 | { | 115 | { |
116 | Q_OBJECT | 116 | Q_OBJECT |
117 | public: | 117 | public: |
118 | FNColorDialog(QWidget* parent=0, const char* name=0, WFlags f=0); | 118 | FNColorDialog(QWidget* parent=0, const char* name=0, Qt::WFlags f=0); |
119 | virtual ~FNColorDialog(); | 119 | virtual ~FNColorDialog(); |
120 | void setColor(QColor c); | 120 | void setColor(QColor c); |
121 | QColor color() const; | 121 | QColor color() const; |
122 | public slots: | 122 | public slots: |
123 | virtual void basePaletteClicked(FNPaletteBase*); | 123 | virtual void basePaletteClicked(FNPaletteBase*); |
124 | virtual void hsvPaletteClicked(FNPaletteBase*); | 124 | virtual void hsvPaletteClicked(FNPaletteBase*); |
125 | void rgbChanged(int); | 125 | void rgbChanged(int); |
126 | private: | 126 | private: |
127 | FNHSVPalette* _palette; | 127 | FNHSVPalette* _palette; |
128 | FNColorPalette* _base[16]; | 128 | FNColorPalette* _base[16]; |
129 | QSlider* _hue; | 129 | QSlider* _hue; |
130 | FNColorPalette* _select; | 130 | FNColorPalette* _select; |
131 | QSpinBox* _r; | 131 | QSpinBox* _r; |
132 | QSpinBox* _g; | 132 | QSpinBox* _g; |
133 | QSpinBox* _b; | 133 | QSpinBox* _b; |
134 | bool _isblock; | 134 | bool _isblock; |
135 | 135 | ||
136 | }; | 136 | }; |
137 | #endif //FNPALETTEDIALOG_H | 137 | #endif //FNPALETTEDIALOG_H |