-rw-r--r-- | kaddressbook/views/colorlistbox.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/views/colorlistbox.h | 1 | ||||
-rw-r--r-- | kaddressbook/views/configurecardviewdialog.cpp | 4 | ||||
-rw-r--r-- | kaddressbook/views/configuretableviewdialog.cpp | 6 |
4 files changed, 16 insertions, 2 deletions
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp index c243fa0..7386207 100644 --- a/kaddressbook/views/colorlistbox.cpp +++ b/kaddressbook/views/colorlistbox.cpp | |||
@@ -29,12 +29,13 @@ | |||
29 | #include "colorlistbox.h" | 29 | #include "colorlistbox.h" |
30 | 30 | ||
31 | ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) | 31 | ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) |
32 | :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) | 32 | :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) |
33 | { | 33 | { |
34 | connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); | 34 | connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); |
35 | connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); | ||
35 | setAcceptDrops( true); | 36 | setAcceptDrops( true); |
36 | } | 37 | } |
37 | 38 | ||
38 | 39 | ||
39 | void ColorListBox::setEnabled( bool state ) | 40 | void ColorListBox::setEnabled( bool state ) |
40 | { | 41 | { |
@@ -71,13 +72,17 @@ QColor ColorListBox::color( uint index ) const | |||
71 | } | 72 | } |
72 | else | 73 | else |
73 | { | 74 | { |
74 | return( black ); | 75 | return( black ); |
75 | } | 76 | } |
76 | } | 77 | } |
77 | 78 | void ColorListBox::slotNewColor(QListBoxItem * i) | |
79 | { | ||
80 | if ( i ) | ||
81 | newColor( index( i ) ); | ||
82 | } | ||
78 | 83 | ||
79 | void ColorListBox::newColor( int index ) | 84 | void ColorListBox::newColor( int index ) |
80 | { | 85 | { |
81 | if( isEnabled() == false ) | 86 | if( isEnabled() == false ) |
82 | { | 87 | { |
83 | return; | 88 | return; |
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h index 4a0e705..bb91484 100644 --- a/kaddressbook/views/colorlistbox.h +++ b/kaddressbook/views/colorlistbox.h | |||
@@ -45,12 +45,13 @@ class ColorListBox : public KListBox | |||
45 | void dragLeaveEvent( QDragLeaveEvent *e ); | 45 | void dragLeaveEvent( QDragLeaveEvent *e ); |
46 | void dragMoveEvent( QDragMoveEvent *e ); | 46 | void dragMoveEvent( QDragMoveEvent *e ); |
47 | void dropEvent( QDropEvent *e ); | 47 | void dropEvent( QDropEvent *e ); |
48 | 48 | ||
49 | private slots: | 49 | private slots: |
50 | void newColor( int index ); | 50 | void newColor( int index ); |
51 | void slotNewColor(QListBoxItem * i); | ||
51 | 52 | ||
52 | private: | 53 | private: |
53 | int mCurrentOnDragEnter; | 54 | int mCurrentOnDragEnter; |
54 | 55 | ||
55 | }; | 56 | }; |
56 | 57 | ||
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp index 366e54c..e0fbd21 100644 --- a/kaddressbook/views/configurecardviewdialog.cpp +++ b/kaddressbook/views/configurecardviewdialog.cpp | |||
@@ -212,17 +212,21 @@ void CardViewLookNFeelPage::setHeaderFont() | |||
212 | #endif //KAB_EMBEDDED | 212 | #endif //KAB_EMBEDDED |
213 | } | 213 | } |
214 | 214 | ||
215 | void CardViewLookNFeelPage::enableFonts() | 215 | void CardViewLookNFeelPage::enableFonts() |
216 | { | 216 | { |
217 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); | 217 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); |
218 | if ( cbEnableCustomFonts->isChecked() ) | ||
219 | vbFonts->setFocus(); | ||
218 | } | 220 | } |
219 | 221 | ||
220 | void CardViewLookNFeelPage::enableColors() | 222 | void CardViewLookNFeelPage::enableColors() |
221 | { | 223 | { |
222 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); | 224 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); |
225 | if ( cbEnableCustomColors->isChecked() ) | ||
226 | lbColors->setFocus(); | ||
223 | } | 227 | } |
224 | 228 | ||
225 | void CardViewLookNFeelPage::initGUI() | 229 | void CardViewLookNFeelPage::initGUI() |
226 | { | 230 | { |
227 | int spacing = KDialog::spacingHint(); | 231 | int spacing = KDialog::spacingHint(); |
228 | int margin = KDialog::marginHint(); | 232 | int margin = KDialog::marginHint(); |
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp index 8bcceb2..0e36abd 100644 --- a/kaddressbook/views/configuretableviewdialog.cpp +++ b/kaddressbook/views/configuretableviewdialog.cpp | |||
@@ -207,17 +207,21 @@ void LookAndFeelPage::setHeaderFont() | |||
207 | #endif //KAB_EMBEDDED | 207 | #endif //KAB_EMBEDDED |
208 | } | 208 | } |
209 | 209 | ||
210 | void LookAndFeelPage::enableFonts() | 210 | void LookAndFeelPage::enableFonts() |
211 | { | 211 | { |
212 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); | 212 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); |
213 | if ( cbEnableCustomFonts->isChecked() ) | ||
214 | vbFonts->setFocus(); | ||
213 | } | 215 | } |
214 | 216 | ||
215 | void LookAndFeelPage::enableColors() | 217 | void LookAndFeelPage::enableColors() |
216 | { | 218 | { |
217 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); | 219 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); |
220 | if ( cbEnableCustomColors->isChecked() ) | ||
221 | lbColors->setFocus(); | ||
218 | } | 222 | } |
219 | 223 | ||
220 | void LookAndFeelPage::initGUI() | 224 | void LookAndFeelPage::initGUI() |
221 | { | 225 | { |
222 | int spacing = KDialog::spacingHint(); | 226 | int spacing = KDialog::spacingHint(); |
223 | int margin = KDialog::marginHint(); | 227 | int margin = KDialog::marginHint(); |