##// END OF EJS Templates
MR for linux compilation
MR for linux compilation

File last commit:

r844:90e991aec5fa
r845:89fbdd3d4a7b
Show More
DragDropHelper.h
65 lines | 1.7 KiB | text/x-c | CLexer
Format changes
r844 #ifndef SCIQLOP_DRAGDROPHELPER_H
#define SCIQLOP_DRAGDROPHELPER_H
New helper class for the drag&drop
r837
#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
r840 /**
* @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
r844 class DragDropScroller : public QObject {
Manage the scroll of the tab QScrollArea during a drag&drop operation
r840 Q_OBJECT
public:
Format changes
r844 DragDropScroller(QObject *parent = nullptr);
Manage the scroll of the tab QScrollArea during a drag&drop operation
r840
Format changes
r844 void addScrollArea(QScrollArea *scrollArea);
void removeScrollArea(QScrollArea *scrollArea);
Manage the scroll of the tab QScrollArea during a drag&drop operation
r840
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
r837 /**
* @brief Helper class for drag&drop operations.
*/
Format changes
r844 class DragDropHelper {
New helper class for the drag&drop
r837 public:
static const QString MIME_TYPE_GRAPH;
static const QString MIME_TYPE_ZONE;
Format changes
r844 DragDropHelper();
virtual ~DragDropHelper();
void setCurrentDragWidget(VisualizationDragWidget *dragWidget);
VisualizationDragWidget *getCurrentDragWidget() const;
New helper class for the drag&drop
r837
QWidget &placeHolder() const;
Format changes
r844 void insertPlaceHolder(QVBoxLayout *layout, int index);
New helper class for the drag&drop
r837 void removePlaceHolder();
bool isPlaceHolderSet() const;
Format changes
r844 void addDragDropScrollArea(QScrollArea *scrollArea);
void removeDragDropScrollArea(QScrollArea *scrollArea);
New helper class for the drag&drop
r837
Format changes
r844 QUrl imageTemporaryUrl(const QImage &image) const;
New helper class for the drag&drop
r837
private:
class DragDropHelperPrivate;
spimpl::unique_impl_ptr<DragDropHelperPrivate> impl;
};
Format changes
r844 #endif // SCIQLOP_DRAGDROPHELPER_H