##// END OF EJS Templates
Allow graph panning with the mouse in default mode
Allow graph panning with the mouse in default mode

File last commit:

r1084:dd81862d7e96
r1085:26c176b0b338
Show More
VisualizationSelectionZoneItem.h
39 lines | 1.2 KiB | text/x-c | CLexer
/ gui / include / Visualization / VisualizationSelectionZoneItem.h
Display of selection zones on a graph
r1084 #ifndef SCIQLOP_VISUALIZATIONSELECTIONZONEITEM_H
#define SCIQLOP_VISUALIZATIONSELECTIONZONEITEM_H
#include <Common/spimpl.h>
#include <Data/SqpRange.h>
#include <Visualization/qcustomplot.h>
class VisualizationSelectionZoneItem : public QCPItemRect {
public:
VisualizationSelectionZoneItem(QCustomPlot *plot);
virtual ~VisualizationSelectionZoneItem();
void setName(const QString &name);
QString name() const;
SqpRange range() const;
void setRange(double tstart, double tend);
void setStart(double tstart);
void setEnd(double tend);
void setColor(const QColor &color);
void setEditionEnabled(bool value);
bool isEditionEnabled() const;
Qt::CursorShape curshorShapeForPosition(const QPoint &position) const;
void setHovered(bool value);
protected:
void mousePressEvent(QMouseEvent *event, const QVariant &details) override;
void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) override;
void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) override;
private:
class VisualizationSelectionZoneItemPrivate;
spimpl::unique_impl_ptr<VisualizationSelectionZoneItemPrivate> impl;
};
#endif // SCIQLOP_VISUALIZATIONSELECTIONZONEITEM_H