casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
casa::QtAutoGui Class Reference

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

#include <QtAutoGui.qo.h>

Inheritance diagram for casa::QtAutoGui:
casa::QtCanvasManagerOptions casa::QtDisplayDataGui

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
 

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 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.

Member Enumeration Documentation

Enumerator
Set 
Copy 
Paste 
Default 
Original 
Memorize 
Command 

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

Constructor & Destructor Documentation

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 ( )

Member Function Documentation

void casa::QtAutoGui::adjustHeight ( )
slot
void casa::QtAutoGui::apply ( )
void casa::QtAutoGui::autoApplyState ( bool  auto_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_.

virtual void casa::QtAutoGui::changeOptions ( casacore::Record  changedOptions)
virtualslot
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 ( 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)
void casa::QtAutoGui::setMemory ( )
void casa::QtAutoGui::setOptions ( casacore::Record  options)
signal
void casa::QtAutoGui::setOriginal ( )

Member Data Documentation

bool casa::QtAutoGui::auto_apply_
protected

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

Referenced by autoApplyState().

QWidget* casa::QtAutoGui::contents_
private

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

QVBoxLayout* casa::QtAutoGui::contentsLayout_
private

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

const QString casa::QtAutoGui::HISTOGRAM_RANGE_KEY
static

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

const QString casa::QtAutoGui::HISTOGRAM_SHOW_KEY
static

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

QString casa::QtAutoGui::m_data_type
private

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

QDomDocument casa::QtAutoGui::m_doc
private

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

QString casa::QtAutoGui::m_file_name
private

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

QString casa::QtAutoGui::m_lockItem
private

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

QMutex casa::QtAutoGui::mutex
private

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

bool casa::QtAutoGui::recordLoaded_
private

QScrollArea *scrollArea;.

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

QSpacerItem* casa::QtAutoGui::spacerItem
private

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

QVBoxLayout* casa::QtAutoGui::vboxLayout
private

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


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