Document
#include <Document.h>

Public Member Functions | |
Document (KisDocument *document, bool ownsDocument, QObject *parent=0) | |
bool | guidesLocked () const |
bool | guidesVisible () const |
QList< qreal > | horizontalGuides () const |
bool | operator!= (const Document &other) const |
bool | operator== (const Document &other) const |
QList< qreal > | verticalGuides () const |
![]() | |
QObject (QObject *parent) | |
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 () |
void | dumpObjectInfo () const const |
void | dumpObjectTree () |
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 QRegExp ®Exp, 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 |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
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_DISABLE_COPY (Class) | |
Q_DISABLE_COPY_MOVE (Class) | |
Q_DISABLE_MOVE (Class) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
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 | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
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 | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
QThread * | thread () const const |
Additional Inherited Members | |
![]() | |
objectName | |
![]() | |
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) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
typedef | QObjectList |
![]() | |
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 Document class encapsulates a Krita Document/Image.
A Krita document is an Image with a filename. Libkis does not differentiate between a document and an image, like Krita does internally.
Definition at line 33 of file Document.h.
Member Function Documentation
◆ activeNode
|
slot |
activeNode retrieve the node that is currently active in the currently active window
- Returns
- the active node. If there is no active window, the first child node is returned.
Definition at line 113 of file Document.cpp.
◆ animationLength
|
slot |
get total frame range for animation
- Returns
- total frame range for animation
Definition at line 1024 of file Document.cpp.
◆ annotation
|
slot |
annotation the actual data for the annotation for this type.
It's a simple QByteArray, what's in it depends on the type of the annotation
- Parameters
-
type the type of the annotation
- Returns
- a bytearray, possibly empty if this type of annotation doesn't exist
Definition at line 1107 of file Document.cpp.
◆ annotationDescription
annotationDescription gets the pretty description for the current annotation
- Parameters
-
type the type of the annotation
- Returns
- a string that can be presented to the user
Definition at line 1100 of file Document.cpp.
◆ annotationTypes
|
slot |
annotationTypes returns the list of annotations present in the document.
Each annotation type is unique.
Definition at line 1073 of file Document.cpp.
◆ backgroundColor
|
slot |
backgroundColor returns the current background color of the document.
The color will also include the opacity.
- Returns
- QColor
Definition at line 220 of file Document.cpp.
◆ batchmode
|
slot |
Batchmode means that no actions on the document should show dialogs or popups.
- Returns
- true if the document is in batchmode.
Definition at line 101 of file Document.cpp.
◆ bounds
|
slot |
bounds return the bounds of the image
- Returns
- the bounds
Definition at line 940 of file Document.cpp.
◆ clone
|
slot |
clone create a shallow clone of this document.
- Returns
- a new Document that should be identical to this one in every respect.
We set ownsDocument to true, it will be reset automatically as soon as we create the first view for the document
Definition at line 868 of file Document.cpp.
◆ close
|
slot |
close Close the document: remove it from Krita's internal list of documents and close all views.
If the document is modified, you should save it first. There will be no prompt for saving.
After closing the document it becomes invalid.
- Returns
- true if the document is closed.
Definition at line 472 of file Document.cpp.
◆ colorDepth
|
slot |
colorDepth A string describing the color depth of the image:
- U8: unsigned 8 bits integer, the most common type
- U16: unsigned 16 bits integer
- F16: half, 16 bits floating point. Only available if Krita was built with OpenEXR
- F32: 32 bits floating point
- Returns
- the color depth.
Definition at line 176 of file Document.cpp.
◆ colorModel
|
slot |
colorModel retrieve the current color model of this document:
- A: Alpha mask
- RGBA: RGB with alpha channel (The actual order of channels is most often BGR!)
- XYZA: XYZ with alpha channel
- LABA: LAB with alpha channel
- CMYKA: CMYK with alpha channel
- GRAYA: Gray with alpha channel
- YCbCrA: YCbCr with alpha channel
- Returns
- the internal color model string.
Definition at line 182 of file Document.cpp.
◆ colorProfile
|
slot |
- Returns
- the name of the current color profile
Definition at line 188 of file Document.cpp.
◆ createCloneLayer
|
slot |
◆ createColorizeMask
|
slot |
createColorizeMask Creates a colorize mask, which can be used to color fill via keystrokes.
- Parameters
-
name - the name of the layer.
- Returns
- a TransparencyMask
Definition at line 776 of file Document.cpp.
◆ createFileLayer
|
slot |
createFileLayer returns a layer that shows an external image.
- Parameters
-
name name of the file layer. fileName the absolute filename of the file referenced. Symlinks will be resolved. scalingMethod how the dimensions of the file are interpreted can be either "None", "ImageToSize" or "ImageToPPI" scalingFilter filter used to scale the file can be "Bicubic", "Hermite", "NearestNeighbor", "Bilinear", "Bell", "BSpline", "Lanczos3", "Mitchell"
- Returns
- a FileLayer
Definition at line 656 of file Document.cpp.
◆ createFillLayer
|
slot |
createFillLayer creates a fill layer object, which is a layer
- Parameters
-
name generatorName - name of the generation filter. configuration - the configuration for the generation filter. selection - the selection.
- Returns
- a filllayer object.
Definition at line 674 of file Document.cpp.
◆ createFilterLayer
|
slot |
createFilterLayer creates a filter layer, which is a layer that represents a filter applied non-destructively.
- Parameters
-
name name of the filterLayer filter the filter that this filter layer will us. selection the selection.
- Returns
- a filter layer object.
Definition at line 665 of file Document.cpp.
◆ createFilterMask [1/2]
|
slot |
createFilterMask Creates a filter mask object that much like a filterlayer can apply a filter non-destructively.
- Parameters
-
name the name of the layer. filter the filter assigned. selection_source a node from which the selection should be initialized
- Returns
- a FilterMask
Definition at line 712 of file Document.cpp.
◆ createFilterMask [2/2]
|
slot |
createFilterMask Creates a filter mask object that much like a filterlayer can apply a filter non-destructively.
- Parameters
-
name the name of the layer. filter the filter assigned. selection the selection to be used by the filter mask
- Returns
- a FilterMask
Definition at line 734 of file Document.cpp.
◆ createGroupLayer
|
slot |
createGroupLayer Returns a grouplayer object.
Grouplayers are nodes that can have other layers as children and have the passthrough mode.
- Parameters
-
name the name of the layer.
- Returns
- a GroupLayer object.
Definition at line 647 of file Document.cpp.
◆ createNode
@brief createNode create a new node of the given type. The node is not added to the node hierarchy; you need to do that by finding the right parent node, getting its list of child nodes and adding the node in the right place, then calling Node::SetChildNodes @param name The name of the node @param nodeType The type of the node. Valid types are: <ul> <li>paintlayer <li>grouplayer <li>filelayer <li>filterlayer <li>filllayer <li>clonelayer <li>vectorlayer <li>transparencymask <li>filtermask <li>transformmask <li>selectionmask </ul> When relevant, the new Node will have the colorspace of the image by default; that can be changed with Node::setColorSpace. The settings and selections for relevant layer and mask types can also be set after the Node has been created.
- Returns
- the new Node.
Definition at line 599 of file Document.cpp.
◆ createSelectionMask
|
slot |
createSelectionMask Creates a selection mask, which can be used to store selections.
- Parameters
-
name - the name of the layer.
- Returns
- a SelectionMask
Definition at line 749 of file Document.cpp.
◆ createTransformMask
|
slot |
createTransformMask Creates a transform mask, which can be used to apply a transformation non-destructively.
- Parameters
-
name - the name of the layer mask.
- Returns
- a TransformMask
Definition at line 767 of file Document.cpp.
◆ createTransparencyMask
|
slot |
createTransparencyMask Creates a transparency mask, which can be used to assign transparency to regions.
- Parameters
-
name - the name of the layer.
- Returns
- a TransparencyMask
Definition at line 758 of file Document.cpp.
◆ createVectorLayer
|
slot |
createVectorLayer Creates a vector layer that can contain vector shapes.
- Parameters
-
name the name of this layer.
- Returns
- a VectorLayer.
Definition at line 703 of file Document.cpp.
◆ crop
|
slot |
crop the image to rectangle described by x
, y
, w
and h
- Parameters
-
x x coordinate of the top left corner y y coordinate of the top left corner w width h height
Definition at line 495 of file Document.cpp.
◆ currentTime
|
slot |
get current frame selected of animation
- Returns
- current frame selected of animation
Definition at line 1057 of file Document.cpp.
◆ documentInfo
|
slot |
documentInfo creates and XML document representing document and author information.
- Returns
- a string containing a valid XML document with the right information about the document and author. The DTD can be found here:
https://phabricator.kde.org/source/krita/browse/master/krita/dtd/
Definition at line 243 of file Document.cpp.
◆ exportImage
|
slot |
exportImage export the image, without changing its URL to the given path.
- Parameters
-
filename the full path to which the image is to be saved exportConfiguration a configuration object appropriate to the file format. An InfoObject will used to that configuration.
The supported formats have specific configurations that must be used when in batchmode. They are described below:
png
- alpha: bool (True or False)
- compression: int (1 to 9)
- forceSRGB: bool (True or False)
- indexed: bool (True or False)
- interlaced: bool (True or False)
- saveSRGBProfile: bool (True or False)
- transparencyFillcolor: rgb (Ex:[255,255,255])
jpeg
- baseline: bool (True or False)
- exif: bool (True or False)
- filters: bool (['ToolInfo', 'Anonymizer'])
- forceSRGB: bool (True or False)
- iptc: bool (True or False)
- is_sRGB: bool (True or False)
- optimize: bool (True or False)
- progressive: bool (True or False)
- quality: int (0 to 100)
- saveProfile: bool (True or False)
- smoothing: int (0 to 100)
- subsampling: int (0 to 3)
- transparencyFillcolor: rgb (Ex:[255,255,255])
- xmp: bool (True or False)
- Returns
- true if the export succeeded, false if it failed.
Definition at line 505 of file Document.cpp.
◆ fileName
|
slot |
- Returns
- the full path to the document, if it has been set.
Definition at line 261 of file Document.cpp.
◆ flatten
|
slot |
flatten all layers in the image
Definition at line 515 of file Document.cpp.
◆ framesPerSecond
|
slot |
frames per second of document
- Returns
- the fps of the document
Definition at line 973 of file Document.cpp.
◆ fullClipRangeEndTime
|
slot |
get the full clip range end time
- Returns
- full clip range end time
Definition at line 1016 of file Document.cpp.
◆ fullClipRangeStartTime
|
slot |
get the full clip range start time
- Returns
- full clip range start time
Definition at line 998 of file Document.cpp.
◆ guidesLocked()
bool Document::guidesLocked | ( | ) | const |
guidesLocked Returns guide lockedness.
- Returns
- whether the guides are locked.
Definition at line 863 of file Document.cpp.
◆ guidesVisible()
bool Document::guidesVisible | ( | ) | const |
guidesVisible Returns guide visibility.
- Returns
- whether the guides are visible.
Definition at line 858 of file Document.cpp.
◆ height
|
slot |
- Returns
- the height of the image in pixels
Definition at line 275 of file Document.cpp.
◆ horizontalGuides()
QList< qreal > Document::horizontalGuides | ( | ) | const |
horizontalGuides The horizontal guides.
- Returns
- a list of the horizontal positions of guides.
Definition at line 828 of file Document.cpp.
◆ importAnimation
Import an image sequence of files from a directory.
This will grab all images from the directory and import them with a potential offset (firstFrame) and step (images on 2s, 3s, etc)
- Returns
- whether the animation import was successful
Definition at line 958 of file Document.cpp.
◆ lock
|
slot |
[low-level] Lock the image without waiting for all the internal job queues are processed
WARNING: Don't use it unless you really know what you are doing! Use barrierLock() instead!
Waits for all the currently running internal jobs to complete and locks the image for writing. Please note that this function does not wait for all the internal queues to process, so there might be some non-finished actions pending. It means that you just postpone these actions until you unlock() the image back. Until then, then image might easily be frozen in some inconsistent state.
The only sane usage for this function is to lock the image for emergency processing, when some internal action or scheduler got hung up, and you just want to fetch some data from the image without races.
In all other cases, please use barrierLock() instead!
Definition at line 798 of file Document.cpp.
◆ modified
|
slot |
modified returns true if the document has unsaved modifications.
Definition at line 928 of file Document.cpp.
◆ name
|
slot |
- Returns
- the name of the document. This is the title field in the documentInfo
Definition at line 294 of file Document.cpp.
◆ nodeByName
nodeByName searches the node tree for a node with the given name and returns it
- Parameters
-
name the name of the node
- Returns
- the first node with the given name or 0 if no node is found
Definition at line 155 of file Document.cpp.
◆ nodeByUniqueID
nodeByUniqueID searches the node tree for a node with the given name and returns it.
- Parameters
-
uuid the unique id of the node
- Returns
- the node with the given unique id, or 0 if no node is found.
Definition at line 165 of file Document.cpp.
◆ pixelData
|
slot |
pixelData reads the given rectangle from the image projection and returns it as a byte array.
The pixel data starts top-left, and is ordered row-first.
The byte array can be interpreted as follows: 8 bits images have one byte per channel, and as many bytes as there are channels. 16 bits integer images have two bytes per channel, representing an unsigned short. 16 bits float images have two bytes per channel, representing a half, or 16 bits float. 32 bits float images have four bytes per channel, representing a float.
You can read outside the image boundaries; those pixels will be transparent black.
The order of channels is:
- Integer RGBA: Blue, Green, Red, Alpha
- Float RGBA: Red, Green, Blue, Alpha
- LabA: L, a, b, Alpha
- CMYKA: Cyan, Magenta, Yellow, Key, Alpha
- XYZA: X, Y, Z, A
- YCbCrA: Y, Cb, Cr, Alpha
The byte array is a copy of the original image data. In Python, you can use bytes, bytearray and the struct module to interpret the data and construct, for instance, a Pillow Image object.
- Parameters
-
x x position from where to start reading y y position from where to start reading w row length to read h number of rows to read
- Returns
- a QByteArray with the pixel data. The byte array may be empty.
Definition at line 458 of file Document.cpp.
◆ playBackEndTime
|
slot |
get end time of current playback
- Returns
- end time of current playback
Definition at line 1049 of file Document.cpp.
◆ playBackStartTime
|
slot |
get start time of current playback
- Returns
- start time of current playback
Definition at line 1041 of file Document.cpp.
◆ projection
|
slot |
projection creates a QImage from the rendered image or a cutout rectangle.
Definition at line 785 of file Document.cpp.
◆ refreshProjection
|
slot |
Starts a synchronous recomposition of the projection: everything will wait until the image is fully recomputed.
Definition at line 822 of file Document.cpp.
◆ removeAnnotation
|
slot |
removeAnnotation remove the specified annotation from the image
- Parameters
-
type the type defining the annotation
Definition at line 1127 of file Document.cpp.
◆ resizeImage
|
slot |
resizeImage resizes the canvas to the given left edge, top edge, width and height.
Note: This doesn't scale, use scale image for that.
- Parameters
-
x the new left edge y the new top edge w the new width h the new height
Definition at line 523 of file Document.cpp.
◆ resolution
|
slot |
- Returns
- the resolution in pixels per inch
Definition at line 307 of file Document.cpp.
◆ rootNode
|
slot |
rootNode the root node is the invisible group layer that contains the entire node hierarchy.
- Returns
- the root of the image
Definition at line 330 of file Document.cpp.
◆ rotateImage
|
slot |
rotateImage Rotate the image by the given radians.
- Parameters
-
radians the amount you wish to rotate the image in radians
Definition at line 554 of file Document.cpp.
◆ save
|
slot |
save the image to its currently set path.
The modified flag of the document will be reset
- Returns
- true if saving succeeded, false otherwise.
Definition at line 572 of file Document.cpp.
◆ saveAs
|
slot |
saveAs save the document under the filename
.
The document's filename will be reset to filename
.
- Parameters
-
filename the new filename (full path) for the document
- Returns
- true if saving succeeded, false otherwise.
Definition at line 583 of file Document.cpp.
◆ scaleImage
|
slot |
scaleImage
- Parameters
-
w the new width h the new height xres the new xres yres the new yres strategy the scaling strategy. There's several ones amongst these that aren't available in the regular UI. The list of filters is extensible and can be retrieved with Krita::filter - Hermite
- Bicubic - Adds pixels using the color of surrounding pixels. Produces smoother tonal gradations than Bilinear.
- Box - Replicate pixels in the image. Preserves all the original detail, but can produce jagged effects.
- Bilinear - Adds pixels averaging the color values of surrounding pixels. Produces medium quality results when the image is scaled from half to two times the original size.
- Bell
- BSpline
- Kanczos3 - Offers similar results than Bicubic, but maybe a little bit sharper. Can produce light and dark halos along strong edges.
- Mitchell
Definition at line 538 of file Document.cpp.
◆ selection
|
slot |
selection Create a Selection object around the global selection, if there is one.
- Returns
- the global selection or None if there is no global selection.
Definition at line 339 of file Document.cpp.
◆ setActiveNode
|
slot |
setActiveNode make the given node active in the currently active view and window
- Parameters
-
value the node to make active.
Definition at line 130 of file Document.cpp.
◆ setAnnotation
|
slot |
setAnnotation Add the given annotation to the document
- Parameters
-
type the unique type of the annotation description the user-visible description of the annotation annotation the annotation itself
Definition at line 1119 of file Document.cpp.
◆ setBackgroundColor
|
slot |
setBackgroundColor sets the background color of the document.
It will trigger a projection update.
- Parameters
-
color A QColor. The color will be converted from sRGB.
- Returns
- bool
Definition at line 229 of file Document.cpp.
◆ setBatchmode
|
slot |
Set batchmode to value
.
If batchmode is true, then there should be no popups or dialogs shown to the user.
Definition at line 107 of file Document.cpp.
◆ setColorProfile
|
slot |
setColorProfile set the color profile of the image to the given profile.
The profile has to be registered with krita and be compatible with the current color model and depth; the image data is not converted.
- Parameters
-
colorProfile
- Returns
- false if the colorProfile name does not correspond to to a registered profile or if assigning the profile failed.
Definition at line 194 of file Document.cpp.
◆ setColorSpace
|
slot |
setColorSpace convert the nodes and the image to the given colorspace.
The conversion is done with Perceptual as intent, High Quality and No LCMS Optimizations as flags and no blackpoint compensation.
- Parameters
-
colorModel A string describing the color model of the image: - A: Alpha mask
- RGBA: RGB with alpha channel (The actual order of channels is most often BGR!)
- XYZA: XYZ with alpha channel
- LABA: LAB with alpha channel
- CMYKA: CMYK with alpha channel
- GRAYA: Gray with alpha channel
- YCbCrA: YCbCr with alpha channel
colorDepth A string describing the color depth of the image: - U8: unsigned 8 bits integer, the most common type
- U16: unsigned 16 bits integer
- F16: half, 16 bits floating point. Only available if Krita was built with OpenEXR
- F32: 32 bits floating point
colorProfile a valid color profile for this color model and color depth combination.
- Returns
- false the combination of these arguments does not correspond to a colorspace.
Definition at line 205 of file Document.cpp.
◆ setCurrentTime
|
slot |
set current time of document's animation
Definition at line 1065 of file Document.cpp.
◆ setDocumentInfo
|
slot |
setDocumentInfo set the Document information to the information contained in document
- Parameters
-
document A string containing a valid XML document that conforms to the document-info DTD that can be found here:
https://phabricator.kde.org/source/krita/browse/master/krita/dtd/
Definition at line 251 of file Document.cpp.
◆ setFileName
|
slot |
setFileName set the full path of the document to
- Parameters
-
value
Definition at line 267 of file Document.cpp.
◆ setFramesPerSecond
|
slot |
set frames per second of document
Definition at line 981 of file Document.cpp.
◆ setFullClipRangeEndTime
|
slot |
set full clip range end time
Definition at line 1007 of file Document.cpp.
◆ setFullClipRangeStartTime
|
slot |
set start time of animation
Definition at line 989 of file Document.cpp.
◆ setGuidesLocked
|
slot |
setGuidesLocked set guides locked on this document
- Parameters
-
locked whether or not to lock the guides on this document.
Definition at line 920 of file Document.cpp.
◆ setGuidesVisible
|
slot |
setGuidesVisible set guides visible on this document.
- Parameters
-
visible whether or not the guides are visible.
Definition at line 912 of file Document.cpp.
◆ setHeight
|
slot |
setHeight resize the document to
- Parameters
-
value height. This is a canvas resize, not a scale.
Definition at line 283 of file Document.cpp.
◆ setHorizontalGuides
|
slot |
setHorizontalGuides replace all existing horizontal guides with the entries in the list.
- Parameters
-
lines a list of floats containing the new guides.
Definition at line 880 of file Document.cpp.
◆ setModified
|
slot |
setModified sets the modified status of the document
- Parameters
-
modified if true, the document is considered modified and closing it will ask for saving.
Definition at line 934 of file Document.cpp.
◆ setName
|
slot |
setName sets the name of the document to value
.
This is the title field in the documentInfo
Definition at line 300 of file Document.cpp.
◆ setPlayBackRange
|
slot |
set temporary playback range of document
Definition at line 1032 of file Document.cpp.
◆ setResolution
|
slot |
setResolution set the resolution of the image; this does not scale the image
- Parameters
-
value the resolution in pixels per inch
Definition at line 316 of file Document.cpp.
◆ setSelection
|
slot |
setSelection set or replace the global selection
- Parameters
-
value a valid selection object.
Definition at line 347 of file Document.cpp.
◆ setVerticalGuides
|
slot |
setVerticalGuides replace all existing horizontal guides with the entries in the list.
- Parameters
-
lines a list of floats containing the new guides.
Definition at line 896 of file Document.cpp.
◆ setWidth
|
slot |
setWidth resize the document to
- Parameters
-
value width. This is a canvas resize, not a scale.
Definition at line 368 of file Document.cpp.
◆ setXOffset
|
slot |
setXOffset sets the left edge of the canvas to x
.
Definition at line 387 of file Document.cpp.
◆ setXRes
|
slot |
setXRes set the horizontal resolution of the image to xRes in pixels per inch
Definition at line 424 of file Document.cpp.
◆ setYOffset
|
slot |
setYOffset sets the top edge of the canvas to y
.
Definition at line 406 of file Document.cpp.
◆ setYRes
|
slot |
setYRes set the vertical resolution of the image to yRes in pixels per inch
Definition at line 444 of file Document.cpp.
◆ shearImage
|
slot |
shearImage shear the whole image.
- Parameters
-
angleX the X-angle in degrees to shear by angleY the Y-angle in degrees to shear by
Definition at line 563 of file Document.cpp.
◆ thumbnail
|
slot |
thumbnail create a thumbnail of the given dimensions.
If the requested size is too big a null QImage is created.
- Returns
- a QImage representing the layer contents.
Definition at line 791 of file Document.cpp.
◆ topLevelNodes
toplevelNodes return a list with all top level nodes in the image graph
Definition at line 147 of file Document.cpp.
◆ tryBarrierLock
|
slot |
Tries to lock the image without waiting for the jobs to finish.
Same as barrierLock(), but doesn't block execution of the calling thread until all the background jobs are finished. Instead, in case of presence of unfinished jobs in the queue, it just returns false
- Returns
- whether the lock has been acquired
Definition at line 816 of file Document.cpp.
◆ unlock
|
slot |
Unlocks the image and starts/resumes all the pending internal jobs.
If the image has been locked for a non-readOnly access, then all the internal caches of the image (e.g. lod-planes) are reset and regeneration jobs are scheduled.
Definition at line 804 of file Document.cpp.
◆ verticalGuides()
QList< qreal > Document::verticalGuides | ( | ) | const |
verticalGuides The vertical guide lines.
- Returns
- a list of vertical guides.
Definition at line 843 of file Document.cpp.
◆ waitForDone
|
slot |
Wait for all the internal image jobs to complete and return without locking the image.
This function is handy for tests or other synchronous actions, when one needs to wait for the result of his actions.
Definition at line 810 of file Document.cpp.
◆ width
|
slot |
- Returns
- the width of the image in pixels.
Definition at line 360 of file Document.cpp.
◆ xOffset
|
slot |
- Returns
- the left edge of the canvas in pixels.
Definition at line 379 of file Document.cpp.
◆ xRes
|
slot |
- Returns
- xRes the horizontal resolution of the image in pixels per inch
Definition at line 417 of file Document.cpp.
◆ yOffset
|
slot |
- Returns
- the top edge of the canvas in pixels.
Definition at line 398 of file Document.cpp.
◆ yRes
|
slot |
- Returns
- yRes the vertical resolution of the image in pixels per inch
Definition at line 437 of file Document.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Nov 30 2023 04:01:29 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.