casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Signals | Public Member Functions | Private Slots | Private Attributes | List of all members
casa::TBFilterRules Class Reference

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

#include <TBFilterRules.qo.h>

Inheritance diagram for casa::TBFilterRules:

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. More...
 

Public Member Functions

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

Private Slots

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

Private Attributes

TBTabletable
 Associated table. More...
 
TBFilterRuleSequencerules
 Entered rule sequence. More...
 

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 180 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.

casa::TBFilterRules::~TBFilterRules ( )

Member Function Documentation

void casa::TBFilterRules::addRule ( )
privateslot

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)
privateslot

Slot for when the comparator QComboBox value changes.

Updates the rule parameters accordingly.

void casa::TBFilterRules::fieldChosen ( int  i)
privateslot

Slot for when the field QComboBox changes.

Updates the rule parameters to apply to the chosen field.

void casa::TBFilterRules::listIndexChanged ( int  i)
privateslot

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

Displays the selected rule.

void casa::TBFilterRules::removeRule ( )
privateslot

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 ( )
privateslot

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

TBFilterRuleSequence* casa::TBFilterRules::rules
private

Entered rule sequence.

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

TBTable* casa::TBFilterRules::table
private

Associated table.

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


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