casa
$Rev:20696$
|
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 (Record changedOptions) |
void | autoApplyState (bool auto_apply) |
(called only once, during or soon after construction. | |
Signals | |
void | setOptions (Record options) |
Public Member Functions | |
QtAutoGui (QWidget *parent=0) | |
QtAutoGui (Record rec, String dataName="", 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 (Record rec) |
call once only during initialization, to populate the gui, if you used the QtAutoGui(QWidget=0) constructor. | |
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;. | |
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 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.
Definition at line 90 of file QtAutoGui.qo.h.
casa::QtAutoGui::QtAutoGui | ( | QWidget * | parent = 0 | ) |
casa::QtAutoGui::QtAutoGui | ( | Record | rec, |
String | dataName = "" , |
||
String | dataType = "Unknown" , |
||
QWidget * | parent = 0 |
||
) |
void casa::QtAutoGui::adjustHeight | ( | ) | [slot] |
void casa::QtAutoGui::apply | ( | ) |
void casa::QtAutoGui::autoApplyState | ( | bool | auto_apply | ) | [inline, slot] |
(called only once, during or soon after construction.
Sets up contents of the gui from rec).
Definition at line 158 of file QtAutoGui.qo.h.
References auto_apply_.
virtual void casa::QtAutoGui::changeOptions | ( | Record | changedOptions | ) | [virtual, slot] |
Referenced by casa::QtCanvasManager::QtCanvasManager(), and casa::QtDisplayDataGui::QtDisplayDataGui().
void casa::QtAutoGui::contextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected] |
QString casa::QtAutoGui::dataType | ( | ) | const |
void casa::QtAutoGui::dismiss | ( | ) |
QString casa::QtAutoGui::fileName | ( | ) | const |
void casa::QtAutoGui::initialize | ( | ) | [private] |
void casa::QtAutoGui::itemValueChanged | ( | QString | name, |
QString | value, | ||
int | action, | ||
bool | apply | ||
) | [slot] |
bool casa::QtAutoGui::load | ( | QDomDocument & | doc | ) |
bool casa::QtAutoGui::load | ( | ) |
void casa::QtAutoGui::loadRecord | ( | Record | rec | ) |
call once only during initialization, to populate the gui, if you used the QtAutoGui(QWidget=0) constructor.
Referenced by casa::QtCanvasManager::QtCanvasManager(), 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 | ( | ) |
void casa::QtAutoGui::setOptions | ( | Record | options | ) | [signal] |
Referenced by casa::QtCanvasManager::QtCanvasManager(), and casa::QtDisplayDataGui::QtDisplayDataGui().
void casa::QtAutoGui::setOriginal | ( | ) |
bool casa::QtAutoGui::auto_apply_ [protected] |
Definition at line 161 of file QtAutoGui.qo.h.
Referenced by autoApplyState().
QWidget* casa::QtAutoGui::contents_ [private] |
Definition at line 167 of file QtAutoGui.qo.h.
QVBoxLayout* casa::QtAutoGui::contentsLayout_ [private] |
Definition at line 168 of file QtAutoGui.qo.h.
const QString casa::QtAutoGui::HISTOGRAM_RANGE_KEY [static] |
Definition at line 95 of file QtAutoGui.qo.h.
const QString casa::QtAutoGui::HISTOGRAM_SHOW_KEY [static] |
Definition at line 94 of file QtAutoGui.qo.h.
QString casa::QtAutoGui::m_data_type [private] |
Definition at line 166 of file QtAutoGui.qo.h.
QDomDocument casa::QtAutoGui::m_doc [private] |
Definition at line 164 of file QtAutoGui.qo.h.
QString casa::QtAutoGui::m_file_name [private] |
Definition at line 165 of file QtAutoGui.qo.h.
QString casa::QtAutoGui::m_lockItem [private] |
Definition at line 175 of file QtAutoGui.qo.h.
QMutex casa::QtAutoGui::mutex [private] |
Definition at line 176 of file QtAutoGui.qo.h.
Bool casa::QtAutoGui::recordLoaded_ [private] |
QScrollArea *scrollArea;.
Definition at line 174 of file QtAutoGui.qo.h.
QSpacerItem* casa::QtAutoGui::spacerItem [private] |
Definition at line 171 of file QtAutoGui.qo.h.
QVBoxLayout* casa::QtAutoGui::vboxLayout [private] |
Definition at line 169 of file QtAutoGui.qo.h.