##// END OF EJS Templates
Integrates the drag&drop classes into the existing visualization classes.
Integrates the drag&drop classes into the existing visualization classes.

File last commit:

r837:deba06e71141
r839:5f082699d3e8
Show More
DragDropHelper.h
42 lines | 1.0 KiB | text/x-c | CLexer
#ifndef DRAGDROPHELPER_H
#define DRAGDROPHELPER_H
#include <Common/spimpl.h>
#include <QWidget>
class QVBoxLayout;
class QScrollArea;
class VisualizationDragWidget;
class QMimeData;
/**
* @brief Helper class for drag&drop operations.
*/
class DragDropHelper
{
public:
DragDropHelper();
~DragDropHelper();
static const QString MIME_TYPE_GRAPH;
static const QString MIME_TYPE_ZONE;
void setCurrentDragWidget(VisualizationDragWidget* dragWidget);
VisualizationDragWidget* getCurrentDragWidget() const;
QWidget &placeHolder() const;
void insertPlaceHolder(QVBoxLayout* layout, int index);
void removePlaceHolder();
bool isPlaceHolderSet() const;
void addDragDropScrollArea(QScrollArea* scrollArea);
void removeDragDropScrollArea(QScrollArea* scrollArea);
QUrl imageTemporaryUrl(const QImage& image) const;
private:
class DragDropHelperPrivate;
spimpl::unique_impl_ptr<DragDropHelperPrivate> impl;
};
#endif // DRAGDROPHELPER_H