Skui 0.0.1
Build fast and easy to use control software with Skui.
 
Loading...
Searching...
No Matches
Document Class Reference

The Document class represents a document in the application. More...

#include <document.hpp>

Inheritance diagram for Document:

Public Member Functions

 Document (QObject *parent=nullptr)
 
 ~Document ()
 
Panelpanel () const
 Returns the panel of the document.
 
NodeEditornodeEditor () const
 Returns the node editor of the document.
 
QList< QString > availableNodes () const
 Returns the list of available node types.
 
void createNode (const QString &name, const QPoint position_hint=QPoint(0, 0))
 Creates a node of the specified type.
 
void deleteNode (Node *node)
 

Static Public Member Functions

static DocumentactiveDocument ()
 Returns the active document.
 

Detailed Description

The Document class represents a document in the application.

It manages the node editor and panel for the document. The Document class also provides methods to create visual nodes and access the available node types. There is always one active document in the application, which can be accessed via the static method activeDocument().

Constructor & Destructor Documentation

◆ Document()

Document::Document ( QObject * parent = nullptr)

◆ ~Document()

Document::~Document ( )

Member Function Documentation

◆ activeDocument()

static Document * Document::activeDocument ( )
inlinestatic

Returns the active document.

This method returns a pointer to the active document. The active document is the document that is currently being edited.

Returns
A pointer to the active document.

◆ availableNodes()

QList< QString > Document::availableNodes ( ) const

Returns the list of available node types.

This method returns a list of strings representing the types of nodes that can be created.

Returns
A list of available node types.
See also
Document::createVisual(const QString &name)

◆ createNode()

void Document::createNode ( const QString & name,
const QPoint position_hint = QPoint(0, 0) )

Creates a node of the specified type.

This method creates a node of the specified type by the name and adds it to the node editor.

Parameters
nameThe type of the node to create.
See also
Document::availableNodes()

◆ deleteNode()

void Document::deleteNode ( Node * node)

◆ nodeEditor()

NodeEditor * Document::nodeEditor ( ) const
inline

Returns the node editor of the document.

This method returns a pointer to the node editor of the document.

Returns
A pointer to the node editor of the document.
See also
NodeEditor

◆ panel()

Panel * Document::panel ( ) const
inline

Returns the panel of the document.

This method returns a pointer to the panel of the document.

Returns
A pointer to the panel of the document.
See also
Panel::Panel(QWidget *)

The documentation for this class was generated from the following files: