casa
5.7.0-16
|
Widget for entering format rules for a given field. More...
#include <TBFormat.qo.h>
Signals | |
void | clearRequested (int index) |
This signal is emitted when the user clicks the "Clear casacore::Format" button. More... | |
void | setRequested (int index, TBFormat *format) |
This signal is emitted when the user enters a format and then clicks the "Set casacore::Format" button. More... | |
Public Member Functions | |
TBFormatter (casacore::String field, casacore::String type, int index, QFontColor font, QWidget *parent=NULL) | |
Constructor that takes the field name, type, and index to be formatted, along with the default (unformatted) QFontColor and an optional pointer to the parent widget. More... | |
~TBFormatter () | |
void | setFormat (TBFormat *f) |
Sets the displayed format to the given format. More... | |
Private Slots | |
void | changeColor () |
Slot for when the user wants a color chooser. More... | |
void | clearFormat () |
Slot for when the user clicks the "Clear casacore::Format" button. More... | |
void | setFormat () |
Slot for when the user clicks the "Set casacore::Format" button. More... | |
void | applyAllTurned (bool on) |
Slot for when the user clicks the "apply to all" checkbox. More... | |
void | applySelectionChanged (int newIndex) |
Slot for when the user clicks in the value-dependent format list. More... | |
void | valuesChanged () |
Slot for when the user changes a font or color parameter. More... | |
Private Member Functions | |
QFontColor * | getFont () |
Collects the QFontColor information currently set in the GUI and returns it. More... | |
void | setFontColor (QFontColor *color) |
Sets the displayed font and color information to the given QFontColor. More... | |
Private Attributes | |
casacore::String | field |
Field being formatted. More... | |
casacore::String | type |
Type of the field being formatted. More... | |
int | index |
Index of the field being formatted. More... | |
std::vector< QFontColor * > | fonts |
casacore::Vector of QFontColors for value-dependent formats. More... | |
bool | update |
Flag indicating whether any GUI-generated events are "genuine.". More... | |
Static Private Attributes | |
static const int | UNLIMITED_DECIMALS |
Unlimited decimals constant. More... | |
Widget for entering format rules for a given field.
A TBFormatter is a dialog that can be used to get format rules from the user. The user can then command either to clear the format (and remove all formatting) or to set the format for a given field. Important: this behavior is implemented through the use of signals, which means that it is the caller's/parent's responsibility for handling the signals and applying the formats as needed.
Definition at line 188 of file TBFormat.qo.h.
casa::TBFormatter::TBFormatter | ( | casacore::String | field, |
casacore::String | type, | ||
int | index, | ||
QFontColor | font, | ||
QWidget * | parent = NULL |
||
) |
Constructor that takes the field name, type, and index to be formatted, along with the default (unformatted) QFontColor and an optional pointer to the parent widget.
If the parent pointer is NULL, this will be displayed as a dialog; otherwise it can be displayed inside the parent.
casa::TBFormatter::~TBFormatter | ( | ) |
|
privateslot |
Slot for when the user clicks the "apply to all" checkbox.
If the all box is checked, the list of value-dependent formats is disabled.
|
privateslot |
Slot for when the user clicks in the value-dependent format list.
The selected format is displayed in the widget.
|
privateslot |
Slot for when the user wants a color chooser.
Opens a QColorDialog.
|
privateslot |
Slot for when the user clicks the "Clear casacore::Format" button.
Emits the clearFormat() signal and closes the window.
|
signal |
This signal is emitted when the user clicks the "Clear casacore::Format" button.
The parent/caller should then remove the format for the field with the specified index.
|
private |
Collects the QFontColor information currently set in the GUI and returns it.
|
private |
Sets the displayed font and color information to the given QFontColor.
void casa::TBFormatter::setFormat | ( | TBFormat * | f | ) |
Sets the displayed format to the given format.
|
privateslot |
Slot for when the user clicks the "Set casacore::Format" button.
Collects the format information from the widget, emits the setRequested() signal, and closes the window.
|
signal |
This signal is emitted when the user enters a format and then clicks the "Set casacore::Format" button.
The parent/caller should then set the format for the specified field to the specified format.
|
privateslot |
Slot for when the user changes a font or color parameter.
The QFontColor in the value-dependent vector is updated accordingly.
|
private |
Field being formatted.
Definition at line 218 of file TBFormat.qo.h.
|
private |
casacore::Vector of QFontColors for value-dependent formats.
Definition at line 227 of file TBFormat.qo.h.
|
private |
Index of the field being formatted.
Definition at line 224 of file TBFormat.qo.h.
|
private |
Type of the field being formatted.
Definition at line 221 of file TBFormat.qo.h.
|
staticprivate |
Unlimited decimals constant.
Definition at line 267 of file TBFormat.qo.h.
|
private |
Flag indicating whether any GUI-generated events are "genuine.".
Definition at line 230 of file TBFormat.qo.h.