Part of the setup dialog (KShowMailApp::SetupDialog) to configure the filter. More...
#include <configfilter.h>
Public Member Functions | |
ConfigFilter (QWidget *parent=0, const QVariantList &args=QVariantList()) | |
~ConfigFilter () | |
virtual void | load () |
virtual void | defaults () |
virtual void | save () |
Protected Member Functions | |
void | decreaseNumbers (uint number) |
FilterSetupItem * | getFilterItem (uint num) |
Private Slots | |
void | slotChanged () |
Connected with the configuration items. Calls the slot changed() of KCModule to notify the dialog about the change. | |
void | slotOpenWhitelist () |
void | slotOpenBlacklist () |
void | slotAdd () |
void | slotEdit () |
void | slotRemove () |
void | slotOtherActionChanged (int index) |
void | slotMoveTop () |
void | slotMoveBottom () |
void | slotMoveUp () |
void | slotMoveDown () |
void | slotFilterActiveToggled (bool filterOn) |
void | slotOpenMailBoxWizard () |
void | slotExport () |
void | slotImport () |
Private Attributes | |
KSharedConfigPtr | config |
QCheckBox * | chkActivateFilter |
QGroupBox * | gboxSenderLists |
QGroupBox * | gboxFilters |
QGroupBox * | gboxOthers |
QGroupBox * | gBoxExImport |
KPushButton * | btnOpenBlacklist |
KPushButton * | btnOpenWhitelist |
QTreeWidget * | listFilters |
KPushButton * | btnMoveTop |
KPushButton * | btnMoveBottom |
KPushButton * | btnMoveUp |
KPushButton * | btnMoveDown |
KPushButton * | btnAdd |
KPushButton * | btnEdit |
KPushButton * | btnRemove |
KComboBox * | cmbActionOthers |
KLineEdit * | txtMailbox |
KPushButton * | btnMailboxWizard |
KPushButton * | btnExport |
KPushButton * | btnImport |
uint | lastFilterNumber |
QStringList | blacklist |
int | blacklistAction |
QStringList | whitelist |
Part of the setup dialog (KShowMailApp::SetupDialog) to configure the filter.
Definition at line 63 of file configfilter.h.
ConfigFilter::ConfigFilter | ( | QWidget * | parent = 0 , |
|
const QVariantList & | args = QVariantList() | |||
) | [explicit] |
Generic constructor
parent | parent widget
|
Definition at line 23 of file configfilter.cpp.
ConfigFilter::~ConfigFilter | ( | ) |
Destructor
Definition at line 206 of file configfilter.cpp.
void ConfigFilter::decreaseNumbers | ( | uint | number | ) | [protected] |
Decrease the numbers of these filter setup items whose number is greater than or equals num.
number | start number of renumbering |
Definition at line 492 of file configfilter.cpp.
void ConfigFilter::defaults | ( | ) | [virtual] |
Overloaded method of KCModule. Sets the user interface elements to default values. This method is called when the user clicks the "Default" button.
Definition at line 265 of file configfilter.cpp.
FilterSetupItem * ConfigFilter::getFilterItem | ( | uint | num | ) | [protected] |
Returns the pointer to the filter setup item with number num. Returns 0 if no item found.
num | number of the searched filter item
|
Definition at line 662 of file configfilter.cpp.
void ConfigFilter::load | ( | ) | [virtual] |
Overloaded method of KCModule. Sets the user interface elements to reflect the current settings stored in the config file.
Definition at line 210 of file configfilter.cpp.
void ConfigFilter::save | ( | ) | [virtual] |
Overloaded method of KCModule. Stores the config information as shown in the user interface in the config file. Is called when the user clicks "Apply" or "Ok".
Definition at line 296 of file configfilter.cpp.
void ConfigFilter::slotAdd | ( | ) | [private, slot] |
Connected with button btnAdd. Opens the account setup dialog with an account item pointer of NULL. If the user has clicked OK, the dialog will create a new account item with the entered values and adds it to the list view.
Definition at line 394 of file configfilter.cpp.
void ConfigFilter::slotChanged | ( | ) | [private, slot] |
Connected with the configuration items. Calls the slot changed() of KCModule to notify the dialog about the change.
Definition at line 360 of file configfilter.cpp.
void ConfigFilter::slotEdit | ( | ) | [private, slot] |
Connected with button btnEdit. Opens the account setup with the selected account item.
Definition at line 423 of file configfilter.cpp.
void ConfigFilter::slotExport | ( | ) | [private, slot] |
Connected with button btnExport.
Exports the filter settings.
Definition at line 710 of file configfilter.cpp.
void ConfigFilter::slotFilterActiveToggled | ( | bool | filterOn | ) | [private, slot] |
Connected with chkActivateFilter, signal toggled(). Enabled or disabled the other widget of this GUI.
filterOn | TRUE - filter is active; FALSE - filter is not active |
Definition at line 690 of file configfilter.cpp.
void ConfigFilter::slotImport | ( | ) | [private, slot] |
Connected with button btnImport.
Imports the filter settings.
Definition at line 872 of file configfilter.cpp.
void ConfigFilter::slotMoveBottom | ( | ) | [private, slot] |
Connected with button btnMoveBottom. Moves the selected filter item at the bottom of the list, i.e. the number of this item will be the greatest one.
Definition at line 558 of file configfilter.cpp.
void ConfigFilter::slotMoveDown | ( | ) | [private, slot] |
Connected with button btnMoveDown. Moves the selected filter item down, i.e. the number of this item will be increased.
Definition at line 627 of file configfilter.cpp.
void ConfigFilter::slotMoveTop | ( | ) | [private, slot] |
Connected with button btnMoveTop. Moves the selected filter item at the top of the list, i.e. the number of this item will be the least one.
Definition at line 512 of file configfilter.cpp.
void ConfigFilter::slotMoveUp | ( | ) | [private, slot] |
Connected with button btnMoveUp. Moves the selected filter item up, i.e. the number of this item will be decreased.
Definition at line 591 of file configfilter.cpp.
void ConfigFilter::slotOpenBlacklist | ( | ) | [private, slot] |
Connected with the button btnOpenBlacklist. Creates and opens a dialog to edit the blacklist.
Definition at line 379 of file configfilter.cpp.
void ConfigFilter::slotOpenMailBoxWizard | ( | ) | [private, slot] |
Connected with button btnMailboxWizard. Opens a wizard to configure the mailbox
Definition at line 697 of file configfilter.cpp.
void ConfigFilter::slotOpenWhitelist | ( | ) | [private, slot] |
Connected with the button btnOpenWhitelist. Creates and opens a dialog to edit the whitelist.
Definition at line 365 of file configfilter.cpp.
void ConfigFilter::slotOtherActionChanged | ( | int | index | ) | [private, slot] |
Connected with combobox cmbActionOthers. Enables or disables additional widgets for action configuration.
index | position (index) of the selected action |
Definition at line 478 of file configfilter.cpp.
void ConfigFilter::slotRemove | ( | ) | [private, slot] |
Connected with button btnRemove. Removes the selected item.
Definition at line 447 of file configfilter.cpp.
QStringList ConfigFilter::blacklist [private] |
The blacklist
Definition at line 219 of file configfilter.h.
int ConfigFilter::blacklistAction [private] |
The action for mails these senders are listed on the blacklist.
Possible actions are: CONFIG_VALUE_FILTER_BLACKLIST_ACTION_DELETE, CONFIG_VALUE_FILTER_BLACKLIST_ACTION_MARK
Definition at line 225 of file configfilter.h.
KPushButton* ConfigFilter::btnAdd [private] |
Button to add a new filter.
Definition at line 173 of file configfilter.h.
KPushButton* ConfigFilter::btnEdit [private] |
Button to edit a filter.
Definition at line 178 of file configfilter.h.
KPushButton* ConfigFilter::btnExport [private] |
Button to export the filter settings
Definition at line 203 of file configfilter.h.
KPushButton* ConfigFilter::btnImport [private] |
Button to import the filter settings
Definition at line 208 of file configfilter.h.
KPushButton* ConfigFilter::btnMailboxWizard [private] |
This button opens a wizard which will help to get the right mailbox
Definition at line 198 of file configfilter.h.
KPushButton* ConfigFilter::btnMoveBottom [private] |
Button to move a filter at bottom.
Definition at line 158 of file configfilter.h.
KPushButton* ConfigFilter::btnMoveDown [private] |
Button to move a filter down.
Definition at line 168 of file configfilter.h.
KPushButton* ConfigFilter::btnMoveTop [private] |
Button to move a filter at top.
Definition at line 153 of file configfilter.h.
KPushButton* ConfigFilter::btnMoveUp [private] |
Button to move a filter up.
Definition at line 163 of file configfilter.h.
KPushButton* ConfigFilter::btnOpenBlacklist [private] |
Button to open the Blacklist.
Definition at line 138 of file configfilter.h.
KPushButton* ConfigFilter::btnOpenWhitelist [private] |
Button to open the Whitelist.
Definition at line 143 of file configfilter.h.
KPushButton* ConfigFilter::btnRemove [private] |
Button to remove a filter.
Definition at line 183 of file configfilter.h.
QCheckBox* ConfigFilter::chkActivateFilter [private] |
Check box to activate the filter
Definition at line 113 of file configfilter.h.
KComboBox* ConfigFilter::cmbActionOthers [private] |
Combobox to select the action for the rest of mails.
Definition at line 188 of file configfilter.h.
KSharedConfigPtr ConfigFilter::config [private] |
Connector to the configuration file
Definition at line 108 of file configfilter.h.
QGroupBox* ConfigFilter::gBoxExImport [private] |
Group box for export/import filter settings
Definition at line 133 of file configfilter.h.
QGroupBox* ConfigFilter::gboxFilters [private] |
Group box for filter items.
Definition at line 123 of file configfilter.h.
QGroupBox* ConfigFilter::gboxOthers [private] |
Group box for other action.
Definition at line 128 of file configfilter.h.
QGroupBox* ConfigFilter::gboxSenderLists [private] |
Group box for sender lists.
Definition at line 118 of file configfilter.h.
uint ConfigFilter::lastFilterNumber [private] |
The last assigned number of a filter setup item. It is set to zero by the constructor. Therefore the first filter number is 1.
Definition at line 214 of file configfilter.h.
QTreeWidget* ConfigFilter::listFilters [private] |
List of filters
Definition at line 148 of file configfilter.h.
KLineEdit* ConfigFilter::txtMailbox [private] |
If selected, the other mails will be moved to the mailbox which is written in this edit line.
Definition at line 193 of file configfilter.h.
QStringList ConfigFilter::whitelist [private] |
The whiteList
Definition at line 230 of file configfilter.h.