A custom QGraphicsScene for a library application.
More...
#include <library_scene.h>
|
| | LibraryScene (QObject *parent=nullptr) |
| | Constructs a new LibraryScene object.
|
| QRectF | visibleItemsBounds () const |
| | Returns the bounding rectangle of all visible items in the scene.
|
| bool | filterNodes (const QString &query) |
| | Filters nodes based on a query string.
|
|
void | relayoutVisibleItems () |
| | Relayouts the visible items in the scene.
|
|
void | themeChanged () |
| | Handles theme change events.
|
|
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
| | Handles mouse press events in the scene.
|
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
| | Handles mouse move events in the scene.
|
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
| | Handles mouse release events in the scene.
|
| void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) override |
| | Handles context menu events in the scene.
|
|
|
bool | mPressed = false |
| | Scene position where mouse was pressed.
|
|
bool | mDragging = false |
| | Flag indicating if mouse is currently pressed.
|
|
DraggableItem * | mClickedItem |
| | Flag indicating if dragging is in progress.
|
A custom QGraphicsScene for a library application.
◆ LibraryScene()
| LibraryScene::LibraryScene |
( |
QObject * | parent = nullptr | ) |
|
Constructs a new LibraryScene object.
- Parameters
-
| parent | The parent QObject, if any. |
◆ clearSelectedNodes()
| void LibraryScene::clearSelectedNodes |
( |
| ) |
|
|
private |
Pointer to the item that was clicked.
Clears all selected nodes from the scene.
◆ contextMenuEvent()
| void LibraryScene::contextMenuEvent |
( |
QGraphicsSceneContextMenuEvent * | event | ) |
|
|
overrideprotected |
Handles context menu events in the scene.
- Parameters
-
| event | The QGraphicsSceneContextMenuEvent object. |
◆ filterNodes()
| bool LibraryScene::filterNodes |
( |
const QString & | query | ) |
|
Filters nodes based on a query string.
- Parameters
-
| query | The query string to filter nodes by. |
- Returns
- bool True if any nodes were filtered, false otherwise.
◆ libraryNodeSelected
| void LibraryScene::libraryNodeSelected |
( |
const QString & | nodeType | ) |
|
|
signal |
Emitted when a library node is selected.
- Parameters
-
| nodeType | The type of the selected node. |
◆ mouseMoveEvent()
| void LibraryScene::mouseMoveEvent |
( |
QGraphicsSceneMouseEvent * | event | ) |
|
|
overrideprotected |
Handles mouse move events in the scene.
- Parameters
-
| event | The QGraphicsSceneMouseEvent object. |
◆ mousePressEvent()
| void LibraryScene::mousePressEvent |
( |
QGraphicsSceneMouseEvent * | event | ) |
|
|
overrideprotected |
Handles mouse press events in the scene.
- Parameters
-
| event | The QGraphicsSceneMouseEvent object. |
◆ mouseReleaseEvent()
| void LibraryScene::mouseReleaseEvent |
( |
QGraphicsSceneMouseEvent * | event | ) |
|
|
overrideprotected |
Handles mouse release events in the scene.
- Parameters
-
| event | The QGraphicsSceneMouseEvent object. |
◆ visibleItemsBounds()
| QRectF LibraryScene::visibleItemsBounds |
( |
| ) |
const |
Returns the bounding rectangle of all visible items in the scene.
- Returns
- QRectF The bounding rectangle.
The documentation for this class was generated from the following files:
- /__w/maki/maki/app/system/library_scene.h
- /__w/maki/maki/app/system/library_scene.cpp