GridConfig

Search for usage in LXR

#include <GridConfig.h>

Inheritance diagram for GridConfig:

Public Slots

bool angleAspectLocked () const
 
qreal angleLeft () const
 
bool angleLeftActive () const
 
qreal angleRight () const
 
bool angleRightActive () const
 
int cellSize () const
 
int cellSpacing () const
 
QColor colorMain () const
 
QColor colorSubdivision () const
 
QColor colorVertical () const
 
bool fromXml (const QString &xmlContent) const
 
QString lineTypeMain () const
 
QString lineTypeSubdivision () const
 
QString lineTypeVertical () const
 
QPoint offset () const
 
bool offsetAspectLocked () const
 
void setAngleAspectLocked (bool angleAspectLocked)
 
void setAngleLeft (qreal angleLeft)
 
void setAngleLeftActive (bool active)
 
void setAngleRight (qreal angleRight)
 
void setAngleRightActive (bool active)
 
void setCellSize (int cellSize)
 
void setCellSpacing (int cellSpacing)
 
void setColorMain (QColor colorMain)
 
void setColorSubdivision (QColor colorSubdivision)
 
void setColorVertical (QColor colorVertical)
 
void setLineTypeMain (const QString &lineType)
 
void setLineTypeSubdivision (const QString &lineType)
 
void setLineTypeVertical (const QString &lineType)
 
void setOffset (QPoint offset)
 
void setOffsetAspectLocked (bool offsetAspectLocked)
 
void setSnap (bool snap)
 
void setSpacing (QPoint spacing)
 
void setSpacingActiveHorizontal (bool active)
 
void setSpacingActiveVertical (bool active)
 
void setSpacingAspectLocked (bool spacingAspectLocked)
 
void setSubdivision (int subdivision)
 
void setType (const QString &gridType)
 
void setVisible (bool visible)
 
bool snap () const
 
QPoint spacing () const
 
bool spacingActiveHorizontal () const
 
bool spacingActiveVertical () const
 
bool spacingAspectLocked () const
 
int subdivision () const
 
QString toXml () const
 
QString type () const
 
bool visible () const
 

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< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () 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< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
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 QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () 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
 
qobject_cast (const QObject *object)
 
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)
 
QThreadthread () 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
 
QObjectsender () 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]

GridConfig::GridConfig ( QObject * parent = 0)
explicit

Create a new, empty GridConfig.

Definition at line 26 of file GridConfig.cpp.

◆ ~GridConfig()

GridConfig::~GridConfig ( )
override

Definition at line 33 of file GridConfig.cpp.

Member Function Documentation

◆ angleAspectLocked

bool GridConfig::angleAspectLocked ( ) const
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

qreal GridConfig::angleLeft ( ) const
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

bool GridConfig::angleLeftActive ( ) const
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

qreal GridConfig::angleRight ( ) const
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

bool GridConfig::angleRightActive ( ) const
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

int GridConfig::cellSize ( ) const
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

int GridConfig::cellSpacing ( ) const
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

QColor GridConfig::colorMain ( ) const
slot

Returns grid main line color.

Returns
The color for grid main line

Definition at line 326 of file GridConfig.cpp.

◆ colorSubdivision

QColor GridConfig::colorSubdivision ( ) const
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

QColor GridConfig::colorVertical ( ) const
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

bool GridConfig::fromXml ( const QString & xmlContent) const
slot

Load grid definition from an XML document.

Parameters
xmlContentxml 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

QString GridConfig::lineTypeMain ( ) const
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

QString GridConfig::lineTypeSubdivision ( ) const
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

QString GridConfig::lineTypeVertical ( ) const
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

QPoint GridConfig::offset ( ) const
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

bool GridConfig::offsetAspectLocked ( ) const
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

void GridConfig::setAngleAspectLocked ( bool angleAspectLocked)
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
angleAspectLockedSet to True lock aspect.

Definition at line 239 of file GridConfig.cpp.

◆ setAngleLeft

void GridConfig::setAngleLeft ( qreal angleLeft)
slot

Set left angle (in degrees) of isometric grid for document.

AngleLeft value is used for grid type "isometric".

Parameters
angleLeftA positive decimal value, in range [0.00 - 89.00]

Definition at line 134 of file GridConfig.cpp.

◆ setAngleLeftActive

void GridConfig::setAngleLeftActive ( bool active)
slot

Set left angle grid active.

Spacing value is used for grid type "isometric".

Parameters
activeTrue to activate left angle grid, False to deactivate it.

Definition at line 154 of file GridConfig.cpp.

◆ setAngleRight

void GridConfig::setAngleRight ( qreal angleRight)
slot

Set right angle (in degrees) of isometric grid for document.

AngleRight value is used for grid type "isometric".

Parameters
angleRightA positive decimal value, in range [0.00 - 89.00]

Definition at line 144 of file GridConfig.cpp.

◆ setAngleRightActive

void GridConfig::setAngleRightActive ( bool active)
slot

Set right angle grid active.

Spacing value is used for grid type "isometric".

Parameters
activeTrue to activate right angle grid, False to deactivate it.

Definition at line 164 of file GridConfig.cpp.

◆ setCellSize

void GridConfig::setCellSize ( int cellSize)
slot

Set grid cell size (in pixels) for document.

Cell spacing value is used for grid type "isometric".

Parameters
cellSizeAn integer that define cell border size.

Definition at line 184 of file GridConfig.cpp.

◆ setCellSpacing

void GridConfig::setCellSpacing ( int cellSpacing)
slot

Set grid cell spacing for document.

Cell spacing value is used for grid type "isometric_legacy".

Parameters
cellSpacingA integer that define spacing, in range [10 - 1000]

Definition at line 174 of file GridConfig.cpp.

◆ setColorMain

void GridConfig::setColorMain ( QColor colorMain)
slot

Set grid main line color.

Parameters
colorThe color to apply for grid main line

Definition at line 331 of file GridConfig.cpp.

◆ setColorSubdivision

void GridConfig::setColorSubdivision ( QColor colorSubdivision)
slot

Set grid subdivision line color ColorSubdivision value is used for grid type "rectangular".

Parameters
colorThe color to apply for grid subdivision line

Definition at line 341 of file GridConfig.cpp.

◆ setColorVertical

void GridConfig::setColorVertical ( QColor colorVertical)
slot

Set grid vertical line color ColorSubdivision value is used for grid type "isometric".

Parameters
colorThe color to apply for grid vertical line

Definition at line 351 of file GridConfig.cpp.

◆ setLineTypeMain

void GridConfig::setLineTypeMain ( const QString & lineType)
slot

Set grid main line type.

Parameters
lineTypeThe main line type to apply for grid Can be:
  • "solid"
  • "dashed"
  • "dotted"

Definition at line 256 of file GridConfig.cpp.

◆ setLineTypeSubdivision

void GridConfig::setLineTypeSubdivision ( const QString & lineType)
slot

Set grid subdivision line type.

Parameters
lineTypeThe 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

void GridConfig::setLineTypeVertical ( const QString & lineType)
slot

Set grid vertical line type.

Parameters
lineTypeThe 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

void GridConfig::setOffset ( QPoint offset)
slot

Define grid offset (in pixels, from origin) for document.

Parameters
offsetA QPoint that define X and Y offset (X and Y in range [0 - 500])

Definition at line 74 of file GridConfig.cpp.

◆ setOffsetAspectLocked

void GridConfig::setOffsetAspectLocked ( bool offsetAspectLocked)
slot

Set status of "Aspect locked" property for offset values (X and Y values are linked to keep ratio)

Parameters
offsetAspectLockedSet to True lock aspect.

Definition at line 219 of file GridConfig.cpp.

◆ setSnap

void GridConfig::setSnap ( bool snap)
slot

Activate or deactivate snap to grid for document.

Parameters
snapSet to True to activate snap to grid.

Definition at line 64 of file GridConfig.cpp.

◆ setSpacing

void GridConfig::setSpacing ( QPoint spacing)
slot

Set grid spacing (in pixels) for document.

Spacing value is used for grid type "rectangular".

Parameters
spacingA QPoint that define X and Y spacing (minimum value for X and Y is 1)

Definition at line 87 of file GridConfig.cpp.

◆ setSpacingActiveHorizontal

void GridConfig::setSpacingActiveHorizontal ( bool active)
slot

Set horizontal grid spacing active.

Spacing value is used for grid type "rectangular".

Parameters
activeTrue to activate horizontal spacing, False to deactivate it.

Definition at line 104 of file GridConfig.cpp.

◆ setSpacingActiveVertical

void GridConfig::setSpacingActiveVertical ( bool active)
slot

Set vertical grid spacing active.

Spacing value is used for grid type "rectangular".

Parameters
activeTrue to activate vertical spacing, False to deactivate it.

Definition at line 114 of file GridConfig.cpp.

◆ setSpacingAspectLocked

void GridConfig::setSpacingAspectLocked ( bool spacingAspectLocked)
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
spacingAspectLockedSet to True lock aspect.

Definition at line 229 of file GridConfig.cpp.

◆ setSubdivision

void GridConfig::setSubdivision ( int subdivision)
slot

Set number of grid subdivision for document.

Subdivision value is used for grid type "rectangular".

Parameters
subdivisionA positive integer value, in range [1 - 10]

Definition at line 124 of file GridConfig.cpp.

◆ setType

void GridConfig::setType ( const QString & gridType)
slot

Set current grid type applied for document.

Parameters
gridTypeThe grid type can be:
  • "rectangular"
  • "isometric"
  • "isometric_legacy"

Definition at line 201 of file GridConfig.cpp.

◆ setVisible

void GridConfig::setVisible ( bool visible)
slot

Set grid visibility for document.

Parameters
snapSet to True to get grid visible.

Definition at line 54 of file GridConfig.cpp.

◆ snap

bool GridConfig::snap ( ) const
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

QPoint GridConfig::spacing ( ) const
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

bool GridConfig::spacingActiveHorizontal ( ) const
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

bool GridConfig::spacingActiveVertical ( ) const
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

bool GridConfig::spacingAspectLocked ( ) const
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

int GridConfig::subdivision ( ) const
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

QString GridConfig::toXml ( ) const
slot

Save grid definition as an XML document.

Returns
A string with xml content

Definition at line 370 of file GridConfig.cpp.

◆ type

QString GridConfig::type ( ) const
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

bool GridConfig::visible ( ) const
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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:13:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.