diff --git a/qcd_utils/pult/cdgraphics.cpp b/qcd_utils/pult/cdgraphics.cpp index c06839f..e205868 100644 --- a/qcd_utils/pult/cdgraphics.cpp +++ b/qcd_utils/pult/cdgraphics.cpp @@ -214,6 +214,7 @@ QByteArray CDGraphics::save() const { X.lock(); cs.add(4, getList(X.enabledList())); X.unlock(); + cs.add(5, buttonConfigVisible->isChecked()); return cs.data(); } @@ -240,6 +241,9 @@ void CDGraphics::load(QByteArray ba) { X.setEnabledList(setList(cs.getData())); X.unlock(); break; + case 5: + buttonConfigVisible->setChecked(cs.getData()); + break; default: break; } } @@ -258,6 +262,13 @@ GDockWidget * CDGraphics::graphicDock(Graphic * o) const { void CDGraphics::addGraphic() { GDockWidget * dw = new GDockWidget(QString("area %1").arg(docks.size()), da); connect(dw, SIGNAL(removeRequest()), this, SLOT(removeGraphic())); + connect(buttonConfigVisible, SIGNAL(toggled(bool)), dw->graphic, SLOT(setConfigVisible(bool))); + connect(buttonLegendVisible, SIGNAL(clicked(bool)), dw->graphic->graphic(), SLOT(setLegendVisible(bool))); + connect(buttonBorderInputsVisible, SIGNAL(clicked(bool)), dw->graphic->graphic(), SLOT(setBorderInputsVisible(bool))); + connect(buttonPause, SIGNAL(clicked(bool)), dw->graphic->graphic(), SLOT(setPaused(bool))); + dw->graphic->setConfigVisible(buttonConfigVisible->isChecked()); + dw->graphic->graphic()->setLegendVisible(buttonLegendVisible->isChecked()); + dw->graphic->graphic()->setBorderInputsVisible(buttonBorderInputsVisible->isChecked()); da->addDockWidget(Qt::RightDockWidgetArea, dw); docks << dw; for (int i = 0; i < docks.size(); ++i) diff --git a/qcd_utils/pult/cdgraphics.ui b/qcd_utils/pult/cdgraphics.ui index e5f7336..9974f72 100644 --- a/qcd_utils/pult/cdgraphics.ui +++ b/qcd_utils/pult/cdgraphics.ui @@ -32,13 +32,19 @@ QFrame::StyledPanel + + 0 + + + 0 + Add new - + :/icons/list-add.png:/icons/list-add.png @@ -49,7 +55,7 @@ Clear all - + :/icons/edit-clear.png:/icons/edit-clear.png @@ -60,11 +66,80 @@ Remove all - + :/icons/edit-delete.png:/icons/edit-delete.png + + + + Remove all + + + + :/icons/layer-visible-off.png + :/icons/layer-visible-on.png:/icons/layer-visible-off.png + + + true + + + true + + + + + + + Remove all + + + + :/icons/legend.png:/icons/legend.png + + + true + + + true + + + + + + + Remove all + + + + :/icons/media-playback-pause.png:/icons/media-playback-pause.png + + + true + + + false + + + + + + + Remove all + + + + :/icons/border-line.png:/icons/border-line.png + + + true + + + false + + + @@ -84,7 +159,10 @@ + + + diff --git a/qcd_utils/qcd_graphic.h b/qcd_utils/qcd_graphic.h index a554a07..d082fea 100644 --- a/qcd_utils/qcd_graphic.h +++ b/qcd_utils/qcd_graphic.h @@ -24,9 +24,11 @@ public: CDGraphicWidget(QWidget * p = 0); Graphic * graphic() const; - void setConfigVisible(bool on); bool isConfigVisible() const; +public slots: + void setConfigVisible(bool on); + private: Ui::CDGraphicWidget * ui; diff --git a/qcd_utils/qcd_graphic.ui b/qcd_utils/qcd_graphic.ui index 705199c..511ed61 100644 --- a/qcd_utils/qcd_graphic.ui +++ b/qcd_utils/qcd_graphic.ui @@ -14,6 +14,21 @@ CD Pult + + 0 + + + 0 + + + 0 + + + 0 + + + 0 +