-rw-r--r-- | libkdepim/categoryeditdialog.h | 24 | ||||
-rw-r--r-- | libkdepim/categoryselectdialog.cpp | 6 |
2 files changed, 28 insertions, 2 deletions
diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h index 4ebc802..3e8ab45 100644 --- a/libkdepim/categoryeditdialog.h +++ b/libkdepim/categoryeditdialog.h | |||
@@ -25,4 +25,5 @@ | |||
25 | 25 | ||
26 | #include <categoryeditdialog_base.h> | 26 | #include <categoryeditdialog_base.h> |
27 | #include <qlistview.h> | ||
27 | 28 | ||
28 | class KPimPrefs; | 29 | class KPimPrefs; |
@@ -30,4 +31,27 @@ class KPimPrefs; | |||
30 | namespace KPIM { | 31 | namespace KPIM { |
31 | 32 | ||
33 | class CategorySelectItem :public QObject, public QCheckListItem | ||
34 | { | ||
35 | |||
36 | Q_OBJECT | ||
37 | public: | ||
38 | |||
39 | CategorySelectItem(QListView * parent, const QString & text, Type tt) : | ||
40 | QCheckListItem (parent, text, tt ) , QObject( parent ) | ||
41 | {;} | ||
42 | |||
43 | signals: | ||
44 | void stateChanged( QListViewItem*); | ||
45 | |||
46 | protected: | ||
47 | |||
48 | virtual void stateChange(bool b) | ||
49 | { | ||
50 | QCheckListItem::stateChange(b); | ||
51 | emit stateChanged( this ); | ||
52 | } | ||
53 | }; | ||
54 | |||
55 | |||
32 | class CategoryEditDialog : public CategoryEditDialog_base | 56 | class CategoryEditDialog : public CategoryEditDialog_base |
33 | { | 57 | { |
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp index 8038934..4d80726 100644 --- a/libkdepim/categoryselectdialog.cpp +++ b/libkdepim/categoryselectdialog.cpp | |||
@@ -55,5 +55,5 @@ CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent, | |||
55 | showMaximized(); | 55 | showMaximized(); |
56 | connect( mSetColorCat, SIGNAL( clicked() ), this, SLOT( setColorCat() ) ); | 56 | connect( mSetColorCat, SIGNAL( clicked() ), this, SLOT( setColorCat() ) ); |
57 | connect( mCategories, SIGNAL( clicked(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) ); | 57 | // connect( mCategories, SIGNAL( clicked(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) ); |
58 | } | 58 | } |
59 | void CategorySelectDialog::editCategoriesDialog() | 59 | void CategorySelectDialog::editCategoriesDialog() |
@@ -74,5 +74,7 @@ void CategorySelectDialog::setCategories() | |||
74 | for (it = mPrefs->mCustomCategories.begin(); | 74 | for (it = mPrefs->mCustomCategories.begin(); |
75 | it != mPrefs->mCustomCategories.end(); ++it ) { | 75 | it != mPrefs->mCustomCategories.end(); ++it ) { |
76 | new QCheckListItem(mCategories,*it,QCheckListItem::CheckBox); | 76 | CategorySelectItem * item = new CategorySelectItem(mCategories,*it,QCheckListItem::CheckBox); |
77 | QObject::connect( item, SIGNAL( stateChanged(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) ); | ||
78 | |||
77 | } | 79 | } |
78 | } | 80 | } |