casa
5.7.0-16
|
Subclass of QTableWidgetItem that allows for custom sorting. More...
#include <TBDataTab.qo.h>
Public Member Functions | |
TBDataItem (TBData *data) | |
Constructor to take the casacore::String value and the type. More... | |
~TBDataItem () | |
virtual bool | operator< (const QTableWidgetItem &other) const |
Override QTableWidgetItem's less-than operator. More... | |
Private Member Functions | |
void | set (casacore::String value, bool text) |
Set the Qt::UserRole and, if text is true, the Qt::DisplayRole values. More... | |
Private Attributes | |
casacore::String | type |
Holds the data type. More... | |
bool | arrayDimension |
Is true if the value stored for Qt::UserRole is an array dimension, false otherwise. More... | |
TBData * | tdata |
Subclass of QTableWidgetItem that allows for custom sorting.
TBDataItem takes a value and a type. The object saves the value in two ways using Qt::DisplayRole and Qt::UserRole. The value is stored as a string using QtDisplayRole, and this is what is actually shown in the QTableWidget. The data stored with Qt::UserRole, however, may be of a different type, such as an integer. This storage is used when sorting so that, for example, numbers can be sorted numerically rather than lexiographically. casacore::Array types are sorted using the first element for one-dimensional arrays and the first dimension for other arrays.
Definition at line 64 of file TBDataTab.qo.h.
casa::TBDataItem::TBDataItem | ( | TBData * | data | ) |
Constructor to take the casacore::String value and the type.
TBDataItem(casacore::String value, casacore::String type);
casa::TBDataItem::~TBDataItem | ( | ) |
|
virtual |
Override QTableWidgetItem's less-than operator.
Returns true if the value of this TBDataItem is less than that of the given TBDataItem, false otherwise. If other is not of type TBDataItem, the behavior is undefined. Also, since this operator is only used for custom sorting, the other TBDataItem is assumed to have the same type as this one.
|
private |
Set the Qt::UserRole and, if text is true, the Qt::DisplayRole values.
|
private |
Is true if the value stored for Qt::UserRole is an array dimension, false otherwise.
Definition at line 87 of file TBDataTab.qo.h.
|
private |
Definition at line 89 of file TBDataTab.qo.h.
|
private |
Holds the data type.
Definition at line 83 of file TBDataTab.qo.h.