-rw-r--r-- | korganizer/kofilterview.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index b22bc54..1479208 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -1,79 +1,78 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
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 <qcheckbox.h> | 24 | #include <qcheckbox.h> |
25 | #include <qcombobox.h> | 25 | #include <qcombobox.h> |
26 | #include <qpushbutton.h> | 26 | #include <qpushbutton.h> |
27 | 27 | ||
28 | #include <libkcal/calfilter.h> | 28 | #include <libkcal/calfilter.h> |
29 | 29 | ||
30 | #include "kofilterview.h" | 30 | #include "kofilterview.h" |
31 | #include "kofilterview.moc" | ||
32 | 31 | ||
33 | KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, | 32 | KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, |
34 | const char* name,WFlags fl ) | 33 | const char* name,WFlags fl ) |
35 | : KOFilterView_base(parent,name,fl) | 34 | : KOFilterView_base(parent,name,fl) |
36 | { | 35 | { |
37 | mFilters = filterList; | 36 | mFilters = filterList; |
38 | 37 | ||
39 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); | 38 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); |
40 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); | 39 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); |
41 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); | 40 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); |
42 | } | 41 | } |
43 | 42 | ||
44 | KOFilterView::~KOFilterView() | 43 | KOFilterView::~KOFilterView() |
45 | { | 44 | { |
46 | // no need to delete child widgets, Qt does it all for us | 45 | // no need to delete child widgets, Qt does it all for us |
47 | } | 46 | } |
48 | 47 | ||
49 | bool KOFilterView::filtersEnabled() | 48 | bool KOFilterView::filtersEnabled() |
50 | { | 49 | { |
51 | return mEnabledCheck->isChecked(); | 50 | return mEnabledCheck->isChecked(); |
52 | } | 51 | } |
53 | 52 | ||
54 | void KOFilterView::setFiltersEnabled(bool set) | 53 | void KOFilterView::setFiltersEnabled(bool set) |
55 | { | 54 | { |
56 | mEnabledCheck->setChecked(set); | 55 | mEnabledCheck->setChecked(set); |
57 | emit filterChanged(); | 56 | emit filterChanged(); |
58 | } | 57 | } |
59 | 58 | ||
60 | 59 | ||
61 | void KOFilterView::updateFilters() | 60 | void KOFilterView::updateFilters() |
62 | { | 61 | { |
63 | mSelectionCombo->clear(); | 62 | mSelectionCombo->clear(); |
64 | 63 | ||
65 | CalFilter *filter = mFilters->first(); | 64 | CalFilter *filter = mFilters->first(); |
66 | while(filter) { | 65 | while(filter) { |
67 | mSelectionCombo->insertItem(filter->name()); | 66 | mSelectionCombo->insertItem(filter->name()); |
68 | filter = mFilters->next(); | 67 | filter = mFilters->next(); |
69 | } | 68 | } |
70 | } | 69 | } |
71 | 70 | ||
72 | CalFilter *KOFilterView::selectedFilter() | 71 | CalFilter *KOFilterView::selectedFilter() |
73 | { | 72 | { |
74 | CalFilter *f = mFilters->at(mSelectionCombo->currentItem()); | 73 | CalFilter *f = mFilters->at(mSelectionCombo->currentItem()); |
75 | return f; | 74 | return f; |
76 | } | 75 | } |
77 | 76 | ||
78 | void KOFilterView::setSelectedFilter(QString filterName) | 77 | void KOFilterView::setSelectedFilter(QString filterName) |
79 | { | 78 | { |