VisualizationDragWidget.h
29 lines
| 800 B
| text/x-c
|
CLexer
r849 | #ifndef SCIQLOP_VISUALIZATIONDRAGWIDGET_H | |||
#define SCIQLOP_VISUALIZATIONDRAGWIDGET_H | ||||
r841 | ||||
#include <Common/spimpl.h> | ||||
r847 | #include <QMimeData> | |||
#include <QWidget> | ||||
r841 | ||||
r847 | class VisualizationDragWidget : public QWidget { | |||
r841 | Q_OBJECT | |||
public: | ||||
r847 | VisualizationDragWidget(QWidget *parent = nullptr); | |||
r841 | ||||
r847 | virtual QMimeData *mimeData() const = 0; | |||
r841 | virtual bool isDragAllowed() const = 0; | |||
protected: | ||||
virtual void mousePressEvent(QMouseEvent *event) override; | ||||
virtual void mouseMoveEvent(QMouseEvent *event) override; | ||||
private: | ||||
class VisualizationDragWidgetPrivate; | ||||
spimpl::unique_impl_ptr<VisualizationDragWidgetPrivate> impl; | ||||
signals: | ||||
r847 | void dragDetected(VisualizationDragWidget *dragWidget, const QPoint &dragPosition); | |||
r841 | }; | |||
r849 | #endif // SCIQLOP_VISUALIZATIONDRAGWIDGET_H | |||