forked from teamnwah/openmw-tes3coop
Merge branch 'mode'
Conflicts: apps/opencs/view/render/pagedworldspacewidget.cpp apps/opencs/view/render/worldspacewidget.cpp apps/opencs/view/render/worldspacewidget.hpploadfix
commit
a60e4c036f
@ -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
|
@ -0,0 +1,10 @@
|
||||
|
||||
#include "modebutton.hpp"
|
||||
|
||||
CSVWidget::ModeButton::ModeButton (const QIcon& icon, const QString& tooltip, QWidget *parent)
|
||||
: PushButton (icon, Type_Mode, tooltip, parent)
|
||||
{}
|
||||
|
||||
void CSVWidget::ModeButton::activate (SceneToolbar *toolbar) {}
|
||||
|
||||
void CSVWidget::ModeButton::deactivate (SceneToolbar *toolbar) {}
|
@ -0,0 +1,28 @@
|
||||
#ifndef CSV_WIDGET_MODEBUTTON_H
|
||||
#define CSV_WIDGET_MODEBUTTON_H
|
||||
|
||||
#include "pushbutton.hpp"
|
||||
|
||||
namespace CSVWidget
|
||||
{
|
||||
class SceneToolbar;
|
||||
|
||||
/// \brief Specialist PushButton of Type_Mode for use in SceneToolMode
|
||||
class ModeButton : public PushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
ModeButton (const QIcon& icon, const QString& tooltip = "",
|
||||
QWidget *parent = 0);
|
||||
|
||||
/// Default-Implementation: do nothing
|
||||
virtual void activate (SceneToolbar *toolbar);
|
||||
|
||||
/// Default-Implementation: do nothing
|
||||
virtual void deactivate (SceneToolbar *toolbar);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue