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

#include <terraintexturemode.hpp>

Inheritance diagram for CSVRender::TerrainTextureMode:
Collaboration diagram for CSVRender::TerrainTextureMode:

Public Slots

void handleDropEvent (QDropEvent *event)
 
void setBrushSize (int brushSize)
 
void setBrushShape (int brushShape)
 
void setBrushTexture (std::string brushShape)
 

Signals

void passBrushTexture (std::string brushTexture)
 

Public Member Functions

 TerrainTextureMode (WorldspaceWidget *, QWidget *parent=nullptr)
 Editmode for terrain texture grid. More...
 
void primaryEditPressed (const WorldspaceHitResult &hit)
 Create single command for one-click texture editing. More...
 
void primarySelectPressed (const WorldspaceHitResult &)
 Open brush settings window. More...
 
void secondarySelectPressed (const WorldspaceHitResult &)
 Default-implementation: Ignored. More...
 
void activate (CSVWidget::SceneToolbar *)
 Default-Implementation: do nothing. More...
 
void deactivate (CSVWidget::SceneToolbar *)
 Default-Implementation: do nothing. More...
 
virtual bool primaryEditStartDrag (const QPoint &pos)
 Start texture editing command macro. More...
 
virtual bool secondaryEditStartDrag (const QPoint &pos)
 
virtual bool primarySelectStartDrag (const QPoint &pos)
 
virtual bool secondarySelectStartDrag (const QPoint &pos)
 
virtual void drag (const QPoint &pos, int diffX, int diffY, double speedFactor)
 Handle texture edit behavior during dragging. More...
 
virtual void dragCompleted (const QPoint &pos)
 End texture editing command macro. More...
 
virtual void dragAborted ()
 
virtual void dragWheel (int diff, double speedFactor)
 Default-implementation: ignored. More...
 
virtual void dragMoveEvent (QDragMoveEvent *event)
 Default-implementation: ignored. More...
 
void editTerrainTextureGrid (const WorldspaceHitResult &hit)
 Handle brush mechanics, maths regarding worldspace hit etc. More...
 
void pushEditToCommand (CSMWorld::LandTexturesColumn::DataType &newLandGrid, CSMDoc::Document &document, CSMWorld::IdTable &landTable, std::string cellId)
 Push texture edits to command macro. More...
 
void createTexture (std::string textureFileName)
 Create new land texture record from texture asset. More...
 
bool allowLandTextureEditing (std::string textureFileName)
 Create new cell and land if needed. 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 void setEditLock (bool locked)
 Default-implementation: Ignored. More...
 
virtual void secondaryEditPressed (const WorldspaceHitResult &hit)
 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 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 Attributes

std::string mCellId
 
std::string mBrushTexture
 
int mBrushSize
 
int mBrushShape
 
CSVWidget::SceneToolTextureBrushmTextureBrushScenetool
 
const int cellSize {ESM::Land::REAL_SIZE}
 
const int landSize {ESM::Land::LAND_SIZE}
 
const int landTextureSize {ESM::Land::LAND_TEXTURE_SIZE}
 

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)
 

Constructor & Destructor Documentation

CSVRender::TerrainTextureMode::TerrainTextureMode ( WorldspaceWidget worldspaceWidget,
QWidget parent = nullptr 
)

Editmode for terrain texture grid.

Member Function Documentation

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

Default-Implementation: do nothing.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

bool CSVRender::TerrainTextureMode::allowLandTextureEditing ( std::string  textureFileName)

Create new cell and land if needed.

Here is the call graph for this function:

void CSVRender::TerrainTextureMode::createTexture ( std::string  textureFileName)

Create new land texture record from texture asset.

Here is the call graph for this function:

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

Default-Implementation: do nothing.

Reimplemented from CSVWidget::ModeButton.

Here is the call graph for this function:

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

Handle texture edit behavior during dragging.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

void CSVRender::TerrainTextureMode::dragAborted ( )
virtual

Default-implementation: ignored

Note
dragAborted will not be called, if the drag is aborted via changing editing mode

Reimplemented from CSVRender::EditMode.

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

End texture editing command macro.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

void CSVRender::TerrainTextureMode::dragMoveEvent ( QDragMoveEvent *  event)
virtual

Default-implementation: ignored.

Reimplemented from CSVRender::EditMode.

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

Default-implementation: ignored.

Reimplemented from CSVRender::EditMode.

void CSVRender::TerrainTextureMode::editTerrainTextureGrid ( const WorldspaceHitResult hit)

Handle brush mechanics, maths regarding worldspace hit etc.

Here is the call graph for this function:

void CSVRender::TerrainTextureMode::handleDropEvent ( QDropEvent *  event)
slot

Here is the call graph for this function:

void CSVRender::TerrainTextureMode::passBrushTexture ( std::string  brushTexture)
signal
void CSVRender::TerrainTextureMode::primaryEditPressed ( const WorldspaceHitResult hit)
virtual

Create single command for one-click texture editing.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

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

Start texture editing command macro.

Reimplemented from CSVRender::EditMode.

Here is the call graph for this function:

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

Open brush settings window.

Reimplemented from CSVRender::EditMode.

bool CSVRender::TerrainTextureMode::primarySelectStartDrag ( const QPoint &  pos)
virtual

Default-implementation: ignore and return false

Returns
Drag accepted?

Reimplemented from CSVRender::EditMode.

void CSVRender::TerrainTextureMode::pushEditToCommand ( CSMWorld::LandTexturesColumn::DataType newLandGrid,
CSMDoc::Document document,
CSMWorld::IdTable landTable,
std::string  cellId 
)

Push texture edits to command macro.

Here is the call graph for this function:

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

Default-implementation: ignore and return false

Returns
Drag accepted?

Reimplemented from CSVRender::EditMode.

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

Default-implementation: Ignored.

Reimplemented from CSVRender::EditMode.

bool CSVRender::TerrainTextureMode::secondarySelectStartDrag ( const QPoint &  pos)
virtual

Default-implementation: ignore and return false

Returns
Drag accepted?

Reimplemented from CSVRender::EditMode.

void CSVRender::TerrainTextureMode::setBrushShape ( int  brushShape)
slot
void CSVRender::TerrainTextureMode::setBrushSize ( int  brushSize)
slot
void CSVRender::TerrainTextureMode::setBrushTexture ( std::string  brushShape)
slot

Member Data Documentation

const int CSVRender::TerrainTextureMode::cellSize {ESM::Land::REAL_SIZE}
private
const int CSVRender::TerrainTextureMode::landSize {ESM::Land::LAND_SIZE}
private
const int CSVRender::TerrainTextureMode::landTextureSize {ESM::Land::LAND_TEXTURE_SIZE}
private
int CSVRender::TerrainTextureMode::mBrushShape
private
int CSVRender::TerrainTextureMode::mBrushSize
private
std::string CSVRender::TerrainTextureMode::mBrushTexture
private
std::string CSVRender::TerrainTextureMode::mCellId
private
CSVWidget::SceneToolTextureBrush* CSVRender::TerrainTextureMode::mTextureBrushScenetool
private

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