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

#include <QtViewerBase.qo.h>

Inheritance diagram for casa::QtViewerBase:
casa::QtViewer

Public Slots

virtual void hold ()
 Hold/release of (canvas-draw) refresh of all QDPs. More...
 
virtual void release ()
 
virtual void quit ()
 Closes all open panels, which will exit the Qt loop. More...
 

Public Member Functions

 QtViewerBase (bool is_server=false)
 
 ~QtViewerBase ()
 
bool server () const
 
virtual QtMouseToolStatemouseBtns ()
 Return the common QtMouseToolState that all mouse tool users should share. More...
 
virtual const QtMouseToolStatemouseBtns () const
 
virtual std::list
< QtDisplayPanelGui * > 
openDPs ()
 The list of QtDisplayPanels that are not closed. More...
 
virtual int nOpenDPs ()
 The number of open QtDisplayPanels. More...
 
virtual void dpCreated (QtDisplayPanelGui *newDP, QtDisplayPanel *panel)
 Only to be used by QtDisplayPanels, to inform this class of their creation. More...
 
bool dataDisplaysAs (casacore::String datatype, casacore::String &displaytype)
 Returns true iff datatype is a vaild viewer datatype and displaytype is valid for the datatype. More...
 
bool exiting ()
 

Static Public Member Functions

static casacore::String fileType (const casacore::String pathname)
 function to aid typing files of interest to the viewer. More...
 
static casacore::String filetype (const casacore::String pathname)
 similar to above; returns internal DD datatype names like "ms" (or else 'nonexistent', 'unknown'). More...
 
static bool isRestoreFile (casacore::String filename, QDomDocument &restoredoc)
 Does the given file pathname hold a readable file with valid ID and form as a viewer restore xml document? (If so, contents are set onto restoredoc). More...
 
static bool isRestoreString (casacore::String xmlState, QDomDocument &restoredoc)
 Does the given casacore::String have valid ID and form as viewer restore xml? (If so, contents are set onto restoredoc). More...
 
static casacore::String toString (casacore::Vector< float > values)
 Utility routines to convert between casacore::Vector<float> and String. More...
 
static casacore::Vector< float > toVectorF (casacore::String values, bool *ok=0)
 
static casacore::String toString (casacore::Vector< double > values)
 
static casacore::Vector< double > toVectorD (casacore::String values, bool *ok=0)
 

Static Public Attributes

static const casacore::String cvRestoreID
 
static const casacore::String cvRestoreFileExt
 
static const int IMAGE
 public (const) data. More...
 
static const int MEASUREMENT_SET
 
static const int SKY_CATALOG
 
static const int RESTORE
 
static const int LEL
 
static const int N_DT
 
static const int RASTER
 viewer displaytypes. More...
 
static const int CONTOUR
 
static const int VECTOR
 
static const int MARKER
 
static const int SKY_CAT
 
static const int OLDPANEL
 
static const int NEWPANEL
 
static const int N_DS
 
static const int INVALID
 (for invalid datatype or displaytype). More...
 

Protected Slots

virtual void dpDestroyed_ (QObject *)
 Connected by this class, (only) to QDPs' destroyed() signals (for maintenance of the list of existing QDPs). More...
 
virtual void dpHidden_ (QtDisplayPanel *)
 Connected by this class, (only) to QDPs' dpHidden() signals (for checking on open QDPs – will quit if none are left open). More...
 

Protected Attributes

bool server_
 
std::list< QtDisplayPanelGui * > qdps_
 Existing QtDisplayPanels (whether 'closed' or not, as long as not deleted). More...
 
QtMouseToolState msbtns_
 This should be the only place this object is ever created.... More...
 
casacore::Vector
< casacore::String
datatypeNames_
 Translates IMAGE, RASTER, etc. More...
 
casacore::Vector
< casacore::String
displaytypeNames_
 
casacore::Vector
< casacore::Vector< int > > 
dataDisplaysAs_
 e.g. More...
 

Static Private Attributes

static bool qtviewer_app_exit
 

Detailed Description

Definition at line 65 of file QtViewerBase.qo.h.

Constructor & Destructor Documentation

casa::QtViewerBase::QtViewerBase ( bool  is_server = false)
casa::QtViewerBase::~QtViewerBase ( )

Member Function Documentation

bool casa::QtViewerBase::dataDisplaysAs ( casacore::String  datatype,
casacore::String displaytype 
)

Returns true iff datatype is a vaild viewer datatype and displaytype is valid for the datatype.

If the former is true but the latter isn't, displaytype is [re]set to the default displaytype for the datatype.

virtual void casa::QtViewerBase::dpCreated ( QtDisplayPanelGui newDP,
QtDisplayPanel panel 
)
virtual

Only to be used by QtDisplayPanels, to inform this class of their creation.

(C++ should allow individual methods to be 'friend'ed to outside classes...).

virtual void casa::QtViewerBase::dpDestroyed_ ( QObject *  )
protectedvirtualslot

Connected by this class, (only) to QDPs' destroyed() signals (for maintenance of the list of existing QDPs).

virtual void casa::QtViewerBase::dpHidden_ ( QtDisplayPanel )
protectedvirtualslot

Connected by this class, (only) to QDPs' dpHidden() signals (for checking on open QDPs – will quit if none are left open).

bool casa::QtViewerBase::exiting ( )
inline

Definition at line 152 of file QtViewerBase.qo.h.

References qtviewer_app_exit.

static casacore::String casa::QtViewerBase::fileType ( const casacore::String  pathname)
static

function to aid typing files of interest to the viewer.

Moved from QtDataManager to be available for non-gui use. Returns user interface Strings like "Measurement Set".

static casacore::String casa::QtViewerBase::filetype ( const casacore::String  pathname)
static

similar to above; returns internal DD datatype names like "ms" (or else 'nonexistent', 'unknown').

virtual void casa::QtViewerBase::hold ( )
virtualslot

Hold/release of (canvas-draw) refresh of all QDPs.

(NB: does not concern enabling of Qt Widgets). Call to hold() must be matched to later call of release(); they can be nested. It is sometimes efficient to wait until several changes are complete and then redraw everything just once.

static bool casa::QtViewerBase::isRestoreFile ( casacore::String  filename,
QDomDocument &  restoredoc 
)
static

Does the given file pathname hold a readable file with valid ID and form as a viewer restore xml document? (If so, contents are set onto restoredoc).

static bool casa::QtViewerBase::isRestoreString ( casacore::String  xmlState,
QDomDocument &  restoredoc 
)
static

Does the given casacore::String have valid ID and form as viewer restore xml? (If so, contents are set onto restoredoc).

virtual QtMouseToolState* casa::QtViewerBase::mouseBtns ( )
inlinevirtual

Return the common QtMouseToolState that all mouse tool users should share.

Definition at line 82 of file QtViewerBase.qo.h.

References msbtns_.

virtual const QtMouseToolState* casa::QtViewerBase::mouseBtns ( ) const
inlinevirtual

Definition at line 85 of file QtViewerBase.qo.h.

References msbtns_.

virtual int casa::QtViewerBase::nOpenDPs ( )
virtual

The number of open QtDisplayPanels.

(More efficient than the equivalent openDPs().len(), if the number is all that's needed).

virtual std::list<QtDisplayPanelGui*> casa::QtViewerBase::openDPs ( )
virtual

The list of QtDisplayPanels that are not closed.

virtual void casa::QtViewerBase::quit ( )
virtualslot

Closes all open panels, which will exit the Qt loop.

Note that the loop can be restarted (and is, in interactive clean, e.g.), with existing widgets intact. This does not in itself delete objects or exit the process, although the driver program might do that. Also, some of the panels may have WA_DeleteOnClose set, which would cause their deletion (see, e.g., QtViewer::createDPG()).

virtual void casa::QtViewerBase::release ( )
virtualslot
bool casa::QtViewerBase::server ( ) const
inline

Definition at line 76 of file QtViewerBase.qo.h.

References server_.

static casacore::String casa::QtViewerBase::toString ( casacore::Vector< float >  values)
static

Utility routines to convert between casacore::Vector<float> and String.

static casacore::String casa::QtViewerBase::toString ( casacore::Vector< double >  values)
static
static casacore::Vector<double> casa::QtViewerBase::toVectorD ( casacore::String  values,
bool *  ok = 0 
)
static
static casacore::Vector<float> casa::QtViewerBase::toVectorF ( casacore::String  values,
bool *  ok = 0 
)
static

Member Data Documentation

const int casa::QtViewerBase::CONTOUR
static

Definition at line 145 of file QtViewerBase.qo.h.

const casacore::String casa::QtViewerBase::cvRestoreFileExt
static

Definition at line 120 of file QtViewerBase.qo.h.

const casacore::String casa::QtViewerBase::cvRestoreID
static

Definition at line 119 of file QtViewerBase.qo.h.

casacore::Vector<casacore::Vector<int> > casa::QtViewerBase::dataDisplaysAs_
protected

e.g.

dataDisplaysAs_[IMAGE] will be {RASTER, CONTOUR, VECTOR, MARKER} dataDisplaysAs_[datatype][0] will be the default displaytype for that datatype.

Definition at line 215 of file QtViewerBase.qo.h.

casacore::Vector<casacore::String> casa::QtViewerBase::datatypeNames_
protected

Translates IMAGE, RASTER, etc.

into the names used internally (e.g. "image", "raster").

Definition at line 210 of file QtViewerBase.qo.h.

casacore::Vector<casacore::String> casa::QtViewerBase::displaytypeNames_
protected

Definition at line 210 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::IMAGE
static

public (const) data.

viewer datatypess.

Definition at line 141 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::INVALID
static

(for invalid datatype or displaytype).

Definition at line 149 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::LEL
static

Definition at line 142 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::MARKER
static

Definition at line 145 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::MEASUREMENT_SET
static

Definition at line 141 of file QtViewerBase.qo.h.

QtMouseToolState casa::QtViewerBase::msbtns_
protected

This should be the only place this object is ever created....

Holds mouse button assignment for the mouse tools, which is to be the same on all mouse toolbars / display panels.

Definition at line 206 of file QtViewerBase.qo.h.

Referenced by mouseBtns().

const int casa::QtViewerBase::N_DS
static

Definition at line 146 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::N_DT
static

Definition at line 142 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::NEWPANEL
static

Definition at line 146 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::OLDPANEL
static

Definition at line 146 of file QtViewerBase.qo.h.

std::list<QtDisplayPanelGui*> casa::QtViewerBase::qdps_
protected

Existing QtDisplayPanels (whether 'closed' or not, as long as not deleted).

Unlike QDDs, QtViewerBase does not create or delete QDPs, it just tries to keep track of them. Note that by default, 'closed' DPs are simply not 'visible' (see QWidget::isVisible()), though they are not deleted unless their owner does it. An owner can also revive (show) a 'closed' QDP. The publicly-available list openDPs() shows only those which are not closed. Minimized or covered DPs are still considered 'open'.

Definition at line 200 of file QtViewerBase.qo.h.

bool casa::QtViewerBase::qtviewer_app_exit
staticprivate

Definition at line 218 of file QtViewerBase.qo.h.

Referenced by exiting().

const int casa::QtViewerBase::RASTER
static

viewer displaytypes.

Definition at line 145 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::RESTORE
static

Definition at line 142 of file QtViewerBase.qo.h.

bool casa::QtViewerBase::server_
protected

Definition at line 190 of file QtViewerBase.qo.h.

Referenced by server().

const int casa::QtViewerBase::SKY_CAT
static

Definition at line 146 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::SKY_CATALOG
static

Definition at line 141 of file QtViewerBase.qo.h.

const int casa::QtViewerBase::VECTOR
static

Definition at line 145 of file QtViewerBase.qo.h.


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