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

#include <QtViewerBase.qo.h>

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

List of all members.

Public Slots

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

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.
virtual const QtMouseToolStatemouseBtns () const
virtual List< QtDisplayPanelGui * > openDPs ()
 The list of QtDisplayPanels that are not closed.
virtual Int nOpenDPs ()
 The number of open QtDisplayPanels.
virtual void dpCreated (QtDisplayPanelGui *newDP, QtDisplayPanel *panel)
 Only to be used by QtDisplayPanels, to inform this class of their creation.
Bool dataDisplaysAs (String datatype, String &displaytype)
 Returns True iff datatype is a vaild viewer datatype and displaytype is valid for the datatype.
bool exiting ()

Static Public Member Functions

static String fileType (const String pathname)
 function to aid typing files of interest to the viewer.
static String filetype (const String pathname)
 similar to above; returns internal DD datatype names like "ms" (or else 'nonexistent', 'unknown').
static Bool isRestoreFile (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).
static Bool isRestoreString (String xmlState, QDomDocument &restoredoc)
 Does the given String have valid ID and form as viewer restore xml? (If so, contents are set onto restoredoc).
static String toString (Vector< Float > values)
 Utility routines to convert between Vector<Float> and String.
static Vector< FloattoVectorF (String values, Bool *ok=0)
static String toString (Vector< Double > values)
static Vector< DoubletoVectorD (String values, Bool *ok=0)

Static Public Attributes

static const String cvRestoreID
static const String cvRestoreFileExt
static const Int IMAGE
 public (const) data.
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.
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).

Protected Slots

virtual void dpDestroyed_ (QObject *)
 Connected by this class, (only) to QDPs' destroyed() signals (for maintenance of the list of existing QDPs).
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).

Protected Attributes

bool server_
List< QtDisplayPanelGui * > qdps_
 Existing QtDisplayPanels (whether 'closed' or not, as long as not deleted).
QtMouseToolState msbtns_
 This should be the only place this object is ever created....
Vector< StringdatatypeNames_
 Translates IMAGE, RASTER, etc.
Vector< StringdisplaytypeNames_
Vector< Vector< Int > > dataDisplaysAs_
 e.g.

Static Private Attributes

static bool qtviewer_app_exit

Detailed Description

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


Constructor & Destructor Documentation

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

Member Function Documentation

Bool casa::QtViewerBase::dataDisplaysAs ( String  datatype,
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 *  ) [protected, virtual, slot]

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

virtual void casa::QtViewerBase::dpHidden_ ( QtDisplayPanel ) [protected, virtual, slot]

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 142 of file QtViewerBase.qo.h.

References qtviewer_app_exit.

static String casa::QtViewerBase::fileType ( const 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 String casa::QtViewerBase::filetype ( const String  pathname) [static]

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

virtual void casa::QtViewerBase::hold ( ) [virtual, slot]

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 ( 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 ( String  xmlState,
QDomDocument &  restoredoc 
) [static]

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

virtual QtMouseToolState* casa::QtViewerBase::mouseBtns ( ) [inline, virtual]

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

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

References msbtns_.

virtual const QtMouseToolState* casa::QtViewerBase::mouseBtns ( ) const [inline, virtual]

Definition at line 77 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).

The list of QtDisplayPanels that are not closed.

virtual void casa::QtViewerBase::quit ( ) [virtual, slot]

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

Reimplemented in casa::QtViewer.

virtual void casa::QtViewerBase::release ( ) [virtual, slot]
bool casa::QtViewerBase::server ( ) const [inline]

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

References server_.

static String casa::QtViewerBase::toString ( Vector< Float values) [static]

Utility routines to convert between Vector<Float> and String.

static String casa::QtViewerBase::toString ( Vector< Double values) [static]
static Vector<Double> casa::QtViewerBase::toVectorD ( String  values,
Bool ok = 0 
) [static]
static Vector<Float> casa::QtViewerBase::toVectorF ( String  values,
Bool ok = 0 
) [static]

Member Data Documentation

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

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

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

e.g.

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

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

Translates IMAGE, RASTER, etc.

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

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

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

public (const) data.

viewer datatypess.

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

(for invalid datatype or displaytype).

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

const Int casa::QtViewerBase::LEL [static]

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

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

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

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 194 of file QtViewerBase.qo.h.

Referenced by mouseBtns().

const Int casa::QtViewerBase::N_DS [static]

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

const Int casa::QtViewerBase::N_DT [static]

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

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

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

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 188 of file QtViewerBase.qo.h.

bool casa::QtViewerBase::qtviewer_app_exit [static, private]

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

Referenced by exiting().

viewer displaytypes.

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

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

bool casa::QtViewerBase::server_ [protected]

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

Referenced by server().

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

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

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


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