palapeli/libpala
#include <Pala/SlicerMode>
Public Member Functions | |
SlicerMode (const QByteArray &key, const QString &name) | |
virtual | ~SlicerMode () |
void | filterProperties (QList< const Pala::SlicerProperty * > &properties) const |
QByteArray | key () const |
QString | name () const |
void | setPropertyEnabled (const QByteArray &property, bool enabled) |
Detailed Description
Representation of an operational mode of a slicing algorithm.
- Since
- libpala 1.2 (KDE SC 4.6)
Complex slicer plugins may include several slicing algorithms at once. This class represents such operational modes. Basically, the usage of slicer modes is identical to creating a Pala::StringProperty with a finite set of choices, but slicer modes have some advantages:
- You can choose to enable or disable properties depending on the selected slicer mode.
- You can create an own SlicerMode subclass and aggregate in it algorithms that are relevant to this mode. You are free not to use slicer modes: Just disregard this class and all functions in other classes that deal with slicer modes.
Definition at line 46 of file slicermode.h.
Constructor & Destructor Documentation
Pala::SlicerMode::SlicerMode | ( | const QByteArray & | key, |
const QString & | name | ||
) |
Create a new SlicerMode instance.
- Parameters
-
key an identifier which is unique among the modes of one slicer name a user-visible name that describes this mode
Definition at line 31 of file slicermode.cpp.
|
virtual |
Definition at line 38 of file slicermode.cpp.
Member Function Documentation
void Pala::SlicerMode::filterProperties | ( | QList< const Pala::SlicerProperty * > & | properties | ) | const |
Definition at line 43 of file slicermode.cpp.
QByteArray Pala::SlicerMode::key | ( | ) | const |
Definition at line 57 of file slicermode.cpp.
QString Pala::SlicerMode::name | ( | ) | const |
Definition at line 62 of file slicermode.cpp.
void Pala::SlicerMode::setPropertyEnabled | ( | const QByteArray & | property, |
bool | enabled | ||
) |
Defines whether the property which has been added to Pala::Slicer with the given key, is enabled when this mode is selected. If this mode does not define the state for some property, the state defined by the property itself (through the Palapeli::SlicerProperty::setEnabled() method) is used. You will therefore probably use this function only to define exceptions from this default state.
Definition at line 67 of file slicermode.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.