finish touch ui
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include <qsize.h>
|
||||
#include <qsizepolicy.h>
|
||||
#include <random>
|
||||
|
||||
#include "component.hh"
|
||||
@@ -38,7 +39,7 @@ static auto ComConfigComponent(ThemeManager& manager, auto&& callback) {
|
||||
slogen_context->set_silent("BanG Bream! It's MyGo!!!");
|
||||
|
||||
auto select_com_context = std::make_shared<MutableValue<QStringList>>();
|
||||
select_com_context->set_silent(QStringList {});
|
||||
select_com_context->set_silent(QStringList {"COM1", "COM2", "COM3", "COM4", "COM5"});
|
||||
|
||||
auto select_baud_context = std::make_shared<MutableValue<QStringList>>();
|
||||
select_baud_context->set_silent(QStringList {"9600", "115200"});
|
||||
@@ -57,6 +58,10 @@ static auto ComConfigComponent(ThemeManager& manager, auto&& callback) {
|
||||
slpro::LeadingIcon {material::icon::kArrowDropDown, material::regular::font},
|
||||
slpro::IndexChanged {[&](auto& self){ qDebug() << self.currentIndex();}},
|
||||
slpro::LeadingText {"COM"},
|
||||
MutableForward {
|
||||
slpro::SelectItems {},
|
||||
select_com_context,
|
||||
}
|
||||
},
|
||||
lnpro::Item<MatSelect> {
|
||||
slpro::ThemeManager {manager },
|
||||
@@ -145,6 +150,9 @@ static auto ComConfigComponent(ThemeManager& manager, auto&& callback) {
|
||||
static auto DisplayComponent(ThemeManager& manager, int index = 0) noexcept {
|
||||
const auto row = new Row{
|
||||
lnpro::Item<HeatMapPlot> {
|
||||
plot_widget::pro::SizePolicy {
|
||||
QSizePolicy::Expanding,
|
||||
},
|
||||
pwpro::MatrixSize {
|
||||
QSize{3, 4}
|
||||
},
|
||||
@@ -190,8 +198,13 @@ auto ViewComponent(ViewComponentState& state) noexcept -> raw_pointer<QWidget> {
|
||||
}),
|
||||
},
|
||||
|
||||
lnpro::Item {
|
||||
DisplayComponent(state.manager),
|
||||
lnpro::Item<Row> {
|
||||
lnpro::Item {
|
||||
DisplayComponent(state.manager),
|
||||
},
|
||||
lnpro::Item {
|
||||
DisplayComponent(state.manager),
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user