Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CanvasViewProxy Class Reference

A Proxy for the CanvasView class. More...

#include <CanvasViewProxy.h>

Inheritance diagram for CanvasViewProxy:
Inheritance graph
[legend]
Collaboration diagram for CanvasViewProxy:
Collaboration graph
[legend]

Signals

void addDisplaySignal (PlotterBase *plotter)
 Signal used to add a plotter display to the canvas. More...
 
void clearSignal ()
 Signal used to clear all displays from canvas. More...
 
void saveAsImageSignal (const PlotterBase *plotter, const std::string &filename)
 Save the plotter as an image file. More...
 
void swapOrientationSignal ()
 Swaps the orientation. More...
 

Public Member Functions

void addDisplay (PlotterBase *plotter)
 Adds a plotter display to the canvas. More...
 
 CanvasViewProxy (CanvasView *view)
 The constructor taking the CanvasView object to be used. More...
 
void clear ()
 Clears the canvas of all displays. More...
 
void saveAsImage (const PlotterBase *, const std::string &filename)
 Saves the plotter as image file with name filename. More...
 
void swapOrientation ()
 Swaps the orientation from portrait to landscape and vice verse. More...
 
virtual ~CanvasViewProxy ()
 The destructor. More...
 

Private Member Functions

 blockSignals (bool block)
 
 CanvasViewProxy (const CanvasViewProxy &)
 Private copy constructor to prevent copying. More...
 
 checkConnectArgs (const char *signal, const QObject *receiver, const char *member)
 
 child (const char *objName, const char *inheritsClass=0, bool recursiveSearch=TRUE)
 
 childEvent (QChildEvent *)
 
 children () const
 
 className () const
 
 connect (const QObject *sender, const char *signal, const char *member) const
 
 connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
 connectNotify (const char *signal)
 
 customEvent (QCustomEvent *)
 
 deleteLater ()
 
 destroyed ()
 
 destroyed (QObject *obj)
 
 disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
 disconnect (const QObject *receiver, const char *member=0)
 
 disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
 disconnectNotify (const char *signal)
 
 dumpObjectInfo ()
 
 dumpObjectTree ()
 
 event (QEvent *e)
 
 eventFilter (QObject *watched, QEvent *e)
 
 highPriority () const
 
 inherits (const char *clname) const
 
 insertChild (QObject *obj)
 
 installEventFilter (const QObject *filterObj)
 
 isA (const char *clname) const
 
 isWidgetType () const
 
 killTimer (int id)
 
 killTimers ()
 
void lock ()
 Gets mutex lock from application object. More...
 
 metaObject () const
 
 name () const
 
 name (const char *defaultName) const
 
 normalizeSignalSlot (const char *signalSlot)
 
 objectTrees ()
 
 parent () const
 
 prop -the name of this object
 
 property (const char *name) const
 
 qt_find_obj_child (QObject *parent, const char *type, const char *name)
 
 queryList (const char *inheritsClass=0, const char *objName=0, bool regexpMatch=TRUE, bool recursiveSearch=TRUE) const
 
 removeChild (QObject *obj)
 
 removeEventFilter (const QObject *obj)
 
 sender ()
 
 setName (const char *name)
 
 setProperty (const char *name, const QVariant &value)
 
 signalsBlocked () const
 
 startTimer (int interval)
 
 timerEvent (QTimerEvent *)
 
 tr (const char *sourceText, const char *comment)
 
 trUtf8 (const char *sourceText, const char *comment)
 
void unlock ()
 Releases the mutex lock to the application object. More...
 

Private Attributes

CanvasViewm_canvas_view
 The CanvasView object managed by this proxy. More...
 

Detailed Description

A Proxy for the CanvasView class.

A Proxy for the CanvaView is responsible for invoking member functions of the CanvasView class in a thread safe manner. For example, the CanvasView object is executed in the GUI thread, while a Python script or command is in a different thread, perhaps the main thread. Thus Python should use the CanvasViewProxy to invoke member functions of the CanvasView object.

For Qt 3, this class users the QApplication::lock() and QApplication::unlock() methods in insure that the GUI thread is not running when modifying the canvas. For Qt 4, locking and unlocking is not needed since the signal/slot connection is thread safe, which was not the case for Qt 3.

Author
Paul F. Kunz Paul_.nosp@m.Kunz.nosp@m.@slac.nosp@m..sta.nosp@m.nford.nosp@m..edu

Definition at line 45 of file CanvasViewProxy.h.

Constructor & Destructor Documentation

CanvasViewProxy ( const CanvasViewProxy )
private

Private copy constructor to prevent copying.

~CanvasViewProxy ( )
virtual

The destructor.

Definition at line 45 of file CanvasViewProxy.cxx.

Member Function Documentation

void addDisplay ( PlotterBase plotter)

Adds a plotter display to the canvas.

Definition at line 69 of file CanvasViewProxy.cxx.

References CanvasViewProxy::addDisplaySignal(), CanvasViewProxy::lock(), and CanvasViewProxy::unlock().

void addDisplaySignal ( PlotterBase plotter)
signal

Signal used to add a plotter display to the canvas.

Referenced by CanvasViewProxy::addDisplay(), and CanvasViewProxy::CanvasViewProxy().

void clear ( )

Clears the canvas of all displays.

Definition at line 82 of file CanvasViewProxy.cxx.

References CanvasViewProxy::clearSignal(), CanvasViewProxy::lock(), and CanvasViewProxy::unlock().

Referenced by CanvasViewProxy::CanvasViewProxy().

void clearSignal ( )
signal

Signal used to clear all displays from canvas.

Referenced by CanvasViewProxy::CanvasViewProxy(), and CanvasViewProxy::clear().

void lock ( )
private

Gets mutex lock from application object.

Definition at line 51 of file CanvasViewProxy.cxx.

References QApplication::closingDown().

Referenced by CanvasViewProxy::addDisplay(), CanvasViewProxy::clear(), CanvasViewProxy::saveAsImage(), and CanvasViewProxy::swapOrientation().

void saveAsImage ( const PlotterBase plotter,
const std::string &  filename 
)

Saves the plotter as image file with name filename.

Definition at line 95 of file CanvasViewProxy.cxx.

References CanvasViewProxy::lock(), CanvasViewProxy::saveAsImageSignal(), and CanvasViewProxy::unlock().

void saveAsImageSignal ( const PlotterBase plotter,
const std::string &  filename 
)
signal

Save the plotter as an image file.

Referenced by CanvasViewProxy::CanvasViewProxy(), and CanvasViewProxy::saveAsImage().

void swapOrientation ( )

Swaps the orientation from portrait to landscape and vice verse.

Definition at line 108 of file CanvasViewProxy.cxx.

References CanvasViewProxy::lock(), CanvasViewProxy::swapOrientationSignal(), and CanvasViewProxy::unlock().

Referenced by CanvasViewProxy::CanvasViewProxy().

void swapOrientationSignal ( )
signal

Swaps the orientation.

Referenced by CanvasViewProxy::CanvasViewProxy(), and CanvasViewProxy::swapOrientation().

void unlock ( )
private

Releases the mutex lock to the application object.

Definition at line 60 of file CanvasViewProxy.cxx.

References QApplication::closingDown().

Referenced by CanvasViewProxy::addDisplay(), CanvasViewProxy::clear(), CanvasViewProxy::saveAsImage(), and CanvasViewProxy::swapOrientation().

Member Data Documentation

CanvasView* m_canvas_view
private

The CanvasView object managed by this proxy.

Definition at line 53 of file CanvasViewProxy.h.

Referenced by CanvasViewProxy::CanvasViewProxy().


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

Generated for HippoDraw Class Library by doxygen