Skip to content
Snippets Groups Projects
Commit cb37cb1d authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

setup layout

parent 87ab67d2
No related branches found
No related tags found
1 merge request!2155Create and store snapshots of parameter tree (#792)
...@@ -13,8 +13,20 @@ ...@@ -13,8 +13,20 @@
// ************************************************************************************************ // ************************************************************************************************
#include "GUI/View/Tuning/ParameterBackupWidget.h" #include "GUI/View/Tuning/ParameterBackupWidget.h"
#include "GUI/View/Tool/ActionFactory.h"
#include <QBoxLayout>
#include <QComboBox>
ParameterBackupWidget::ParameterBackupWidget(QWidget* parent) ParameterBackupWidget::ParameterBackupWidget(QWidget* parent)
: QWidget(parent) : StyledToolbar(parent)
{ {
auto* createAction = new QAction("New snapshot");
addAction(createAction);
auto* combo = new QComboBox;
addWidget(combo);
QAction* removeAction =
ActionFactory::createRemoveAction(this, "selected snapshot", [] { qInfo() << "removed"; });
addAction(removeAction);
} }
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
#ifndef BORNAGAIN_GUI_VIEW_TUNING_PARAMETERBACKUPWIDGET_H #ifndef BORNAGAIN_GUI_VIEW_TUNING_PARAMETERBACKUPWIDGET_H
#define BORNAGAIN_GUI_VIEW_TUNING_PARAMETERBACKUPWIDGET_H #define BORNAGAIN_GUI_VIEW_TUNING_PARAMETERBACKUPWIDGET_H
#include <QWidget> #include "GUI/View/Widget/StyledToolbar.h"
class ParameterBackupWidget : public QWidget { class ParameterBackupWidget : public StyledToolbar {
Q_OBJECT Q_OBJECT
public: public:
explicit ParameterBackupWidget(QWidget* parent = nullptr); explicit ParameterBackupWidget(QWidget* parent = nullptr);
......
...@@ -77,6 +77,7 @@ ParameterTuningWidget::ParameterTuningWidget() ...@@ -77,6 +77,7 @@ ParameterTuningWidget::ParameterTuningWidget()
auto* mainLayout = new QVBoxLayout; auto* mainLayout = new QVBoxLayout;
mainLayout->setContentsMargins(0, 0, 0, 0); mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->setSpacing(0); mainLayout->setSpacing(0);
mainLayout->addWidget(m_backupWidget);
mainLayout->addWidget(toolbar); mainLayout->addWidget(toolbar);
mainLayout->addWidget(m_sliderSettingsWidget); mainLayout->addWidget(m_sliderSettingsWidget);
mainLayout->addWidget(m_treeView); mainLayout->addWidget(m_treeView);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment