Page Contents

Topics

Classes

QLStatePool Class

#include <QLayers/qlstatepool.h>

Inherits: QObject

Public Functions

QLStatePool(const QString& name, QWidget* parent = nullptr)
QLStatePool(const QString& name, QStringList states, QWidget* parent = nullptr)
void add_state(const QString& state)
void set_state(const QString& state)
QString state() const

Signals

void changed()

Detailed Description

A QLStatePool is a QObject that manages a set of states.

States are just strings. States can be added to the pool using add_state() and the current pool state can be changed using set_state().

Member Function Documentation

QLStatePool(const QString& name, QWidget* parent = nullptr)

Constructs a state pool with a given name.

QLStatePool(const QString& name, QStringList states, QWidget* parent = nullptr)

Constructs a state pool with a given name and set of states.

void add_state(const QString& state)

Adds state to the pool.

void changed()

Signal

This signal is emitted when the active state changes.

void set_state(const QString& state)

Sets state as the active pool state.

The provided state must exist within the pool or the state will not be changed.

QString state() const

Returns the active pool state.