VR-Forces 4.0.4 Class Documentation
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtCreateControlObjectHandler Class Reference

This handler creates entities. More...

Inheritance diagram for DtCreateControlObjectHandler:
Inheritance graph
[legend]

List of all members.

Public Slots

virtual void create (QVector< DtPoint > &points, QString name, QString label, QColor color, int forceType, int appearance, bool publish, QString attachTo, DtArchivableObject *userData, bool createDone=true)
 If createDone is false, dialog will not be removed and the create process can continue.
virtual void completeEdit (QString name, QString label, QColor color, int forceType, int appearance, bool publish, DtArchivableObject *userData)
virtual void cancel ()
 Handle the cancelling of this object creation.
virtual bool mouseEvent (DtTMMapArea *area, QMouseEvent *evnt, const DtPoint &pnt)
virtual void updateTempSymbol ()
virtual void redrawSymbol ()
virtual void clearHideSymbol ()
virtual void done ()
 Called when finished creating or editing (either by OK or cancel)

Signals

void selectedPoint (const DtPoint &p)
void userComplete (bool finish)
 Emitted when the user never wants to show the dialog, will tell the dialog that is hidden that the user has complete the operation.

Public Member Functions

 DtCreateControlObjectHandler ()
 Default Constructor.
virtual ~DtCreateControlObjectHandler ()
 Destructor.
virtual QWidgetcreateDialog (QWidget *parent)
 Creates the dialog associated with this handler (if there is one)
virtual void setCreationObject (DtEntityMapperKey obj, int frc)
 Set the object you are creating.
virtual void setVertices (const QVector< DtPoint > &pnt)
 Sets the vertices used for creation.
virtual void setName (const QString &name)

Static Public Member Functions

static bool addDialogCreator (const DtEntityMapperKey &key, DtDialogCreator fcn)
 Adds a dialog creator function to the list of dialogs that can be created (by entity key).
static void cleanupDialogCreators ()
 Call to cleanup memory owned by myDialogCreators member.
static void setDefaultNameLabel (const QString &)
static QString defaultNameLabel ()

Protected Member Functions

virtual QWidgetcreateWidgetFor (const DtEntityMapperKey &key, QWidget *parent)
 Dialog creation routines. Creates the dialog from internally added dialog creators.
virtual void setWorkingName ()=0
 Sets the working name of the temp symbol.
virtual void additionalTempSymbolModifications (QPolygon &pts)
 Additional modifications to be made to the temp symbol by subclasses.
virtual void initDialog (QWidget *w)
 Initializes dialog with default values.
virtual void initDialogConnections ()
 Uses myEventDlg pointer to init connections.
virtual void initCreateConnections ()
 Connections that are initialized when in create mode.
virtual void initEditConnections ()
 Connections that are are made when editing.
virtual void pointSelected (const DtPoint &p)
virtual void activate ()
 Called when this event handler first becomes active.
virtual void deactivate ()
 Called when we are decativated, acts as a cancel on the current event.
virtual void stop (const DtPoint &pnt)
virtual DtSymbolcreateTempSymbol (DtTMMapArea *area)
 Creates the temp symbol and sets the working name.
virtual DtSymbolcreateSymbol (DtTMMapArea *area)
 Subclasses need to create temp symbol.
virtual void getVertices (QVector< DtPoint > &modelPoints) const
virtual bool canPublish () const
virtual bool isPublished () const
virtual void setCaption (QWidget *w)
 Sets the caption for the dialog based on mode and type.
virtual QString defaultName () const
 Default name of any item of a particular type.
virtual void sendUserComplete (bool finish=false)
 Sends user complete message if show dialog type is Never.
virtual bool userDefinedAction (DtUserDefinedType iAction, void *usr)
virtual bool complete () const
 Returns true if the item is complete by the number of points.
virtual bool finishOnCreate () const
 Return true if want to finish on create by default. Default is false.
virtual void disconnectDialogConnections ()
virtual void disconnectEditConnections ()
virtual void disconnectCreateConnections ()
virtual int publishedEditTimeout () const
 250 ms default, then, calls done to hide copied symbol
virtual const char * eventSignalName ()
virtual QPixmap createCursor ()
 Creates/restores the override cusror to display that the handler is in creation mode.
virtual void dialogDestroyedEvent ()
 Called when dialog is destroyed.

Protected Attributes

QVector< DtPointmyPointList
QString myObjectName
QString myLabelName
bool myFinalPointSelected
DtSymbolmyHideSymbol
DtOverlaySymbolDescriptormyDescription
bool myDeleteDescription
bool myFirstClick
DtArchivableObjectmyUserData
 Set by the dialogs, this will be passed to create and edit routines for modification.

Static Protected Attributes

static QList
< DtDialogCreatorInfo * > 
myDialogCreators
 Dialog creators.
static QString theDefaultNameLabel

Detailed Description

This handler creates entities.


Constructor & Destructor Documentation

Default Constructor.

Destructor.


Member Function Documentation

Creates the dialog associated with this handler (if there is one)

Reimplemented from DtEventHandler.

Adds a dialog creator function to the list of dialogs that can be created (by entity key).

If one exists with the key, replaces

Call to cleanup memory owned by myDialogCreators member.

Current called as part of application cleanup

virtual void DtCreateControlObjectHandler::setCreationObject ( DtEntityMapperKey  obj,
int  frc 
) [virtual]

Set the object you are creating.

Reimplemented from DtCreationHandler.

virtual void DtCreateControlObjectHandler::setVertices ( const QVector< DtPoint > &  pnt) [virtual]

Sets the vertices used for creation.

This is used if no model data. Note the vertices are copied into the myPointsList

virtual void DtCreateControlObjectHandler::setName ( const QString &  name) [virtual]
static void DtCreateControlObjectHandler::setDefaultNameLabel ( const QString &  ) [static]
virtual void DtCreateControlObjectHandler::create ( QVector< DtPoint > &  points,
QString  name,
QString  label,
QColor  color,
int  forceType,
int  appearance,
bool  publish,
QString  attachTo,
DtArchivableObject userData,
bool  createDone = true 
) [virtual, slot]

If createDone is false, dialog will not be removed and the create process can continue.

virtual void DtCreateControlObjectHandler::completeEdit ( QString  name,
QString  label,
QColor  color,
int  forceType,
int  appearance,
bool  publish,
DtArchivableObject userData 
) [virtual, slot]
virtual void DtCreateControlObjectHandler::cancel ( ) [virtual, slot]

Handle the cancelling of this object creation.

Implements DtCreationHandler.

virtual bool DtCreateControlObjectHandler::mouseEvent ( DtTMMapArea area,
QMouseEvent *  evnt,
const DtPoint pnt 
) [virtual, slot]

Reimplemented from DtCreationHandler.

Reimplemented in DtCreateLineHandler.

virtual void DtCreateControlObjectHandler::updateTempSymbol ( ) [virtual, slot]

Implements DtCreationHandler.

virtual void DtCreateControlObjectHandler::redrawSymbol ( ) [virtual, slot]
virtual void DtCreateControlObjectHandler::clearHideSymbol ( ) [virtual, slot]
virtual void DtCreateControlObjectHandler::done ( ) [virtual, slot]

Called when finished creating or editing (either by OK or cancel)

Reimplemented in DtTerrainCreateLineHandler.

Emitted when the user never wants to show the dialog, will tell the dialog that is hidden that the user has complete the operation.

If the operation is a success, it will create the object. If not, the dialog should display itself

virtual QWidget* DtCreateControlObjectHandler::createWidgetFor ( const DtEntityMapperKey key,
QWidget parent 
) [protected, virtual]

Dialog creation routines. Creates the dialog from internally added dialog creators.

Reimplemented in DtTerrainCreateLineHandler.

virtual void DtCreateControlObjectHandler::setWorkingName ( ) [protected, pure virtual]

Sets the working name of the temp symbol.

Implemented in DtCreateAreaHandler, DtCreateLineHandler, and DtCreatePointHandler.

virtual void DtCreateControlObjectHandler::additionalTempSymbolModifications ( QPolygon &  pts) [protected, virtual]

Additional modifications to be made to the temp symbol by subclasses.

The array is the screen point location of all points in the object

virtual void DtCreateControlObjectHandler::initDialog ( QWidget w) [protected, virtual]

Initializes dialog with default values.

Reimplemented in DtTerrainCreateLineHandler, DtCreateLineHandler, and DtCreatePointHandler.

virtual void DtCreateControlObjectHandler::initDialogConnections ( ) [protected, virtual]

Uses myEventDlg pointer to init connections.

Set as function of calling createWidgetForCategory from createDialog. Common connections plus call to edit or create connections depending on mode

Reimplemented in DtCreateLineHandler, and DtCreatePointHandler.

virtual void DtCreateControlObjectHandler::initCreateConnections ( ) [protected, virtual]

Connections that are initialized when in create mode.

virtual void DtCreateControlObjectHandler::initEditConnections ( ) [protected, virtual]

Connections that are are made when editing.

virtual void DtCreateControlObjectHandler::pointSelected ( const DtPoint p) [protected, virtual]

Implements DtCreationHandler.

Reimplemented in DtCreatePointHandler.

virtual void DtCreateControlObjectHandler::activate ( ) [protected, virtual]

Called when this event handler first becomes active.

Reimplemented from DtCreationHandler.

Reimplemented in DtTerrainCreatePointHandler.

virtual void DtCreateControlObjectHandler::deactivate ( ) [protected, virtual]

Called when we are decativated, acts as a cancel on the current event.

Reimplemented from DtCreationHandler.

virtual void DtCreateControlObjectHandler::stop ( const DtPoint pnt) [protected, virtual]

Reimplemented from DtCreationHandler.

virtual DtSymbol* DtCreateControlObjectHandler::createTempSymbol ( DtTMMapArea area) [protected, virtual]

Creates the temp symbol and sets the working name.

If in edit mode, hide the original symbol

Reimplemented from DtCreationHandler.

Reimplemented in DtTerrainCreateLineHandler.

virtual DtSymbol* DtCreateControlObjectHandler::createSymbol ( DtTMMapArea area) [protected, virtual]

Subclasses need to create temp symbol.

Implements DtCreationHandler.

Reimplemented in DtCreateLineHandler, and DtCreatePointHandler.

virtual void DtCreateControlObjectHandler::getVertices ( QVector< DtPoint > &  modelPoints) const [protected, virtual]
virtual bool DtCreateControlObjectHandler::canPublish ( ) const [protected, virtual]
virtual bool DtCreateControlObjectHandler::isPublished ( ) const [protected, virtual]
virtual void DtCreateControlObjectHandler::setCaption ( QWidget w) [protected, virtual]

Sets the caption for the dialog based on mode and type.

virtual QString DtCreateControlObjectHandler::defaultName ( ) const [protected, virtual]

Default name of any item of a particular type.

virtual void DtCreateControlObjectHandler::sendUserComplete ( bool  finish = false) [protected, virtual]

Sends user complete message if show dialog type is Never.

Reimplemented in DtCreatePointHandler.

virtual bool DtCreateControlObjectHandler::userDefinedAction ( DtUserDefinedType  iAction,
void *  usr 
) [protected, virtual]

Reimplemented from DtEventHandler.

virtual bool DtCreateControlObjectHandler::complete ( ) const [protected, virtual]

Returns true if the item is complete by the number of points.

Called on first click if dialog is displayed on first click

virtual bool DtCreateControlObjectHandler::finishOnCreate ( ) const [protected, virtual]

Return true if want to finish on create by default. Default is false.

Reimplemented in DtCreateLineHandler.

virtual void DtCreateControlObjectHandler::disconnectDialogConnections ( ) [protected, virtual]
virtual void DtCreateControlObjectHandler::disconnectEditConnections ( ) [protected, virtual]
virtual void DtCreateControlObjectHandler::disconnectCreateConnections ( ) [protected, virtual]
virtual int DtCreateControlObjectHandler::publishedEditTimeout ( ) const [protected, virtual]

250 ms default, then, calls done to hide copied symbol

virtual const char* DtCreateControlObjectHandler::eventSignalName ( ) [inline, protected, virtual]
virtual QPixmap DtCreateControlObjectHandler::createCursor ( ) [protected, virtual]

Creates/restores the override cusror to display that the handler is in creation mode.

Reimplemented from DtCreationHandler.

virtual void DtCreateControlObjectHandler::dialogDestroyedEvent ( ) [protected, virtual]

Called when dialog is destroyed.

Reimplemented from DtEventHandler.


Member Data Documentation

Set by the dialogs, this will be passed to create and edit routines for modification.

Dialog creators.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)