casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Signals | Public Member Functions | Private Slots | Private Attributes
casa::TBFilterRules Class Reference

Widget to allow the user to enter a filter rule sequence. More...

#include <TBFilterRules.qo.h>

List of all members.

Signals

void runRequested (TBFilterRuleSequence *rules, TBFilterRules *rDialog)
 This signal is emitted when the user has entered a TBFilterRuleSequence and has indicated that he/she is finished.

Public Member Functions

 TBFilterRules (TBTable *table, QWidget *parent=NULL)
 Constructor that takes a table and an optional parent parameter.
 ~TBFilterRules ()
void renameForSearch (bool isSearch)
 Renames the window title and run button text to distinguish between a search and a filter.

Private Slots

void runClicked ()
 Slot for the "run" button.
void fieldChosen (int i)
 Slot for when the field QComboBox changes.
void comparatorChosen (QString c)
 Slot for when the comparator QComboBox value changes.
void addRule ()
 Slot for the "add" button.
void removeRule ()
 Slot for the "remove" button.
void listIndexChanged (int i)
 Slot for when the user selects a rule in the list.

Private Attributes

TBTabletable
 Associated table.
TBFilterRuleSequencerules
 Entered rule sequence.

Detailed Description

Widget to allow the user to enter a filter rule sequence.

Synopsis

TBFilterRules can be presented to the user as a modal dialog or as a widget displayed in any layout. Once the user has finished entering the rules, the TBFilterRules emits a signal with the entered rules. Important: the caller/parent is responsible for connecting this signal and taking care of the dialog.

Definition at line 183 of file TBFilterRules.qo.h.


Constructor & Destructor Documentation

casa::TBFilterRules::TBFilterRules ( TBTable table,
QWidget *  parent = NULL 
)

Constructor that takes a table and an optional parent parameter.

If parent is NULL, the GUI is presented as a dialog.


Member Function Documentation

void casa::TBFilterRules::addRule ( ) [private, slot]

Slot for the "add" button.

If the user has just entered a new rule, it is added to the sequence. If the user is viewing a previously-entered rule, the display is cleared so that a new rule can be entered.

void casa::TBFilterRules::comparatorChosen ( QString  c) [private, slot]

Slot for when the comparator QComboBox value changes.

Updates the rule parameters accordingly.

void casa::TBFilterRules::fieldChosen ( int  i) [private, slot]

Slot for when the field QComboBox changes.

Updates the rule parameters to apply to the chosen field.

void casa::TBFilterRules::listIndexChanged ( int  i) [private, slot]

Slot for when the user selects a rule in the list.

Displays the selected rule.

void casa::TBFilterRules::removeRule ( ) [private, slot]

Slot for the "remove" button.

Removes the currently selected rule from the sequence.

void casa::TBFilterRules::renameForSearch ( bool  isSearch)

Renames the window title and run button text to distinguish between a search and a filter.

If isSearch is true, the title is set to "Search Rules" and the run button text is set to "Search"; otherwise the title is set to "Filter Rules" and the run button text is set to "Run Filter." The default behavior is for filter, not search.

void casa::TBFilterRules::runClicked ( ) [private, slot]

Slot for the "run" button.

Emits the runRequested() signal.

void casa::TBFilterRules::runRequested ( TBFilterRuleSequence rules,
TBFilterRules rDialog 
) [signal]

This signal is emitted when the user has entered a TBFilterRuleSequence and has indicated that he/she is finished.

The entered rules are passed as a parameter as is a pointer to this widget. The parent/caller is responsible for implementing the rules and deleting the dialog upon completion.


Member Data Documentation

Entered rule sequence.

Definition at line 213 of file TBFilterRules.qo.h.

Associated table.

Definition at line 210 of file TBFilterRules.qo.h.


The documentation for this class was generated from the following file: