OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | List of all members
CSVRender::InstanceMode Class Reference

#include <instancemode.hpp>

Inheritance diagram for CSVRender::InstanceMode:
Collaboration diagram for CSVRender::InstanceMode:

Public Member Functions

 InstanceMode (WorldspaceWidget *worldspaceWidget, QWidget *parent=0)
 
virtual void activate (CSVWidget::SceneToolbar *toolbar)
 Default-Implementation: do nothing. More...
 
virtual void deactivate (CSVWidget::SceneToolbar *toolbar)
 Default-Implementation: do nothing. More...
 
virtual void setEditLock (bool locked)
 Default-implementation: Ignored. More...
 
virtual void primaryEditPressed (const WorldspaceHitResult &hit)
 Default-implementation: Ignored. More...
 
virtual void secondaryEditPressed (const WorldspaceHitResult &hit)
 Default-implementation: Ignored. More...
 
virtual void primarySelectPressed (const WorldspaceHitResult &hit)
 Default-implementation: Ignored. More...
 
virtual void secondarySelectPressed (const WorldspaceHitResult &hit)
 Default-implementation: Ignored. More...
 
virtual bool primaryEditStartDrag (const QPoint &pos)
 
virtual bool secondaryEditStartDrag (const QPoint &pos)
 
virtual void drag (const QPoint &pos, int diffX, int diffY, double speedFactor)
 Default-implementation: ignored. More...
 
virtual void dragCompleted (const QPoint &pos)
 Default-implementation: ignored. More...
 
virtual void dragAborted ()
 
virtual void dragWheel (int diff, double speedFactor)
 Default-implementation: ignored. More...
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 Default-implementation: ignored. More...
 
virtual void dropEvent (QDropEvent *event)
 Default-implementation: ignored. More...
 
virtual int getSubMode () const
 Default: return -1. More...
 
- Public Member Functions inherited from CSVRender::EditMode
 EditMode (WorldspaceWidget *worldspaceWidget, const QIcon &icon, unsigned int mask, const QString &tooltip="", QWidget *parent=0)
 
unsigned int getInteractionMask () const
 
virtual bool primarySelectStartDrag (const QPoint &pos)
 
virtual bool secondarySelectStartDrag (const QPoint &pos)
 
virtual void dragMoveEvent (QDragMoveEvent *event)
 Default-implementation: ignored. More...
 
- Public Member Functions inherited from CSVWidget::ModeButton
 ModeButton (const QIcon &icon, const QString &tooltip="", QWidget *parent=0)
 
virtual bool createContextMenu (QMenu *menu)
 
- Public Member Functions inherited from CSVWidget::PushButton
 PushButton (const QIcon &icon, Type type, const QString &tooltip="", QWidget *parent=0)
 
 PushButton (Type type, const QString &tooltip="", QWidget *parent=0)
 
bool hasKeepOpen () const
 
QString getBaseToolTip () const
 Return tooltip used at construction (without any button-specific modifications) More...
 
Type getType () const
 

Private Types

enum  DragMode { DragMode_None, DragMode_Move, DragMode_Rotate, DragMode_Scale }
 

Private Slots

void subModeChanged (const std::string &id)
 

Private Member Functions

int getSubModeFromId (const std::string &id) const
 
osg::Vec3f quatToEuler (const osg::Quat &quat) const
 
osg::Quat eulerToQuat (const osg::Vec3f &euler) const
 
osg::Vec3f getSelectionCenter (const std::vector< osg::ref_ptr< TagBase > > &selection) const
 
osg::Vec3f getScreenCoords (const osg::Vec3f &pos)
 

Private Attributes

CSVWidget::SceneToolModemSubMode
 
std::string mSubModeId
 
InstanceSelectionModemSelectionMode
 
DragMode mDragMode
 
int mDragAxis
 
bool mLocked
 
float mUnitScaleDist
 

Additional Inherited Members

- Public Types inherited from CSVWidget::PushButton
enum  Type { Type_TopMode, Type_TopAction, Type_Mode, Type_Toggle }
 
- Protected Member Functions inherited from CSVRender::EditMode
WorldspaceWidgetgetWorldspaceWidget ()
 
- Protected Member Functions inherited from CSVWidget::PushButton
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 

Member Enumeration Documentation

Enumerator
DragMode_None 
DragMode_Move 
DragMode_Rotate 
DragMode_Scale 

Constructor & Destructor Documentation

CSVRender::InstanceMode::InstanceMode ( WorldspaceWidget worldspaceWidget,
QWidget parent = 0 
)

Member Function Documentation

void CSVRender::InstanceMode::activate ( CSVWidget::SceneToolbar toolbar)
virtual

Default-Implementation: do nothing.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

void CSVRender::InstanceMode::deactivate ( CSVWidget::SceneToolbar toolbar)
virtual

Default-Implementation: do nothing.

Reimplemented from CSVWidget::ModeButton.

Here is the call graph for this function:

void CSVRender::InstanceMode::drag ( const QPoint &  pos,
int  diffX,
int  diffY,
double  speedFactor 
)
virtual

Default-implementation: ignored.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

void CSVRender::InstanceMode::dragAborted ( )
virtual
Note
dragAborted will not be called, if the drag is aborted via changing editing mode

Reimplemented from CSVRender::EditMode.

void CSVRender::InstanceMode::dragCompleted ( const QPoint &  pos)
virtual

Default-implementation: ignored.

Reimplemented from CSVRender::EditMode.

void CSVRender::InstanceMode::dragEnterEvent ( QDragEnterEvent *  event)
virtual

Default-implementation: ignored.

Reimplemented from CSVRender::EditMode.

void CSVRender::InstanceMode::dragWheel ( int  diff,
double  speedFactor 
)
virtual

Default-implementation: ignored.

Reimplemented from CSVRender::EditMode.

void CSVRender::InstanceMode::dropEvent ( QDropEvent *  event)
virtual

Default-implementation: ignored.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

osg::Quat CSVRender::InstanceMode::eulerToQuat ( const osg::Vec3f &  euler) const
private
osg::Vec3f CSVRender::InstanceMode::getScreenCoords ( const osg::Vec3f &  pos)
private
osg::Vec3f CSVRender::InstanceMode::getSelectionCenter ( const std::vector< osg::ref_ptr< TagBase > > &  selection) const
private
int CSVRender::InstanceMode::getSubMode ( ) const
virtual

Default: return -1.

Reimplemented from CSVRender::EditMode.

int CSVRender::InstanceMode::getSubModeFromId ( const std::string &  id) const
private
void CSVRender::InstanceMode::primaryEditPressed ( const WorldspaceHitResult hit)
virtual

Default-implementation: Ignored.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

bool CSVRender::InstanceMode::primaryEditStartDrag ( const QPoint &  pos)
virtual

Default-implementation: ignore and return false

Returns
Drag accepted?

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

void CSVRender::InstanceMode::primarySelectPressed ( const WorldspaceHitResult hit)
virtual

Default-implementation: Ignored.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

osg::Vec3f CSVRender::InstanceMode::quatToEuler ( const osg::Quat &  quat) const
private

Here is the call graph for this function:

void CSVRender::InstanceMode::secondaryEditPressed ( const WorldspaceHitResult hit)
virtual

Default-implementation: Ignored.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

bool CSVRender::InstanceMode::secondaryEditStartDrag ( const QPoint &  pos)
virtual

Default-implementation: ignore and return false

Returns
Drag accepted?

Reimplemented from CSVRender::EditMode.

void CSVRender::InstanceMode::secondarySelectPressed ( const WorldspaceHitResult hit)
virtual

Default-implementation: Ignored.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

void CSVRender::InstanceMode::setEditLock ( bool  locked)
virtual

Default-implementation: Ignored.

Reimplemented from CSVRender::EditMode.

void CSVRender::InstanceMode::subModeChanged ( const std::string &  id)
privateslot

Member Data Documentation

int CSVRender::InstanceMode::mDragAxis
private
DragMode CSVRender::InstanceMode::mDragMode
private
bool CSVRender::InstanceMode::mLocked
private
InstanceSelectionMode* CSVRender::InstanceMode::mSelectionMode
private
CSVWidget::SceneToolMode* CSVRender::InstanceMode::mSubMode
private
std::string CSVRender::InstanceMode::mSubModeId
private
float CSVRender::InstanceMode::mUnitScaleDist
private

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