24 : m_provider(provider)
29 return m_provider->resource(key);
70 d->manager.setResource(key,
value);
75 return d->manager.resource(key);
101 return d->manager.koColorResource(key);
126 return d->manager.koShapeResource(key);
177 return d->manager.boolResource(key);
182 return d->manager.intResource(key);
187 return d->manager.stringResource(key);
192 return d->manager.sizeResource(key);
197 return d->manager.hasResource(key);
202 d->manager.clearResource(key);
207 d->manager.addDerivedResourceConverter(converter);
212 return d->manager.hasDerivedResourceConverter(key);
217 d->manager.removeDerivedResourceConverter(key);
222 return d->manager.hasAbstractResource(key);
227 d->manager.removeAbstractResource(key);
232 d->manager.addResourceUpdateMediator(mediator);
237 return d->manager.hasResourceUpdateMediator(key);
242 d->manager.removeResourceUpdateMediator(key);
247 d->manager.addActiveCanvasResourceDependency(dep);
252 return d->manager.hasActiveCanvasResourceDependency(sourceKey, targetKey);
257 d->manager.removeActiveCanvasResourceDependency(sourceKey, targetKey);
262 d->manager.setAbstractResource(abstractResource);
267 return d->interfaceWrapper;
float value(const T *src, size_t ch)
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
QVariant resource(int key) const
int decorationThickness() const
decorationThickness
KoUnit unitResource(int key) const
KoCanvasResourceProvider(QObject *parent=0)
~KoCanvasResourceProvider() override
void addActiveCanvasResourceDependency(KoActiveCanvasResourceDependencySP dep)
KoShape * koShapeResource(int key) const
bool hasResource(int key) const
bool hasDerivedResourceConverter(int key)
bool hasAbstractResource(int key)
void setHandleRadius(int handleSize)
void removeAbstractResource(int key)
void setBackgroundColor(const KoColor &color)
bool isUsingOtherColor() const
isUsingOtherColor
KoCanvasResourcesInterfaceSP canvasResourcesInterface() const
bool boolResource(int key) const
KoResourceManager manager
KoColor foregroundColor() const
void canvasResourceChanged(int key, const QVariant &value)
void clearResource(int key)
QSharedPointer< CanvasResourceProviderInterfaceWrapper > interfaceWrapper
KoColor koColorResource(int key) const
int handleRadius() const
Returns the actual handle radius.
void canvasResourceChangeAttempted(int key, const QVariant &value)
int intResource(int key) const
bool hasResourceUpdateMediator(int key)
void setDecorationThickness(int decorationThickness)
setDecorationThickness Set the minimum decoration thickness.
KoColor backgroundColor() const
void removeResourceUpdateMediator(int key)
void removeDerivedResourceConverter(int key)
void setForegroundColor(const KoColor &color)
QString stringResource(int key) const
void removeActiveCanvasResourceDependency(int sourceKey, int targetKey)
void setUsingOtherColor(bool usingOtherColor)
setUsingOtherColor Set whether the user requested the current action to use the colors the other way ...
bool hasActiveCanvasResourceDependency(int sourceKey, int targetKey) const
Private(KoCanvasResourceProvider *q)
void addResourceUpdateMediator(KoResourceUpdateMediatorSP mediator)
void setAbstractResource(KoAbstractCanvasResourceInterfaceSP abstractResource)
void setResource(int key, const QVariant &value)
void addDerivedResourceConverter(KoDerivedResourceConverterSP converter)
QSizeF sizeResource(int key) const
An abstract class for providing access to canvas resources like current gradient and Fg/Bg colors.
The KoResourceManager class provides access to the currently active resources for a given canvas....
void resourceChangeAttempted(int key, const QVariant &value)
void resourceChanged(int key, const QVariant &value)
@ DecorationThickness
Integer, the thickness of single px decorations, will be adjusted by HiDPI settings....
@ HandleRadius
The handle radius used for drawing handles of any kind.
@ BackgroundColor
The active background color selected for this canvas.
@ ForegroundColor
The active foreground color selected for this canvas.
CanvasResourceProviderInterfaceWrapper(KoCanvasResourceProvider *provider)
QVariant resource(int key) const override
static KoColorSpaceRegistry * instance()
const KoColorSpace * rgb8(const QString &profileName=QString())