casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
casa::QtAutoGui Class Reference

General-purpose Qt options widget created from Record. More...

#include <QtAutoGui.qo.h>

Inheritance diagram for casa::QtAutoGui:
casa::QtCanvasManager casa::QtDisplayDataGui

List of all members.

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

Detailed Description

General-purpose Qt options widget created from Record.

Synopsis

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.


Member Enumeration Documentation

Enumerator:
Set 
Copy 
Paste 
Default 
Original 
Memorize 
Command 

Definition at line 90 of file QtAutoGui.qo.h.


Constructor & Destructor Documentation

casa::QtAutoGui::QtAutoGui ( QWidget *  parent = 0)
casa::QtAutoGui::QtAutoGui ( Record  rec,
String  dataName = "",
String  dataType = "Unknown",
QWidget *  parent = 0 
)

Member Function Documentation

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]
void casa::QtAutoGui::contextMenuEvent ( QContextMenuEvent *  e) [protected]
QString casa::QtAutoGui::dataType ( ) const
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)

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::setDataType ( const QString &  dType)
void casa::QtAutoGui::setFileName ( const QString &  file_name)
void casa::QtAutoGui::setOptions ( Record  options) [signal]

Member Data Documentation

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.

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.


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