A custom QGraphicsView for managing a library of nodes.
More...
#include <library_container.h>
|
| | LibraryContainer (QWidget *parent=nullptr) |
| | Constructs a new LibraryContainer with the given parent widget.
|
| VoidResult | addNode (const QString &id, std::shared_ptr< NodeConfig > config) |
| | Adds a node with the given ID and configuration to the library.
|
| bool | filterNodes (const QString &query) |
| | Filters nodes based on the given query string.
|
|
void | setColumnCount (int count) |
| | Update the number of columns in the library.
|
|
|
void | updateSceneSize () |
| | Updates the size of the scene based on the current view size.
|
|
void | relayoutItems () |
| | Update layout after a column change.
|
|
|
int | mColumnCount = 2 |
| | The last Y position of an item in the scene.
|
A custom QGraphicsView for managing a library of nodes.
◆ LibraryContainer()
| LibraryContainer::LibraryContainer |
( |
QWidget * | parent = nullptr | ) |
|
◆ addNode()
| VoidResult LibraryContainer::addNode |
( |
const QString & | id, |
|
|
std::shared_ptr< NodeConfig > | config ) |
Adds a node with the given ID and configuration to the library.
- Parameters
-
| id | The unique identifier for the node. |
| config | The configuration for the node. |
- Returns
- A VoidResult indicating success or failure.
◆ create()
| LibraryContainer * LibraryContainer::create |
( |
const QString & | name, |
|
|
QWidget * | parent ) |
|
static |
Creates and returns a new LibraryContainer instance with the specified name and parent widget.
- Parameters
-
| name | The name of the library container. |
| parent | The parent widget. |
- Returns
- A pointer to the newly created LibraryContainer instance.
◆ filterNodes()
| bool LibraryContainer::filterNodes |
( |
const QString & | query | ) |
|
Filters nodes based on the given query string.
- Parameters
-
| query | The query string used to filter nodes. |
- Returns
- true if any nodes were filtered; false otherwise.
◆ resizeEvent()
| void LibraryContainer::resizeEvent |
( |
QResizeEvent * | event | ) |
|
|
overrideprotected |
The documentation for this class was generated from the following files: