kmail Library API Documentation

KMSearchPatternEdit Class Reference

This widget is intended to be used in the filter configuration as well as in the message search dialogs.A widget which allows editing a set of KMSearchRule's. More...

#include <kmsearchpatternedit.h>

Inheritance diagram for KMSearchPatternEdit:

Inheritance graph
[legend]
Collaboration diagram for KMSearchPatternEdit:

Collaboration graph
[legend]
List of all members.

Public Slots

void reset ()

Signals

void maybeNameChanged ()

Public Member Functions

 KMSearchPatternEdit (QWidget *parent=0, const char *name=0, bool headersOnly=false, bool absoluteDates=false)
 KMSearchPatternEdit (const QString &title, QWidget *parent=0, const char *name=0, bool headersOnly=false, bool absoluteDates=false)
void setSearchPattern (KMSearchPattern *aPattern)
void setHeadersOnly (bool headersOnly)
void updateSearchPattern ()

Detailed Description

This widget is intended to be used in the filter configuration as well as in the message search dialogs.A widget which allows editing a set of KMSearchRule's.

It consists of a frame, inside which there are placed two radio buttons entitled "Match {all,any} of the following", followed by a vertical stack of KMSearchRuleWidgets (initially two) and two buttons to add and remove, resp., additional KMSearchWidget 's.

To set the widget according to a given KMSearchPattern, use setSearchPattern; to initialize it (e.g. for a new, virgin rule), use setSearchPattern with a 0 argument. The widget operates directly on a shallow(!) copy of the search rule. So while you actually don't really need searchPattern, because you can always store a pointer to the current pattern yourself, you must not modify the currently-worked-on pattern yourself while this widget holds a reference to it. The only exceptions are:

Author:
Marc Mutz <Marc@Mutz.com>

Definition at line 164 of file kmsearchpatternedit.h.


Constructor & Destructor Documentation

KMSearchPatternEdit::KMSearchPatternEdit QWidget parent = 0,
const char *  name = 0,
bool  headersOnly = false,
bool  absoluteDates = false
 

Constructor.

The parent and name parameters are passed to the underlying QGroupBox, as usual.

Definition at line 371 of file kmsearchpatternedit.cpp.

KMSearchPatternEdit::KMSearchPatternEdit const QString title,
QWidget parent = 0,
const char *  name = 0,
bool  headersOnly = false,
bool  absoluteDates = false
 

Constructor.

This one allows you to set a title different from i18n("Search Criteria").

Definition at line 378 of file kmsearchpatternedit.cpp.


Member Function Documentation

void KMSearchPatternEdit::setSearchPattern KMSearchPattern aPattern  ) 
 

Set the search pattern.

Rules are inserted regardless of the return value of each rules' KMSearchRule::isEmpty. This widget makes a shallow copy of aPattern and operates directly on it.

Definition at line 420 of file kmsearchpatternedit.cpp.

References KMSearchPattern::op().

Referenced by KMFilterDlg::slotFilterSelected().

void KMSearchPatternEdit::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 438 of file kmsearchpatternedit.cpp.

void KMSearchPatternEdit::updateSearchPattern  )  [inline]
 

Updates the search pattern according to the current widget values.

Definition at line 186 of file kmsearchpatternedit.h.

void KMSearchPatternEdit::reset  )  [slot]
 

Called when the widget should let go of the currently referenced filter and disable itself.

Definition at line 443 of file kmsearchpatternedit.cpp.

void KMSearchPatternEdit::maybeNameChanged  )  [signal]
 

This signal is emitted whenever the name of the processed search pattern may have changed.


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.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 25 11:20:32 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003