kmail
KMFilterDlg Class Reference
#include <kmfilterdlg.h>
Detailed Description
The filter dialog.The filter dialog.This is a non-modal dialog used to manage KMail's filters. It should only be called through KMFilterMgr::openDialog. The dialog consists of three main parts:
- The KMFilterListBox in the left half allows the user to select a filter to be displayed using the widgets on the right half. It also has buttons to delete filters, add new ones, to rename them and to change their order (maybe you will be able to move the filters around by dragging later, and to optimise the filters by trying to apply them to all locally available KMMessage in turn and thus profiling which filters (and which rules of the search patterns) matches most often and sorting the filter/rules list according to the results, but I first want the basic functionality in place).
- The KMSearchPatternEdit in the upper-right quarter allows the user to modify the filter criteria.
- The KMFilterActionEdit in the lower-right quarter allows the user to select the actions that will be executed for any message that matches the search pattern.
- (tbi) There will be another widget that will allow the user to select to which folders the filter may be applied and whether it should be applied on outbound or inbound message transfers or both or none (meaning the filter is only applied when the user explicitly hits CTRL-J). I'm not sure whether there should be a per-folder filter list or a single list where you can select the names of folders this rule will be applied to.
NOTE: Though this dialog is non-modal, it completely ignores all the stuff that goes on behind the scenes with folders esp. folder creation, move and create. The widgets that depend on the filter list and the filters that use folders as parameters are not updated as you expect. I hope this will change sometime soon.
KMFilterDlg supports the creation of new filters through context menues, dubbed "rapid filters". Call KMFilterMgr::createFilter to use this. That call will be delivered to this dialog, which in turn delivers it to the KMFilterListBox.
If you change the (DocBook) anchor for the filter dialog help, make sure to change const
QString
KMFilterDlgHelpAnchor
in kmfilterdlg.cpp accordingly.
- See also:
- KMFilter KMFilterActionEdit KMSearchPatternEdit KMFilterListBox
Definition at line 324 of file kmfilterdlg.h.
Constructor & Destructor Documentation
KMFilterDlg::KMFilterDlg | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 , |
|||
bool | popFilter = false , |
|||
bool | createDummyFilter = true | |||
) |
Create the filter dialog.
The only class which should be able to do this is KMFilterMgr. This ensures that there is only a single filter dialog
Definition at line 125 of file kmfilterdlg.cpp.
Member Function Documentation
void KMFilterDlg::createFilter | ( | const QCString & | field, | |
const QString & | value | |||
) | [inline] |
Called from KMFilterMgr.
Creates a new filter and presets the first rule with "field equals value". Internally forwarded to KMFilterListBox::createFilter. You should instead call KMFilterMgr::createFilter.
Definition at line 338 of file kmfilterdlg.h.
void KMFilterDlg::slotFilterSelected | ( | KMFilter * | aFilter | ) | [slot] |
Internally connected to KMFilterListBox::filterSelected.
Just does a simple check and then calls KMSearchPatternEdit::setSearchPattern and KMFilterActionEdit::setActionList.
Definition at line 357 of file kmfilterdlg.cpp.
void KMFilterDlg::slotActionChanged | ( | const KMPopFilterAction | aAction | ) | [slot] |
Member Data Documentation
KMFilterListBox* KMFilterDlg::mFilterList [protected] |
The widget that contains the ListBox showing the filters, and the controls to remove filters, add new ones and to change their order.
Definition at line 370 of file kmfilterdlg.h.
KMSearchPatternEdit* KMFilterDlg::mPatternEdit [protected] |
KMFilterActionWidgetLister* KMFilterDlg::mActionLister [protected] |
KMPopFilterActionWidget* KMFilterDlg::mActionGroup [protected] |
QCheckBox* KMFilterDlg::mApplyOnIn [protected] |
Lets the user select whether to apply this filter on inbound/outbound messages, both, or only on explicit CTRL-J.
Definition at line 379 of file kmfilterdlg.h.
QRadioButton* KMFilterDlg::mApplyOnForAll [protected] |
For a filter applied to inbound messages selects whether to apply this filter to all accounts or to selected accounts only.
Definition at line 382 of file kmfilterdlg.h.
KListView* KMFilterDlg::mAccountList [protected] |
The documentation for this class was generated from the following files: