casa
5.7.0-16
|
General-purpose Qt options widget created from Record. More...
#include <QtAutoGui.qo.h>
Public Types | |
enum | ACTIONTYPE { Set, Copy, Paste, Default, Original, Memorize, Command } |
Public Slots | |
void | itemValueChanged (QString name, QString value, int action, bool apply) |
void | adjustHeight () |
virtual void | changeOptions (casacore::Record changedOptions) |
void | autoApplyState (bool auto_apply) |
(called only once, during or soon after construction. More... | |
Signals | |
void | setOptions (casacore::Record options) |
Public Member Functions | |
QtAutoGui (QWidget *parent=0) | |
QtAutoGui (casacore::Record rec, casacore::String dataName="", casacore::String dataType="Unknown", QWidget *parent=0) | |
~QtAutoGui () | |
void | setFileName (const QString &file_name) |
QString | fileName () const |
void | setDataType (const QString &dType) |
QString | dataType () const |
bool | load (QDomDocument &doc) |
bool | load () |
bool | save () |
void | apply () |
void | restore () |
void | setMemory () |
void | setOriginal () |
void | setDefault () |
void | dismiss () |
void | loadRecord (casacore::Record rec) |
call once only during initialization, to populate the gui, if you used the QtAutoGui(QWidget=0) constructor. More... | |
Static Public Attributes | |
static const QString | HISTOGRAM_SHOW_KEY |
static const QString | HISTOGRAM_RANGE_KEY |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *e) |
Protected Attributes | |
bool | auto_apply_ |
Private Member Functions | |
void | initialize () |
Private Attributes | |
QDomDocument | m_doc |
QString | m_file_name |
QString | m_data_type |
QWidget * | contents_ |
QVBoxLayout * | contentsLayout_ |
QVBoxLayout * | vboxLayout |
QSpacerItem * | spacerItem |
bool | recordLoaded_ |
QScrollArea *scrollArea;. More... | |
QString | m_lockItem |
QMutex | mutex |
General-purpose Qt options widget created from Record.
This class serves the same general purpose as the old glish autogui.g: it creates a gui from a record whose fields describe 'parameters' (or 'options') to be controlled by the gui. The record used to construct the gui is passed in construction, or soon after, via loadRecord(). Each option passed contains an initial value as well as meta-data describing the type of input widget to be used ('popt' field), labels, limits, choices, help texts, etc., as applicable.
When the user operates the control for a gui option, a setOptions signal is emitted with a similar casacore::Record indicating which option was changed, and new value. If the 'Apply' button of the gui is pressed, the setOptions signal contains the current value of every option.
////////////////////// QtAutoGui /////////////////////////
Definition at line 66 of file QtAutoGui.qo.h.
Enumerator | |
---|---|
Set | |
Copy | |
Paste | |
Default | |
Original | |
Memorize | |
Command |
Definition at line 89 of file QtAutoGui.qo.h.
casa::QtAutoGui::QtAutoGui | ( | QWidget * | parent = 0 | ) |
casa::QtAutoGui::QtAutoGui | ( | casacore::Record | rec, |
casacore::String | dataName = "" , |
||
casacore::String | dataType = "Unknown" , |
||
QWidget * | parent = 0 |
||
) |
casa::QtAutoGui::~QtAutoGui | ( | ) |
|
slot |
void casa::QtAutoGui::apply | ( | ) |
|
inlineslot |
(called only once, during or soon after construction.
Sets up contents of the gui from rec).
Definition at line 157 of file QtAutoGui.qo.h.
References auto_apply_.
|
virtualslot |
|
protected |
QString casa::QtAutoGui::dataType | ( | ) | const |
void casa::QtAutoGui::dismiss | ( | ) |
QString casa::QtAutoGui::fileName | ( | ) | const |
|
private |
|
slot |
bool casa::QtAutoGui::load | ( | QDomDocument & | doc | ) |
bool casa::QtAutoGui::load | ( | ) |
void casa::QtAutoGui::loadRecord | ( | casacore::Record | rec | ) |
call once only during initialization, to populate the gui, if you used the QtAutoGui(QWidget=0) constructor.
Referenced by casa::QtCanvasManagerOptions::QtCanvasManagerOptions(), and casa::QtDisplayDataGui::QtDisplayDataGui().
void casa::QtAutoGui::restore | ( | ) |
bool casa::QtAutoGui::save | ( | ) |
void casa::QtAutoGui::setDataType | ( | const QString & | dType | ) |
void casa::QtAutoGui::setDefault | ( | ) |
void casa::QtAutoGui::setFileName | ( | const QString & | file_name | ) |
Referenced by casa::QtDisplayDataGui::QtDisplayDataGui().
void casa::QtAutoGui::setMemory | ( | ) |
|
signal |
void casa::QtAutoGui::setOriginal | ( | ) |
|
protected |
Definition at line 162 of file QtAutoGui.qo.h.
Referenced by autoApplyState().
|
private |
Definition at line 168 of file QtAutoGui.qo.h.
|
private |
Definition at line 169 of file QtAutoGui.qo.h.
|
static |
Definition at line 94 of file QtAutoGui.qo.h.
|
static |
Definition at line 93 of file QtAutoGui.qo.h.
|
private |
Definition at line 167 of file QtAutoGui.qo.h.
|
private |
Definition at line 165 of file QtAutoGui.qo.h.
|
private |
Definition at line 166 of file QtAutoGui.qo.h.
|
private |
Definition at line 176 of file QtAutoGui.qo.h.
|
private |
Definition at line 177 of file QtAutoGui.qo.h.
|
private |
QScrollArea *scrollArea;.
Definition at line 175 of file QtAutoGui.qo.h.
|
private |
Definition at line 172 of file QtAutoGui.qo.h.
|
private |
Definition at line 170 of file QtAutoGui.qo.h.