2 #include <score/plugins/settingsdelegate/SettingsDelegatePresenter.hpp>
3 #include <score/plugins/settingsdelegate/SettingsDelegateView.hpp>
6 #include <QDialogButtonBox>
9 #include <QStackedWidget>
10 #include <QVBoxLayout>
19 template <
typename Model>
27 auto centerWidg =
new QWidget{
this};
29 m_settingsList->setMinimumWidth(150);
30 m_settingsList->setMaximumWidth(150);
31 m_hboxLayout->addWidget(m_settingsList);
32 m_hboxLayout->addWidget(m_stackedWidget);
33 centerWidg->setLayout(m_hboxLayout);
36 m_vertLayout->addWidget(centerWidg);
37 m_vertLayout->addWidget(m_buttons);
38 this->setLayout(m_vertLayout);
42 m_settingsList, &QListWidget::currentRowChanged, m_stackedWidget,
43 &QStackedWidget::setCurrentIndex);
45 connect(m_buttons, &QDialogButtonBox::accepted,
this, &SettingsView::accept);
46 connect(m_buttons, &QDialogButtonBox::rejected,
this, &SettingsView::reject);
50 view->setParent(
this);
51 QListWidgetItem* it =
new QListWidgetItem{
52 view->getPresenter()->settingsIcon(), view->getPresenter()->settingsName(),
54 it->setSizeHint(QSize{0, 30});
55 m_settingsList->addItem(it);
56 m_stackedWidget->addWidget(view->getWidget());
58 m_pluginViews.insert(view);
62 std::set<SettingsDelegateView<Model>*> m_pluginViews;
64 QVBoxLayout* m_vertLayout{
new QVBoxLayout{}};
65 QHBoxLayout* m_hboxLayout{
new QHBoxLayout{}};
66 QListWidget* m_settingsList{
new QListWidget{
this}};
67 QStackedWidget* m_stackedWidget{
new QStackedWidget{
this}};
69 QDialogButtonBox* m_buttons{
70 new QDialogButtonBox{QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
this}};
Definition: SettingsDelegateView.hpp:18
Definition: SettingsView.hpp:21
Base toolkit upon which the software is built.
Definition: Application.cpp:90