Krita
Search for usage in LXR
#include <Krita.h>
|
QAction * | action (const QString &name) const |
|
QList< QAction * > | actions () const |
|
Document * | activeDocument () const |
|
Window * | activeWindow () const |
|
void | addDockWidgetFactory (DockWidgetFactoryBase *factory) |
|
void | addExtension (Extension *extension) |
|
bool | addProfile (const QString &profilePath) |
|
bool | batchmode () const |
|
QStringList | colorDepths (const QString &colorModel) const |
|
QStringList | colorModels () const |
|
Document * | createDocument (int width, int height, const QString &name, const QString &colorModel, const QString &colorDepth, const QString &profile, double resolution) |
|
QList< QDockWidget * > | dockers () const |
|
QList< Document * > | documents () const |
|
QList< Extension * > | extensions () |
|
Filter * | filter (const QString &name) const |
|
QStringList | filters () const |
|
QStringList | filterStrategies () const |
|
static QObject * | fromVariant (const QVariant &v) |
|
static QString | getAppDataLocation () |
|
QIcon | icon (QString &iconName) const |
|
static Krita * | instance () |
|
static QString | krita_i18n (const QString &text) |
|
static QString | krita_i18nc (const QString &context, const QString &text) |
|
Notifier * | notifier () const |
|
Document * | openDocument (const QString &filename) |
|
Window * | openWindow () |
|
QStringList | profiles (const QString &colorModel, const QString &colorDepth) const |
|
QString | readSetting (const QString &group, const QString &name, const QString &defaultValue) |
|
QStringList | recentDocuments () const |
|
QMap< QString, Resource * > | resources (QString &type) const |
|
void | setActiveDocument (Document *value) |
|
void | setBatchmode (bool value) |
|
QString | version () const |
|
QList< View * > | views () const |
|
QList< Window * > | windows () const |
|
void | writeSetting (const QString &group, const QString &name, const QString &value) |
|
|
| Krita (QObject *parent=0) |
|
| 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 |
|
|
| 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) |
|
Krita is a singleton class that offers the root access to the Krita object hierarchy.
The Krita.instance() is aliased as two builtins: Scripter and Application.
Definition at line 27 of file Krita.h.
◆ action
- Returns
- the action that has been registered under the given name, or 0 if no such action exists.
Definition at line 93 of file Krita.cpp.
◆ actions
- Returns
- return a list of all actions for the currently active mainWindow.
Definition at line 83 of file Krita.cpp.
◆ activeDocument
Document * Krita::activeDocument |
( |
| ) |
const |
|
slot |
- Returns
- the currently active document, if there is one.
Definition at line 104 of file Krita.cpp.
◆ activeWindow
Window * Krita::activeWindow |
( |
| ) |
const |
|
slot |
- Returns
- the currently active window or None if there is no window
Definition at line 245 of file Krita.cpp.
◆ addDockWidgetFactory
addDockWidgetFactory Add the given docker factory to the application.
For scripts loaded on startup, this means that every window will have one of the dockers created by the factory.
- Parameters
-
factory | The factory object. |
Definition at line 397 of file Krita.cpp.
◆ addExtension
void Krita::addExtension |
( |
Extension * |
extension | ) |
|
|
slot |
addExtension add the given plugin to Krita.
There will be a single instance of each Extension in the Krita process.
- Parameters
-
extension | the extension to add. |
Definition at line 370 of file Krita.cpp.
◆ addProfile
bool Krita::addProfile |
( |
const QString & |
profilePath | ) |
|
|
slot |
addProfile load the given profile into the profile registry.
- Parameters
-
profilePath | the path to the profile. |
- Returns
- true if adding the profile succeeded.
Definition at line 219 of file Krita.cpp.
◆ batchmode
bool Krita::batchmode |
( |
| ) |
const |
|
slot |
batchmode determines whether the script is run in batch mode.
If batchmode is true, scripts should now show messageboxes or dialog boxes.
Note that this separate from Document.setBatchmode(), which determines whether export/save option dialogs are shown.
- Returns
- true if the script is run in batchmode
Definition at line 129 of file Krita.cpp.
◆ colorDepths
colorDepths creates a list with the names of all color depths compatible with the given color model.
- Parameters
-
colorModel | the id of a color model. |
- Returns
- a list of all color depths or a empty list if there is no such color depths.
Definition at line 183 of file Krita.cpp.
◆ colorModels
colorModels creates a list with all color models id's registered.
- Returns
- a list of all color models or a empty list if there is no such color models.
Definition at line 169 of file Krita.cpp.
◆ createDocument
Document * Krita::createDocument |
( |
int |
width, |
|
|
int |
height, |
|
|
const QString & |
name, |
|
|
const QString & |
colorModel, |
|
|
const QString & |
colorDepth, |
|
|
const QString & |
profile, |
|
|
double |
resolution |
|
) |
| |
|
slot |
@brief createDocument creates a new document and image and registers
the document with the Krita application.
Unless you explicitly call Document::close() the document will remain
known to the Krita document registry. The document and its image will
only be deleted when Krita exits.
The document will have one transparent layer.
To create a new document and show it, do something like:
def add_document_to_window():
add_document_to_window()
@param width the width in pixels
@param height the height in pixels
@param name the name of the image (not the filename of the document)
@param colorModel A string describing the color model of the image:
<ul>
<li>A: Alpha mask</li>
<li>RGBA: RGB with alpha channel (The actual order of channels is most often BGR!)</li>
<li>XYZA: XYZ with alpha channel</li>
<li>LABA: LAB with alpha channel</li>
<li>CMYKA: CMYK with alpha channel</li>
<li>GRAYA: Gray with alpha channel</li>
<li>YCbCrA: YCbCr with alpha channel</li>
</ul>
@param colorDepth A string describing the color depth of the image:
<ul>
<li>U8: unsigned 8 bits integer, the most common type</li>
<li>U16: unsigned 16 bits integer</li>
<li>F16: half, 16 bits floating point. Only available if Krita was built with OpenEXR</li>
<li>F32: 32 bits floating point</li>
</ul>
@param profile The name of an icc profile that is known to Krita. If an empty string is passed, the default is
taken.
@param resolution the resolution in points per inch.
@return the created document.
Definition at line 329 of file Krita.cpp.
◆ dockers
- Returns
- a list of all the dockers
Definition at line 308 of file Krita.cpp.
◆ documents
- Returns
- a list of all open Documents
Definition at line 140 of file Krita.cpp.
◆ extensions
return a list with all registered extension objects.
Definition at line 375 of file Krita.cpp.
◆ filter
filter construct a Filter object with a default configuration.
- Parameters
-
- Returns
- the filter or None if there is no such filter.
Definition at line 156 of file Krita.cpp.
◆ filters
Filters are identified by an internal name.
This function returns a list of all existing registered filters.
- Returns
- a list of all registered filters
Definition at line 149 of file Krita.cpp.
◆ filterStrategies
filterStrategies Retrieves all installed filter strategies.
A filter strategy is used when transforming (scaling, shearing, rotating) an image to calculate the value of the new pixels. You can use th
- Returns
- the id's of all available filters.
Definition at line 197 of file Krita.cpp.
◆ fromVariant
Scripter.fromVariant(variant) variant is a QVariant returns instance of QObject-subclass.
This is a helper method for PyQt because PyQt cannot cast a variant to a QObject or QWidget
Definition at line 418 of file Krita.cpp.
◆ icon
icon This allows you to get icons from Krita's internal icons.
- Parameters
-
iconName | name of the icon. |
- Returns
- the icon related to this name.
Definition at line 392 of file Krita.cpp.
◆ instance
Krita * Krita::instance |
( |
| ) |
|
|
staticslot |
◆ notifier
notifier the Notifier singleton emits signals when documents are opened and closed, the configuration changes, views are opened and closed or windows are opened.
- Returns
- the notifier object
Definition at line 226 of file Krita.cpp.
◆ openDocument
openDocument creates a new Document, registers it with the Krita application and loads the given file.
- Parameters
-
filename | the file to open in the document |
- Returns
- the document
Definition at line 351 of file Krita.cpp.
◆ openWindow
Window * Krita::openWindow |
( |
| ) |
|
|
slot |
openWindow create a new main window.
The window is not shown by default.
Definition at line 364 of file Krita.cpp.
◆ profiles
profiles creates a list with the names of all color profiles compatible with the given color model and color depth.
- 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
|
- Returns
- a list with valid names
Definition at line 202 of file Krita.cpp.
◆ readSetting
readSetting read the given setting value from the kritarc file.
- Parameters
-
group | The group the setting is part of. If empty, then the setting is read from the general group. |
name | The name of the setting |
defaultValue | The default value of the setting |
- Returns
- a string representing the setting.
Definition at line 386 of file Krita.cpp.
◆ recentDocuments
return all recent documents registered in the RecentFiles group of the kritarc
Definition at line 317 of file Krita.cpp.
◆ resources
resources returns a list of Resource objects of the given type
- Parameters
-
-
pattern
-
gradient
-
brush
-
preset
-
palette
-
workspace
Definition at line 263 of file Krita.cpp.
◆ setActiveDocument
void Krita::setActiveDocument |
( |
Document * |
value | ) |
|
|
slot |
setActiveDocument activates the first view that shows the given document
- Parameters
-
value | the document we want to activate |
Definition at line 119 of file Krita.cpp.
◆ setBatchmode
void Krita::setBatchmode |
( |
bool |
value | ) |
|
|
slot |
setBatchmode sets the batchmode to
- Parameters
-
value; | if true, scripts should not show dialogs or messageboxes. |
Definition at line 134 of file Krita.cpp.
◆ version
version Determine the version of Krita
Usage: print(Application.version ())
- Returns
- the version string including git sha1 if Krita was built from git
Definition at line 231 of file Krita.cpp.
◆ views
- Returns
- a list of all views. A Document can be shown in more than one view.
Definition at line 236 of file Krita.cpp.
◆ windows
- Returns
- a list of all windows
Definition at line 254 of file Krita.cpp.
◆ writeSetting
writeSetting write the given setting under the given name to the kritarc file in the given settings group.
- Parameters
-
group | The group the setting belongs to. If empty, then the setting is written in the general section |
name | The name of the setting |
value | The value of the setting. Script settings are always written as strings. |
Definition at line 380 of file Krita.cpp.
The documentation for this class was generated from the following files:
Window * activeWindow() const
Krita is a singleton class that offers the root access to the Krita object hierarchy.
Document * createDocument(int width, int height, const QString &name, const QString &colorModel, const QString &colorDepth, const QString &profile, double resolution)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Dec 6 2023 04:01:35 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.