Controller for adding and removing components.
More...
#include <componentscontroller.h>
|
| void | componentAdded (const Tome::Component &component) |
| | A new component has been added to the project. More...
|
| |
| void | componentRemoved (const Tome::Component &component) |
| | A component has been removed from the project. More...
|
| |
|
|
| ComponentsController () |
| | Constructs a new controller for adding and removing components.
|
| |
| const Component | addComponent (const QString &componentName, const QString &componentSetName) |
| | Adds a new component to the specified component set. More...
|
| |
| void | addComponentSet (const ComponentSet &componentSet) |
| | Adds a new component set to the project. More...
|
| |
| const ComponentList | getComponents () const |
| | Gets a list of all components in the project. More...
|
| |
| const ComponentSetList & | getComponentSets () const |
| | Gets a list of all component sets in the project. More...
|
| |
| const QStringList | getComponentSetNames () const |
| | Gets a list of the names of all component sets in the project. More...
|
| |
| const QString | getSetNameOfComponent (const Component component) const |
| | Gets the name of the component set containing the specified component. More...
|
| |
| int | indexOf (const Component &component) const |
| | Gets the index of the specified component within its set. More...
|
| |
| bool | removeComponent (const Component component) |
| | Removes the specified component from the project. More...
|
| |
| bool | removeComponentSet (const QString &name) |
| | Removes the component set with the specified name from the project, including all components. More...
|
| |
| void | setComponents (ComponentSetList &model) |
| | Uses the specified list of component sets as model for this controller. More...
|
| |
Controller for adding and removing components.
◆ addComponent()
| const Component ComponentsController::addComponent |
( |
const QString & |
componentName, |
|
|
const QString & |
componentSetName |
|
) |
| |
Adds a new component to the specified component set.
- Exceptions
-
| std::out_of_range | if the component set could not be found. |
- Parameters
-
| componentName | Name of the component to add. |
| componentSetName | Name of the component set to add the component to. |
- Returns
◆ addComponentSet()
| void ComponentsController::addComponentSet |
( |
const ComponentSet & |
componentSet | ) |
|
Adds a new component set to the project.
- Parameters
-
| componentSet | Name of the component set to add. |
◆ componentAdded
| void Tome::ComponentsController::componentAdded |
( |
const Tome::Component & |
component | ) |
|
|
signal |
A new component has been added to the project.
- Parameters
-
| component | Component that has been added to the project. |
◆ componentRemoved
| void Tome::ComponentsController::componentRemoved |
( |
const Tome::Component & |
component | ) |
|
|
signal |
A component has been removed from the project.
- Parameters
-
| component | Component that has been removed from the project. |
◆ getComponents()
| const ComponentList ComponentsController::getComponents |
( |
| ) |
const |
Gets a list of all components in the project.
- Returns
- List of all components in the project.
◆ getComponentSetNames()
| const QStringList ComponentsController::getComponentSetNames |
( |
| ) |
const |
Gets a list of the names of all component sets in the project.
- Returns
- List of the names of all component sets in the project.
◆ getComponentSets()
| const ComponentSetList & ComponentsController::getComponentSets |
( |
| ) |
const |
Gets a list of all component sets in the project.
- Returns
- List of all component sets in the project.
◆ getSetNameOfComponent()
| const QString ComponentsController::getSetNameOfComponent |
( |
const Component |
component | ) |
const |
Gets the name of the component set containing the specified component.
- Exceptions
-
| std::out_of_range | if the component could not be found. |
- Parameters
-
| component | Component to get the name of the containing set of. |
- Returns
- Name of the set containing the specified component.
◆ indexOf()
| int ComponentsController::indexOf |
( |
const Component & |
component | ) |
const |
Gets the index of the specified component within its set.
Returns -1 if the component could not be found.
- Parameters
-
| component | Component to get the index of. |
- Returns
- Index of the specified component within its set, or -1 if that component could not be found.
◆ removeComponent()
| bool ComponentsController::removeComponent |
( |
const Component |
component | ) |
|
Removes the specified component from the project.
- Parameters
-
| component | Component to remove. |
- Returns
- true, if the component was removed, and false if the component could not be found.
◆ removeComponentSet()
| bool ComponentsController::removeComponentSet |
( |
const QString & |
name | ) |
|
Removes the component set with the specified name from the project, including all components.
- Parameters
-
| name | Name of the component set to remove. |
- Returns
- true, if the component set was removed, and false if the component set could not be found.
◆ setComponents()
| void ComponentsController::setComponents |
( |
ComponentSetList & |
model | ) |
|
Uses the specified list of component sets as model for this controller.
- Parameters
-
| model | New list of component sets to use as model for this controller. |
The documentation for this class was generated from the following files:
- Source/Tome/Features/Components/Controller/componentscontroller.h
- Source/Tome/Features/Components/Controller/componentscontroller.cpp