krita
KisResource Class Reference
#include <kis_resource.h>
Inheritance diagram for KisResource:

Detailed Description
The KisResource class provides a representation of Krita image resources.This includes, but not limited to, brushes and patterns.
This replaces the KisKrayon facility that used to be present in Krayon.
Definition at line 32 of file kis_resource.h.
Public Member Functions | |
KisResource (const QString &filename) | |
virtual | ~KisResource () |
virtual bool | load ()=0 |
virtual bool | save ()=0 |
virtual QImage | img ()=0 |
QString | filename () const |
void | setFilename (const QString &filename) |
QString | name () const |
void | setName (const QString &name) |
bool | valid () const |
void | setValid (bool valid) |
Constructor & Destructor Documentation
KisResource::KisResource | ( | const QString & | filename | ) |
Creates a new KisResource object using filename
.
No file is opened in the constructor, you have to call load.
- Parameters:
-
filename the file name to save and load from.
Definition at line 21 of file kis_resource.cc.
Member Function Documentation
virtual QImage KisResource::img | ( | ) | [pure virtual] |
Returns a QImage representing this resource.
This image could be null.
Implemented in KisBrush, KisGradient, KisImagePipeBrush, KisPalette, and KisPattern.
virtual bool KisResource::load | ( | ) | [pure virtual] |
Load this resource.
Implemented in KisAutobrushResource, KisAutogradientResource, KisBrush, KisGradient, KisImagePipeBrush, KisPalette, KisPattern, and KisTextBrushResource.
virtual bool KisResource::save | ( | ) | [pure virtual] |
Save this resource asynchronously.
The signal saveComplete is emitted when the resource has been saved.
Implemented in KisBrush, KisGradient, KisImagePipeBrush, KisPalette, and KisPattern.
The documentation for this class was generated from the following files: