-rw-r--r-- | bin/kdepim/WhatsNew.txt | 5 | ||||
-rw-r--r-- | kaddressbook/filter.cpp | 22 | ||||
-rw-r--r-- | kaddressbook/filter.h | 6 | ||||
-rw-r--r-- | kaddressbook/filtereditdialog.cpp | 40 | ||||
-rw-r--r-- | kaddressbook/filtereditdialog.h | 7 |
5 files changed, 65 insertions, 15 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 5d8ef41..d8f8323 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -11,25 +11,30 @@ Added sync config options for filters on incoming data. | |||
11 | Added sync config options for filters on outgoing data. | 11 | Added sync config options for filters on outgoing data. |
12 | Please read the updated SyncHowTo about the new filter settings. | 12 | Please read the updated SyncHowTo about the new filter settings. |
13 | These filter settings make it now possible to sync with shared | 13 | These filter settings make it now possible to sync with shared |
14 | calendars without writing back private or confidential data | 14 | calendars without writing back private or confidential data |
15 | (via the outgoing filters). | 15 | (via the outgoing filters). |
16 | To sync only with particular parts of a shared calendar, | 16 | To sync only with particular parts of a shared calendar, |
17 | the incoming filter settings can be used. | 17 | the incoming filter settings can be used. |
18 | An example can be found in the SyncHowTo. | 18 | An example can be found in the SyncHowTo. |
19 | 19 | ||
20 | KO/Pi: | 20 | KO/Pi: |
21 | The timeedit input has a pulldown list for times. | 21 | The timeedit input has a pulldown list for times. |
22 | If opened, this pulldown list should now has the right time highlighted. | 22 | If opened, this pulldown list should now has the right time highlighted. |
23 | Added the possibility to exclude events/todos/journals in a filter. | ||
24 | You should exclude journals, if you do not want them to sync with a public calendar. | ||
23 | 25 | ||
26 | KA/Pi: | ||
27 | Added the possibility to in/exclude public/private/confidential contacts to a filter. | ||
28 | If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... | ||
24 | 29 | ||
25 | 30 | ||
26 | ********** VERSION 1.9.17 ************ | 31 | ********** VERSION 1.9.17 ************ |
27 | 32 | ||
28 | KO/Pi: | 33 | KO/Pi: |
29 | Fixed that tooltips were not updated after moving an item in agenda view. | 34 | Fixed that tooltips were not updated after moving an item in agenda view. |
30 | Fixed a bug in sorting start date for recurring events in list view. | 35 | Fixed a bug in sorting start date for recurring events in list view. |
31 | Changed the left button in todo viewer from "Agenda" to "Set completed". | 36 | Changed the left button in todo viewer from "Agenda" to "Set completed". |
32 | This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. | 37 | This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. |
33 | Added more info in the todo viewer: Startdate, parent/sub todos. | 38 | Added more info in the todo viewer: Startdate, parent/sub todos. |
34 | 39 | ||
35 | 40 | ||
diff --git a/kaddressbook/filter.cpp b/kaddressbook/filter.cpp index 39d2ae4..9cb4c2d 100644 --- a/kaddressbook/filter.cpp +++ b/kaddressbook/filter.cpp | |||
@@ -19,35 +19,38 @@ | |||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <kconfig.h> | 24 | #include <kconfig.h> |
25 | #include <kconfigbase.h> | 25 | #include <kconfigbase.h> |
26 | #include <kdebug.h> | 26 | #include <kdebug.h> |
27 | 27 | ||
28 | #include "kabprefs.h" | 28 | #include "kabprefs.h" |
29 | 29 | ||
30 | #include "filter.h" | 30 | #include "filter.h" |
31 | #include <secrecy.h> | ||
31 | 32 | ||
32 | Filter::Filter() | 33 | Filter::Filter() |
33 | : mName( QString::null ), mMatchRule( Matching ), mEnabled( true ), | 34 | : mName( QString::null ), mMatchRule( Matching ), mEnabled( true ), |
34 | mInternal( false ) | 35 | mInternal( false ) |
35 | { | 36 | { |
37 | mCriteria = ShowPublic | ShowPrivate| ShowConfidential ; | ||
36 | } | 38 | } |
37 | 39 | ||
38 | Filter::Filter( const QString &name ) | 40 | Filter::Filter( const QString &name ) |
39 | : mName( name ), mMatchRule( Matching ), mEnabled( true ), | 41 | : mName( name ), mMatchRule( Matching ), mEnabled( true ), |
40 | mInternal( false ) | 42 | mInternal( false ) |
41 | { | 43 | { |
44 | mCriteria = ShowPublic | ShowPrivate| ShowConfidential ; | ||
42 | } | 45 | } |
43 | 46 | ||
44 | Filter::~Filter() | 47 | Filter::~Filter() |
45 | { | 48 | { |
46 | } | 49 | } |
47 | 50 | ||
48 | void Filter::setName( const QString &name ) | 51 | void Filter::setName( const QString &name ) |
49 | { | 52 | { |
50 | mName = name; | 53 | mName = name; |
51 | } | 54 | } |
52 | 55 | ||
53 | const QString &Filter::name() const | 56 | const QString &Filter::name() const |
@@ -70,24 +73,41 @@ void Filter::apply( KABC::Addressee::List &addresseeList ) | |||
70 | { | 73 | { |
71 | #ifndef KAB_EMBEDDED | 74 | #ifndef KAB_EMBEDDED |
72 | iter = addresseeList.erase( iter ); | 75 | iter = addresseeList.erase( iter ); |
73 | #else //KAB_EMBEDDED | 76 | #else //KAB_EMBEDDED |
74 | iter = addresseeList.remove( iter ); | 77 | iter = addresseeList.remove( iter ); |
75 | #endif //KAB_EMBEDDED | 78 | #endif //KAB_EMBEDDED |
76 | } | 79 | } |
77 | } | 80 | } |
78 | } | 81 | } |
79 | 82 | ||
80 | bool Filter::filterAddressee( const KABC::Addressee &a ) | 83 | bool Filter::filterAddressee( const KABC::Addressee &a ) |
81 | { | 84 | { |
85 | switch ( a.secrecy().type()) { | ||
86 | case KABC::Secrecy::Public: | ||
87 | if (! (mCriteria & ShowPublic )) | ||
88 | return false; | ||
89 | break; | ||
90 | case KABC::Secrecy::Private: | ||
91 | if (! (mCriteria & ShowPrivate )) | ||
92 | return false; | ||
93 | break; | ||
94 | case KABC::Secrecy::Confidential: | ||
95 | if (! (mCriteria & ShowConfidential )) | ||
96 | return false; | ||
97 | break; | ||
98 | default: | ||
99 | return false; | ||
100 | break; | ||
101 | } | ||
82 | QStringList::Iterator iter; | 102 | QStringList::Iterator iter; |
83 | iter = mCategoryList.begin(); | 103 | iter = mCategoryList.begin(); |
84 | // empty filter always matches | 104 | // empty filter always matches |
85 | 105 | ||
86 | if ( iter == mCategoryList.end() ) | 106 | if ( iter == mCategoryList.end() ) |
87 | return true; | 107 | return true; |
88 | 108 | ||
89 | for ( ; iter != mCategoryList.end(); ++iter ) { | 109 | for ( ; iter != mCategoryList.end(); ++iter ) { |
90 | if ( a.hasCategory( *iter ) ) | 110 | if ( a.hasCategory( *iter ) ) |
91 | return ( mMatchRule == Matching ); | 111 | return ( mMatchRule == Matching ); |
92 | } | 112 | } |
93 | 113 | ||
@@ -111,32 +131,34 @@ void Filter::setCategories( const QStringList &list ) | |||
111 | 131 | ||
112 | const QStringList &Filter::categories() const | 132 | const QStringList &Filter::categories() const |
113 | { | 133 | { |
114 | return mCategoryList; | 134 | return mCategoryList; |
115 | } | 135 | } |
116 | 136 | ||
117 | void Filter::save( KConfig *config ) | 137 | void Filter::save( KConfig *config ) |
118 | { | 138 | { |
119 | config->writeEntry( "Name", mName ); | 139 | config->writeEntry( "Name", mName ); |
120 | config->writeEntry( "Enabled", mEnabled ); | 140 | config->writeEntry( "Enabled", mEnabled ); |
121 | config->writeEntry( "Categories", mCategoryList ); | 141 | config->writeEntry( "Categories", mCategoryList ); |
122 | config->writeEntry( "MatchRule", (int)mMatchRule ); | 142 | config->writeEntry( "MatchRule", (int)mMatchRule ); |
143 | config->writeEntry( "Criteria", (int)mCriteria ); | ||
123 | } | 144 | } |
124 | 145 | ||
125 | void Filter::restore( KConfig *config ) | 146 | void Filter::restore( KConfig *config ) |
126 | { | 147 | { |
127 | mName = config->readEntry( "Name", "<internal error>" ); | 148 | mName = config->readEntry( "Name", "<internal error>" ); |
128 | mEnabled = config->readBoolEntry( "Enabled", true ); | 149 | mEnabled = config->readBoolEntry( "Enabled", true ); |
129 | mCategoryList = config->readListEntry( "Categories" ); | 150 | mCategoryList = config->readListEntry( "Categories" ); |
130 | mMatchRule = (MatchRule)config->readNumEntry( "MatchRule", Matching ); | 151 | mMatchRule = (MatchRule)config->readNumEntry( "MatchRule", Matching ); |
152 | mCriteria = config->readNumEntry( "Criteria", (ShowPublic | ShowPrivate| ShowConfidential) ); | ||
131 | } | 153 | } |
132 | 154 | ||
133 | void Filter::save( KConfig *config, QString baseGroup, Filter::List &list ) | 155 | void Filter::save( KConfig *config, QString baseGroup, Filter::List &list ) |
134 | { | 156 | { |
135 | { | 157 | { |
136 | KConfigGroupSaver s( config, baseGroup ); | 158 | KConfigGroupSaver s( config, baseGroup ); |
137 | 159 | ||
138 | // remove the old filters | 160 | // remove the old filters |
139 | uint count = config->readNumEntry( "Count" ); | 161 | uint count = config->readNumEntry( "Count" ); |
140 | /* // memory access violation here | 162 | /* // memory access violation here |
141 | for ( uint i = 0; i < count; ++i ) | 163 | for ( uint i = 0; i < count; ++i ) |
142 | config->deleteGroup( QString( "%1_%2" ).arg( baseGroup ).arg( i ) ); | 164 | config->deleteGroup( QString( "%1_%2" ).arg( baseGroup ).arg( i ) ); |
diff --git a/kaddressbook/filter.h b/kaddressbook/filter.h index cf2c0a1..26870d7 100644 --- a/kaddressbook/filter.h +++ b/kaddressbook/filter.h | |||
@@ -29,25 +29,28 @@ | |||
29 | #include <qvaluelist.h> | 29 | #include <qvaluelist.h> |
30 | 30 | ||
31 | #include <kabc/addressee.h> | 31 | #include <kabc/addressee.h> |
32 | #include <kconfig.h> | 32 | #include <kconfig.h> |
33 | 33 | ||
34 | /** | 34 | /** |
35 | Filter for AddressBook related objects (Addressees) | 35 | Filter for AddressBook related objects (Addressees) |
36 | 36 | ||
37 | @todo This class should be switched to use shared data. | 37 | @todo This class should be switched to use shared data. |
38 | */ | 38 | */ |
39 | class Filter | 39 | class Filter |
40 | { | 40 | { |
41 | public: | 41 | public: |
42 | enum { ShowPublic = 1, ShowPrivate = 2, ShowConfidential = 4}; | ||
43 | void setCriteria(int c) { mCriteria = c ;} | ||
44 | int criteria() const { return mCriteria;} | ||
42 | typedef QValueList<Filter> List; | 45 | typedef QValueList<Filter> List; |
43 | 46 | ||
44 | enum MatchRule { Matching = 0, NotMatching = 1 }; | 47 | enum MatchRule { Matching = 0, NotMatching = 1 }; |
45 | 48 | ||
46 | Filter(); | 49 | Filter(); |
47 | Filter( const QString& name ); | 50 | Filter( const QString& name ); |
48 | ~Filter(); | 51 | ~Filter(); |
49 | 52 | ||
50 | /** | 53 | /** |
51 | Set the name of the filter. | 54 | Set the name of the filter. |
52 | */ | 55 | */ |
53 | void setName( const QString &name ); | 56 | void setName( const QString &name ); |
@@ -134,20 +137,21 @@ class Filter | |||
134 | Sets the filter rule. If the rule is Filter::Matching (default), | 137 | Sets the filter rule. If the rule is Filter::Matching (default), |
135 | then the filter will return true on items that match the filter. | 138 | then the filter will return true on items that match the filter. |
136 | If the rule is Filter::NotMatching, then the filter will return | 139 | If the rule is Filter::NotMatching, then the filter will return |
137 | true on items that do not match the filter. | 140 | true on items that do not match the filter. |
138 | */ | 141 | */ |
139 | void setMatchRule( MatchRule rule ); | 142 | void setMatchRule( MatchRule rule ); |
140 | 143 | ||
141 | /** @return The current match rule. | 144 | /** @return The current match rule. |
142 | */ | 145 | */ |
143 | MatchRule matchRule() const; | 146 | MatchRule matchRule() const; |
144 | 147 | ||
145 | private: | 148 | private: |
149 | int mCriteria; | ||
146 | QString mName; | 150 | QString mName; |
147 | QStringList mCategoryList; | 151 | QStringList mCategoryList; |
148 | MatchRule mMatchRule; | 152 | MatchRule mMatchRule; |
149 | bool mEnabled; | 153 | bool mEnabled; |
150 | bool mInternal; | 154 | bool mInternal; |
151 | }; | 155 | }; |
152 | 156 | ||
153 | #endif | 157 | #endif |
diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp index 063585a..987f234 100644 --- a/kaddressbook/filtereditdialog.cpp +++ b/kaddressbook/filtereditdialog.cpp | |||
@@ -25,24 +25,25 @@ | |||
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qbuttongroup.h> | 31 | #include <qbuttongroup.h> |
32 | #include <qhbox.h> | 32 | #include <qhbox.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qlayout.h> | 34 | #include <qlayout.h> |
35 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
36 | #include <qradiobutton.h> | 36 | #include <qradiobutton.h> |
37 | #include <qcheckbox.h> | ||
37 | #include <qregexp.h> | 38 | #include <qregexp.h> |
38 | #include <qstring.h> | 39 | #include <qstring.h> |
39 | #include <qtoolbutton.h> | 40 | #include <qtoolbutton.h> |
40 | #include <qtooltip.h> | 41 | #include <qtooltip.h> |
41 | #include <qwidget.h> | 42 | #include <qwidget.h> |
42 | 43 | ||
43 | #include <kapplication.h> | 44 | #include <kapplication.h> |
44 | #include <kbuttonbox.h> | 45 | #include <kbuttonbox.h> |
45 | #include <kdebug.h> | 46 | #include <kdebug.h> |
46 | #include <kiconloader.h> | 47 | #include <kiconloader.h> |
47 | #include <klineedit.h> | 48 | #include <klineedit.h> |
48 | #include <klistbox.h> | 49 | #include <klistbox.h> |
@@ -81,48 +82,60 @@ void FilterEditDialog::setFilter( const Filter &filter ) | |||
81 | if ( categories.contains( item->text( 0 ) ) ) { | 82 | if ( categories.contains( item->text( 0 ) ) ) { |
82 | QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); | 83 | QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); |
83 | checkItem->setOn( true ); | 84 | checkItem->setOn( true ); |
84 | } | 85 | } |
85 | 86 | ||
86 | item = item->nextSibling(); | 87 | item = item->nextSibling(); |
87 | } | 88 | } |
88 | 89 | ||
89 | if ( filter.matchRule() == Filter::Matching ) | 90 | if ( filter.matchRule() == Filter::Matching ) |
90 | mMatchRuleGroup->setButton( 0 ); | 91 | mMatchRuleGroup->setButton( 0 ); |
91 | else | 92 | else |
92 | mMatchRuleGroup->setButton( 1 ); | 93 | mMatchRuleGroup->setButton( 1 ); |
94 | |||
95 | int c = filter.criteria() ; | ||
96 | mPublic->setChecked(c &Filter::ShowPublic); | ||
97 | mPrivate->setChecked(c & Filter::ShowPrivate); | ||
98 | mConfidential->setChecked(c & Filter::ShowConfidential); | ||
99 | |||
93 | } | 100 | } |
94 | 101 | ||
95 | Filter FilterEditDialog::filter() | 102 | Filter FilterEditDialog::filter() |
96 | { | 103 | { |
97 | Filter filter; | 104 | Filter filter; |
98 | 105 | ||
99 | filter.setName( mNameEdit->text() ); | 106 | filter.setName( mNameEdit->text() ); |
100 | 107 | ||
101 | QStringList categories; | 108 | QStringList categories; |
102 | QListViewItem *item = mCategoriesView->firstChild(); | 109 | QListViewItem *item = mCategoriesView->firstChild(); |
103 | while ( item != 0 ) { | 110 | while ( item != 0 ) { |
104 | QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); | 111 | QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); |
105 | if ( checkItem->isOn() ) | 112 | if ( checkItem->isOn() ) |
106 | categories.append( item->text( 0 ) ); | 113 | categories.append( item->text( 0 ) ); |
107 | 114 | ||
108 | item = item->nextSibling(); | 115 | item = item->nextSibling(); |
109 | } | 116 | } |
110 | filter.setCategories( categories ); | 117 | filter.setCategories( categories ); |
111 | 118 | ||
112 | if ( mMatchRuleGroup->find( 0 )->isOn() ) | 119 | if ( mMatchRuleGroup->find( 0 )->isOn() ) |
113 | filter.setMatchRule( Filter::Matching ); | 120 | filter.setMatchRule( Filter::Matching ); |
114 | else | 121 | else |
115 | filter.setMatchRule( Filter::NotMatching ); | 122 | filter.setMatchRule( Filter::NotMatching ); |
116 | 123 | ||
124 | int c = 0; | ||
125 | if (mPublic->isChecked()) c |= Filter::ShowPublic; | ||
126 | if (mPrivate->isChecked()) c |= Filter::ShowPrivate; | ||
127 | if (mConfidential->isChecked()) c |= Filter::ShowConfidential; | ||
128 | filter.setCriteria( c ) ; | ||
129 | |||
117 | return filter; | 130 | return filter; |
118 | } | 131 | } |
119 | 132 | ||
120 | void FilterEditDialog::initGUI() | 133 | void FilterEditDialog::initGUI() |
121 | { | 134 | { |
122 | #ifndef KAB_EMBEDDED | 135 | #ifndef KAB_EMBEDDED |
123 | resize( 490, 300 ); | 136 | resize( 490, 300 ); |
124 | #else //KAB_EMBEDDED | 137 | #else //KAB_EMBEDDED |
125 | resize( KMIN(KGlobal::getDesktopWidth()-10, 490), KMIN(KGlobal::getDesktopHeight()-50, 300)); | 138 | resize( KMIN(KGlobal::getDesktopWidth()-10, 490), KMIN(KGlobal::getDesktopHeight()-50, 300)); |
126 | #endif //KAB_EMBEDDED | 139 | #endif //KAB_EMBEDDED |
127 | 140 | ||
128 | 141 | ||
@@ -134,41 +147,42 @@ void FilterEditDialog::initGUI() | |||
134 | label = new QLabel( i18n( "Name" ), page ); | 147 | label = new QLabel( i18n( "Name" ), page ); |
135 | mNameEdit = new KLineEdit( page ); | 148 | mNameEdit = new KLineEdit( page ); |
136 | mNameEdit->setFocus(); | 149 | mNameEdit->setFocus(); |
137 | topLayout->addWidget( label, 0, 0 ); | 150 | topLayout->addWidget( label, 0, 0 ); |
138 | topLayout->addWidget( mNameEdit, 0, 1 ); | 151 | topLayout->addWidget( mNameEdit, 0, 1 ); |
139 | connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), | 152 | connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), |
140 | SLOT( filterNameTextChanged( const QString&) ) ); | 153 | SLOT( filterNameTextChanged( const QString&) ) ); |
141 | 154 | ||
142 | mCategoriesView = new KListView( page ); | 155 | mCategoriesView = new KListView( page ); |
143 | mCategoriesView->addColumn( i18n( "Categories" ) ); | 156 | mCategoriesView->addColumn( i18n( "Categories" ) ); |
144 | topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); | 157 | topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); |
145 | 158 | ||
146 | mMatchRuleGroup = new QButtonGroup( page ); | 159 | mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page ); |
147 | mMatchRuleGroup->setExclusive( true ); | 160 | mMatchRuleGroup->setExclusive( true ); |
148 | 161 | QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup ); | |
149 | QBoxLayout *gbLayout = new QVBoxLayout( mMatchRuleGroup ); | ||
150 | gbLayout->setSpacing( KDialog::spacingHint() ); | ||
151 | gbLayout->setMargin( KDialog::marginHint() ); | ||
152 | |||
153 | QRadioButton *radio = new QRadioButton( i18n( "Show only contacts matching\n the selected categories" ), mMatchRuleGroup ); | ||
154 | radio->setChecked( true ); | 162 | radio->setChecked( true ); |
155 | mMatchRuleGroup->insert( radio ); | 163 | //mMatchRuleGroup->insert( radio ); |
156 | gbLayout->addWidget( radio ); | 164 | radio = new QRadioButton( i18n( "Exclude categories" ), mMatchRuleGroup ); |
165 | //mMatchRuleGroup->insert( radio ); | ||
166 | topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); | ||
157 | 167 | ||
158 | radio = new QRadioButton( i18n( "Show all contacts except those\n matching the selected categories" ), mMatchRuleGroup ); | 168 | QHButtonGroup * mMatchPPCGroup = new QHButtonGroup(i18n( "Include contacts, that are:" ), page ); |
159 | mMatchRuleGroup->insert( radio ); | 169 | mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup ); |
160 | gbLayout->addWidget( radio ); | 170 | mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup ); |
171 | mConfidential = new QCheckBox( i18n( "confidential" ), mMatchPPCGroup ); | ||
172 | mPublic->setChecked( true ); | ||
173 | mPrivate->setChecked( true ); | ||
174 | mConfidential->setChecked( true ); | ||
175 | topLayout->addMultiCellWidget( mMatchPPCGroup, 3, 3, 0, 1 ); | ||
161 | 176 | ||
162 | topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); | ||
163 | } | 177 | } |
164 | 178 | ||
165 | void FilterEditDialog::filterNameTextChanged( const QString &text ) | 179 | void FilterEditDialog::filterNameTextChanged( const QString &text ) |
166 | { | 180 | { |
167 | enableButtonOK( !text.isEmpty() ); | 181 | enableButtonOK( !text.isEmpty() ); |
168 | } | 182 | } |
169 | 183 | ||
170 | void FilterEditDialog::slotHelp() | 184 | void FilterEditDialog::slotHelp() |
171 | { | 185 | { |
172 | #ifndef KAB_EMBEDDED | 186 | #ifndef KAB_EMBEDDED |
173 | kapp->invokeHelp( "using-filters" ); | 187 | kapp->invokeHelp( "using-filters" ); |
174 | #endif //KAB_EMBEDDED | 188 | #endif //KAB_EMBEDDED |
diff --git a/kaddressbook/filtereditdialog.h b/kaddressbook/filtereditdialog.h index 4dd75e4..5a8bad1 100644 --- a/kaddressbook/filtereditdialog.h +++ b/kaddressbook/filtereditdialog.h | |||
@@ -27,30 +27,32 @@ Copyright (c) 2004 Ulf Schenk | |||
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef FILTEREDITDIALOG_H | 31 | #ifndef FILTEREDITDIALOG_H |
32 | #define FILTEREDITDIALOG_H | 32 | #define FILTEREDITDIALOG_H |
33 | 33 | ||
34 | class QButtonGroup; | 34 | class QButtonGroup; |
35 | class QString; | 35 | class QString; |
36 | class QToolButton; | 36 | class QToolButton; |
37 | class QWidget; | 37 | class QWidget; |
38 | class QListBoxItem; | 38 | class QListBoxItem; |
39 | class QCheckBox; | ||
39 | 40 | ||
40 | class KLineEdit; | 41 | class KLineEdit; |
41 | class KListBox; | 42 | class KListBox; |
42 | class KListView; | 43 | class KListView; |
43 | 44 | ||
44 | #include <kdialogbase.h> | 45 | #include <kdialogbase.h> |
46 | #include <qhbuttongroup.h> | ||
45 | 47 | ||
46 | #include "filter.h" | 48 | #include "filter.h" |
47 | 49 | ||
48 | class FilterDialog : public KDialogBase | 50 | class FilterDialog : public KDialogBase |
49 | { | 51 | { |
50 | Q_OBJECT | 52 | Q_OBJECT |
51 | 53 | ||
52 | public: | 54 | public: |
53 | FilterDialog( QWidget *parent, const char *name = 0 ); | 55 | FilterDialog( QWidget *parent, const char *name = 0 ); |
54 | ~FilterDialog(); | 56 | ~FilterDialog(); |
55 | 57 | ||
56 | void setFilters( const Filter::List &list ); | 58 | void setFilters( const Filter::List &list ); |
@@ -87,18 +89,21 @@ class FilterEditDialog : public KDialogBase | |||
87 | 89 | ||
88 | protected slots: | 90 | protected slots: |
89 | void filterNameTextChanged( const QString& ); | 91 | void filterNameTextChanged( const QString& ); |
90 | void slotHelp(); | 92 | void slotHelp(); |
91 | 93 | ||
92 | private: | 94 | private: |
93 | void initGUI(); | 95 | void initGUI(); |
94 | 96 | ||
95 | Filter mFilter; | 97 | Filter mFilter; |
96 | 98 | ||
97 | KLineEdit *mNameEdit; | 99 | KLineEdit *mNameEdit; |
98 | KListView *mCategoriesView; | 100 | KListView *mCategoriesView; |
99 | QButtonGroup *mMatchRuleGroup; | 101 | QHButtonGroup *mMatchRuleGroup; |
102 | QCheckBox *mPrivate; | ||
103 | QCheckBox *mPublic; | ||
104 | QCheckBox *mConfidential; | ||
100 | QPushButton *mEditButton; | 105 | QPushButton *mEditButton; |
101 | QPushButton *mRemoveButton; | 106 | QPushButton *mRemoveButton; |
102 | }; | 107 | }; |
103 | 108 | ||
104 | #endif | 109 | #endif |