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 Member Functions | Private Attributes | List of all members
casa::TBSorter Class Reference

Widget to configure a multi-field sort ordering. More...

#include <TBSorter.qo.h>

Inheritance diagram for casa::TBSorter:

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::Stringcols
 The sortable fields. More...
 

Detailed Description

Widget to configure a multi-field sort ordering.

Synopsis

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.

Constructor & Destructor Documentation

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

Member Function Documentation

void casa::TBSorter::acceptButton ( )
privateslot

Slot for the button to accept the current sort order and emit the sortEntered() signal.

void casa::TBSorter::add ( int  row,
bool  asc = true 
)
private

Adds the specified field from the field list to the sort list.

void casa::TBSorter::add ( )
privateslot

Slot for the "Add" button that adds the selected row in the field list to the bottom of the sort list.

void casa::TBSorter::addAll ( )
privateslot

Slot for the "Add All" button that adds all rows in the field list to the bottom of the sort list.

void casa::TBSorter::moveDown ( )
privateslot

Slot for the "Move Down" button that moves the selected row in the sort list down one position.

void casa::TBSorter::moveUp ( )
privateslot

Slot for the "Move Up" button that moves the selected row in the sort list up one position.

void casa::TBSorter::remove ( int  row)
private

Removes the specified field from the sort list.

void casa::TBSorter::remove ( )
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.

void casa::TBSorter::removeAll ( )
privateslot

Slot for the "Remove All" button that removes all the rows from the sort list and returns them to the field list.

void casa::TBSorter::sortEntered ( std::vector< std::pair< casacore::String, bool > > &  sort)
signal

sortEntered is emitted when the "casacore::Sort" button is clicked.

The sort parameter contains the ordered list of fields and ascending bools.

void casa::TBSorter::swapRows ( int  r1,
int  r2 
)
private

Swaps the two indicated rows in the sort list.

void casa::TBSorter::tableIndexChanged ( int  row)
privateslot

Slot for when the currently selected index in the sort list is changed.

Member Data Documentation

std::vector<casacore::String> casa::TBSorter::cols
private

The sortable fields.

Definition at line 70 of file TBSorter.qo.h.


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