casa
5.7.0-16
|
Widget to configure a multi-field sort ordering. More...
#include <TBSorter.qo.h>
Signals | |
void | sortEntered (std::vector< std::pair< casacore::String, bool > > &sort) |
sortEntered is emitted when the "casacore::Sort" button is clicked. More... | |
Public Member Functions | |
TBSorter (std::vector< casacore::String > &cols, std::vector< std::pair< casacore::String, bool > > *sort=NULL, QWidget *parent=NULL) | |
Constructor that takes the list of fields, an optional current sort order to display, and an optional parent. More... | |
~TBSorter () | |
Private Slots | |
void | add () |
Slot for the "Add" button that adds the selected row in the field list to the bottom of the sort list. More... | |
void | addAll () |
Slot for the "Add All" button that adds all rows in the field list to the bottom of the sort list. More... | |
void | remove () |
Slot for the "Remove" button that removes the selected row from the sort list and returns it to its previous position in the field list. More... | |
void | removeAll () |
Slot for the "Remove All" button that removes all the rows from the sort list and returns them to the field list. More... | |
void | tableIndexChanged (int row) |
Slot for when the currently selected index in the sort list is changed. More... | |
void | moveUp () |
Slot for the "Move Up" button that moves the selected row in the sort list up one position. More... | |
void | moveDown () |
Slot for the "Move Down" button that moves the selected row in the sort list down one position. More... | |
void | acceptButton () |
Slot for the button to accept the current sort order and emit the sortEntered() signal. More... | |
Private Member Functions | |
void | add (int row, bool asc=true) |
Adds the specified field from the field list to the sort list. More... | |
void | remove (int row) |
Removes the specified field from the sort list. More... | |
void | swapRows (int r1, int r2) |
Swaps the two indicated rows in the sort list. More... | |
Private Attributes | |
std::vector< casacore::String > | cols |
The sortable fields. More... | |
Widget to configure a multi-field sort ordering.
TBSorter allows the user to create an ordered list of fields for sorting. Each field in the list also has a checkbox to indicate whether the sort on that field should be ascending or not. Once a sort order has been entered a signal is emitted; it is the parent's/caller's responsibility to connect the signal and implement the sort.
Definition at line 50 of file TBSorter.qo.h.
casa::TBSorter::TBSorter | ( | std::vector< casacore::String > & | cols, |
std::vector< std::pair< casacore::String, bool > > * | sort = NULL , |
||
QWidget * | parent = NULL |
||
) |
Constructor that takes the list of fields, an optional current sort order to display, and an optional parent.
If parent is NULL, the widget is displayed as a dialog; otherwise it is displayed in the parent.
casa::TBSorter::~TBSorter | ( | ) |
|
privateslot |
Slot for the button to accept the current sort order and emit the sortEntered() signal.
|
private |
Adds the specified field from the field list to the sort list.
|
privateslot |
Slot for the "Add" button that adds the selected row in the field list to the bottom of the sort list.
|
privateslot |
Slot for the "Add All" button that adds all rows in the field list to the bottom of the sort list.
|
privateslot |
Slot for the "Move Down" button that moves the selected row in the sort list down one position.
|
privateslot |
Slot for the "Move Up" button that moves the selected row in the sort list up one position.
|
private |
Removes the specified field from the sort list.
|
privateslot |
Slot for the "Remove" button that removes the selected row from the sort list and returns it to its previous position in the field list.
|
privateslot |
Slot for the "Remove All" button that removes all the rows from the sort list and returns them to the field list.
|
signal |
sortEntered is emitted when the "casacore::Sort" button is clicked.
The sort parameter contains the ordered list of fields and ascending bools.
|
private |
Swaps the two indicated rows in the sort list.
|
privateslot |
Slot for when the currently selected index in the sort list is changed.
|
private |
The sortable fields.
Definition at line 70 of file TBSorter.qo.h.