#include <kmfilterdlg.h>
Inherits TQGroupBox.
Public Slots | |
void | slotUpdateFilterName () |
void | slotApplyFilterChanges () |
void | slotShowLaterToggled (bool aOn) |
Signals | |
void | filterSelected (KMFilter *filter) |
void | resetWidgets () |
void | applyWidgets () |
Public Member Functions | |
KMFilterListBox (const TQString &title, TQWidget *parent=0, const char *name=0, bool popFilter=false) | |
void | createFilter (const TQCString &field, const TQString &value) |
void | loadFilterList (bool createDummyFilter) |
bool | showLaterMsgs () |
void | insertFilter (KMFilter *aFilter) |
void | appendFilter (KMFilter *aFilter) |
TQValueList< KMFilter * > | filtersForSaving () const |
Protected Slots | |
void | slotSelected (int aIdx) |
void | slotNew () |
void | slotCopy () |
void | slotDelete () |
void | slotTop () |
void | slotUp () |
void | slotDown () |
void | slotBottom () |
void | slotRename () |
void | slotSelectSourceFolders () |
Protected Attributes | |
TQPtrList< KMFilter > | mFilterList |
TQListBox * | mListBox |
TQPushButton * | mBtnNew |
TQPushButton * | mBtnCopy |
TQPushButton * | mBtnDelete |
TQPushButton * | mBtnRename |
TQPushButton * | mBtnTop |
TQPushButton * | mBtnUp |
TQPushButton * | mBtnDown |
TQPushButton * | mBtnBot |
int | mIdxSelItem |
bool | mShowLater |
Detailed Description
This is a complex widget that is used to manipulate KMail's filter list.
It consists of an internal list of filters, which is a deep copy of the list KMFilterMgr manages, a TQListBox 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 (KMSearchPatternEdit 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 KMFilter's.
- See also
- KMFilter KMFilterDlg KMFilterActionEdit KMSearchPatternEdit
Definition at line 60 of file kmfilterdlg.h.
Constructor & Destructor Documentation
◆ KMFilterListBox()
KMFilterListBox::KMFilterListBox | ( | const TQString & | title, |
TQWidget * | parent = 0 , |
||
const char * | name = 0 , |
||
bool | popFilter = false |
||
) |
Constuctor.
Definition at line 579 of file kmfilterdlg.cpp.
Member Function Documentation
◆ applyWidgets
|
signal |
Emitted when this widget wants the edit widgets to apply the changes to the current filter.
◆ createFilter()
void KMFilterListBox::createFilter | ( | const TQCString & | field, |
const TQString & | value | ||
) |
Called from KMFilterDlg.
Creates a new filter and presets the first rule with "field equals value". It's there mainly to support "rapid filter creation" from a context menu. You should instead call KMFilterMgr::createFilter.
- See also
- KMFilterMgr::createFilter KMFilterDlg::createFilter
Definition at line 677 of file kmfilterdlg.cpp.
◆ filterSelected
|
signal |
Emitted when a new filter has been selected by the user or if the current filter has changed after a 'new' or 'delete' operation.
◆ filtersForSaving()
TQValueList< KMFilter * > KMFilterListBox::filtersForSaving | ( | ) | const |
Returns a list of copies of the current list of filters.
The list owns the contents and thus the caller needs to clean them up.
Definition at line 764 of file kmfilterdlg.cpp.
◆ loadFilterList()
void KMFilterListBox::loadFilterList | ( | bool | createDummyFilter | ) |
Loads the filter list and selects the first filter.
Should be called when all signals are connected properly. If createDummyFilter is true, an empty filter is created to improve the usability of the dialog in case no filter has been defined so far.
Definition at line 998 of file kmfilterdlg.cpp.
◆ resetWidgets
|
signal |
Emitted when this widget wants the edit widgets to let go of their filter reference.
Everyone holding a reference to a filter should update it from the contents of the widgets used to edit it and set their internal reference to 0.
◆ showLaterMsgs()
bool KMFilterListBox::showLaterMsgs | ( | ) |
Returns wheather the global option 'Show Later Msgs' is set or not.
Definition at line 694 of file kmfilterdlg.cpp.
◆ slotApplyFilterChanges
|
slot |
Called when the user clicks either 'Apply' or 'OK' in KMFilterDlg.
Updates the filter list in the KMFilterMgr.
Definition at line 732 of file kmfilterdlg.cpp.
◆ slotBottom
|
protectedslot |
Called when the user clicks the 'Bottom' button.
Moves the current filter to the bottom line.
Definition at line 913 of file kmfilterdlg.cpp.
◆ slotCopy
|
protectedslot |
Called when the user clicks the 'Copy' button.
Creates a copy of the current filter and inserts it just before the current one.
Definition at line 813 of file kmfilterdlg.cpp.
◆ slotDelete
|
protectedslot |
Called when the user clicks the 'Delete' button.
Deletes the current filter.
Definition at line 834 of file kmfilterdlg.cpp.
◆ slotDown
|
protectedslot |
Called when the user clicks the 'Down' button.
Moves the current filter down one line.
Definition at line 898 of file kmfilterdlg.cpp.
◆ slotNew
|
protectedslot |
Called when the user clicks the 'New' button.
Creates a new empty filter just before the current one.
Definition at line 806 of file kmfilterdlg.cpp.
◆ slotRename
|
protectedslot |
Called when the user clicks the 'Rename' button.
Pops up a dialog prompting to enter the new name.
Definition at line 928 of file kmfilterdlg.cpp.
◆ slotSelected
|
protectedslot |
Called when the user clicks on a filter in the filter list.
Calculates the corresponding filter and emits the filterSelected signal.
Definition at line 794 of file kmfilterdlg.cpp.
◆ slotShowLaterToggled
|
slot |
Called when the user toggles the 'Show Download Later Msgs' Checkbox in the Global Options section.
Definition at line 727 of file kmfilterdlg.cpp.
◆ slotTop
|
protectedslot |
Called when the user clicks the 'Top' button.
Moves the current filter to the top line.
Definition at line 868 of file kmfilterdlg.cpp.
◆ slotUp
|
protectedslot |
Called when the user clicks the 'Up' button.
Moves the current filter up one line.
Definition at line 883 of file kmfilterdlg.cpp.
◆ slotUpdateFilterName
|
slot |
Called when the name of a filter might have changed (e.g.
through changing the first rule in KMSearchPatternEdit). Updates the corresponding entry in the listbox and (if necessary) auto-names the filter.
Definition at line 699 of file kmfilterdlg.cpp.
Member Data Documentation
◆ mBtnNew
|
protected |
The various action buttons.
Definition at line 161 of file kmfilterdlg.h.
◆ mFilterList
|
protected |
The deep copy of the filter list.
Definition at line 157 of file kmfilterdlg.h.
◆ mIdxSelItem
|
protected |
The index of the currently selected item.
Definition at line 164 of file kmfilterdlg.h.
◆ mListBox
|
protected |
The listbox displaying the filter list.
Definition at line 159 of file kmfilterdlg.h.
The documentation for this class was generated from the following files: