summaryrefslogtreecommitdiffabout
path: root/kaddressbook/filtereditdialog.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /kaddressbook/filtereditdialog.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'kaddressbook/filtereditdialog.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/filtereditdialog.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/kaddressbook/filtereditdialog.h b/kaddressbook/filtereditdialog.h
new file mode 100644
index 0000000..4dd75e4
--- a/dev/null
+++ b/kaddressbook/filtereditdialog.h
@@ -0,0 +1,104 @@
1/*
2 This file is part of KAddressBook.
3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
4
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
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
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
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution.
22*/
23
24/*
25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk
27
28$Id$
29*/
30
31#ifndef FILTEREDITDIALOG_H
32#define FILTEREDITDIALOG_H
33
34class QButtonGroup;
35class QString;
36class QToolButton;
37class QWidget;
38class QListBoxItem;
39
40class KLineEdit;
41class KListBox;
42class KListView;
43
44#include <kdialogbase.h>
45
46#include "filter.h"
47
48class FilterDialog : public KDialogBase
49{
50 Q_OBJECT
51
52 public:
53 FilterDialog( QWidget *parent, const char *name = 0 );
54 ~FilterDialog();
55
56 void setFilters( const Filter::List &list );
57 Filter::List filters() const;
58
59 protected slots:
60 void add();
61 void edit();
62 void remove();
63 void selectionChanged( QListBoxItem* );
64
65 private:
66 void initGUI();
67 void refresh();
68
69 Filter::List mFilterList;
70 Filter::List mInternalFilterList;
71
72 KListBox *mFilterListBox;
73 QPushButton *mAddButton;
74 QPushButton *mEditButton;
75 QPushButton *mRemoveButton;
76};
77
78class FilterEditDialog : public KDialogBase
79{
80 Q_OBJECT
81 public:
82 FilterEditDialog( QWidget *parent, const char *name = 0 );
83 ~FilterEditDialog();
84
85 void setFilter( const Filter &filter );
86 Filter filter();
87
88 protected slots:
89 void filterNameTextChanged( const QString& );
90 void slotHelp();
91
92 private:
93 void initGUI();
94
95 Filter mFilter;
96
97 KLineEdit *mNameEdit;
98 KListView *mCategoriesView;
99 QButtonGroup *mMatchRuleGroup;
100 QPushButton *mEditButton;
101 QPushButton *mRemoveButton;
102};
103
104#endif