Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
type_reference_dialog.h
1#pragma once
2
3#include "../base_dialog.h"
4#include "typing/type_reference.h"
5
6class QComboBox;
7class QDialogButtonBox;
8class QLabel;
9class QPushButton;
10class QStackedWidget;
11
12namespace maki
13{
14
15class SelectorWidget;
16class ButtonWidget;
17class TypeSelector;
18
19class TypeReferenceDialog : public BaseDialog
20{
21 Q_OBJECT
22
23public:
24 TypeReferenceDialog(const QString& title, QWidget* parent = nullptr);
25
26 void setTypeRef(const koda::types::TypeReference& ref);
27 koda::types::TypeReference typeRef() const;
28
29private slots:
30 void kindChanged(const QString& value);
31
32private:
33 QStackedWidget* mStack = nullptr;
34 maki::SelectorWidget* mKindCombo = nullptr;
35
36 void buildUi();
37 int kindToIndex(koda::types::TypeReferenceKind type) const;
38
39 static koda::types::TypeReference defaultNamedType();
40};
41
42} // namespace maki
BaseDialog(const QString &title, double ratio, double screenFraction, QWidget *parent=nullptr)
Constructs a new BaseDialog instance.
Definition base_dialog.cpp:19
A widget wrapping a push button with optional description and icon support.
Definition widget_factory.h:501
A widget for selecting one value from a list of options.
Definition widget_factory.h:451
Definition type_selector.h:13
Contains UI helper widgets and layout grouping utilities used by MAKI.
Definition generator.h:10