Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Sep 17, 2024
1 parent 31f67aa commit 3dd223e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 28 deletions.
24 changes: 12 additions & 12 deletions src/bedsidemon/spo2/spo2_parameter_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,18 +259,18 @@ spo2_parameter_window::spo2_parameter_window(utki::shared_ref<ruis::context> con
}
))
{
{
auto& cp = this->get_widget_as<ruis::click_proxy>("click_proxy"sv);
cp.click_handler = [this](ruis::click_proxy& cp){
if(this->pw_menu){
// menu is already open
return;
}
auto pwm = utki::make_shared<spo2_parameter_window_menu>(this->context);
this->pw_menu = pwm;
application::inst().open_menu(pwm);
};
}
{
auto& cp = this->get_widget_as<ruis::click_proxy>("click_proxy"sv);
cp.click_handler = [this](ruis::click_proxy& cp) {
if (this->pw_menu) {
// menu is already open
return;
}
auto pwm = utki::make_shared<spo2_parameter_window_menu>(this->context);
this->pw_menu = pwm;
application::inst().open_menu(pwm);
};
}

auto& ss = settings_storage::inst();
decltype(settings_storage::settings_changed_signal
Expand Down
2 changes: 1 addition & 1 deletion src/bedsidemon/spo2/spo2_parameter_window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../settings.hpp"
#include "../waveform.hpp"

#include "spo2_parameter_window_menu.hpp"
#include "spo2_measurement.hpp"
#include "spo2_parameter_window_menu.hpp"

namespace bedsidemon {

Expand Down
23 changes: 12 additions & 11 deletions src/bedsidemon/spo2/spo2_parameter_window_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ using namespace std::string_literals;

using namespace bedsidemon;

namespace{
std::vector<utki::shared_ref<ruis::widget>> make_menu_contents(utki::shared_ref<ruis::context> c){
// clang-format off
namespace {
std::vector<utki::shared_ref<ruis::widget>> make_menu_contents(utki::shared_ref<ruis::context> c)
{
// clang-format off
return {
// TODO:
};
// clang-format on
}
// clang-format on
}
} // namespace

spo2_parameter_window_menu::spo2_parameter_window_menu(utki::shared_ref<ruis::context> context) :
// clang-format off
// clang-format off
ruis::widget(
std::move(context),
{
Expand All @@ -45,9 +46,9 @@ spo2_parameter_window_menu::spo2_parameter_window_menu(utki::shared_ref<ruis::co
{}
),
menu(
this->context, //
U"SpO2"s,
make_menu_contents(this->context)
)
// clang-format on
this->context, //
U"SpO2"s,
make_menu_contents(this->context)
)
// clang-format on
{}
9 changes: 5 additions & 4 deletions src/bedsidemon/spo2/spo2_parameter_window_menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#include "../menu.hpp"

namespace bedsidemon{
namespace bedsidemon {

class spo2_parameter_window_menu : public menu{
class spo2_parameter_window_menu : public menu
{
public:
spo2_parameter_window_menu(utki::shared_ref<ruis::context> context);
spo2_parameter_window_menu(utki::shared_ref<ruis::context> context);
};

}
} // namespace bedsidemon

0 comments on commit 3dd223e

Please sign in to comment.