kmail Library API Documentation

KMFilterDlg Class Reference

The filter dialog. The filter dialog. More...

#include <kmfilterdlg.h>

List of all members.

Public Slots

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

Public Methods

 KMFilterDlg (QWidget *parent=0, const char *name=0, bool popFilter=false)
void createFilter (const QCString &field, const QString &value)

Protected Slots

void slotApplicabilityChanged ()
void slotStopProcessingButtonToggled (bool aChecked)
void slotConfigureShortcutButtonToggled (bool aChecked)
void slotFilterActionIconChanged (QString icon)
void slotReset ()
void slotSaveSize ()
void slotFinished ()

Protected Attributes

KMFilterListBoxmFilterList
KMSearchPatternEditmPatternEdit
KMFilterActionWidgetLister * mActionLister
KMPopFilterActionWidget * mActionGroup
QCheckBoxmApplyOnIn
QCheckBoxmApplyOnOut
QCheckBoxmApplyOnCtrlJ
QCheckBoxmStopProcessingHere
QCheckBoxmConfigureShortcut
QLabelmFilterActionLabel
KIconButton * mFilterActionIconButton
QGroupBoxmAdvOptsGroup
QVGroupBoxmGlobalsBox
QCheckBoxmShowLaterBtn
KMFilter * mFilter
bool bPopFilter


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:

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

Author:
Marc Mutz <Marc@Mutz.com>, based upon work by Stefan Taferner <taferner@kde.org>.
See also:
KMFilter KMFilterActionEdit KMSearchPatternEdit KMFilterListBox

Definition at line 303 of file kmfilterdlg.h.


Constructor & Destructor Documentation

KMFilterDlg::KMFilterDlg QWidget   parent = 0,
const char *    name = 0,
bool    popFilter = false
 

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

References QWhatsThis::add(), QGridLayout::addMultiCellWidget(), QGridLayout::addWidget(), KMFilterListBox::loadFilterList(), mActionGroup, mActionLister, mApplyOnCtrlJ, mApplyOnIn, mApplyOnOut, mFilterList, mPatternEdit, QLabel::setBuddy(), QGridLayout::setColStretch(), slotActionChanged(), slotFilterSelected(), and slotFinished().


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

References KMFilterListBox::createFilter(), and mFilterList.

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

References mActionGroup, mActionLister, mApplyOnCtrlJ, mApplyOnIn, mApplyOnOut, mFilterList, mPatternEdit, QCheckBox::setChecked(), KMSearchPatternEdit::setSearchPattern(), and KMFilterListBox::showLaterMsgs().

Referenced by KMFilterDlg().

void KMFilterDlg::slotActionChanged const KMPopFilterAction    aAction [slot]
 

Action for popFilter.

Definition at line 260 of file kmfilterdlg.cpp.

Referenced by KMFilterDlg().

void KMFilterDlg::slotFinished   [protected, slot]
 

called when the dialog is closed (finished).

Definition at line 250 of file kmfilterdlg.cpp.

Referenced by KMFilterDlg().


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

Referenced by createFilter(), KMFilterDlg(), and slotFilterSelected().

KMSearchPatternEdit* KMFilterDlg::mPatternEdit [protected]
 

The widget that allows editing of the filter pattern.

Definition at line 344 of file kmfilterdlg.h.

Referenced by KMFilterDlg(), and slotFilterSelected().

KMFilterActionWidgetLister* KMFilterDlg::mActionLister [protected]
 

The widget that allows editing of the filter actions.

Definition at line 346 of file kmfilterdlg.h.

Referenced by KMFilterDlg(), and slotFilterSelected().

KMPopFilterActionWidget* KMFilterDlg::mActionGroup [protected]
 

The widget that allows editing the popFilter actions.

Definition at line 348 of file kmfilterdlg.h.

Referenced by KMFilterDlg(), and slotFilterSelected().

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

Referenced by KMFilterDlg(), and slotFilterSelected().

QCheckBox * KMFilterDlg::mApplyOnOut [protected]
 

Lets the user select whether to apply this filter on inbound/outbound messages, both, or only on explicit CTRL-J.

Definition at line 351 of file kmfilterdlg.h.

Referenced by KMFilterDlg(), and slotFilterSelected().

QCheckBox * KMFilterDlg::mApplyOnCtrlJ [protected]
 

Lets the user select whether to apply this filter on inbound/outbound messages, both, or only on explicit CTRL-J.

Definition at line 351 of file kmfilterdlg.h.

Referenced by KMFilterDlg(), and slotFilterSelected().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kmail Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:37:36 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003