diff --git a/src/plot.cpp b/src/plot.cpp --- a/src/plot.cpp +++ b/src/plot.cpp @@ -29,12 +29,7 @@ Plot::Plot(QWidget* parent) : QwtPlot(parent), zoomer(this->canvas(), false), - sZoomer(this, &zoomer), - showGridAction("Grid", this), - showMinorGridAction("Minor Grid", this), - unzoomAction("Unzoom", this), - darkBackgroundAction("Dark Background", this), - showLegendAction("Legend", this) + sZoomer(this, &zoomer) { isAutoScaled = true; @@ -47,39 +42,6 @@ Plot::Plot(QWidget* parent) : showGrid(false); darkBackground(false); - showGridAction.setToolTip("Show Grid"); - showMinorGridAction.setToolTip("Show Minor Grid"); - unzoomAction.setToolTip("Unzoom the Plot"); - darkBackgroundAction.setToolTip("Enable Dark Plot Background"); - showLegendAction.setToolTip("Display the Legend on Plot"); - - showGridAction.setShortcut(QKeySequence("G")); - showMinorGridAction.setShortcut(QKeySequence("M")); - - showGridAction.setCheckable(true); - showMinorGridAction.setCheckable(true); - darkBackgroundAction.setCheckable(true); - showLegendAction.setCheckable(true); - - showGridAction.setChecked(false); - showMinorGridAction.setChecked(false); - darkBackgroundAction.setChecked(false); - showLegendAction.setChecked(true); - - showMinorGridAction.setEnabled(false); - - connect(&showGridAction, SELECT::OVERLOAD_OF(&QAction::triggered), - this, &Plot::showGrid); - connect(&showGridAction, SELECT::OVERLOAD_OF(&QAction::triggered), - &showMinorGridAction, &QAction::setEnabled); - connect(&showMinorGridAction, SELECT::OVERLOAD_OF(&QAction::triggered), - this, &Plot::showMinorGrid); - connect(&unzoomAction, &QAction::triggered, this, &Plot::unzoom); - connect(&darkBackgroundAction, SELECT::OVERLOAD_OF(&QAction::triggered), - this, &Plot::darkBackground); - connect(&showLegendAction, SELECT::OVERLOAD_OF(&QAction::triggered), - [this](bool enabled){legend.setVisible(enabled); replot();}); - snapshotOverlay = NULL; } @@ -102,17 +64,6 @@ void Plot::setAxis(bool autoScaled, doub resetAxes(); } -QList Plot::menuActions() -{ - QList actions; - actions << &showGridAction; - actions << &showMinorGridAction; - actions << &unzoomAction; - actions << &darkBackgroundAction; - actions << &showLegendAction; - return actions; -} - void Plot::resetAxes() { if (isAutoScaled) @@ -213,7 +164,9 @@ void Plot::flashSnapshotOverlay() if (snapshotOverlay != NULL) delete snapshotOverlay; QColor color; - if (darkBackgroundAction.isChecked()) + // TODO: fix snapshot overlay + // if (darkBackgroundAction.isChecked()) + if(1) { color = QColor(Qt::white); }