forked from mirror/openmw-tes3mp
added edit mode button to scene toolbar
parent
b50fcd403b
commit
2acf446f18
@ -0,0 +1,19 @@
|
||||
|
||||
#include "editmode.hpp"
|
||||
|
||||
#include "worldspacewidget.hpp"
|
||||
|
||||
CSVRender::EditMode::EditMode (WorldspaceWidget *worldspaceWidget, const QIcon& icon,
|
||||
unsigned int mask, const QString& tooltip, QWidget *parent)
|
||||
: ModeButton (icon, tooltip, parent), mWorldspaceWidget (worldspaceWidget), mMask (mask)
|
||||
{}
|
||||
|
||||
unsigned int CSVRender::EditMode::getInteractionMask() const
|
||||
{
|
||||
return mMask;
|
||||
}
|
||||
|
||||
void CSVRender::EditMode::activate (CSVWidget::SceneToolbar *toolbar)
|
||||
{
|
||||
mWorldspaceWidget->setInteractionMask (mMask);
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
#ifndef CSV_RENDER_EDITMODE_H
|
||||
#define CSV_RENDER_EDITMODE_H
|
||||
|
||||
#include "../widget/modebutton.hpp"
|
||||
|
||||
namespace CSVRender
|
||||
{
|
||||
class WorldspaceWidget;
|
||||
|
||||
class EditMode : public CSVWidget::ModeButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
WorldspaceWidget *mWorldspaceWidget;
|
||||
unsigned int mMask;
|
||||
|
||||
public:
|
||||
|
||||
EditMode (WorldspaceWidget *worldspaceWidget, const QIcon& icon, unsigned int mask,
|
||||
const QString& tooltip = "", QWidget *parent = 0);
|
||||
|
||||
unsigned int getInteractionMask() const;
|
||||
|
||||
virtual void activate (CSVWidget::SceneToolbar *toolbar);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue