palapeli/libpala
#include <Pala/SlicerProperty>
Public Member Functions | |
virtual | ~SlicerProperty () |
QString | caption () const |
QVariantList | choices () const |
QVariant | defaultValue () const |
bool | isAdvanced () const |
bool | isEnabled () const |
QByteArray | key () const |
void | setAdvanced (bool advanced=true) |
void | setChoices (const QVariantList &choices) |
void | setDefaultValue (const QVariant &value) |
void | setEnabled (bool enabled) |
void | setKey (const QByteArray &key) |
QVariant::Type | type () const |
Protected Member Functions | |
SlicerProperty (QVariant::Type type, const QString &caption) | |
Detailed Description
Representation of a single configurable parameter of a slicing algorithm.
Slicer properties describe configurable parameters of slicing algorithms (i.e. Pala::Slicer instances) in a presentation-agnostic way. They do not store any user-generated values, they just describe the possible input forms.
- Note
- This is an abstract base class. Use the subclasses provided by this library. Defining own subclasses outside libpala is senseless, because Palapeli needs to know about them to use them correctly and to their full extent.
- See also
- Pala::Slicer::addProperty, Pala::AbstractSlicerPropertySet
Definition at line 44 of file slicerproperty.h.
Constructor & Destructor Documentation
|
explicitprotected |
Definition at line 53 of file slicerproperty.cpp.
|
virtual |
Deletes this slicer property.
Definition at line 60 of file slicerproperty.cpp.
Member Function Documentation
QString Pala::SlicerProperty::caption | ( | ) | const |
Definition at line 65 of file slicerproperty.cpp.
QVariantList Pala::SlicerProperty::choices | ( | ) | const |
Definition at line 70 of file slicerproperty.cpp.
QVariant Pala::SlicerProperty::defaultValue | ( | ) | const |
Definition at line 75 of file slicerproperty.cpp.
bool Pala::SlicerProperty::isAdvanced | ( | ) | const |
- Since
- libpala 1.2 (KDE SC 4.6)
Definition at line 80 of file slicerproperty.cpp.
bool Pala::SlicerProperty::isEnabled | ( | ) | const |
- Since
- libpala 1.2 (KDE SC 4.6)
Definition at line 85 of file slicerproperty.cpp.
QByteArray Pala::SlicerProperty::key | ( | ) | const |
- Since
- libpala 1.2 (KDE SC 4.6)
Definition at line 90 of file slicerproperty.cpp.
void Pala::SlicerProperty::setAdvanced | ( | bool | advanced = true | ) |
Sets whether this property is advanced (false by default).
If it is set, Palapeli is allowed to hide the property widget from the puzzle creation interface unless an "Advanced" button is pressed (or similar).
- Since
- libpala 1.2 (KDE SC 4.6)
Definition at line 100 of file slicerproperty.cpp.
void Pala::SlicerProperty::setChoices | ( | const QVariantList & | choices | ) |
Limits the user input to the selection of one of the given values.
The first value in the given list will be the default.
- Warning
- This setting will override any other constraints to the user input, including the default value defined by setDefaultValue().
Definition at line 105 of file slicerproperty.cpp.
void Pala::SlicerProperty::setDefaultValue | ( | const QVariant & | value | ) |
Sets the default value of this property.
Definition at line 113 of file slicerproperty.cpp.
void Pala::SlicerProperty::setEnabled | ( | bool | enabled | ) |
Sets whether this property is enabled (true by default).
If you do not use multiple slicer modes (see Pala::Slicer::addSlicerMode), setting this to false is senseless. On the other hand, if you do use multiple slicer modes and have certain properties which are only useful in single modes, you probably want to set this to false, and enable the property in the relevant slicer modes using the Pala::SlicerMode::setPropertyEnabled method.
- Since
- libpala 1.2 (KDE SC 4.6)
Definition at line 119 of file slicerproperty.cpp.
void Pala::SlicerProperty::setKey | ( | const QByteArray & | key | ) |
- Since
- libpala 1.2 (KDE SC 4.6)
Definition at line 124 of file slicerproperty.cpp.
QVariant::Type Pala::SlicerProperty::type | ( | ) | const |
Definition at line 95 of file slicerproperty.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.