author | kergoth <kergoth> | 2003-08-09 16:12:19 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 16:12:19 (UTC) |
commit | 1c58d1407f9584fedcdae390a04e2b37e5853361 (patch) (unidiff) | |
tree | 3c6e741c4d382d1a53c182930052b684d6e35b91 /noncore/apps/tinykate/libkate/microkde | |
parent | e3f4607edd0c1ca1434adb446df1d4a1d27c6a86 (diff) | |
download | opie-1c58d1407f9584fedcdae390a04e2b37e5853361.zip opie-1c58d1407f9584fedcdae390a04e2b37e5853361.tar.gz opie-1c58d1407f9584fedcdae390a04e2b37e5853361.tar.bz2 |
Merge from BRANCH_1_0
Diffstat (limited to 'noncore/apps/tinykate/libkate/microkde') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp | 14 | ||||
-rw-r--r-- | noncore/apps/tinykate/libkate/microkde/kcolordialog.h | 4 |
2 files changed, 7 insertions, 11 deletions
diff --git a/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp b/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp index 976f1db..5d21f15 100644 --- a/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp +++ b/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp | |||
@@ -20,26 +20,24 @@ | |||
20 | 20 | ||
21 | #include <qdialog.h> | 21 | #include <qdialog.h> |
22 | #include <qpainter.h> | 22 | #include <qpainter.h> |
23 | #include <qdrawutil.h> | 23 | #include <qdrawutil.h> |
24 | #include <qapplication.h> | 24 | #include <qapplication.h> |
25 | #include <kglobalsettings.h> | 25 | #include <kglobalsettings.h> |
26 | //#include "kcolordialog.h" | 26 | #include "kcolordialog.h" |
27 | #include "kcolorbtn.h" | 27 | #include "kcolorbtn.h" |
28 | 28 | ||
29 | #include <opie/colordialog.h> | ||
30 | |||
31 | KColorButton::KColorButton( QWidget *parent, const char *name ) | 29 | KColorButton::KColorButton( QWidget *parent, const char *name ) |
32 | : QPushButton( parent, name ), dragFlag(false) | 30 | : QPushButton( parent, name ), dragFlag(false) |
33 | { | 31 | { |
34 | // 2000-10-15 (putzer): fixes broken keyboard usage | 32 | // 2000-10-15 (putzer): fixes broken keyboard usage |
35 | connect (this, SIGNAL(clicked()), this, SLOT(chooseColor())); | 33 | connect (this, SIGNAL(clicked()), this, SLOT(chooseColor())); |
36 | } | 34 | } |
37 | 35 | ||
38 | KColorButton::KColorButton( const QColor &c, QWidget *parent, | 36 | KColorButton::KColorButton( const QColor &c, QWidget *parent, |
39 | const char *name ) | 37 | const char *name ) |
40 | : QPushButton( parent, name ), col(c), dragFlag(false) | 38 | : QPushButton( parent, name ), col(c), dragFlag(false) |
41 | { | 39 | { |
42 | 40 | ||
43 | // 2000-10-15 (putzer): fixes broken keyboard usage | 41 | // 2000-10-15 (putzer): fixes broken keyboard usage |
44 | connect (this, SIGNAL(clicked()), this, SLOT(chooseColor())); | 42 | connect (this, SIGNAL(clicked()), this, SLOT(chooseColor())); |
45 | } | 43 | } |
@@ -72,15 +70,15 @@ void KColorButton::drawButtonLabel( QPainter *painter ) | |||
72 | painter->fillRect( l+b, t+b, w-b*2, h-b*2, fillCol ); | 70 | painter->fillRect( l+b, t+b, w-b*2, h-b*2, fillCol ); |
73 | } | 71 | } |
74 | } | 72 | } |
75 | 73 | ||
76 | void KColorButton::chooseColor() | 74 | void KColorButton::chooseColor() |
77 | { | 75 | { |
78 | QColor newCol=OColorDialog::getColor( col); | 76 | if( KColorDialog::getColor( col) == QDialog::Rejected ) |
79 | if( newCol != QDialog::Rejected ) | ||
80 | { | 77 | { |
81 | col=newCol; | 78 | return; |
79 | } | ||
80 | |||
82 | repaint( false ); | 81 | repaint( false ); |
83 | emit changed( col ); | 82 | emit changed( col ); |
84 | } | ||
85 | } | 83 | } |
86 | 84 | ||
diff --git a/noncore/apps/tinykate/libkate/microkde/kcolordialog.h b/noncore/apps/tinykate/libkate/microkde/kcolordialog.h index 1d5c27e..0f831cd 100644 --- a/noncore/apps/tinykate/libkate/microkde/kcolordialog.h +++ b/noncore/apps/tinykate/libkate/microkde/kcolordialog.h | |||
@@ -1,15 +1,13 @@ | |||
1 | #ifndef MINIKDE_KCOLORDIALOG_H | 1 | #ifndef MINIKDE_KCOLORDIALOG_H |
2 | #define MINIKDE_KCOLORDIALOG_H | 2 | #define MINIKDE_KCOLORDIALOG_H |
3 | 3 | ||
4 | #include <qcolor.h> | 4 | #include <qcolor.h> |
5 | #include <opie/colordialog.h> | ||
6 | 5 | ||
7 | class KColorDialog : OColorDialog | 6 | class KColorDialog |
8 | { | 7 | { |
9 | Q_OBJECT | ||
10 | public: | 8 | public: |
11 | enum { Accepted }; | 9 | enum { Accepted }; |
12 | 10 | ||
13 | static int getColor( const QColor & ); | 11 | static int getColor( const QColor & ); |
14 | }; | 12 | }; |
15 | 13 | ||