diff --git a/components/charts/heatmap.hh b/components/charts/heatmap.hh index 574aae9..ff08f10 100644 --- a/components/charts/heatmap.hh +++ b/components/charts/heatmap.hh @@ -55,8 +55,7 @@ private: QSize get_matrix_size(); private: friend class Impl; - // QSize matrix_size = {3, 4}; - QSize matrix_size; + QSize matrix_size = {3, 4}; }; } // namespace plot_widget::internal diff --git a/components/view.cc b/components/view.cc index 26b404d..41e1028 100644 --- a/components/view.cc +++ b/components/view.cc @@ -3,6 +3,7 @@ // #include +#include #include #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>(); - select_com_context->set_silent(QStringList {}); + select_com_context->set_silent(QStringList {"COM1", "COM2", "COM3", "COM4", "COM5"}); auto select_baud_context = std::make_shared>(); 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 { 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 { + plot_widget::pro::SizePolicy { + QSizePolicy::Expanding, + }, pwpro::MatrixSize { QSize{3, 4} }, @@ -190,8 +198,13 @@ auto ViewComponent(ViewComponentState& state) noexcept -> raw_pointer { }), }, - lnpro::Item { - DisplayComponent(state.manager), + lnpro::Item { + lnpro::Item { + DisplayComponent(state.manager), + }, + lnpro::Item { + DisplayComponent(state.manager), + }, }, }, }; diff --git a/main.cc b/main.cc index 48e8aab..39b00c4 100644 --- a/main.cc +++ b/main.cc @@ -1,4 +1,5 @@ #include "component.hh" +#include "modern-qt/utility/material-icon.hh" #include #include #include @@ -32,7 +33,7 @@ auto main(int argc, char *argv[]) -> int { }, .buttons_context = { - {"0", material::icon::kHome}, + {"0", material::icon::kTouchSensor}, {"1", material::icon::kStar}, {"2", material::icon::kFavorite}, {"3", material::icon::kExtension}, diff --git a/modern-qt/utility/material-icon.hh b/modern-qt/utility/material-icon.hh index d41e8a4..d50eee2 100644 --- a/modern-qt/utility/material-icon.hh +++ b/modern-qt/utility/material-icon.hh @@ -161,6 +161,9 @@ namespace material { // link constexpr auto kAddLink = "add_link"; constexpr auto kLinkOff = "link_off"; + + // sensor icon + constexpr auto kTouchSensor = "touch_app"; } } }