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

#include <pagedworldspacewidget.hpp>

Inheritance diagram for CSVRender::PagedWorldspaceWidget:
Collaboration diagram for CSVRender::PagedWorldspaceWidget:

Signals

void cellSelectionChanged (const CSMWorld::CellSelection &selection)
 
- Signals inherited from CSVRender::WorldspaceWidget
void closeRequest ()
 
void dataDropped (const std::vector< CSMWorld::UniversalId > &data)
 
- Signals inherited from CSVRender::SceneWidget
void focusToolbarRequest ()
 

Public Member Functions

 PagedWorldspaceWidget (QWidget *parent, CSMDoc::Document &document)
 
virtual ~PagedWorldspaceWidget ()
 
void useViewHint (const std::string &hint)
 Decodes the the hint string to set of cell that are rendered. More...
 
void setCellSelection (const CSMWorld::CellSelection &selection)
 
const CSMWorld::CellSelectiongetCellSelection () const
 
virtual bool handleDrop (const std::vector< CSMWorld::UniversalId > &data, DropType type)
 
virtual dropRequirments getDropRequirements (DropType type) const
 
virtual
CSVWidget::SceneToolToggle2
makeControlVisibilitySelector (CSVWidget::SceneToolbar *parent)
 
virtual unsigned int getVisibilityMask () const
 
virtual void clearSelection (int elementMask)
 
virtual void invertSelection (int elementMask)
 
virtual void selectAll (int elementMask)
 
virtual void selectAllWithSameParentId (int elementMask)
 
virtual std::string getCellId (const osg::Vec3f &point) const
 
virtual CellgetCell (const osg::Vec3d &point) const
 
virtual std::vector
< osg::ref_ptr< TagBase > > 
getSelection (unsigned int elementMask) const
 
virtual std::vector
< osg::ref_ptr< TagBase > > 
getEdited (unsigned int elementMask) const
 
virtual void setSubMode (int subMode, unsigned int elementMask)
 
virtual void reset (unsigned int elementMask)
 Erase all overrides and restore the visual representation to its true state. More...
 
- Public Member Functions inherited from CSVRender::WorldspaceWidget
 WorldspaceWidget (CSMDoc::Document &document, QWidget *parent=0)
 
 ~WorldspaceWidget ()
 
CSVWidget::SceneToolModemakeNavigationSelector (CSVWidget::SceneToolbar *parent)
 
CSVWidget::SceneToolToggle2makeSceneVisibilitySelector (CSVWidget::SceneToolbar *parent)
 
CSVWidget::SceneToolRunmakeRunTool (CSVWidget::SceneToolbar *parent)
 
CSVWidget::SceneToolModemakeEditModeSelector (CSVWidget::SceneToolbar *parent)
 
void selectDefaultNavigationMode ()
 
void centerOrbitCameraOnSelection ()
 
virtual void setInteractionMask (unsigned int mask)
 
unsigned int getInteractionMask () const
 
virtual void setEditLock (bool locked)
 
CSMDoc::DocumentgetDocument ()
 
WorldspaceHitResult mousePick (const QPoint &localPos, unsigned int interactionMask) const
 
- Public Member Functions inherited from CSVRender::SceneWidget
 SceneWidget (std::shared_ptr< Resource::ResourceSystem > resourceSystem, QWidget *parent=0, Qt::WindowFlags f=0, bool retrieveInput=true)
 
virtual ~SceneWidget ()
 
CSVWidget::SceneToolModemakeLightingSelector (CSVWidget::SceneToolbar *parent)
 
void setDefaultAmbient (const osg::Vec4f &colour)
 
- Public Member Functions inherited from CSVRender::RenderWidget
 RenderWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 
virtual ~RenderWidget ()
 
void flagAsModified ()
 Initiates a request to redraw the view. More...
 
void setVisibilityMask (int mask)
 
osg::Camera * getCamera ()
 

Protected Member Functions

virtual void addVisibilitySelectorButtons (CSVWidget::SceneToolToggle2 *tool)
 
virtual void addEditModeSelectorButtons (CSVWidget::SceneToolMode *tool)
 
virtual void handleInteractionPress (const WorldspaceHitResult &hit, InteractionType type)
 
- Protected Member Functions inherited from CSVRender::WorldspaceWidget
virtual void updateOverlay ()
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void settingChanged (const CSMPrefs::Setting *setting)
 
EditModegetEditMode ()
 
bool getSpeedMode ()
 
- Protected Member Functions inherited from CSVRender::SceneWidget
void setLighting (Lighting *lighting)
 
void setAmbient (const osg::Vec4f &ambient)
 
- Protected Member Functions inherited from CSVRender::RenderWidget
void updateCameraParameters (double overrideAspect=-1.0)
 

Private Slots

virtual void cellDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
virtual void cellRemoved (const QModelIndex &parent, int start, int end)
 
virtual void cellAdded (const QModelIndex &index, int start, int end)
 
virtual void landDataChanged (const QModelIndex &topLeft, const QModelIndex &botomRight)
 
virtual void landAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
virtual void landAdded (const QModelIndex &parent, int start, int end)
 
virtual void landTextureDataChanged (const QModelIndex &topLeft, const QModelIndex &botomRight)
 
virtual void landTextureAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
virtual void landTextureAdded (const QModelIndex &parent, int start, int end)
 
void assetTablesChanged ()
 
void loadCameraCell ()
 
void loadEastCell ()
 
void loadNorthCell ()
 
void loadWestCell ()
 
void loadSouthCell ()
 

Private Member Functions

std::pair< int, intgetCoordinatesFromId (const std::string &record) const
 
bool adjustCells ()
 
virtual void referenceableDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
virtual void referenceableAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
virtual void referenceableAdded (const QModelIndex &index, int start, int end)
 
virtual void referenceDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
virtual void referenceAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
virtual void referenceAdded (const QModelIndex &index, int start, int end)
 
virtual void pathgridDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
virtual void pathgridAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
virtual void pathgridAdded (const QModelIndex &parent, int start, int end)
 
virtual std::string getStartupInstruction ()
 
void addCellToScene (const CSMWorld::CellCoordinates &coordinates)
 
void removeCellFromScene (const CSMWorld::CellCoordinates &coordinates)
 
void addCellSelection (int x, int y)
 
void moveCellSelection (int x, int y)
 
void addCellToSceneFromCamera (int offsetX, int offsetY)
 

Private Attributes

CSMDoc::DocumentmDocument
 
CSMWorld::CellSelection mSelection
 
std::map
< CSMWorld::CellCoordinates,
Cell * > 
mCells
 
std::string mWorldspace
 
CSVWidget::SceneToolToggle2mControlElements
 
bool mDisplayCellCoord
 

Additional Inherited Members

- Public Types inherited from CSVRender::WorldspaceWidget
enum  DropType { Type_CellsInterior, Type_CellsExterior, Type_Other, Type_DebugProfile }
 
enum  dropRequirments { canHandle, needPaged, needUnpaged, ignored }
 
enum  InteractionType {
  InteractionType_PrimaryEdit, InteractionType_PrimarySelect, InteractionType_SecondaryEdit, InteractionType_SecondarySelect,
  InteractionType_None
}
 
- Public Slots inherited from CSVRender::WorldspaceWidget
void abortDrag ()
 
- Public Slots inherited from CSVRender::SceneWidget
void update (double dt)
 
- Static Public Member Functions inherited from CSVRender::WorldspaceWidget
static DropType getDropType (const std::vector< CSMWorld::UniversalId > &data)
 
- Protected Types inherited from CSVRender::WorldspaceWidget
enum  ButtonId {
  Button_Reference = 0x1, Button_Pathgrid = 0x2, Button_Water = 0x4, Button_Fog = 0x8,
  Button_Terrain = 0x10
}
 
- Protected Slots inherited from CSVRender::WorldspaceWidget
void elementSelectionChanged ()
 
- Protected Slots inherited from CSVRender::SceneWidget
void selectNavigationMode (const std::string &mode)
 
- Protected Slots inherited from CSVRender::RenderWidget
void toggleRenderStats ()
 
- Protected Attributes inherited from CSVRender::SceneWidget
std::shared_ptr
< Resource::ResourceSystem
mResourceSystem
 
LightingmLighting
 
osg::Vec4f mDefaultAmbient
 
bool mHasDefaultAmbient
 
LightingDay mLightingDay
 
LightingNight mLightingNight
 
LightingBright mLightingBright
 
int mPrevMouseX
 
int mPrevMouseY
 
bool mCamPositionSet
 Tells update that camera isn't set. More...
 
FreeCameraControllermFreeCamControl
 
OrbitCameraControllermOrbitCamControl
 
CameraControllermCurrentCamControl
 
- Protected Attributes inherited from CSVRender::RenderWidget
osg::ref_ptr< osgViewer::View > mView
 
osg::ref_ptr< osg::Group > mRootNode
 
QTimer mTimer
 

Constructor & Destructor Documentation

CSVRender::PagedWorldspaceWidget::PagedWorldspaceWidget ( QWidget parent,
CSMDoc::Document document 
)
Note
Sets the cell area selection to an invalid value to indicate that currently no cells are displayed. The cells to be displayed will be specified later through hint system.

Here is the call graph for this function:

CSVRender::PagedWorldspaceWidget::~PagedWorldspaceWidget ( )
virtual

Member Function Documentation

void CSVRender::PagedWorldspaceWidget::addCellSelection ( int  x,
int  y 
)
private
Note
Does not update the view or any cell marker

Here is the call graph for this function:

void CSVRender::PagedWorldspaceWidget::addCellToScene ( const CSMWorld::CellCoordinates coordinates)
private
Note
Does not update the view or any cell marker

Here is the call graph for this function:

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::addCellToSceneFromCamera ( int  offsetX,
int  offsetY 
)
private
void CSVRender::PagedWorldspaceWidget::addEditModeSelectorButtons ( CSVWidget::SceneToolMode tool)
protectedvirtual
Todo:
replace EditMode with suitable subclasses

Reimplemented from CSVRender::WorldspaceWidget.

Here is the call graph for this function:

void CSVRender::PagedWorldspaceWidget::addVisibilitySelectorButtons ( CSVWidget::SceneToolToggle2 tool)
protectedvirtual

Reimplemented from CSVRender::WorldspaceWidget.

Here is the call graph for this function:

bool CSVRender::PagedWorldspaceWidget::adjustCells ( )
private

Bring mCells into sync with mSelection again.

Returns
Any cells added or removed?

Here is the call graph for this function:

void CSVRender::PagedWorldspaceWidget::assetTablesChanged ( )
privateslot

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::cellAdded ( const QModelIndex &  index,
int  start,
int  end 
)
privatevirtualslot
Todo:
check if no selected cell is affected and do not update, if that is the case

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::cellDataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
privatevirtualslot
Todo:
check if no selected cell is affected and do not update, if that is the case

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::cellRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
privatevirtualslot

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::cellSelectionChanged ( const CSMWorld::CellSelection selection)
signal
void CSVRender::PagedWorldspaceWidget::clearSelection ( int  elementMask)
virtual
Parameters
elementMaskElements to be affected by the clear operation

Implements CSVRender::WorldspaceWidget.

CSVRender::Cell * CSVRender::PagedWorldspaceWidget::getCell ( const osg::Vec3d &  point) const
virtual
Note
Returns the cell if it exists, otherwise a null pointer

Implements CSVRender::WorldspaceWidget.

std::string CSVRender::PagedWorldspaceWidget::getCellId ( const osg::Vec3f &  point) const
virtual

Implements CSVRender::WorldspaceWidget.

Here is the call graph for this function:

const CSMWorld::CellSelection & CSVRender::PagedWorldspaceWidget::getCellSelection ( ) const
std::pair< int, int > CSVRender::PagedWorldspaceWidget::getCoordinatesFromId ( const std::string &  record) const
private
CSVRender::WorldspaceWidget::dropRequirments CSVRender::PagedWorldspaceWidget::getDropRequirements ( DropType  type) const
virtual

Reimplemented from CSVRender::WorldspaceWidget.

Here is the call graph for this function:

std::vector< osg::ref_ptr< CSVRender::TagBase > > CSVRender::PagedWorldspaceWidget::getEdited ( unsigned int  elementMask) const
virtual
std::vector< osg::ref_ptr< CSVRender::TagBase > > CSVRender::PagedWorldspaceWidget::getSelection ( unsigned int  elementMask) const
virtual
std::string CSVRender::PagedWorldspaceWidget::getStartupInstruction ( )
privatevirtual
unsigned int CSVRender::PagedWorldspaceWidget::getVisibilityMask ( ) const
virtual

Reimplemented from CSVRender::WorldspaceWidget.

Here is the call graph for this function:

bool CSVRender::PagedWorldspaceWidget::handleDrop ( const std::vector< CSMWorld::UniversalId > &  data,
DropType  type 
)
virtual
Returns
Drop handled?

Reimplemented from CSVRender::WorldspaceWidget.

Here is the call graph for this function:

void CSVRender::PagedWorldspaceWidget::handleInteractionPress ( const WorldspaceHitResult hit,
InteractionType  type 
)
protectedvirtual

Reimplemented from CSVRender::WorldspaceWidget.

Here is the call graph for this function:

void CSVRender::PagedWorldspaceWidget::invertSelection ( int  elementMask)
virtual
Parameters
elementMaskElements to be affected by the select operation

Implements CSVRender::WorldspaceWidget.

void CSVRender::PagedWorldspaceWidget::landAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
privatevirtualslot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::landAdded ( const QModelIndex &  parent,
int  start,
int  end 
)
privatevirtualslot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::landDataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  botomRight 
)
privatevirtualslot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::landTextureAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
privatevirtualslot

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::landTextureAdded ( const QModelIndex &  parent,
int  start,
int  end 
)
privatevirtualslot

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::landTextureDataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  botomRight 
)
privatevirtualslot

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::loadCameraCell ( )
privateslot

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::loadEastCell ( )
privateslot

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::loadNorthCell ( )
privateslot

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::loadSouthCell ( )
privateslot

Here is the caller graph for this function:

void CSVRender::PagedWorldspaceWidget::loadWestCell ( )
privateslot

Here is the caller graph for this function:

CSVWidget::SceneToolToggle2 * CSVRender::PagedWorldspaceWidget::makeControlVisibilitySelector ( CSVWidget::SceneToolbar parent)
virtual
Attention
The created tool is not added to the toolbar (via addTool). Doing that is the responsibility of the calling function.
void CSVRender::PagedWorldspaceWidget::moveCellSelection ( int  x,
int  y 
)
private
Note
Does not update the view or any cell marker

Here is the call graph for this function:

void CSVRender::PagedWorldspaceWidget::pathgridAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
privatevirtual

Implements CSVRender::WorldspaceWidget.

Here is the call graph for this function:

void CSVRender::PagedWorldspaceWidget::pathgridAdded ( const QModelIndex &  parent,
int  start,
int  end 
)
privatevirtual

Implements CSVRender::WorldspaceWidget.

Here is the call graph for this function:

void CSVRender::PagedWorldspaceWidget::pathgridDataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
privatevirtual

Implements CSVRender::WorldspaceWidget.

Here is the call graph for this function:

void CSVRender::PagedWorldspaceWidget::referenceableAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
privatevirtual
void CSVRender::PagedWorldspaceWidget::referenceableAdded ( const QModelIndex &  index,
int  start,
int  end 
)
privatevirtual

Implements CSVRender::WorldspaceWidget.

Here is the call graph for this function:

void CSVRender::PagedWorldspaceWidget::referenceableDataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
privatevirtual
void CSVRender::PagedWorldspaceWidget::referenceAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
privatevirtual
void CSVRender::PagedWorldspaceWidget::referenceAdded ( const QModelIndex &  index,
int  start,
int  end 
)
privatevirtual
void CSVRender::PagedWorldspaceWidget::referenceDataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
privatevirtual
void CSVRender::PagedWorldspaceWidget::removeCellFromScene ( const CSMWorld::CellCoordinates coordinates)
private
Note
Does not update the view or any cell marker
Calling this function for a cell that is not in the selection is a no-op.
void CSVRender::PagedWorldspaceWidget::reset ( unsigned int  elementMask)
virtual

Erase all overrides and restore the visual representation to its true state.

Implements CSVRender::WorldspaceWidget.

void CSVRender::PagedWorldspaceWidget::selectAll ( int  elementMask)
virtual
Parameters
elementMaskElements to be affected by the select operation

Implements CSVRender::WorldspaceWidget.

void CSVRender::PagedWorldspaceWidget::selectAllWithSameParentId ( int  elementMask)
virtual
Parameters
elementMaskElements to be affected by the select operation

Implements CSVRender::WorldspaceWidget.

void CSVRender::PagedWorldspaceWidget::setCellSelection ( const CSMWorld::CellSelection selection)
void CSVRender::PagedWorldspaceWidget::setSubMode ( int  subMode,
unsigned int  elementMask 
)
virtual
void CSVRender::PagedWorldspaceWidget::useViewHint ( const std::string &  hint)
virtual

Decodes the the hint string to set of cell that are rendered.

Todo:
implement 'r' type hints

Reimplemented from CSVRender::WorldspaceWidget.

Here is the call graph for this function:

Member Data Documentation

std::map<CSMWorld::CellCoordinates, Cell *> CSVRender::PagedWorldspaceWidget::mCells
private
CSVWidget::SceneToolToggle2* CSVRender::PagedWorldspaceWidget::mControlElements
private
bool CSVRender::PagedWorldspaceWidget::mDisplayCellCoord
private
CSMDoc::Document& CSVRender::PagedWorldspaceWidget::mDocument
private
CSMWorld::CellSelection CSVRender::PagedWorldspaceWidget::mSelection
private
std::string CSVRender::PagedWorldspaceWidget::mWorldspace
private

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