kmail

#include <kmfilterdlg.h>

Inherits KDialogBase.

Public Slots

void slotFilterSelected (KMFilter *aFilter)
 
void slotActionChanged (const KMPopFilterAction aAction)
 

Public Member Functions

 KMFilterDlg (TQWidget *parent=0, const char *name=0, bool popFilter=false, bool createDummyFilter=true)
 
void createFilter (const TQCString &field, const TQString &value)
 

Protected Slots

void slotApplicabilityChanged ()
 
void slotApplicableAccountsChanged ()
 
void slotStopProcessingButtonToggled (bool aChecked)
 
void slotConfigureShortcutButtonToggled (bool aChecked)
 
void slotCapturedShortcutChanged (const TDEShortcut &)
 
void slotConfigureToolbarButtonToggled (bool aChecked)
 
void slotFilterActionIconChanged (TQString icon)
 
void slotReset ()
 
void slotUpdateFilter ()
 
void slotSaveSize ()
 
void slotFinished ()
 
void slotUpdateAccountList ()
 
void slotImportFilters ()
 
void slotExportFilters ()
 

Protected Attributes

KMFilterListBoxmFilterList
 
KMSearchPatternEditmPatternEdit
 
KMFilterActionWidgetLister * mActionLister
 
KMPopFilterActionWidget * mActionGroup
 
TQCheckBox * mApplyOnIn
 
TQCheckBox * mApplyOnOut
 
TQCheckBox * mApplyOnCtrlJ
 
TQRadioButton * mApplyOnForAll
 
TQRadioButton * mApplyOnForTraditional
 
TQRadioButton * mApplyOnForChecked
 
TDEListView * mAccountList
 
TQCheckBox * mStopProcessingHere
 
TQCheckBox * mConfigureShortcut
 
TQCheckBox * mConfigureToolbar
 
TQLabel * mFilterActionLabel
 
TDEIconButton * mFilterActionIconButton
 
KKeyButton * mKeyButton
 
TQGroupBox * mAdvOptsGroup
 
TQVGroupBox * mGlobalsBox
 
TQCheckBox * mShowLaterBtn
 
KMFilter * mFilter
 
bool bPopFilter
 

Detailed Description

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.

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.

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 TQString KMFilterDlgHelpAnchor in kmfilterdlg.cpp accordingly.

The filter dialog.

Author
Marc Mutz Marc@.nosp@m.Mutz.nosp@m..com, based upon work by Stefan Taferner tafer.nosp@m.ner@.nosp@m.kde.o.nosp@m.rg.
See also
KMFilter KMFilterActionEdit KMSearchPatternEdit KMFilterListBox

Definition at line 339 of file kmfilterdlg.h.

Constructor & Destructor Documentation

◆ KMFilterDlg()

KMFilterDlg::KMFilterDlg ( TQWidget *  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 130 of file kmfilterdlg.cpp.

Member Function Documentation

◆ createFilter()

void KMFilterDlg::createFilter ( const TQCString &  field,
const TQString &  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 354 of file kmfilterdlg.h.

◆ slotActionChanged

void KMFilterDlg::slotActionChanged ( const KMPopFilterAction  aAction)
slot

Action for popFilter.

Set action of popFilter.

Definition at line 363 of file kmfilterdlg.cpp.

◆ slotApplicabilityChanged

void KMFilterDlg::slotApplicabilityChanged ( )
protectedslot

Definition at line 449 of file kmfilterdlg.cpp.

◆ slotApplicableAccountsChanged

void KMFilterDlg::slotApplicableAccountsChanged ( )
protectedslot

Definition at line 486 of file kmfilterdlg.cpp.

◆ slotCapturedShortcutChanged

void KMFilterDlg::slotCapturedShortcutChanged ( const TDEShortcut &  sc)
protectedslot

Definition at line 519 of file kmfilterdlg.cpp.

◆ slotConfigureShortcutButtonToggled

void KMFilterDlg::slotConfigureShortcutButtonToggled ( bool  aChecked)
protectedslot

Definition at line 508 of file kmfilterdlg.cpp.

◆ slotConfigureToolbarButtonToggled

void KMFilterDlg::slotConfigureToolbarButtonToggled ( bool  aChecked)
protectedslot

Definition at line 539 of file kmfilterdlg.cpp.

◆ slotExportFilters

void KMFilterDlg::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 1366 of file kmfilterdlg.cpp.

◆ slotFilterActionIconChanged

void KMFilterDlg::slotFilterActionIconChanged ( TQString  icon)
protectedslot

Definition at line 545 of file kmfilterdlg.cpp.

◆ slotFilterSelected

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 368 of file kmfilterdlg.cpp.

◆ slotFinished

void KMFilterDlg::slotFinished ( )
protectedslot

Definition at line 353 of file kmfilterdlg.cpp.

◆ slotImportFilters

void KMFilterDlg::slotImportFilters ( )
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 1352 of file kmfilterdlg.cpp.

◆ slotReset

void KMFilterDlg::slotReset ( )
protectedslot

Definition at line 426 of file kmfilterdlg.cpp.

◆ slotSaveSize

void KMFilterDlg::slotSaveSize ( )
protectedslot

Definition at line 357 of file kmfilterdlg.cpp.

◆ slotStopProcessingButtonToggled

void KMFilterDlg::slotStopProcessingButtonToggled ( bool  aChecked)
protectedslot

Definition at line 502 of file kmfilterdlg.cpp.

◆ slotUpdateAccountList

void KMFilterDlg::slotUpdateAccountList ( )
protectedslot

Definition at line 551 of file kmfilterdlg.cpp.

◆ slotUpdateFilter

void KMFilterDlg::slotUpdateFilter ( )
protectedslot

Definition at line 441 of file kmfilterdlg.cpp.

Member Data Documentation

◆ bPopFilter

bool KMFilterDlg::bPopFilter
protected

Definition at line 424 of file kmfilterdlg.h.

◆ mAccountList

TDEListView* KMFilterDlg::mAccountList
protected

ListView that shows the accounts in the advanced tab.

Definition at line 411 of file kmfilterdlg.h.

◆ mActionGroup

KMPopFilterActionWidget* KMFilterDlg::mActionGroup
protected

The widget that allows editing the popFilter actions.

Definition at line 403 of file kmfilterdlg.h.

◆ mActionLister

KMFilterActionWidgetLister* KMFilterDlg::mActionLister
protected

The widget that allows editing of the filter actions.

Definition at line 401 of file kmfilterdlg.h.

◆ mAdvOptsGroup

TQGroupBox* KMFilterDlg::mAdvOptsGroup
protected

Definition at line 419 of file kmfilterdlg.h.

◆ mApplyOnCtrlJ

TQCheckBox * KMFilterDlg::mApplyOnCtrlJ
protected

Definition at line 406 of file kmfilterdlg.h.

◆ mApplyOnForAll

TQRadioButton* 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 409 of file kmfilterdlg.h.

◆ mApplyOnForChecked

TQRadioButton * KMFilterDlg::mApplyOnForChecked
protected

Definition at line 409 of file kmfilterdlg.h.

◆ mApplyOnForTraditional

TQRadioButton * KMFilterDlg::mApplyOnForTraditional
protected

Definition at line 409 of file kmfilterdlg.h.

◆ mApplyOnIn

TQCheckBox* 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 406 of file kmfilterdlg.h.

◆ mApplyOnOut

TQCheckBox * KMFilterDlg::mApplyOnOut
protected

Definition at line 406 of file kmfilterdlg.h.

◆ mConfigureShortcut

TQCheckBox* KMFilterDlg::mConfigureShortcut
protected

Definition at line 414 of file kmfilterdlg.h.

◆ mConfigureToolbar

TQCheckBox* KMFilterDlg::mConfigureToolbar
protected

Definition at line 415 of file kmfilterdlg.h.

◆ mFilter

KMFilter* KMFilterDlg::mFilter
protected

Definition at line 423 of file kmfilterdlg.h.

◆ mFilterActionIconButton

TDEIconButton* KMFilterDlg::mFilterActionIconButton
protected

Definition at line 417 of file kmfilterdlg.h.

◆ mFilterActionLabel

TQLabel* KMFilterDlg::mFilterActionLabel
protected

Definition at line 416 of file kmfilterdlg.h.

◆ mFilterList

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 397 of file kmfilterdlg.h.

◆ mGlobalsBox

TQVGroupBox* KMFilterDlg::mGlobalsBox
protected

Definition at line 420 of file kmfilterdlg.h.

◆ mKeyButton

KKeyButton* KMFilterDlg::mKeyButton
protected

Definition at line 418 of file kmfilterdlg.h.

◆ mPatternEdit

KMSearchPatternEdit* KMFilterDlg::mPatternEdit
protected

The widget that allows editing of the filter pattern.

Definition at line 399 of file kmfilterdlg.h.

◆ mShowLaterBtn

TQCheckBox* KMFilterDlg::mShowLaterBtn
protected

Definition at line 421 of file kmfilterdlg.h.

◆ mStopProcessingHere

TQCheckBox* KMFilterDlg::mStopProcessingHere
protected

Definition at line 413 of file kmfilterdlg.h.


The documentation for this class was generated from the following files: