Maki
Formally verfied low-code orchestration
Toggle main menu visibility
Loading...
Searching...
No Matches
suggestion_menu.h
1
#pragma once
2
3
#include <QString>
4
#include <QWidget>
5
#include <vector>
6
7
#include "../frame.h"
8
#include "control_widget.h"
9
10
class
QEnterEvent;
11
class
QEvent;
12
class
QMouseEvent;
13
class
QPropertyAnimation;
14
class
QTimer;
15
class
QVBoxLayout;
16
class
NodeItem
;
17
class
CanvasView
;
18
class
QCheckBox;
19
class
QLabel;
20
21
namespace
maki
22
{
23
class
WidgetGroup
;
24
}
25
26
class
SuggestionRow :
public
QWidget
27
{
28
Q_OBJECT
29
30
public
:
31
SuggestionRow(
const
QString& svgPath,
const
QString& labelText, QWidget* parent =
nullptr
);
32
33
const
QString& text()
const
;
34
35
bool
isSelected()
const
;
36
void
setSelected(
bool
selected);
37
38
protected
:
39
void
enterEvent(QEnterEvent* event)
override
;
40
void
leaveEvent(QEvent* event)
override
;
41
void
mousePressEvent(QMouseEvent* event)
override
;
42
void
paintEvent(QPaintEvent* event)
override
;
43
44
private
:
45
void
setHovered(
bool
hovered);
46
47
private
:
48
QString mText;
49
50
QCheckBox* mCheckBox =
nullptr
;
51
QLabel* mLabel =
nullptr
;
52
53
bool
mHovered =
false
;
54
};
55
56
class
SuggestionMenu :
public
maki::ControlWidget
57
{
58
Q_OBJECT
59
60
public
:
61
static
SuggestionMenu* create(QWidget* parent =
nullptr
);
62
SuggestionMenu(QWidget* parent =
nullptr
);
63
64
void
setSuggestions(
const
QStringList& consumers,
const
QStringList& producers);
65
66
signals:
67
void
accepted(
const
QStringList& suggestions);
68
69
private
:
70
maki::WidgetGroup
* mConsumersGroup =
nullptr
;
71
maki::WidgetGroup
* mProducersGroup =
nullptr
;
72
73
std::vector<SuggestionRow*> mConsumerRows;
74
std::vector<SuggestionRow*> mProducerRows;
75
76
void
clearSuggestions();
77
QStringList selectedSuggestions()
const
;
78
};
CanvasView
Custom QGraphicsView for a canvas application.
Definition
canvas_view.h:15
NodeItem
Represents a graphical node item in a flowchart.
Definition
node.h:26
maki::WidgetGroup
A labelled container widget that groups widgets in a generic layout.
Definition
widget_factory.h:146
maki
Contains UI helper widgets and layout grouping utilities used by MAKI.
Definition
generator.h:10
Generated for
MAKI
· © 2026 with
Doxygen
1.9.8
GitHub
Research