VR-Forces 4.1 Class Documentation
List of all members | Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes
DtInfoHandler Class Reference

This class was created as a simple way to organize information dialogs. More...

Inheritance diagram for DtInfoHandler:
Inheritance graph
[legend]

Public Slots

virtual void removeInfoDialog (QObject *d)
 Called when an info dialog is closed, this routine will remove the dialog from the internal dialogs (myInfoDialogs) list.
- Public Slots inherited from DtEventHandler
virtual bool mouseEvent (DtTMMapArea *, QMouseEvent *evnt, const DtPoint &pnt)
virtual bool keyboardEvent (DtTMMapArea *, QKeyEvent *evnt)
virtual bool symbolsSelected (DtTMMapArea *area, DtSymbolList *sl)
virtual bool selectionUpdated (DtTMMapArea *area, const QVector< DtModelKey > &d)
virtual bool selectionInProgress (DtTMMapArea *area, DtSymbolSelector &d)
virtual bool focusEvent (DtTMMapArea *, QEvent *evnt)
virtual bool enterEvent (DtTMMapArea *area, QEvent *evnt)
virtual bool leaveEvent (DtTMMapArea *area, QEvent *evnt)
virtual bool dropEvent (DtTMMapArea *area, QDropEvent *evnt)
virtual bool dragEnterEvent (DtTMMapArea *area, QDragEnterEvent *evnt)
virtual bool dragMoveEvent (DtTMMapArea *area, QDragMoveEvent *evnt)
virtual bool dragLeaveEvent (DtTMMapArea *area, QDragLeaveEvent *evnt)
virtual bool aboutToDraw (DtTMMapArea *area, QPainter *)
virtual bool mapActivated (DtTMMapArea *area)
virtual bool selectedModelDataUpdated (DtTMMapArea *area)
virtual bool symbolAdded (DtTMMapArea *area, const DtModelKey &)
virtual bool symbolRemoved (DtTMMapArea *area, const DtModelKey &)
virtual bool disconnecting (DtTMMapArea *area)
 Called when a map is being disconnect from an event handler.
virtual bool connecting (DtTMMapArea *area)
 Called when a map is being connected to an event handler.
virtual void tick ()
virtual void clearDialog ()

Public Member Functions

 DtInfoHandler ()
 Default Constructor.
virtual ~DtInfoHandler ()
 Destructor.
virtual void showInfo (const DtModelData &)
 Shows an info panel for the specified model data.
virtual QWidgetinformationDialogFor (const DtModelData &d, QWidget *parent=NULL)
- Public Member Functions inherited from DtEventHandler
 DtEventHandler ()
 Default Constructor.
virtual ~DtEventHandler ()
 Destructor.
virtual void setEventController (DtEventController *)
virtual void setInitialSelection (const QVector< DtModelKey > &d)
virtual void showDialog (bool b)
virtual QWidgetcreateDialog (QWidget *w)
 Creates the dialog associated with this handler (if there is one)
virtual QWidgetdialog (bool createIfMissing=true, QWidget *parent=NULL)
 If createIfMissing is true, will create the dialog based on the supplied parent window, else will simply return the dialog pointer.
virtual void reset ()
virtual DtBaseWindowbaseWindow () const
 Returns the base window of the event controller.
virtual void activate ()
 Called when this event handler first becomes active.
virtual void deactivate ()
 Called when this event handler is removed as the current event.
virtual void setBaseWindow (DtBaseWindow *w)
 Called when the base window is set for the event controller.
virtual void init ()
 Called when the handler is first created, initialize context.
void setSuspended (bool)
 Set when something wants to suspend some aspect of this handler without deactivating it.
bool suspended () const
virtual void dialogDestroyedEvent ()
 Called when dialog is destroyed.
- Public Member Functions inherited from DtArchivableObject
 DtArchivableObject (QString name, DtArchivableObjectCreator fcn)
 This constructor will add this object to the archivable object factory.
 DtArchivableObject (QString name)
 DtArchivableObject ()
virtual ~DtArchivableObject ()
virtual QString name () const
DtArchiverarchiver ()
 Returns the archiver of this object.
virtual void read (QTextStream &s)
 Reads/writes archiver.
virtual void write (QTextStream &s)
virtual void setLevel (int i)
virtual int level () const
virtual DtArchivableObjectclone ()
 Allows for cloning of this object.

Protected Member Functions

virtual bool userDefinedAction (DtUserDefinedType iAction, void *usr)
virtual QWidgetcreateDialog (QWidget *parent, const DtModelData &d)=0
 Pure overrides to implement class.
virtual void initDialog (QWidget *info, const DtModelData &)=0
virtual void initConnections (QWidget *info)=0
virtual void disconnectConnections (QWidget *info)=0
virtual QString keyFor (const DtModelData &d) const
virtual const char * eventSignalName ()=0

Protected Attributes

QHash< QString, QWidget * > myInfoDialogs
- Protected Attributes inherited from DtEventHandler
QWidgetmyEventDlg
DtEventControllermyEventController
bool mySuspended
- Protected Attributes inherited from DtArchivableObject
DtArchivermyArchiver

Additional Inherited Members

- Signals inherited from DtEventHandler
void closedDialog ()

Detailed Description

This class was created as a simple way to organize information dialogs.

In an of itself it does nothing, but, subclasses can implement pure methods to create and manage info dialogs. To properly be removed from the internal list this class creates, the info dialog must emit a closing(this) signal when it wants to be removed

Constructor & Destructor Documentation

DtInfoHandler::DtInfoHandler ( )

Default Constructor.

virtual DtInfoHandler::~DtInfoHandler ( )
virtual

Destructor.

Member Function Documentation

virtual void DtInfoHandler::showInfo ( const DtModelData )
virtual

Shows an info panel for the specified model data.

This routine will create a new info dialog, make some Qt connections to make sure it updates when items change on the screen and show it. To extend the functionality of the default entity info dialog create a subclass of this dialog and set the creator function in the pvdFactory instance. Due to the nature of the connections made to update this dialog it is not recommended that this method be overridden and not called by the subclass.

virtual QWidget* DtInfoHandler::informationDialogFor ( const DtModelData d,
QWidget parent = NULL 
)
virtual
virtual void DtInfoHandler::removeInfoDialog ( QObject d)
virtualslot

Called when an info dialog is closed, this routine will remove the dialog from the internal dialogs (myInfoDialogs) list.

virtual bool DtInfoHandler::userDefinedAction ( DtUserDefinedType  iAction,
void *  usr 
)
protectedvirtual

Reimplemented from DtEventHandler.

virtual QWidget* DtInfoHandler::createDialog ( QWidget parent,
const DtModelData d 
)
protectedpure virtual

Pure overrides to implement class.

Implemented in DtTerrainInfoHandler.

virtual void DtInfoHandler::initDialog ( QWidget info,
const DtModelData  
)
protectedpure virtual

Implemented in DtTerrainInfoHandler.

virtual void DtInfoHandler::initConnections ( QWidget info)
protectedpure virtual

Implemented in DtTerrainInfoHandler.

virtual void DtInfoHandler::disconnectConnections ( QWidget info)
protectedpure virtual

Implemented in DtTerrainInfoHandler.

virtual QString DtInfoHandler::keyFor ( const DtModelData d) const
protectedvirtual

Reimplemented in DtTerrainInfoHandler.

virtual const char* DtInfoHandler::eventSignalName ( )
protectedpure virtual

Implemented in DtTerrainInfoHandler.

Member Data Documentation

QHash<QString, QWidget*> DtInfoHandler::myInfoDialogs
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)