kaddressbook Library API Documentation

filtereditdialog.h

00001 #ifndef FILTEREDITDIALOG_H
00002 #define FILTEREDITDIALOG_H
00003 
00004 /*
00005     This file is part of KAddressBook.
00006     Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
00007 
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021 
00022     As a special exception, permission is given to link this program
00023     with any edition of Qt, and distribute the resulting executable,
00024     without including the source code for Qt in the source distribution.
00025 */
00026 
00027 class QWidget;
00028 class QToolButton;
00029 class QString;
00030 
00031 class KLineEdit;
00032 class KListBox;
00033 class KListView;
00034 
00035 #include <kdialogbase.h>
00036 
00037 #include "filter.h"
00038 
00039 class FilterDialog : public KDialogBase
00040 {
00041   Q_OBJECT
00042 
00043   public:
00044     FilterDialog(QWidget *parent, const char *name = 0);
00045     ~FilterDialog();
00046 
00047     void setFilters(const Filter::List &list);
00048     Filter::List &filters();
00049 
00050   protected slots:
00051     void add();
00052     void edit();
00053     void remove();
00054     void selectionChanged( QListBoxItem * );
00055 
00056   private:
00057     void initGUI();
00058     void refresh();
00059 
00060     Filter::List mFilterList;
00061 
00062     KListBox *mFilterListBox;
00063     QPushButton *mAddButton;
00064     QPushButton *mEditButton;
00065     QPushButton *mRemoveButton;
00066 };
00067 
00068 class FilterEditDialog : public KDialogBase
00069 {
00070     Q_OBJECT
00071   public:
00072     FilterEditDialog( QWidget *parent, const char *name = 0 );
00073     ~FilterEditDialog();
00074 
00075     void setFilter( const Filter &filter );
00076     Filter filter();
00077 protected slots:
00078     void filterNameTextChanged( const QString&);
00079   private:
00080     void initGUI();
00081 
00082     Filter mFilter;
00083 
00084     KLineEdit *mNameEdit;
00085     KListView *mCategoriesView;
00086     QButtonGroup *mMatchRuleGroup;
00087     QPushButton *mEditButton;
00088     QPushButton *mRemoveButton;
00089 };
00090 
00091 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:09 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001