00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef SENDERLISTDIALOG_H
00019 #define SENDERLISTDIALOG_H
00020
00021
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qradiobutton.h>
00025 #include <qbuttongroup.h>
00026 #include <qpushbutton.h>
00027 #include <QStringList>
00028
00029
00030 #include <KDialog>
00031 #include <kapplication.h>
00032 #include <keditlistbox.h>
00033 #include <klocale.h>
00034 #include <klineedit.h>
00035 #include <kconfig.h>
00036
00037
00038 #include "constants.h"
00039
00040
00041 #define ID_BUTTON_FILTER_SENDERLIST_DELETE 1
00042 #define ID_BUTTON_FILTER_SENDERLIST_MARK 2
00043
00048 class SenderListDialog : public KDialog
00049 {
00050
00051 Q_OBJECT
00052
00053 public:
00054
00058 enum ListType { Black, White };
00059
00067 explicit SenderListDialog( QWidget *parent = 0, ListType type = Black, QStringList list = QStringList(), int blackListAction = DEFAULT_FILTER_BLACKLIST_ACTION );
00068
00072 ~SenderListDialog();
00073
00078 QStringList getList() const;
00079
00085 int getBlacklistAction() const;
00086
00087
00088 private:
00089
00093 ListType type;
00094
00098 QStringList list;
00099
00104 int blacklistAction;
00105
00109 KSharedConfigPtr config;
00110
00114 KEditListBox* editFrame;
00115
00119 QButtonGroup* grpAction;
00120
00124 QRadioButton* btnDelete;
00125
00129 QRadioButton* btnMark;
00130
00134 void fillDialog();
00135
00136 private slots:
00137
00142 void slotSort();
00143
00151 void slotButtonClicked( int button );
00152
00153
00154 };
00155
00156 #endif