Skip to content
Browse files

Improve the user interactions over plot: zooming and range dragging.

The rectangle selection is no longer possible. Control+click can be used
for selecting a range of items.

This allows more freedom for performing customisations as requested in
issue "Change axis limits #838".

The "Load all data" button tool-tip and icon have been readjusted so they
hint the additional use pattern of resetting the plot to the original
zoom and range limits.

New and more appropriate icon for the "Save Plot" button. Icon from the
Silk set from
  • Loading branch information
mgrojo committed Dec 2, 2017
1 parent bbe460c commit cef1e9020be975ad675d02f542b77747d778f8d0
Showing with 9 additions and 5 deletions.
  1. +4 −2 src/PlotDock.cpp
  2. +4 −3 src/PlotDock.ui
  3. +1 −0 src/icons/icons.qrc
  4. BIN src/icons/picture_save.png
@@ -197,8 +197,10 @@ void PlotDock::updatePlot(SqliteTableModel* model, BrowseDataTableSettings* sett

graph->setSelectable (QCP::stDataRange);
// Enable: click on items to select them, Ctrl+Click for multi-selection, mouse-wheel for zooming and mouse drag for
// changing the visible range.
ui->plotWidget->setInteractions(QCP::iSelectPlottables | QCP::iMultiSelect | QCP::iRangeZoom | QCP::iRangeDrag);

// prepare the data vectors for qcustomplot
// possible improvement might be a QVector subclass that directly
@@ -246,7 +246,7 @@
<property name="icon">
<iconset resource="icons/icons.qrc">
<property name="checkable">
@@ -265,11 +265,12 @@
<widget class="QToolButton" name="buttonLoadAllData">
<property name="toolTip">
<string>Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism.</string>
<string>Load all data and redraw plot.
Data loading has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism.</string>
<property name="icon">
<iconset resource="icons/icons.qrc">
@@ -61,5 +61,6 @@
<file alias="close">cross.png</file>
<file alias="special_copy">page_white_copy.png</file>
<file alias="text_replace">text_replace.png</file>
<file alias="image_save">picture_save.png</file>
Binary file not shown.

0 comments on commit cef1e90

Please sign in to comment.