Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
type_value_dialog.h
1#pragma once
2
3#include "../base_dialog.h"
4#include "mission_parameter.h"
5#include "typing/type_reference.h"
6
7namespace maki
8{
9
10struct WidgetAlignment;
12class StringWidget;
13class TypeSelector;
14class InputWidget;
15
16class TypeValueDialog : public BaseDialog
17{
18 Q_OBJECT
19
20public:
21 TypeValueDialog(const QString& title, const MissionParameter& parameter, QWidget* parent = nullptr);
22
23 MissionParameter getParameter() const;
24
25public slots:
26 void accept() override;
27
28private:
29 MissionParameter mParameter;
30 maki::WidgetScrollGroup* mValueGroup;
31 maki::StringWidget* mNameEditor;
32 TypeSelector* mTypeEditor;
33 QDialogButtonBox* mButtonBox;
34
35 void buildUi();
36 void buildValueGroup(const koda::types::TypeReference& ref, const Value& value);
37 void updateFocus(maki::InputWidget* editor);
38};
39
40} // namespace maki
BaseDialog(const QString &title, double ratio, double screenFraction, QWidget *parent=nullptr)
Constructs a new BaseDialog instance.
Definition base_dialog.cpp:19
Definition widget_factory.h:203
A widget for displaying and editing string values.
Definition widget_factory.h:295
Definition type_selector.h:13
Definition widget_factory.h:191
Contains UI helper widgets and layout grouping utilities used by MAKI.
Definition generator.h:10
Describes how a widget should be aligned or inserted into a parent layout.
Definition widget_factory.h:46