kaddressbook

filtereditdialog.h
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19 As a special exception, permission is given to link this program
20 with any edition of TQt, and distribute the resulting executable,
21 without including the source code for TQt in the source distribution.
22*/
23
24#ifndef FILTEREDITDIALOG_H
25#define FILTEREDITDIALOG_H
26
27class TQButtonGroup;
28class TQString;
29class TQToolButton;
30class TQWidget;
31
32class KLineEdit;
33class TDEListBox;
34class TDEListView;
35
36#include <kdialogbase.h>
37
38#include "filter.h"
39
40class FilterDialog : public KDialogBase
41{
42 TQ_OBJECT
43
44
45 public:
46 FilterDialog( TQWidget *parent, const char *name = 0 );
47 ~FilterDialog();
48
49 void setFilters( const Filter::List &list );
50 Filter::List filters() const;
51
52 protected slots:
53 void add();
54 void edit();
55 void remove();
56 void selectionChanged( TQListBoxItem* );
57
58 private:
59 void initGUI();
60 void refresh();
61
62 Filter::List mFilterList;
63 Filter::List mInternalFilterList;
64
65 TDEListBox *mFilterListBox;
66 TQPushButton *mAddButton;
67 TQPushButton *mEditButton;
68 TQPushButton *mRemoveButton;
69};
70
71class FilterEditDialog : public KDialogBase
72{
73 TQ_OBJECT
74
75 public:
76 FilterEditDialog( TQWidget *parent, const char *name = 0 );
77 ~FilterEditDialog();
78
79 void setFilter( const Filter &filter );
80 Filter filter();
81
82 protected slots:
83 void filterNameTextChanged( const TQString& );
84 void slotHelp();
85
86 private:
87 void initGUI();
88
89 Filter mFilter;
90
91 KLineEdit *mNameEdit;
92 TDEListView *mCategoriesView;
93 TQButtonGroup *mMatchRuleGroup;
94 TQPushButton *mEditButton;
95 TQPushButton *mRemoveButton;
96};
97
98#endif
Filter for AddressBook related objects (Addressees)
Definition: filter.h:40