mailcommon
#include <searchpatternedit.h>
Public Types | |
enum | { Message, Body, AnyHeader, Recipients, Size, AgeInDays, Status, Tag, Subject, From, To, CC, ReplyTo, Organization, Date } |
Public Slots | |
void | slotFunctionChanged () |
void | slotReturnPressed () |
void | slotValueChanged () |
Signals | |
void | addWidget (QWidget *) |
void | contentsChanged (const QString &) |
void | fieldChanged (const QString &) |
void | removeWidget (QWidget *) |
void | returnPressed () |
Public Member Functions | |
SearchRuleWidget (QWidget *parent=0, MailCommon::SearchRule::Ptr aRule=MailCommon::SearchRule::Ptr(), SearchPatternEdit::SearchPatternEditOptions options=(SearchPatternEdit::SearchPatternEditOptions)(SearchPatternEdit::None), SearchPatternEdit::SearchModeType modeType=SearchPatternEdit::StandardMode) | |
void | reset () |
MailCommon::SearchRule::Ptr | rule () const |
void | setPatternEditOptions (MailCommon::SearchPatternEdit::SearchPatternEditOptions options) |
void | setRule (MailCommon::SearchRule::Ptr aRule) |
void | updateAddRemoveButton (bool addButtonEnabled, bool removeButtonEnabled) |
Static Public Member Functions | |
static int | ruleFieldToId (const QString &i18nVal) |
Protected Slots | |
void | slotAddWidget () |
void | slotRemoveWidget () |
void | slotRuleFieldChanged (const QString &) |
Protected Member Functions | |
int | indexOfRuleField (const QByteArray &aName) const |
Static Protected Member Functions | |
static QByteArray | ruleFieldToEnglish (const QString &i18nVal) |
Detailed Description
A widget to edit a single MailCommon::SearchRule.
It consists of an editable KComboBox for the field, a read-only KComboBox for the function and a QLineEdit 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 MailCommon::SearchRule 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 MailCommon::SearchRule.
Definition at line 173 of file searchpatternedit.h.
Member Enumeration Documentation
anonymous enum |
Enumerator | |
---|---|
Message | |
Body | |
AnyHeader | |
Recipients | |
Size | |
AgeInDays | |
Status | |
Tag | |
Subject | |
From | |
To | |
CC | |
ReplyTo | |
Organization | |
Date |
Definition at line 187 of file searchpatternedit.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
You can give a MailCommon::SearchRule as parameter, which will be used to initialize the widget.
Definition at line 88 of file searchpatternedit.cpp.
Member Function Documentation
|
signal |
|
signal |
This signal is emitted whenever the user alters the contents/value of the rule.
|
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.
|
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 340 of file searchpatternedit.cpp.
|
signal |
void SearchRuleWidget::reset | ( | ) |
Resets the rule currently worked on and updates the widget accordingly.
Definition at line 275 of file searchpatternedit.cpp.
|
signal |
SearchRule::Ptr SearchRuleWidget::rule | ( | ) | const |
Returns a reference to the currently-worked-on MailCommon::SearchRule.
Definition at line 262 of file searchpatternedit.cpp.
|
staticprotected |
Used internally to translate i18n-ized pseudo-headers back to English.
Definition at line 310 of file searchpatternedit.cpp.
|
static |
Definition at line 320 of file searchpatternedit.cpp.
void SearchRuleWidget::setPatternEditOptions | ( | MailCommon::SearchPatternEdit::SearchPatternEditOptions | options | ) |
Definition at line 106 of file searchpatternedit.cpp.
void SearchRuleWidget::setRule | ( | MailCommon::SearchRule::Ptr | aRule | ) |
Sets the rule.
The rule is accepted regardless of the return value of MailCommon::SearchRule::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 238 of file searchpatternedit.cpp.
|
protectedslot |
Definition at line 228 of file searchpatternedit.cpp.
|
slot |
Definition at line 285 of file searchpatternedit.cpp.
|
protectedslot |
Definition at line 233 of file searchpatternedit.cpp.
|
slot |
Definition at line 305 of file searchpatternedit.cpp.
|
protectedslot |
Definition at line 400 of file searchpatternedit.cpp.
|
slot |
Definition at line 295 of file searchpatternedit.cpp.
void SearchRuleWidget::updateAddRemoveButton | ( | bool | addButtonEnabled, |
bool | removeButtonEnabled | ||
) |
Definition at line 222 of file searchpatternedit.cpp.
The documentation for this class was generated from the following files:
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.