Krita Source Code Documentation
Loading...
Searching...
No Matches
ToolOpacityAbstractResource Class Reference

#include <kis_abstract_resources.h>

+ Inheritance diagram for ToolOpacityAbstractResource:

Public Member Functions

void setValue (const QVariant value) override
 set the value of the current resource
 
 ToolOpacityAbstractResource (int key, qreal value)
 
QVariant value () const override
 
- Public Member Functions inherited from KoAbstractCanvasResourceInterface
int key () const
 
 KoAbstractCanvasResourceInterface (int key, const QString debugTag=QString())
 

Private Attributes

qreal m_value
 

Additional Inherited Members

- Signals inherited from KoAbstractCanvasResourceInterface
void sigResourceChangedExternal (int key, const QVariant &value)
 

Detailed Description

Definition at line 8 of file kis_abstract_resources.h.

Constructor & Destructor Documentation

◆ ToolOpacityAbstractResource()

ToolOpacityAbstractResource::ToolOpacityAbstractResource ( int key,
qreal value )

Member Function Documentation

◆ setValue()

void ToolOpacityAbstractResource::setValue ( const QVariant value)
overridevirtual

set the value of the current resource

Implements KoAbstractCanvasResourceInterface.

Definition at line 18 of file kis_abstract_resources.cpp.

18 {
19 m_value = value.value<qreal>();
20}

References m_value, and value().

◆ value()

QVariant ToolOpacityAbstractResource::value ( ) const
overridevirtual

Return the current value of the resource

Implements KoAbstractCanvasResourceInterface.

Definition at line 14 of file kis_abstract_resources.cpp.

14 {
15 return QVariant::fromValue(m_value);
16}

References m_value.

Member Data Documentation

◆ m_value

qreal ToolOpacityAbstractResource::m_value
private

Definition at line 17 of file kis_abstract_resources.h.


The documentation for this class was generated from the following files: