2014-11-11 15:58:22 +01:00
|
|
|
#include "editmode.hpp"
|
|
|
|
|
2022-10-19 19:02:00 +02:00
|
|
|
#include <apps/opencs/view/widget/modebutton.hpp>
|
|
|
|
|
2014-11-11 15:58:22 +01:00
|
|
|
#include "worldspacewidget.hpp"
|
2022-10-19 19:02:00 +02:00
|
|
|
|
|
|
|
class QMouseEvent;
|
|
|
|
class QWidget;
|
|
|
|
|
|
|
|
namespace CSVWidget
|
|
|
|
{
|
|
|
|
class SceneToolbar;
|
|
|
|
}
|
2014-11-11 15:58:22 +01:00
|
|
|
|
2015-09-29 13:53:47 +02:00
|
|
|
CSVRender::WorldspaceWidget& CSVRender::EditMode::getWorldspaceWidget()
|
|
|
|
{
|
|
|
|
return *mWorldspaceWidget;
|
|
|
|
}
|
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
CSVRender::EditMode::EditMode(
|
|
|
|
WorldspaceWidget* worldspaceWidget, const QIcon& icon, unsigned int mask, const QString& tooltip, QWidget* parent)
|
|
|
|
: ModeButton(icon, tooltip, parent)
|
|
|
|
, mWorldspaceWidget(worldspaceWidget)
|
|
|
|
, mMask(mask)
|
|
|
|
{
|
|
|
|
}
|
2014-11-11 15:58:22 +01:00
|
|
|
|
|
|
|
unsigned int CSVRender::EditMode::getInteractionMask() const
|
|
|
|
{
|
|
|
|
return mMask;
|
|
|
|
}
|
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::activate(CSVWidget::SceneToolbar* toolbar)
|
2014-11-11 15:58:22 +01:00
|
|
|
{
|
2022-09-22 21:26:05 +03:00
|
|
|
mWorldspaceWidget->setInteractionMask(mMask);
|
|
|
|
mWorldspaceWidget->clearSelection(~mMask);
|
2015-03-11 10:54:45 -04:00
|
|
|
}
|
2015-09-24 15:51:16 +02:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::setEditLock(bool locked) {}
|
2015-09-27 16:18:22 +02:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::primaryOpenPressed(const WorldspaceHitResult& hit) {}
|
2019-07-01 23:26:05 +00:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::primaryEditPressed(const WorldspaceHitResult& hit) {}
|
2015-09-27 16:18:22 +02:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::secondaryEditPressed(const WorldspaceHitResult& hit) {}
|
2015-09-27 16:18:22 +02:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::primarySelectPressed(const WorldspaceHitResult& hit) {}
|
2015-10-29 11:20:06 +01:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::secondarySelectPressed(const WorldspaceHitResult& hit) {}
|
2015-10-01 12:46:01 +02:00
|
|
|
|
2022-11-04 15:04:42 -07:00
|
|
|
void CSVRender::EditMode::tertiarySelectPressed(const WorldspaceHitResult& hit) {}
|
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
bool CSVRender::EditMode::primaryEditStartDrag(const QPoint& pos)
|
2015-10-01 12:46:01 +02:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
bool CSVRender::EditMode::secondaryEditStartDrag(const QPoint& pos)
|
2015-10-01 12:46:01 +02:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
bool CSVRender::EditMode::primarySelectStartDrag(const QPoint& pos)
|
2015-10-29 11:20:06 +01:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
bool CSVRender::EditMode::secondarySelectStartDrag(const QPoint& pos)
|
2015-10-01 12:46:01 +02:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::drag(const QPoint& pos, int diffX, int diffY, double speedFactor) {}
|
2015-10-01 12:46:01 +02:00
|
|
|
|
2016-05-17 21:24:16 -04:00
|
|
|
void CSVRender::EditMode::dragCompleted(const QPoint& pos) {}
|
2015-10-01 12:46:01 +02:00
|
|
|
|
|
|
|
void CSVRender::EditMode::dragAborted() {}
|
2015-10-01 13:19:48 +02:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::dragWheel(int diff, double speedFactor) {}
|
2015-12-18 14:04:53 +01:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::dragEnterEvent(QDragEnterEvent* event) {}
|
2015-12-18 14:04:53 +01:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::dropEvent(QDropEvent* event) {}
|
2015-12-18 14:04:53 +01:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::dragMoveEvent(QDragMoveEvent* event) {}
|
2016-03-01 15:48:34 +01:00
|
|
|
|
2022-09-22 21:26:05 +03:00
|
|
|
void CSVRender::EditMode::mouseMoveEvent(QMouseEvent* event) {}
|
2020-02-07 19:04:28 +02:00
|
|
|
|
2016-03-01 15:48:34 +01:00
|
|
|
int CSVRender::EditMode::getSubMode() const
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|