Maki
Formally verfied low-code orchestration
Toggle main menu visibility
Loading...
Searching...
No Matches
library_container.h
1
#pragma once
2
3
#include <QGraphicsView>
4
5
#include "config.h"
6
#include "result.h"
7
11
class
LibraryContainer
:
public
QGraphicsView
12
{
13
Q_OBJECT
14
public
:
20
LibraryContainer
(QWidget* parent =
nullptr
);
21
29
static
LibraryContainer
*
create
(
const
QString& name, QWidget* parent);
30
38
VoidResult
addNode
(
const
QString&
id
, std::shared_ptr<NodeConfig> config);
39
46
bool
filterNodes
(
const
QString& query);
47
51
void
setColumnCount
(
int
count);
52
53
protected
:
59
void
resizeEvent
(QResizeEvent* event)
override
;
60
61
private
:
62
int
mLastItemY;
63
int
mColumnCount
= 2;
64
68
void
updateSceneSize
();
69
73
void
relayoutItems
();
74
};
LibraryContainer::filterNodes
bool filterNodes(const QString &query)
Filters nodes based on the given query string.
Definition
library_container.cpp:86
LibraryContainer::mColumnCount
int mColumnCount
The last Y position of an item in the scene.
Definition
library_container.h:63
LibraryContainer::resizeEvent
void resizeEvent(QResizeEvent *event) override
Handles resize events for the LibraryContainer.
Definition
library_container.cpp:80
LibraryContainer::setColumnCount
void setColumnCount(int count)
Update the number of columns in the library.
Definition
library_container.cpp:74
LibraryContainer::addNode
VoidResult addNode(const QString &id, std::shared_ptr< NodeConfig > config)
Adds a node with the given ID and configuration to the library.
Definition
library_container.cpp:63
LibraryContainer::relayoutItems
void relayoutItems()
Update layout after a column change.
Definition
library_container.cpp:98
LibraryContainer::LibraryContainer
LibraryContainer(QWidget *parent=nullptr)
Constructs a new LibraryContainer with the given parent widget.
Definition
library_container.cpp:15
LibraryContainer::create
static LibraryContainer * create(const QString &name, QWidget *parent)
Creates and returns a new LibraryContainer instance with the specified name and parent widget.
Definition
library_container.cpp:24
LibraryContainer::updateSceneSize
void updateSceneSize()
Updates the size of the scene based on the current view size.
Definition
library_container.cpp:48
Generated for
MAKI
· © 2026 with
Doxygen
1.9.8
GitHub
Research