mailcommon
Namespaces | |
Util | |
Typedefs | |
typedef FilterAction *(* | FilterActionNewFunc )(void) |
Enumerations | |
enum | StatusValueTypes { StatusImportant = 0, StatusToAct = 1, StatusUnread = 2, StatusRead = 3, StatusDeleted = 4, StatusReplied = 5, StatusForwarded = 6, StatusQueued = 7, StatusSent = 8, StatusWatched = 9, StatusIgnored = 10, StatusSpam = 11, StatusHam = 12, StatusHasAttachment = 13 } |
Functions | |
static QModelIndex | lastChildOf (QAbstractItemModel *model, const QModelIndex ¤t) |
MAILCOMMON_EXPORT QDataStream & | operator<< (QDataStream &stream, const MailFilter &filter) |
MAILCOMMON_EXPORT QDataStream & | operator>> (QDataStream &stream, MailFilter &filter) |
Variables | |
static QMap< Collection::Id, QSharedPointer < FolderCollection > > | fcMap |
const int | FILTER_MAX_ACTIONS = 8 |
const int | FILTER_MAX_RULES = 8 |
static QMutex | mapMutex |
static const char * | myConfigGroupName = "FolderSelectionDialog" |
static const int | StatusValueCount |
static const int | StatusValueCountWithoutHidden = StatusValueCount - 1 |
static const MessageStatusInfo | StatusValues [] |
Detailed Description
The filter dialog.
This class represents a search pattern rule operating on a string.
Copyright (c) 2004 David Faure faure @kde .org
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 const
QString
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 program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of the Qt library by Trolltech AS, Norway (or with modified versions of Qt that use the same license as Qt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than Qt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
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>
Typedef Documentation
typedef FilterAction*(* MailCommon::FilterActionNewFunc)(void) |
Definition at line 31 of file filteractiondict.h.
Enumeration Type Documentation
Enumerator | |
---|---|
StatusImportant | |
StatusToAct | |
StatusUnread | |
StatusRead | |
StatusDeleted | |
StatusReplied | |
StatusForwarded | |
StatusQueued | |
StatusSent | |
StatusWatched | |
StatusIgnored | |
StatusSpam | |
StatusHam | |
StatusHasAttachment |
Definition at line 54 of file searchrulestatus.h.
Function Documentation
|
static |
Definition at line 440 of file foldertreeview.cpp.
QDataStream & MailCommon::operator<< | ( | QDataStream & | stream, |
const MailFilter & | filter | ||
) |
Definition at line 637 of file mailfilter.cpp.
QDataStream & MailCommon::operator>> | ( | QDataStream & | stream, |
MailCommon::MailFilter & | filter | ||
) |
Definition at line 668 of file mailfilter.cpp.
Variable Documentation
|
static |
Definition at line 44 of file foldercollection.cpp.
const int MailCommon::FILTER_MAX_ACTIONS = 8 |
Definition at line 40 of file mailfilter.h.
const int MailCommon::FILTER_MAX_RULES = 8 |
Definition at line 49 of file searchpattern.h.
|
static |
Definition at line 43 of file foldercollection.cpp.
|
static |
Definition at line 267 of file folderselectiondialog.cpp.
|
static |
Definition at line 71 of file searchrulestatus.h.
|
static |
Definition at line 76 of file searchrulestatus.h.
|
static |
Definition at line 35 of file searchrulestatus.h.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.