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;
|
|
|
|
}
|
|
|
|
|
2016-07-17 23:36:33 +00:00
|
|
|
namespace CSMPrefs
|
|
|
|
{
|
|
|
|
class Shortcut;
|
|
|
|
}
|
|
|
|
|
2016-04-03 20:32:07 +00:00
|
|
|
namespace CSVRender
|
|
|
|
{
|
|
|
|
class WorldspaceWidget;
|
|
|
|
|
|
|
|
class OrbitCameraMode : public CSVWidget::ModeButton
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2016-07-24 01:23:02 +00:00
|
|
|
OrbitCameraMode(WorldspaceWidget* worldspaceWidget, const QIcon& icon, const QString& tooltip = "",
|
2020-06-22 06:05:25 +00:00
|
|
|
QWidget* parent = nullptr);
|
2023-05-29 11:37:19 +00:00
|
|
|
~OrbitCameraMode() override = default;
|
2016-04-03 20:32:07 +00:00
|
|
|
|
2016-07-24 01:23:02 +00:00
|
|
|
void activate(CSVWidget::SceneToolbar* toolbar) override;
|
2020-06-22 06:05:25 +00:00
|
|
|
void deactivate(CSVWidget::SceneToolbar* toolbar) override;
|
2016-07-17 23:36:33 +00:00
|
|
|
bool createContextMenu(QMenu* menu) override;
|
2016-04-03 20:32:07 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
private:
|
|
|
|
WorldspaceWidget* mWorldspaceWidget;
|
|
|
|
QAction* mCenterOnSelection;
|
|
|
|
CSMPrefs::Shortcut* mCenterShortcut;
|
2016-04-03 20:32:07 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void centerSelection();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|