##// END OF EJS Templates
Format changes
Format changes

File last commit:

r847:90e991aec5fa
r847:90e991aec5fa
Show More
DragDropHelper.h
65 lines | 1.7 KiB | text/x-c | CLexer
Format changes
r847 #ifndef SCIQLOP_DRAGDROPHELPER_H
#define SCIQLOP_DRAGDROPHELPER_H
New helper class for the drag&drop
r840
#include <Common/spimpl.h>
#include <QWidget>
class QVBoxLayout;
class QScrollArea;
class VisualizationDragWidget;
class QMimeData;
Manage the scroll of the tab QScrollArea during a drag&drop operation
r843 /**
* @brief Event filter class which manage the scroll of QScrollArea during a drag&drop operation.
* @note A QScrollArea inside an other QScrollArea is not fully supported.
*/
Format changes
r847 class DragDropScroller : public QObject {
Manage the scroll of the tab QScrollArea during a drag&drop operation
r843 Q_OBJECT
public:
Format changes
r847 DragDropScroller(QObject *parent = nullptr);
Manage the scroll of the tab QScrollArea during a drag&drop operation
r843
Format changes
r847 void addScrollArea(QScrollArea *scrollArea);
void removeScrollArea(QScrollArea *scrollArea);
Manage the scroll of the tab QScrollArea during a drag&drop operation
r843
protected:
bool eventFilter(QObject *obj, QEvent *event);
private:
class DragDropScrollerPrivate;
spimpl::unique_impl_ptr<DragDropScrollerPrivate> impl;
private slots:
void onTimer();
};
New helper class for the drag&drop
r840 /**
* @brief Helper class for drag&drop operations.
*/
Format changes
r847 class DragDropHelper {
New helper class for the drag&drop
r840 public:
static const QString MIME_TYPE_GRAPH;
static const QString MIME_TYPE_ZONE;
Format changes
r847 DragDropHelper();
virtual ~DragDropHelper();
void setCurrentDragWidget(VisualizationDragWidget *dragWidget);
VisualizationDragWidget *getCurrentDragWidget() const;
New helper class for the drag&drop
r840
QWidget &placeHolder() const;
Format changes
r847 void insertPlaceHolder(QVBoxLayout *layout, int index);
New helper class for the drag&drop
r840 void removePlaceHolder();
bool isPlaceHolderSet() const;
Format changes
r847 void addDragDropScrollArea(QScrollArea *scrollArea);
void removeDragDropScrollArea(QScrollArea *scrollArea);
New helper class for the drag&drop
r840
Format changes
r847 QUrl imageTemporaryUrl(const QImage &image) const;
New helper class for the drag&drop
r840
private:
class DragDropHelperPrivate;
spimpl::unique_impl_ptr<DragDropHelperPrivate> impl;
};
Format changes
r847 #endif // SCIQLOP_DRAGDROPHELPER_H