GridConfig
#include <GridConfig.h>
Public Member Functions | |
GridConfig (KisGridConfig *guidesConfig) | |
GridConfig (QObject *parent=0) | |
bool | operator!= (const GridConfig &other) const |
bool | operator== (const GridConfig &other) const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QBindable< QString > | bindableObjectName () |
bool | blockSignals (bool block) |
const QObjectList & | children () const const |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectInfo () const const |
void | dumpObjectTree () const const |
QList< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isQuickItemType () const const |
bool | isWidgetType () const const |
bool | isWindowType () const const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
QVariant | property (const char *name) const const |
Q_CLASSINFO (Name, Value) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_GADGET_EXPORT (EXPORT_MACRO) | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_MOC_INCLUDE Q_MOC_INCLUDE | |
Q_NAMESPACE Q_NAMESPACE | |
Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
Q_OBJECT Q_OBJECT | |
Q_PROPERTY (...) | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
Q_SIGNAL Q_SIGNAL | |
Q_SIGNALS Q_SIGNALS | |
Q_SLOT Q_SLOT | |
Q_SLOTS Q_SLOTS | |
T | qobject_cast (const QObject *object) |
T | qobject_cast (QObject *object) |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setObjectName (QAnyStringView name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | setProperty (const char *name, QVariant &&value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType) |
QThread * | thread () const const |
Additional Inherited Members | |
Public Types inherited from QObject | |
typedef | QObjectList |
Properties inherited from QObject | |
objectName | |
Static Public Member Functions inherited from QObject | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
The GridConfig class encapsulates a Krita Guides configuration.
Definition at line 19 of file GridConfig.h.
Constructor & Destructor Documentation
◆ GridConfig() [1/2]
GridConfig::GridConfig | ( | KisGridConfig * | guidesConfig | ) |
Definition at line 19 of file GridConfig.cpp.
◆ GridConfig() [2/2]
|
explicit |
Create a new, empty GridConfig.
Definition at line 26 of file GridConfig.cpp.
◆ ~GridConfig()
|
override |
Definition at line 33 of file GridConfig.cpp.
Member Function Documentation
◆ angleAspectLocked
|
slot |
Returns status of "Aspect locked" property for angles values (mean, left and right angles values are linked to keep ratio) AngleAspectLocked value is used for grid type "isometric" and "isometric_legacy".
- Returns
- If locked, return True.
Definition at line 234 of file GridConfig.cpp.
◆ angleLeft
|
slot |
Returns left angle (in degrees) of isometric grid for document.
AngleLeft value is used for grid type "isometric".
- Returns
- A positive decimal value, in range [0.00 - 89.00]
Definition at line 129 of file GridConfig.cpp.
◆ angleLeftActive
|
slot |
Returns if left angle grid is active.
Spacing value is used for grid type "isometric".
- Returns
- a boolean which indicate if left angle grid is active or not
Definition at line 149 of file GridConfig.cpp.
◆ angleRight
|
slot |
Returns right angle (in degrees) of isometric grid for document.
AngleRight value is used for grid type "isometric".
- Returns
- A positive decimal value, in range [0.00 - 89.00]
Definition at line 139 of file GridConfig.cpp.
◆ angleRightActive
|
slot |
Returns if right angle grid is active.
Spacing value is used for grid type "isometric".
- Returns
- a boolean which indicate if right angle grid is active or not
Definition at line 159 of file GridConfig.cpp.
◆ cellSize
|
slot |
Returns grid cell border size (in pixels) for document.
Cell spacing value is used for grid type "isometric".
- Returns
- A positive integer value, in range [10 - 1000]
Definition at line 179 of file GridConfig.cpp.
◆ cellSpacing
|
slot |
Returns grid cell spacing (in pixels) for document.
Cell spacing value is used for grid type "isometric_legacy".
- Returns
- A positive integer value, minimum value is 10
Definition at line 169 of file GridConfig.cpp.
◆ colorMain
|
slot |
Returns grid main line color.
- Returns
- The color for grid main line
Definition at line 326 of file GridConfig.cpp.
◆ colorSubdivision
|
slot |
Returns grid subdivision line color ColorSubdivision value is used for grid type "rectangular".
- Returns
- The color for grid subdivision line
Definition at line 336 of file GridConfig.cpp.
◆ colorVertical
|
slot |
Returns grid vertical line color ColorSubdivision value is used for grid type "isometric".
- Returns
- The color for grid vertical line
Definition at line 346 of file GridConfig.cpp.
◆ fromXml
|
slot |
Load grid definition from an XML document.
- Parameters
-
xmlContent xml content provided as a string
- Returns
- True if xml content is valid and grid has been loaded, otherwise False
Definition at line 356 of file GridConfig.cpp.
◆ lineTypeMain
|
slot |
Returns grid main line type.
- Returns
- The main line type for grid in current document Can be:
- "solid"
- "dashed"
- "dotted"
Definition at line 244 of file GridConfig.cpp.
◆ lineTypeSubdivision
|
slot |
Returns grid subdivision line type.
- Returns
- The subdivision line type for grid in current document Can be:
- "solid"
- "dashed"
- "dotted"
LineTypeSubdivision value is used for grid type "rectangular".
Definition at line 269 of file GridConfig.cpp.
◆ lineTypeVertical
|
slot |
Returns grid vertical line type.
- Returns
- The vertical line type for grid in current document Can be:
- "solid"
- "dashed"
- "dotted"
- "none"
LineTypeVertical value is used for grid type "isometric".
Definition at line 294 of file GridConfig.cpp.
◆ offset
|
slot |
Returns grid offset (in pixels, from origin) for document.
- Returns
- A QPoint that define X and Y offset.
Definition at line 69 of file GridConfig.cpp.
◆ offsetAspectLocked
|
slot |
Returns status of "Aspect locked" property for offset values (X and Y values are linked to keep ratio)
- Returns
- If locked, return True.
Definition at line 214 of file GridConfig.cpp.
◆ operator!=()
bool GridConfig::operator!= | ( | const GridConfig & | other | ) | const |
Definition at line 43 of file GridConfig.cpp.
◆ operator==()
bool GridConfig::operator== | ( | const GridConfig & | other | ) | const |
Definition at line 38 of file GridConfig.cpp.
◆ setAngleAspectLocked
|
slot |
Set status of "Aspect locked" property for angles values (left and right angles values are linked to keep ratio) AngleAspectLocked value is used for grid type "isometric" and "isometric_legacy".
- Parameters
-
angleAspectLocked Set to True lock aspect.
Definition at line 239 of file GridConfig.cpp.
◆ setAngleLeft
|
slot |
Set left angle (in degrees) of isometric grid for document.
AngleLeft value is used for grid type "isometric".
- Parameters
-
angleLeft A positive decimal value, in range [0.00 - 89.00]
Definition at line 134 of file GridConfig.cpp.
◆ setAngleLeftActive
|
slot |
Set left angle grid active.
Spacing value is used for grid type "isometric".
- Parameters
-
active True to activate left angle grid, False to deactivate it.
Definition at line 154 of file GridConfig.cpp.
◆ setAngleRight
|
slot |
Set right angle (in degrees) of isometric grid for document.
AngleRight value is used for grid type "isometric".
- Parameters
-
angleRight A positive decimal value, in range [0.00 - 89.00]
Definition at line 144 of file GridConfig.cpp.
◆ setAngleRightActive
|
slot |
Set right angle grid active.
Spacing value is used for grid type "isometric".
- Parameters
-
active True to activate right angle grid, False to deactivate it.
Definition at line 164 of file GridConfig.cpp.
◆ setCellSize
|
slot |
Set grid cell size (in pixels) for document.
Cell spacing value is used for grid type "isometric".
- Parameters
-
cellSize An integer that define cell border size.
Definition at line 184 of file GridConfig.cpp.
◆ setCellSpacing
|
slot |
Set grid cell spacing for document.
Cell spacing value is used for grid type "isometric_legacy".
- Parameters
-
cellSpacing A integer that define spacing, in range [10 - 1000]
Definition at line 174 of file GridConfig.cpp.
◆ setColorMain
|
slot |
Set grid main line color.
- Parameters
-
color The color to apply for grid main line
Definition at line 331 of file GridConfig.cpp.
◆ setColorSubdivision
|
slot |
Set grid subdivision line color ColorSubdivision value is used for grid type "rectangular".
- Parameters
-
color The color to apply for grid subdivision line
Definition at line 341 of file GridConfig.cpp.
◆ setColorVertical
|
slot |
Set grid vertical line color ColorSubdivision value is used for grid type "isometric".
- Parameters
-
color The color to apply for grid vertical line
Definition at line 351 of file GridConfig.cpp.
◆ setLineTypeMain
|
slot |
Set grid main line type.
- Parameters
-
lineType The main line type to apply for grid Can be: - "solid"
- "dashed"
- "dotted"
Definition at line 256 of file GridConfig.cpp.
◆ setLineTypeSubdivision
|
slot |
Set grid subdivision line type.
- Parameters
-
lineType The subdivision line type to apply for grid Can be: - "solid"
- "dashed"
- "dotted"
LineTypeSubdivision value is used for grid type "rectangular".
Definition at line 281 of file GridConfig.cpp.
◆ setLineTypeVertical
|
slot |
Set grid vertical line type.
- Parameters
-
lineType The vertical line type to apply for grid Can be: - "solid"
- "dashed"
- "dotted"
- "none"
LineTypeVertical value is used for grid type "isometric".
Definition at line 309 of file GridConfig.cpp.
◆ setOffset
|
slot |
Define grid offset (in pixels, from origin) for document.
- Parameters
-
offset A QPoint that define X and Y offset (X and Y in range [0 - 500])
Definition at line 74 of file GridConfig.cpp.
◆ setOffsetAspectLocked
|
slot |
Set status of "Aspect locked" property for offset values (X and Y values are linked to keep ratio)
- Parameters
-
offsetAspectLocked Set to True lock aspect.
Definition at line 219 of file GridConfig.cpp.
◆ setSnap
|
slot |
Activate or deactivate snap to grid for document.
- Parameters
-
snap Set to True to activate snap to grid.
Definition at line 64 of file GridConfig.cpp.
◆ setSpacing
|
slot |
Set grid spacing (in pixels) for document.
Spacing value is used for grid type "rectangular".
- Parameters
-
spacing A QPoint that define X and Y spacing (minimum value for X and Y is 1)
Definition at line 87 of file GridConfig.cpp.
◆ setSpacingActiveHorizontal
|
slot |
Set horizontal grid spacing active.
Spacing value is used for grid type "rectangular".
- Parameters
-
active True to activate horizontal spacing, False to deactivate it.
Definition at line 104 of file GridConfig.cpp.
◆ setSpacingActiveVertical
|
slot |
Set vertical grid spacing active.
Spacing value is used for grid type "rectangular".
- Parameters
-
active True to activate vertical spacing, False to deactivate it.
Definition at line 114 of file GridConfig.cpp.
◆ setSpacingAspectLocked
|
slot |
Set status of "Aspect locked" property for spacing values (X and Y values are linked to keep ratio) SpacingAspectLocked value is used for grid type "rectangular".
- Parameters
-
spacingAspectLocked Set to True lock aspect.
Definition at line 229 of file GridConfig.cpp.
◆ setSubdivision
|
slot |
Set number of grid subdivision for document.
Subdivision value is used for grid type "rectangular".
- Parameters
-
subdivision A positive integer value, in range [1 - 10]
Definition at line 124 of file GridConfig.cpp.
◆ setType
|
slot |
Set current grid type applied for document.
- Parameters
-
gridType The grid type can be: - "rectangular"
- "isometric"
- "isometric_legacy"
Definition at line 201 of file GridConfig.cpp.
◆ setVisible
|
slot |
Set grid visibility for document.
- Parameters
-
snap Set to True to get grid visible.
Definition at line 54 of file GridConfig.cpp.
◆ snap
|
slot |
Returns snap to grid status for document.
- Returns
- If snap to grid is active on document, return True.
Definition at line 59 of file GridConfig.cpp.
◆ spacing
|
slot |
Returns grid spacing (in pixels) for document.
Spacing value is used for grid type "rectangular".
- Returns
- A QPoint that define X and Y spacing.
Definition at line 82 of file GridConfig.cpp.
◆ spacingActiveHorizontal
|
slot |
Returns if horizontal grid spacing is active.
Spacing value is used for grid type "rectangular".
- Returns
- a boolean which indicate if horizontal grid is active or not
Definition at line 99 of file GridConfig.cpp.
◆ spacingActiveVertical
|
slot |
Returns if vertical grid spacing is active.
Spacing value is used for grid type "rectangular".
- Returns
- a boolean which indicate if vertical grid is active or not
Definition at line 109 of file GridConfig.cpp.
◆ spacingAspectLocked
|
slot |
Returns status of "Aspect locked" property for spacing values (mean, X and Y values are linked to keep ratio) SpacingAspectLocked value is used for grid type "rectangular".
- Returns
- If locked, return True.
Definition at line 224 of file GridConfig.cpp.
◆ subdivision
|
slot |
Returns number of grid subdivision for document.
Subdivision value is used for grid type "rectangular".
- Returns
- A positive integer value, starting from 1
Definition at line 119 of file GridConfig.cpp.
◆ toXml
|
slot |
Save grid definition as an XML document.
- Returns
- A string with xml content
Definition at line 370 of file GridConfig.cpp.
◆ type
|
slot |
Returns current grid type applied for document.
- Returns
- The grid type can be:
- "rectangular"
- "isometric"
- "isometric_legacy"
Definition at line 189 of file GridConfig.cpp.
◆ visible
|
slot |
Returns grid visibility for document.
- Returns
- If grid is visible, return True.
Definition at line 49 of file GridConfig.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:09 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.