27 #ifndef TBFILTERRULES_H_
28 #define TBFILTERRULES_H_
30 #include <casaqt/QtBrowser/TBFilterRules.ui.h>
148 std::vector<TBFilterRule*>*
getRules();
TBData * value
This rule's value.
void addRule()
Slot for the "add" button.
int anyFieldPasses(TBTable *table, int row)
Checks all fields in the given row.
tb::Comparator comparator
This rule's comparator.
TBData * getValue()
Returns this rule's value.
void removeRule()
Slot for the "remove" button.
std::vector< TBFilterRule * > rules
Rule sequence.
casacore::Data types used for loaded data.
bool isNot
Indicates whether this rule is negated or not.
bool equals(TBFilterRule *r)
Returns true if this rule is equal to the given rule, false otherwise.
void renameForSearch(bool isSearch)
Renames the window title and run button text to distinguish between a search and a filter...
TBFilterRules(TBTable *table, QWidget *parent=NULL)
Constructor that takes a table and an optional parent parameter.
int rowPasses(TBTable *table, int row)
Checks the given row in the given table.
Comparator
Enum listing the possible types of comparisons that can be made in, for example, a filter rule...
void addRule(TBFilterRule *rule)
Adds the given rule to the end of the sequence.
TBFilterRuleSequence()
Default Constructor.
tb::Comparator getComparator()
Returns this rule's comparator.
void runClicked()
Slot for the "run" button.
void removeRule(int i)
Removes the rule at index i from this sequence.
int rowPasses(TBTable *table, int row)
Checks the given row in the given table.
TBTable * table
Associated table.
bool getIsNot()
Returns true if this rule is negated (i.e., "not equal" rather than "equal"), false otherwise...
TBFilterRule * at(unsigned int i)
Returns the rule at index i in this sequence.
casacore::String getField()
Returns the field this rule applies to, or blank if it applies to any field.
Primary interface for the rest of the browser to a table.
void listIndexChanged(int i)
Slot for when the user selects a rule in the list.
bool anyField
Indicates whether this rule applies to any field or not.
Rule that can be used to filter rows based upon field values.
Widget to allow the user to enter a filter rule sequence.
TBFilterRule(casacore::String field, tb::Comparator comparator, TBData *value, TBData *value2=NULL, bool isNot=false, bool anyField=false)
Constructor that takes the rule parameters.
void comparatorChosen(QString c)
Slot for when the comparator QComboBox value changes.
A sequence of TBFilterRules that can be used to filter rows.
unsigned int size()
Returns the number of rules in this sequence.
TBData * value2
This rule's second value.
bool getAnyField()
Returns true if this rule applies to any field, false otherwise.
const Double c
Fundamental physical constants (SI units):
String: the storage and methods of handling collections of characters.
std::vector< TBFilterRule * > * getRules()
Returns the rules in this sequence.
TBData * getValue2()
Returns this rule's second value, or blank if it doesn't have one.
void runRequested(TBFilterRuleSequence *rules, TBFilterRules *rDialog)
This signal is emitted when the user has entered a TBFilterRuleSequence and has indicated that he/she...
TBFilterRuleSequence * rules
Entered rule sequence.
casacore::String field
This rule's field.
void fieldChosen(int i)
Slot for when the field QComboBox changes.