#include <kmsearchpatternedit.h>
Inherits TQWidget.
Public Types | |
enum | { Message , Body , AnyHeader , Recipients , Size , AgeInDays , Status , Subject , From , To , CC , ReplyTo , Organization } |
Public Slots | |
void | slotFunctionChanged () |
void | slotValueChanged () |
Signals | |
void | fieldChanged (const TQString &) |
void | contentsChanged (const TQString &) |
Public Member Functions | |
KMSearchRuleWidget (TQWidget *parent=0, KMSearchRule *aRule=0, const char *name=0, bool headersOnly=false, bool absoluteDates=false) | |
void | setHeadersOnly (bool headersOnly) |
void | setRule (KMSearchRule *aRule) |
KMSearchRule * | rule () const |
void | reset () |
Static Public Member Functions | |
static int | ruleFieldToId (const TQString &i18nVal) |
Protected Slots | |
void | slotRuleFieldChanged (const TQString &) |
Protected Member Functions | |
int | indexOfRuleField (const TQCString &aName) const |
Static Protected Member Functions | |
static TQCString | ruleFieldToEnglish (const TQString &i18nVal) |
Detailed Description
A widget to edit a single KMSearchRule.
It consists of an editable TQComboBox for the field, a read-only TQComboBox for the function and a TQLineEdit for the content or the pattern (in case of regexps). It manages the i18n itself, so field name should be in it's english form.
To use, you essentially give it the reference to a KMSearchRule and it does the rest. It will never delete the rule itself, as it assumes that something outside of it manages this.
A widget to edit a single KMSearchRule.
Definition at line 39 of file kmsearchpatternedit.h.
Constructor & Destructor Documentation
◆ KMSearchRuleWidget()
KMSearchRuleWidget::KMSearchRuleWidget | ( | TQWidget * | parent = 0 , |
KMSearchRule * | aRule = 0 , |
||
const char * | name = 0 , |
||
bool | headersOnly = false , |
||
bool | absoluteDates = false |
||
) |
Constructor.
You can give a KMSearchRule as parameter, which will be used to initialize the widget.
Definition at line 56 of file kmsearchpatternedit.cpp.
Member Function Documentation
◆ contentsChanged
|
signal |
This signal is emitted whenever the user alters the contents/value of the rule.
◆ fieldChanged
|
signal |
This signal is emitted whenever the user alters the field.
The pseudo-headers <...> are returned in their i18n form, but stored in their english form in the rule.
◆ indexOfRuleField()
|
protected |
Used internally to find the corresponding index into the field ComboBox.
Returns the index if found or -1 if the search failed,
Definition at line 227 of file kmsearchpatternedit.cpp.
◆ reset()
void KMSearchRuleWidget::reset | ( | ) |
Resets the rule currently worked on and updates the widget accordingly.
Definition at line 170 of file kmsearchpatternedit.cpp.
◆ rule()
KMSearchRule * KMSearchRuleWidget::rule | ( | ) | const |
Return a reference to the currently-worked-on KMSearchRule.
Definition at line 158 of file kmsearchpatternedit.cpp.
◆ ruleFieldToEnglish()
|
staticprotected |
Used internally to translate i18n-ized pseudo-headers back to english.
Definition at line 198 of file kmsearchpatternedit.cpp.
◆ setHeadersOnly()
void KMSearchRuleWidget::setHeadersOnly | ( | bool | headersOnly | ) |
Set whether only header fields can be searched.
If is
true only header fields can be searched otherwise <message> and <body> searches are available also.
Definition at line 74 of file kmsearchpatternedit.cpp.
◆ setRule()
void KMSearchRuleWidget::setRule | ( | KMSearchRule * | aRule | ) |
Set the rule.
The rule is accepted regardless of the return value of KMSearchRule::isEmpty. This widget makes a shallow copy of aRule
and operates directly on it. If aRule
is 0, resets itself, taks user input, but does essentially nothing. If you pass 0, you should probably disable it.
Definition at line 132 of file kmsearchpatternedit.cpp.
The documentation for this class was generated from the following files: