• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

mailcommon

  • MailCommon
  • KMFilterDialog
Public Slots | Public Member Functions | Protected Slots | Protected Attributes | List of all members
MailCommon::KMFilterDialog Class Reference

#include <kmfilterdialog.h>

Inheritance diagram for MailCommon::KMFilterDialog:
Inheritance graph
[legend]

Public Slots

virtual void accept ()
 
void slotFilterSelected (MailCommon::MailFilter *aFilter)
 

Public Member Functions

 KMFilterDialog (const QList< KActionCollection * > &actionCollection, QWidget *parent=0, bool createDummyFilter=true)
 
void createFilter (const QByteArray &field, const QString &value)
 

Protected Slots

void slotApplicabilityChanged ()
 
void slotApplicableAccountsChanged ()
 
void slotApply ()
 
void slotConfigureShortcutButtonToggled (bool aChecked)
 
void slotConfigureToolbarButtonToggled (bool aChecked)
 
void slotDialogUpdated ()
 
void slotDisableAccept ()
 
void slotExportFilters ()
 
void slotFetchItemsForFolderDone (KJob *job)
 
void slotFilterActionIconChanged (const QString &icon)
 
void slotFinished ()
 
void slotFolderChanged (const Akonadi::Collection &)
 
void slotImportFilter (QAction *)
 
void slotReset ()
 
void slotRunFilters ()
 
void slotSaveSize ()
 
void slotShortcutChanged (const QKeySequence &newSeq)
 
void slotStopProcessingButtonToggled (bool aChecked)
 
void slotUpdateAccountList ()
 
void slotUpdateFilter ()
 

Protected Attributes

AccountList * mAccountList
 
MailCommon::FilterActionWidgetLister * mActionLister
 
QGroupBox * mAdvOptsGroup
 
QCheckBox * mApplyBeforeOut
 
QCheckBox * mApplyOnCtrlJ
 
QRadioButton * mApplyOnForAll
 
QRadioButton * mApplyOnForChecked
 
QRadioButton * mApplyOnForTraditional
 
QCheckBox * mApplyOnIn
 
QCheckBox * mApplyOnOut
 
QCheckBox * mConfigureShortcut
 
QCheckBox * mConfigureToolbar
 
bool mDoNotClose
 
MailCommon::MailFilter * mFilter
 
KIconButton * mFilterActionIconButton
 
QLabel * mFilterActionLabel
 
KMFilterListBox * mFilterList
 
MailCommon::FolderRequester * mFolderRequester
 
bool mIgnoreFilterUpdates
 
KKeySequenceWidget * mKeySeqWidget
 
MailCommon::SearchPatternEdit * mPatternEdit
 
KPushButton * mRunNow
 
QCheckBox * mStopProcessingHere
 

Detailed Description

The filter dialog.

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.

Author
Marc Mutz mutz@.nosp@m.kde..nosp@m.org, based upon work by Stefan Taferner tafer.nosp@m.ner@.nosp@m.kde.o.nosp@m.rg.
See also
MailCommon::MailFilter KMFilterActionEdit SearchPatternEdit KMFilterListBox

Definition at line 339 of file kmfilterdialog.h.

Constructor & Destructor Documentation

MailCommon::KMFilterDialog::KMFilterDialog ( const QList< KActionCollection * > &  actionCollection,
QWidget *  parent = 0,
bool  createDummyFilter = true 
)
explicit

Creates 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 299 of file kmfilterdialog.cpp.

Member Function Documentation

void MailCommon::KMFilterDialog::accept ( )
virtualslot

Override QDialog::accept to allow disabling close.

Definition at line 620 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::createFilter ( const QByteArray &  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 358 of file kmfilterdialog.h.

void MailCommon::KMFilterDialog::slotApplicabilityChanged ( )
protectedslot

Definition at line 778 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotApplicableAccountsChanged ( )
protectedslot

Definition at line 812 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotApply ( )
protectedslot

Called wherenever the apply button is pressed.

Definition at line 630 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotConfigureShortcutButtonToggled ( bool  aChecked)
protectedslot

Definition at line 840 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotConfigureToolbarButtonToggled ( bool  aChecked)
protectedslot

Definition at line 865 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotDialogUpdated ( )
protectedslot

Called whenever a change in the filters configuration is detected, to enable the Apply button.

Definition at line 1690 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotDisableAccept ( )
protectedslot

Called when a user decides to continue editing invalid filters.

Definition at line 1685 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotExportFilters ( )
protectedslot

Called when a user clicks the export filters button.

Pops up a dialog asking the user which filters to export and which file to export to.

Definition at line 1678 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotFetchItemsForFolderDone ( KJob *  job)
protectedslot

Definition at line 685 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotFilterActionIconChanged ( const QString &  icon)
protectedslot

Definition at line 874 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotFilterSelected ( MailCommon::MailFilter *  aFilter)
slot

Internally connected to KMFilterListBox::filterSelected.

Just does a simple check and then calls SearchPatternEdit::setSearchPattern and KMFilterActionEdit::setActionList.

Definition at line 710 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotFinished ( )
protectedslot

Called when the dialog is closed (finished).

Definition at line 635 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotFolderChanged ( const Akonadi::Collection &  collection)
protectedslot

Definition at line 640 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotImportFilter ( QAction *  act)
protectedslot

Called when a user clicks the import filters button.

Pops up a dialog asking the user which file to import from and which of the filters in that file to import.

Definition at line 1644 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotReset ( )
protectedslot

Definition at line 762 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotRunFilters ( )
protectedslot

Definition at line 645 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotSaveSize ( )
protectedslot

Definition at line 704 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotShortcutChanged ( const QKeySequence &  newSeq)
protectedslot

Definition at line 854 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotStopProcessingButtonToggled ( bool  aChecked)
protectedslot

Definition at line 830 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotUpdateAccountList ( )
protectedslot

Update the list of accounts shown in the advanced tab.

Definition at line 883 of file kmfilterdialog.cpp.

void MailCommon::KMFilterDialog::slotUpdateFilter ( )
protectedslot

Definition at line 772 of file kmfilterdialog.cpp.

Member Data Documentation

AccountList* MailCommon::KMFilterDialog::mAccountList
protected

ListView that shows the accounts in the advanced tab.

Definition at line 459 of file kmfilterdialog.h.

MailCommon::FilterActionWidgetLister* MailCommon::KMFilterDialog::mActionLister
protected

The widget that allows editing of the filter actions.

Definition at line 448 of file kmfilterdialog.h.

QGroupBox* MailCommon::KMFilterDialog::mAdvOptsGroup
protected

Definition at line 467 of file kmfilterdialog.h.

QCheckBox * MailCommon::KMFilterDialog::mApplyBeforeOut
protected

Definition at line 452 of file kmfilterdialog.h.

QCheckBox * MailCommon::KMFilterDialog::mApplyOnCtrlJ
protected

Definition at line 452 of file kmfilterdialog.h.

QRadioButton* MailCommon::KMFilterDialog::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 456 of file kmfilterdialog.h.

QRadioButton * MailCommon::KMFilterDialog::mApplyOnForChecked
protected

Definition at line 456 of file kmfilterdialog.h.

QRadioButton * MailCommon::KMFilterDialog::mApplyOnForTraditional
protected

Definition at line 456 of file kmfilterdialog.h.

QCheckBox* MailCommon::KMFilterDialog::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 452 of file kmfilterdialog.h.

QCheckBox * MailCommon::KMFilterDialog::mApplyOnOut
protected

Definition at line 452 of file kmfilterdialog.h.

QCheckBox* MailCommon::KMFilterDialog::mConfigureShortcut
protected

Definition at line 462 of file kmfilterdialog.h.

QCheckBox* MailCommon::KMFilterDialog::mConfigureToolbar
protected

Definition at line 463 of file kmfilterdialog.h.

bool MailCommon::KMFilterDialog::mDoNotClose
protected

Definition at line 472 of file kmfilterdialog.h.

MailCommon::MailFilter* MailCommon::KMFilterDialog::mFilter
protected

Definition at line 469 of file kmfilterdialog.h.

KIconButton* MailCommon::KMFilterDialog::mFilterActionIconButton
protected

Definition at line 465 of file kmfilterdialog.h.

QLabel* MailCommon::KMFilterDialog::mFilterActionLabel
protected

Definition at line 464 of file kmfilterdialog.h.

KMFilterListBox* MailCommon::KMFilterDialog::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 442 of file kmfilterdialog.h.

MailCommon::FolderRequester* MailCommon::KMFilterDialog::mFolderRequester
protected

Definition at line 470 of file kmfilterdialog.h.

bool MailCommon::KMFilterDialog::mIgnoreFilterUpdates
protected

Definition at line 473 of file kmfilterdialog.h.

KKeySequenceWidget* MailCommon::KMFilterDialog::mKeySeqWidget
protected

Definition at line 466 of file kmfilterdialog.h.

MailCommon::SearchPatternEdit* MailCommon::KMFilterDialog::mPatternEdit
protected

The widget that allows editing of the filter pattern.

Definition at line 445 of file kmfilterdialog.h.

KPushButton* MailCommon::KMFilterDialog::mRunNow
protected

Definition at line 471 of file kmfilterdialog.h.

QCheckBox* MailCommon::KMFilterDialog::mStopProcessingHere
protected

Definition at line 461 of file kmfilterdialog.h.


The documentation for this class was generated from the following files:
  • kmfilterdialog.h
  • kmfilterdialog.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

Skip menu "mailcommon"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal