diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -119,9 +119,6 @@ MainWindow::MainWindow(QWidget *parent)
connect(&plotControlPanel, &PlotControlPanel::scaleChanged,
plotMan, &PlotManager::setAxis);
- connect(&plotControlPanel, &PlotControlPanel::multiPlotChanged,
- plotMan, &PlotManager::setMulti);
-
QObject::connect(ui->actionClear, SIGNAL(triggered(bool)),
this, SLOT(clearPlot()));
diff --git a/src/plotcontrolpanel.cpp b/src/plotcontrolpanel.cpp
--- a/src/plotcontrolpanel.cpp
+++ b/src/plotcontrolpanel.cpp
@@ -60,9 +60,6 @@ PlotControlPanel::PlotControlPanel(QWidg
connect(ui->spYmin, SIGNAL(valueChanged(double)),
this, SLOT(onYScaleChanged()));
- connect(ui->cbMultiPlot, &QCheckBox::toggled,
- this, &PlotControlPanel::multiPlotChanged);
-
// init scale range preset list
for (int nbits = 8; nbits <= 24; nbits++) // signed binary formats
{
@@ -153,8 +150,3 @@ void PlotControlPanel::setChannelNamesMo
{
ui->lvChannelNames->setModel(model);
}
-
-bool PlotControlPanel::multiPlot()
-{
- return ui->cbMultiPlot->isChecked();
-}
diff --git a/src/plotcontrolpanel.h b/src/plotcontrolpanel.h
--- a/src/plotcontrolpanel.h
+++ b/src/plotcontrolpanel.h
@@ -39,14 +39,12 @@ public:
bool autoScale();
double yMax();
double yMin();
- bool multiPlot(); ///< returns true if multi plot is selected
void setChannelNamesModel(QAbstractItemModel * model);
signals:
void numOfSamplesChanged(int value);
void scaleChanged(bool autoScaled, double yMin = 0, double yMax = 1);
- void multiPlotChanged(bool enabled);
private:
Ui::PlotControlPanel *ui;
diff --git a/src/plotcontrolpanel.ui b/src/plotcontrolpanel.ui
--- a/src/plotcontrolpanel.ui
+++ b/src/plotcontrolpanel.ui
@@ -7,7 +7,7 @@
0
0
590
- 183
+ 187
@@ -147,9 +147,6 @@
- -
-
-
-
@@ -157,15 +154,8 @@
- -
-
-
- Plot all channels separately
-
-
- Multi Plot
-
-
+
-
+
diff --git a/src/plotmanager.cpp b/src/plotmanager.cpp
--- a/src/plotmanager.cpp
+++ b/src/plotmanager.cpp
@@ -31,7 +31,8 @@ PlotManager::PlotManager(QWidget* plotAr
showMinorGridAction("Minor Grid", this),
unzoomAction("Unzoom", this),
darkBackgroundAction("Dark Background", this),
- showLegendAction("Legend", this)
+ showLegendAction("Legend", this),
+ showMultiAction("Multi Plot", this)
{
_autoScaled = true;
_yMin = 0;
@@ -50,6 +51,7 @@ PlotManager::PlotManager(QWidget* plotAr
unzoomAction.setToolTip("Unzoom the Plot");
darkBackgroundAction.setToolTip("Enable Dark Plot Background");
showLegendAction.setToolTip("Display the Legend on Plot");
+ showMultiAction.setToolTip("Display All Channels Separately");
showGridAction.setShortcut(QKeySequence("G"));
showMinorGridAction.setShortcut(QKeySequence("M"));
@@ -58,11 +60,13 @@ PlotManager::PlotManager(QWidget* plotAr
showMinorGridAction.setCheckable(true);
darkBackgroundAction.setCheckable(true);
showLegendAction.setCheckable(true);
+ showMultiAction.setCheckable(true);
showGridAction.setChecked(false);
showMinorGridAction.setChecked(false);
darkBackgroundAction.setChecked(false);
showLegendAction.setChecked(true);
+ showMultiAction.setChecked(false);
showMinorGridAction.setEnabled(false);
@@ -77,6 +81,10 @@ PlotManager::PlotManager(QWidget* plotAr
this, &PlotManager::darkBackground);
connect(&showLegendAction, SELECT::OVERLOAD_OF(&QAction::triggered),
this, &PlotManager::showLegend);
+ connect(&showLegendAction, SELECT::OVERLOAD_OF(&QAction::triggered),
+ this, &PlotManager::showLegend);
+ connect(&showMultiAction, SELECT::OVERLOAD_OF(&QAction::triggered),
+ this, &PlotManager::setMulti);
}
PlotManager::~PlotManager()
@@ -279,6 +287,7 @@ QList PlotManager::menuActions
actions << &unzoomAction;
actions << &darkBackgroundAction;
actions << &showLegendAction;
+ actions << &showMultiAction;
return actions;
}
diff --git a/src/plotmanager.h b/src/plotmanager.h
--- a/src/plotmanager.h
+++ b/src/plotmanager.h
@@ -81,6 +81,7 @@ private:
QAction unzoomAction;
QAction darkBackgroundAction;
QAction showLegendAction;
+ QAction showMultiAction;
void setupLayout(bool multiPlot);
/// Inserts a new plot widget to the current layout.