Creates and holds the layers of the loaded drawings.
More...
#include <Layers.h>
|
| Layers (QObject *parent=nullptr) |
| Default Qt constructor.
|
|
| ~Layers () override |
| Overridden destructor.
|
|
bool | load (const QString &filepath, const QStringList &layers={}) |
| Generic method to load drawings.
|
|
QStringList | getLayerNames (bool loaded=true) const |
| Gets the layer names from the file or the ones loaded.
|
|
VertexArrayBase * | getVertexArray (QOpenGLShaderProgram *sp, const QString &layer, const QColor &color={0, 0, 0, 0}) |
| Gets the vertex array from the specified layer for the given shader program.
|
|
Creates and holds the layers of the loaded drawings.
◆ Layers()
sf::xgl::Layers::Layers |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Default Qt constructor.
- Parameters
-
◆ ~Layers()
sf::xgl::Layers::~Layers |
( |
| ) |
|
|
override |
◆ getLayerNames()
QStringList sf::xgl::Layers::getLayerNames |
( |
bool |
loaded = true | ) |
const |
Gets the layer names from the file or the ones loaded.
- Parameters
-
loaded | When true, only the actual loaded layer names are returned. |
- Returns
- List of layer names.
◆ getVertexArray()
VertexArrayBase * sf::xgl::Layers::getVertexArray |
( |
QOpenGLShaderProgram * |
sp, |
|
|
const QString & |
layer, |
|
|
const QColor & |
color = {0, 0, 0, 0} |
|
) |
| |
Gets the vertex array from the specified layer for the given shader program.
- Parameters
-
sp | Required shader program. |
layer | Name of the layer. |
color | Optional color to override the color given by the graphic file. |
- Returns
- Derived vertex array class.
◆ load()
bool sf::xgl::Layers::load |
( |
const QString & |
filepath, |
|
|
const QStringList & |
layers = {} |
|
) |
| |
Generic method to load drawings.
- Parameters
-
filepath | Path to the file containing the drawing. |
layers | Layers to load. When empty, all layers are loaded. |
- Returns
- True on success and false otherwise.
The documentation for this class was generated from the following file: