casa
5.7.0-16
|
Widget to allow the user to enter a filter rule sequence. More...
#include <TBFilterRules.qo.h>
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 | |
TBTable * | table |
Associated table. More... | |
TBFilterRuleSequence * | rules |
Entered rule sequence. More... | |
Widget to allow the user to enter a filter rule sequence.
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.
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 | ( | ) |
|
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.
|
privateslot |
Slot for when the comparator QComboBox value changes.
Updates the rule parameters accordingly.
|
privateslot |
Slot for when the field QComboBox changes.
Updates the rule parameters to apply to the chosen field.
|
privateslot |
Slot for when the user selects a rule in the list.
Displays the selected rule.
|
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.
|
privateslot |
Slot for the "run" button.
Emits the runRequested() signal.
|
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.
|
private |
Entered rule sequence.
Definition at line 210 of file TBFilterRules.qo.h.
|
private |
Associated table.
Definition at line 207 of file TBFilterRules.qo.h.