##// END OF EJS Templates
point to latest core ref...
point to latest core ref Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r1501:db2de8e31bd4
r1508:e59c5bf60a49
Show More
VisualizationGraphWidget.h
187 lines | 7.4 KiB | text/x-c | CLexer
/ gui / include / Visualization / VisualizationGraphWidget.h
Creation of VisualizationWidget, VizualizationTabWidget, VisualizationZoneWidget, VisualizationGraphWidget
r58 #ifndef SCIQLOP_VISUALIZATIONGRAPHWIDGET_H
#define SCIQLOP_VISUALIZATIONGRAPHWIDGET_H
Add the visualization gui classes
r118 #include "Visualization/IVisualizationWidget.h"
Integrates the drag&drop classes into the existing visualization classes.
r839 #include "Visualization/VisualizationDragWidget.h"
Add the visualization gui classes
r118
Alexandre Leroux
Adds logs for null visitors
r219 #include <QLoggingCategory>
[WIP] new generic WS plugin and few other fixes...
r1352 #include <QUuid>
Switched to new TS impl but quite broken!...
r1420 #include <QWidget>
Creation of VisualizationWidget, VizualizationTabWidget, VisualizationZoneWidget, VisualizationGraphWidget
r58
Add the visualization gui classes
r118 #include <memory>
#include <Common/spimpl.h>
Many synchronization fixes, most operations works, only product drag from tree is broken...
r1377 #include <Data/DateTimeRange.h>
Alexandre Leroux
Adds logs for null visitors
r219 Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationGraphWidget)
Alexandre Leroux
QCustomPlot notify the graph widget when the xRange changed
r227 class QCPRange;
Alexandre Leroux
Passes directly GraphWidget in delegate...
r725 class QCustomPlot;
Switched to new TS impl but quite broken!...
r1420 class Variable2;
multi selection of zones
r1049 class VisualizationWidget;
Integrates the drag&drop classes into the existing visualization classes.
r839 class VisualizationZoneWidget;
Action "Remove Selected Zones"
r1079 class VisualizationSelectionZoneItem;
Add the visualization gui classes
r118
Switched to new TS impl but quite broken!...
r1420 namespace Ui
{
Creation of VisualizationWidget, VizualizationTabWidget, VisualizationZoneWidget, VisualizationGraphWidget
r58 class VisualizationGraphWidget;
} // namespace Ui
Alexandre Leroux
Corrects the problem of refreshing synchronized graphs from TimeWidget (1)...
r1271 /// Defines options that can be associated with the graph
Switched to new TS impl but quite broken!...
r1420 enum GraphFlag
{
DisableAll = 0x0, ///< Disables acquisition and synchronization
Alexandre Leroux
Corrects the problem of refreshing synchronized graphs from TimeWidget (1)...
r1271 EnableAcquisition = 0x1, ///< When this flag is set, the change of the graph's range leads to
/// the acquisition of data
EnableSynchronization = 0x2, ///< When this flag is set, the change of the graph's range causes
/// the call to the synchronization of the graphs contained in the
/// same zone of this graph
EnableAll = ~DisableAll ///< Enables acquisition and synchronization
};
Q_DECLARE_FLAGS(GraphFlags, GraphFlag)
Q_DECLARE_OPERATORS_FOR_FLAGS(GraphFlags)
Switched to new TS impl but quite broken!...
r1420 class VisualizationGraphWidget : public VisualizationDragWidget, public IVisualizationWidget
{
Creation of VisualizationWidget, VizualizationTabWidget, VisualizationZoneWidget, VisualizationGraphWidget
r58 Q_OBJECT
Alexandre Leroux
Sets sames margin sides for graphs in a same zone
r730 friend class QCustomPlotSynchronizer;
Alexandre Leroux
Passes directly GraphWidget in delegate...
r725 friend class VisualizationGraphRenderingDelegate;
Creation of VisualizationWidget, VizualizationTabWidget, VisualizationZoneWidget, VisualizationGraphWidget
r58 public:
Switched to new TS impl but quite broken!...
r1420 explicit VisualizationGraphWidget(const QString& name = {}, QWidget* parent = 0);
Creation of VisualizationWidget, VizualizationTabWidget, VisualizationZoneWidget, VisualizationGraphWidget
r58 virtual ~VisualizationGraphWidget();
multi selection of zones
r1049 /// Returns the VisualizationZoneWidget which contains the graph or nullptr
Switched to new TS impl but quite broken!...
r1420 VisualizationZoneWidget* parentZoneWidget() const noexcept;
Integrates the drag&drop classes into the existing visualization classes.
r839
multi selection of zones
r1049 /// Returns the main VisualizationWidget which contains the graph or nullptr
Switched to new TS impl but quite broken!...
r1420 VisualizationWidget* parentVisualizationWidget() const;
multi selection of zones
r1049
Alexandre Leroux
Corrects the problem of refreshing synchronized graphs from TimeWidget (1)...
r1271 /// Sets graph options
void setFlags(GraphFlags flags);
Add synchronization that keep delta
r444
Switched to new TS impl but quite broken!...
r1420 void addVariable(std::shared_ptr<Variable2> variable, DateTimeRange range);
Initialisation of the graph range at creation in a new graphe, or inside...
r548
Alexandre Leroux
Remove variable from graph (2)...
r270 /// Removes a variable from the graph
Switched to new TS impl but quite broken!...
r1420 void removeVariable(std::shared_ptr<Variable2> variable) noexcept;
Add the visualization gui classes
r118
Integrates the drag&drop classes into the existing visualization classes.
r839 /// Returns the list of all variables used in the graph
Switched to new TS impl but quite broken!...
r1420 std::vector<std::shared_ptr<Variable2>> variables() const;
Integrates the drag&drop classes into the existing visualization classes.
r839
Alexandre Leroux
Refactors VisualizationGraphWidget::setYRange()...
r900 /// Sets the y-axis range based on the data of a variable
Switched to new TS impl but quite broken!...
r1420 void setYRange(std::shared_ptr<Variable2> variable);
Renamed SqpRange to DateTimeRange, introduced VariableController2 to...
r1346 DateTimeRange graphRange() const noexcept;
Switched to new TS impl but quite broken!...
r1420 void setGraphRange(const DateTimeRange& range, bool updateVar = false, bool forward = false);
refactoring + fix created graph range
r1292 void setAutoRangeOnVariableInitialization(bool value);
Add connection logical for the rescale operation
r437
Action "Remove Selected Zones"
r1079 // Zones
Keep the selection zones when a graph is dropped in another synchro zone
r1048 /// Returns the ranges of all the selection zones on the graph
Renamed SqpRange to DateTimeRange, introduced VariableController2 to...
r1346 QVector<DateTimeRange> selectionZoneRanges() const;
Keep the selection zones when a graph is dropped in another synchro zone
r1048 /// Adds new selection zones in the graph
Switched to new TS impl but quite broken!...
r1420 void addSelectionZones(const QVector<DateTimeRange>& ranges);
Link between selection zone item and event
r1293 /// Adds a new selection zone in the graph
Switched to new TS impl but quite broken!...
r1420 VisualizationSelectionZoneItem* addSelectionZone(
const QString& name, const DateTimeRange& range);
Action "Remove Selected Zones"
r1079 /// Removes the specified selection zone
Switched to new TS impl but quite broken!...
r1420 void removeSelectionZone(VisualizationSelectionZoneItem* selectionZone);
Keep the selection zones when a graph is dropped in another synchro zone
r1048
Undo zoom box action
r1046 /// Undo the last zoom done with a zoom box
void undoZoom();
Switched to new TS impl but quite broken!...
r1420 void zoom(double factor, int center, Qt::Orientation orientation, bool forward = true);
void move(double factor, Qt::Orientation orientation, bool forward = true);
void move(double dx, double dy, bool forward = true);
void transform(const DateTimeRangeTransformation& tranformation, bool forward = true);
Partly reimplemented Graph event handling + bugfix...
r1362
Added shortcut 'l' to toggle Y axis log scale (broken for spectro)...
r1501 void toggle_y_log_scale();
Add the visualization gui classes
r118 // IVisualizationWidget interface
Switched to new TS impl but quite broken!...
r1420 void accept(IVisualizationWidgetVisitor* visitor) override;
bool canDrop(Variable2& variable) const override;
bool contains(Variable2& variable) const override;
Alexandre Leroux
Adds override keywor
r218 QString name() const override;
Add the visualization gui classes
r118
Integrates the drag&drop classes into the existing visualization classes.
r839 // VisualisationDragWidget
Switched to new TS impl but quite broken!...
r1420 QMimeData* mimeData(const QPoint& position) const override;
QPixmap customDragPixmap(const QPoint& dragPosition) override;
Integrates the drag&drop classes into the existing visualization classes.
r839 bool isDragAllowed() const override;
Improves visual effect of dropping a variable in a graph
r873 void highlightForMerge(bool highlighted) override;
Add synchronization that keep delta
r444
Implements cursor mode
r960 // Cursors
/// Adds or moves the vertical cursor at the specified value on the x-axis
void addVerticalCursor(double time);
/// Adds or moves the vertical cursor at the specified value on the x-axis
void addVerticalCursorAtViewportPosition(double position);
void removeVerticalCursor();
/// Adds or moves the vertical cursor at the specified value on the y-axis
void addHorizontalCursor(double value);
/// Adds or moves the vertical cursor at the specified value on the y-axis
void addHorizontalCursorAtViewportPosition(double position);
void removeHorizontalCursor();
Fix the cosinus bug....
r298 signals:
Switched to new TS impl but quite broken!...
r1420 void synchronize(const DateTimeRange& range, const DateTimeRange& oldRange);
void changeRange(const std::shared_ptr<Variable2>& variable, const DateTimeRange& range);
Fix the cosinus bug....
r298
Alexandre Leroux
Handles desynchronisation when removing variable from a graph (1)...
r737 /// Signal emitted when the variable is about to be removed from the graph
Switched to new TS impl but quite broken!...
r1420 void variableAboutToBeRemoved(std::shared_ptr<Variable2> var);
Alexandre Leroux
Handles desynchronisation when removing variable from a graph (1)...
r737 /// Signal emitted when the variable has been added to the graph
Switched to new TS impl but quite broken!...
r1420 void variableAdded(std::shared_ptr<Variable2> var);
Add synchronization part of v5 acquisition
r540
Added RAW graph sync implementation...
r1373
Switched to new TS impl but quite broken!...
r1420 void zoom_sig(double factor, int center, Qt::Orientation orientation, bool forward = true);
void move_sig(double factor, Qt::Orientation orientation, bool forward = true);
void move_sig(double dx, double dy, bool forward = true);
void transform_sig(const DateTimeRangeTransformation& tranformation, bool forward = true);
void setrange_sig(const DateTimeRange& range, bool updateVar = false, bool forward = true);
Added RAW graph sync implementation...
r1373
Alexandre Leroux
Shows/hides plot overlay when entering/leaving graph
r728 protected:
Switched to new TS impl but quite broken!...
r1420 void closeEvent(QCloseEvent* event) override;
void enterEvent(QEvent* event) override;
void leaveEvent(QEvent* event) override;
void wheelEvent(QWheelEvent* event) override;
void mouseMoveEvent(QMouseEvent* event) override;
void mouseReleaseEvent(QMouseEvent* event) override;
void mousePressEvent(QMouseEvent* event) override;
void mouseDoubleClickEvent(QMouseEvent* event) override;
void keyReleaseEvent(QKeyEvent* event) override;
void keyPressEvent(QKeyEvent* event) override;
QCustomPlot& plot() const noexcept;
Alexandre Leroux
Passes directly GraphWidget in delegate...
r725
Creation of VisualizationWidget, VizualizationTabWidget, VisualizationZoneWidget, VisualizationGraphWidget
r58 private:
Switched to new TS impl but quite broken!...
r1420 Ui::VisualizationGraphWidget* ui;
Add the visualization gui classes
r118
class VisualizationGraphWidgetPrivate;
spimpl::unique_impl_ptr<VisualizationGraphWidgetPrivate> impl;
[VisualizationGraphWidget] Restored box zoom and zones plus refac...
r1364
Alexandre Leroux
Handles key modifiers for zoom...
r179 private slots:
Alexandre Leroux
Remove variable from graph (1)...
r269 /// Slot called when right clicking on the graph (displays a menu)
Switched to new TS impl but quite broken!...
r1420 void onGraphMenuRequested(const QPoint& pos) noexcept;
Alexandre Leroux
QCustomPlot notify the graph widget when the xRange changed
r227
Add synchronization that keep delta
r444 /// Rescale the X axe to range parameter
Switched to new TS impl but quite broken!...
r1420 // void onRangeChanged(const QCPRange &newRange, const QCPRange &oldRange);
Alexandre Leroux
QCustomPlot notify the graph widget when the xRange changed
r227
Alexandre Leroux
Handles double click on color scale...
r1002 /// Slot called when a mouse double click was made
Switched to new TS impl but quite broken!...
r1420 void onMouseDoubleClick(QMouseEvent* event) noexcept;
Alexandre Leroux
Creates method that will display a tooltip and a tracer with data point information after a while
r481 /// Slot called when a mouse move was made
Switched to new TS impl but quite broken!...
r1420 void onMouseMove(QMouseEvent* event) noexcept;
Alexandre Leroux
Handles key modifiers for zoom...
r179 /// Slot called when a mouse wheel was made, to perform some processing before the zoom is done
Switched to new TS impl but quite broken!...
r1420 void onMouseWheel(QWheelEvent* event) noexcept;
Implementation of the calibration for the synchronization...
r445 /// Slot called when a mouse press was made, to activate the calibration of a graph
Switched to new TS impl but quite broken!...
r1420 void onMousePress(QMouseEvent* event) noexcept;
Implementation of the calibration for the synchronization...
r445 /// Slot called when a mouse release was made, to deactivate the calibration of a graph
Switched to new TS impl but quite broken!...
r1420 void onMouseRelease(QMouseEvent* event) noexcept;
The mock plugin can now create data with view operation
r235
void onDataCacheVariableUpdated();
add Skeleton for displaying data which are already in cache
r571
Switched to new TS impl but quite broken!...
r1420 void onUpdateVarDisplaying(std::shared_ptr<Variable2> variable, const DateTimeRange& range);
[WIP] new generic WS plugin and few other fixes...
r1352
void variableUpdated(QUuid id);
Switched to new TS impl but quite broken!...
r1420 void variableDeleted(const std::shared_ptr<Variable2>&);
Creation of VisualizationWidget, VizualizationTabWidget, VisualizationZoneWidget, VisualizationGraphWidget
r58 };
#endif // SCIQLOP_VISUALIZATIONGRAPHWIDGET_H