|using||FilterActionNewFunc = FilterAction *(*)()|
|MAILCOMMON_EXPORT QDataStream &||operator<< (QDataStream &stream, const MailFilter &filter)|
|MAILCOMMON_EXPORT QDataStream &||operator>> (QDataStream &stream, MailFilter &filter)|
|static QMap< Collection::Id, QSharedPointer< FolderSettings > >||fcMap|
The filter dialog.
This class represents a search pattern rule operating on a string.
This is a complex widget that is used to manipulate a mail program's filter list.
This is a non-modal dialog used to manage the 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 optimize 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 SearchPatternEdit 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.
Upon creating the dialog, a (deep) copy of the current filter list is made by KMFilterListBox. The changed filters are local to KMFilterListBox until the user clicks the 'Apply' button.
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.
KMFilterDialog supports the creation of new filters through context menus, 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
KMFilterDialogHelpAnchor in kmfilterdlg.cpp accordingly.
The filter dialog.
- See also
- MailCommon::MailFilter KMFilterActionEdit SearchPatternEdit KMFilterListBox
It consists of an internal list of filters, which is a deep copy of the list KMFilterMgr manages, a QListBox displaying that list, and a few buttons used to create new filters, delete them, rename them and change the order of filters.
It does not provide means to change the actual filter (besides the name), but relies on auxiliary widgets (SearchPatternEdit and KMFilterActionEdit) to do that.
Communication with this widget is quite easy: simply create an instance, connect the signals filterSelected, resetWidgets and applyWidgets with a slot that does the right thing and there you go...
This widget will operate on it's own copy of the filter list as long as you don't call slotApplyFilterChanges. It will then transfer the altered filter list back to KMFilterMgr.
A complex widget that allows managing a list of MailCommon::MailFilter's.
- See also
- MailCommon::MailFilter KMFilterDialog KMFilterActionEdit SearchPatternEdit
This class represents a search to be performed against a string. The string can be either a message header, or a pseudo header, such as <body>
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:58:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.