1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-02 12:45:35 +00:00
openmw/apps/opencs/view/render/orbitcameramode.hpp

50 lines
992 B
C++
Raw Normal View History

2016-04-03 20:32:07 +00:00
#ifndef CSV_RENDER_ORBITCAMERAPICKMODE_H
#define CSV_RENDER_ORBITCAMERAPICKMODE_H
#include "../widget/modebutton.hpp"
2022-10-19 17:02:00 +00:00
class QAction;
class QMenu;
class QObject;
class QWidget;
namespace CSVWidget
{
class SceneToolbar;
}
namespace CSMPrefs
{
class Shortcut;
}
2016-04-03 20:32:07 +00:00
namespace CSVRender
{
class WorldspaceWidget;
class OrbitCameraMode : public CSVWidget::ModeButton
{
2022-09-22 18:26:05 +00:00
Q_OBJECT
2016-04-03 20:32:07 +00:00
2022-09-22 18:26:05 +00:00
public:
OrbitCameraMode(WorldspaceWidget* worldspaceWidget, const QIcon& icon, const QString& tooltip = "",
QWidget* parent = nullptr);
~OrbitCameraMode();
2016-04-03 20:32:07 +00:00
2022-09-22 18:26:05 +00:00
void activate(CSVWidget::SceneToolbar* toolbar) override;
void deactivate(CSVWidget::SceneToolbar* toolbar) override;
bool createContextMenu(QMenu* menu) override;
2016-04-03 20:32:07 +00:00
2022-09-22 18:26:05 +00:00
private:
WorldspaceWidget* mWorldspaceWidget;
QAction* mCenterOnSelection;
CSMPrefs::Shortcut* mCenterShortcut;
2016-04-03 20:32:07 +00:00
2022-09-22 18:26:05 +00:00
private slots:
2016-04-03 20:32:07 +00:00
2022-09-22 18:26:05 +00:00
void centerSelection();
2016-04-03 20:32:07 +00:00
};
}
#endif