##// END OF EJS Templates
New visualization classes for the drag&drop
New visualization classes for the drag&drop

File last commit:

r841:7a8534096878
r841:7a8534096878
Show More
VisualizationDragDropContainer.h
45 lines | 1.2 KiB | text/x-c | CLexer
/ gui / include / Visualization / VisualizationDragDropContainer.h
New visualization classes for the drag&drop
r841 #ifndef VISUALIZATIONDRAGDROPCONTAINER_H
#define VISUALIZATIONDRAGDROPCONTAINER_H
#include <QWidget>
#include <QVBoxLayout>
#include <QMimeData>
#include <Common/spimpl.h>
class VisualizationDragWidget;
class VisualizationDragDropContainer : public QWidget
{
Q_OBJECT
signals:
void dropOccured(int dropIndex, const QMimeData* mimeData);
public:
VisualizationDragDropContainer(QWidget* parent = nullptr);
void addDragWidget(VisualizationDragWidget* dragWidget);
void insertDragWidget(int index, VisualizationDragWidget* dragWidget);
void setAcceptedMimeTypes(const QStringList& mimeTypes);
void setMergeAllowedMimeTypes(const QStringList& mimeTypes);
int countDragWidget() const;
protected:
void dragEnterEvent(QDragEnterEvent *event);
void dragLeaveEvent(QDragLeaveEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dropEvent(QDropEvent *event);
private:
class VisualizationDragDropContainerPrivate;
spimpl::unique_impl_ptr<VisualizationDragDropContainerPrivate> impl;
private slots:
void startDrag(VisualizationDragWidget* dragWidget, const QPoint& dragPosition);
};
#endif // VISUALIZATIONDRAGDROPCONTAINER_H