##// END OF EJS Templates
Updates access to y-axis properties of the data series (2)...
Updates access to y-axis properties of the data series (2) Uses iterators instead of y-axis at() method to get access to the data Adds access in data series iterator

File last commit:

r936:672c298824bc
r989:958f5923ee65
Show More
VisualizationDragDropContainer.h
57 lines | 1.8 KiB | text/x-c | CLexer
/ gui / include / Visualization / VisualizationDragDropContainer.h
#ifndef SCIQLOP_VISUALIZATIONDRAGDROPCONTAINER_H
#define SCIQLOP_VISUALIZATIONDRAGDROPCONTAINER_H
#include <Common/spimpl.h>
#include <QFrame>
#include <QLoggingCategory>
#include <QMimeData>
#include <QVBoxLayout>
#include <functional>
#include <DragAndDrop/DragDropHelper.h>
Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationDragDropContainer)
class VisualizationDragWidget;
class VisualizationDragDropContainer : public QFrame {
Q_OBJECT
signals:
void dropOccuredInContainer(int dropIndex, const QMimeData *mimeData);
void dropOccuredOnWidget(VisualizationDragWidget *dragWidget, const QMimeData *mimeData);
public:
enum class DropBehavior { Inserted, Merged, InsertedAndMerged, Forbidden };
using AcceptMimeDataFunction = std::function<bool(const QMimeData *mimeData)>;
VisualizationDragDropContainer(QWidget *parent = nullptr);
void addDragWidget(VisualizationDragWidget *dragWidget);
void insertDragWidget(int index, VisualizationDragWidget *dragWidget);
void setMimeType(const QString &mimeType, DropBehavior behavior);
int countDragWidget() const;
void setAcceptMimeDataFunction(AcceptMimeDataFunction fun);
void setPlaceHolderType(DragDropHelper::PlaceHolderType type,
const QString &placeHolderText = QString());
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 // SCIQLOP_VISUALIZATIONDRAGDROPCONTAINER_H