|
Krita Source Code Documentation
|
#include <MyPaintPaintOpPreset.h>
Inheritance diagram for KisMyPaintPaintOpPreset:Classes | |
| class | Private |
Public Member Functions | |
| void | apply (KisPaintOpSettingsSP settings) |
| MyPaintBrush * | brush () |
| KoResourceSP | clone () const override |
| QByteArray | getJsonData () |
| KisMyPaintPaintOpPreset (const KisMyPaintPaintOpPreset &rhs) | |
| KisMyPaintPaintOpPreset (const QString &fileName="") | |
| bool | loadFromDevice (QIODevice *dev, KisResourcesInterfaceSP resourcesInterface) override |
| QPair< QString, QString > | resourceType () const override |
| void | setColor (const KoColor color, const KoColorSpace *colorSpace) |
| QString | thumbnailPath () const override |
| thumbnailPath returns the path to a separate thumbnail image, outside the actual resource file itself. If the path is relative, it is supposed start in the same location as the resource itself. If it's absolute, that is, it starts with "/", it is from the root of the storage. | |
| void | updateThumbnail () override |
| updateThumbnail updates the thumbnail for this resource. Reimplement if your thumbnail is something else than the image set with setImage. | |
| virtual | ~KisMyPaintPaintOpPreset () |
Public Member Functions inherited from KisPaintOpPreset | |
| KoCanvasResourcesInterfaceSP | canvasResourcesInterface () const |
| void | clearSideLoadedResources () override |
| KoResourceSP | clone () const override |
| KisPaintOpPresetSP | cloneWithResourcesSnapshot (KisResourcesInterfaceSP globalResourcesInterface, KoCanvasResourcesInterfaceSP canvasResourcesInterface, KoResourceCacheInterfaceSP cacheInterface) const |
| KisPaintOpPresetSP | createMaskingPreset () const |
| QString | defaultFileExtension () const override |
| QList< KoResourceLoadResult > | embeddedResources (KisResourcesInterfaceSP globalResourcesInterface) const override |
| void | fromXML (const QDomElement &elt, KisResourcesInterfaceSP resourcesInterface) |
| bool | hasLocalResourcesSnapshot () const |
| bool | hasMaskingPreset () const |
| KisPaintOpPreset () | |
| KisPaintOpPreset (const KisPaintOpPreset &rhs) | |
| KisPaintOpPreset (const QString &filename) | |
| QList< KoResourceLoadResult > | linkedResources (KisResourcesInterfaceSP globalResourcesInterface) const override |
| bool | loadFromDevice (QIODevice *dev, KisResourcesInterfaceSP resourcesInterface) override |
| QString | name () const override |
| KisPaintOpPreset & | operator= (const KisPaintOpPreset &rhs)=delete |
| KoID | paintOp () const |
| return the id of the paintop plugin | |
| Private (KisPaintOpPreset *q) | |
| void | regenerateResourceCache (KoResourceCacheInterfaceSP cacheInterface) |
| bool | removable () const |
| QList< int > | requiredCanvasResources () const override |
| KoResourceCacheInterfaceSP | resourceCacheInterface () const |
| KisResourcesInterfaceSP | resourcesInterface () const |
| QPair< QString, QString > | resourceType () const override |
| bool | sanityCheckResourceCacheIsValid (KoResourceCacheInterfaceSP cacheInterface) const |
| bool | saveToDevice (QIODevice *dev) const override |
| void | setCanvasResourcesInterface (KoCanvasResourcesInterfaceSP canvasResourcesInterface) |
| void | setPaintOp (const KoID &paintOp) |
| set the id of the paintop plugin | |
| void | setResourceCacheInterface (KoResourceCacheInterfaceSP cacheInterface) |
| void | setResourcesInterface (KisResourcesInterfaceSP resourcesInterface) |
| void | setSettings (KisPaintOpSettingsSP settings) |
| replace the current settings object with the specified settings | |
| KisPaintOpSettingsSP | settings () const |
| return the settings that define this paintop preset | |
| QList< KoResourceLoadResult > | sideLoadedResources (KisResourcesInterfaceSP globalResourcesInterface) const override |
| void | toXML (QDomDocument &doc, QDomElement &elt) const |
| QList< KisUniformPaintOpPropertySP > | uniformProperties () |
| void | updateLinkedResourcesMetaData () |
| QPointer< KisPaintOpPresetUpdateProxy > | updateProxy () const |
| QPointer< KisPaintOpPresetUpdateProxy > | updateProxyNoCreate () const |
| ~KisPaintOpPreset () override | |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Public Member Functions inherited from KoResource | |
| bool | active () const |
| void | addMetaData (QString key, QVariant value) |
| store the given key, value pair in the resource | |
| QString | filename () const |
| QImage | image () const |
| bool | isDirty () const |
| virtual bool | isEphemeral () const |
| virtual bool | isSerializable () const |
| KoResource () | |
| KoResource (const KoResource &rhs) | |
| KoResource (const QString &filename) | |
| bool | load (KisResourcesInterfaceSP resourcesInterface) |
| QString | md5Sum (bool generateIfEmpty=true) const |
| QMap< QString, QVariant > | metadata () const |
| get a map with all the metadata | |
| KoResource & | operator= (const KoResource &rhs)=delete |
| bool | permanent () const |
| QList< KoResourceLoadResult > | requiredResources (KisResourcesInterfaceSP globalResourcesInterface) const |
| int | resourceId () const |
| bool | save () |
| void | setActive (bool active) |
| void | setDirty (bool value) |
| Mark the preset as modified but not saved. | |
| void | setFilename (const QString &filename) |
| void | setImage (const QImage &image) |
| void | setMD5Sum (const QString &md5sum) |
| Set the md5sum of this resource. It must be in hex-encoded string format. | |
| void | setName (const QString &name) |
| void | setPermanent (bool permanent) |
| void | setResourceId (int id) |
| void | setStorageLocation (const QString &location) |
| void | setValid (bool valid) |
| void | setVersion (int version) |
| KoResourceSignature | signature () const |
| QString | storageLocation () const |
| QList< KoResourceLoadResult > | takeSideLoadedResources (KisResourcesInterfaceSP globalResourcesInterface) |
| virtual QImage | thumbnail () const |
| thumbnail the thumbnail image to use in resource selectors | |
| bool | valid () const |
| int | version () const |
| Get the version of the resource. | |
| virtual | ~KoResource () |
Private Attributes | |
| Private *const | d |
Additional Inherited Members | |
Public Attributes inherited from KisPaintOpPreset | |
| KisPaintOpSettingsSP | settings {0} |
| KisPaintOpSettings::UpdateListenerSP | settingsUpdateListener |
| QList< KoResourceLoadResult > | sideLoadedResources |
| QScopedPointer< KisPaintOpPresetUpdateProxy > | updateProxy |
| QString | version |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Public Attributes inherited from KoResource | |
| bool | active {true} |
| QString | filename |
| QImage | image |
| QString | md5sum |
| QMap< QString, QVariant > | metadata |
| bool | modified {false} |
| QString | name |
| bool | permanent {false} |
| int | resourceId {-1} |
| QString | storageLocation |
| bool | valid {false} |
| int | version {-1} |
Definition at line 18 of file MyPaintPaintOpPreset.h.
| KisMyPaintPaintOpPreset::KisMyPaintPaintOpPreset | ( | const QString & | fileName = "" | ) |
Definition at line 34 of file MyPaintPaintOpPreset.cpp.
References KisMyPaintPaintOpPreset::Private::brush, and d.
| KisMyPaintPaintOpPreset::KisMyPaintPaintOpPreset | ( | const KisMyPaintPaintOpPreset & | rhs | ) |
Definition at line 42 of file MyPaintPaintOpPreset.cpp.
References KisMyPaintPaintOpPreset::Private::brush, d, and KisMyPaintPaintOpPreset::Private::json.
|
virtual |
Definition at line 55 of file MyPaintPaintOpPreset.cpp.
References KisMyPaintPaintOpPreset::Private::brush, and d.
| void KisMyPaintPaintOpPreset::apply | ( | KisPaintOpSettingsSP | settings | ) |
Definition at line 88 of file MyPaintPaintOpPreset.cpp.
References KisMyPaintPaintOpPreset::Private::brush, d, KisSharedPtr< T >::isNull(), MYPAINT_JSON, and KisPaintOpPreset::settings.
| MyPaintBrush * KisMyPaintPaintOpPreset::brush | ( | ) |
Definition at line 101 of file MyPaintPaintOpPreset.cpp.
References KisMyPaintPaintOpPreset::Private::brush, and d.
|
overridevirtual |
Implements KoResource.
Definition at line 61 of file MyPaintPaintOpPreset.cpp.
References KisMyPaintPaintOpPreset(), and toQShared().
| QByteArray KisMyPaintPaintOpPreset::getJsonData | ( | ) |
Definition at line 190 of file MyPaintPaintOpPreset.cpp.
References d, and KisMyPaintPaintOpPreset::Private::json.
|
overridevirtual |
See a comment in namespace deprecated_remove_after_krita6 in MyPaintStandardOptionData.cpp
we just round-trip the save operation to save the property out to the json object
Implements KoResource.
Definition at line 106 of file MyPaintPaintOpPreset.cpp.
References KoResource::addMetaData(), apply(), KisMyPaintPaintOpPreset::Private::brush, d, KisSharedPtr< T >::data(), KisPaintOpPreset::defaultFileExtension(), KoResource::filename, getJsonData(), KisMyPaintPaintOpPreset::Private::json, KisPaintOpPreset::loadFromDevice(), KoResource::metadata, MYPAINT_JSON, KisPaintOpPreset::resourcesInterface(), KoResource::setFilename(), KoResource::setName(), KisPaintOpPreset::setSettings(), KisPaintOpPreset::settings, KoResource::setValid(), KoResource::signature(), and warnPlugins.
|
inlineoverridevirtual |
Implements KoResource.
Definition at line 34 of file MyPaintPaintOpPreset.h.
References ResourceSubType::MyPaintPaintOpPresets, and ResourceType::PaintOpPresets.
| void KisMyPaintPaintOpPreset::setColor | ( | const KoColor | color, |
| const KoColorSpace * | colorSpace ) |
Definition at line 66 of file MyPaintPaintOpPreset.cpp.
References KisMyPaintPaintOpPreset::Private::brush, KoColorSpace::colorModelId(), d, KoColor::data(), RGBAColorModelID, RGBToHSV(), KoColorSpace::toQColor(), and value().
|
overridevirtual |
thumbnailPath returns the path to a separate thumbnail image, outside the actual resource file itself. If the path is relative, it is supposed start in the same location as the resource itself. If it's absolute, that is, it starts with "/", it is from the root of the storage.
Reimplemented from KoResource.
Definition at line 185 of file MyPaintPaintOpPreset.cpp.
References KoResource::filename.
|
overridevirtual |
updateThumbnail updates the thumbnail for this resource. Reimplement if your thumbnail is something else than the image set with setImage.
Reimplemented from KoResource.
Definition at line 180 of file MyPaintPaintOpPreset.cpp.
References d, KisMyPaintPaintOpPreset::Private::icon, and KoResource::thumbnail().
|
private |
Definition at line 45 of file MyPaintPaintOpPreset.h.