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

#include <MyPaintPaintOpFactory.h>

+ Inheritance diagram for KisMyPaintOpFactory:

Classes

class  Private
 

Public Member Functions

QString category () const override
 
KisPaintOpConfigWidgetcreateConfigWidget (QWidget *parent, KisResourcesInterfaceSP resourcesInterface, KoCanvasResourcesInterfaceSP canvasResourcesInterface) override
 
KisPaintOpcreateOp (const KisPaintOpSettingsSP settings, KisPainter *painter, KisNodeSP node, KisImageSP image) override
 
KisPaintOpSettingsSP createSettings (KisResourcesInterfaceSP resourcesInterface) override
 
QIcon icon () override
 icon
 
QString id () const override
 
 KisMyPaintOpFactory ()
 
bool lodSizeThresholdSupported () const override
 
QString name () const override
 
QList< KoResourceLoadResultprepareEmbeddedResources (const KisPaintOpSettingsSP settings, KisResourcesInterfaceSP resourcesInterface) override
 
QList< KoResourceLoadResultprepareLinkedResources (const KisPaintOpSettingsSP settings, KisResourcesInterfaceSP resourcesInterface) override
 
virtual ~KisMyPaintOpFactory ()
 
- Public Member Functions inherited from KisPaintOpFactory
virtual KisInterstrokeDataFactorycreateInterstrokeDataFactory (const KisPaintOpSettingsSP settings, KisResourcesInterfaceSP resourcesInterface) const
 
 KisPaintOpFactory (const QStringList &whiteListedCompositeOps=QStringList())
 
int priority () const
 
void setPriority (int newPriority)
 
QStringList whiteListedCompositeOps () const
 
 ~KisPaintOpFactory () override
 

Private Attributes

Private *const m_d
 

Additional Inherited Members

- Public Types inherited from KisPaintOpFactory
enum  PaintopVisibility { AUTO , ALWAYS , NEVER }
 
- Static Public Member Functions inherited from KisPaintOpFactory
static QString categoryStable ()
 

Detailed Description

Definition at line 14 of file MyPaintPaintOpFactory.h.

Constructor & Destructor Documentation

◆ KisMyPaintOpFactory()

KisMyPaintOpFactory::KisMyPaintOpFactory ( )

Definition at line 28 of file MyPaintPaintOpFactory.cpp.

29 : m_d(new Private)
30{
31}

◆ ~KisMyPaintOpFactory()

KisMyPaintOpFactory::~KisMyPaintOpFactory ( )
virtual

Definition at line 33 of file MyPaintPaintOpFactory.cpp.

33 {
34
35 delete m_d;
36}

References m_d.

Member Function Documentation

◆ category()

QString KisMyPaintOpFactory::category ( ) const
overridevirtual

Implements KisPaintOpFactory.

Definition at line 76 of file MyPaintPaintOpFactory.cpp.

76 {
77
79}
static QString categoryStable()

References KisPaintOpFactory::categoryStable().

◆ createConfigWidget()

KisPaintOpConfigWidget * KisMyPaintOpFactory::createConfigWidget ( QWidget * parent,
KisResourcesInterfaceSP resourcesInterface,
KoCanvasResourcesInterfaceSP canvasResourcesInterface )
overridevirtual

create a widget that can display paintop settings

Implements KisPaintOpFactory.

Definition at line 51 of file MyPaintPaintOpFactory.cpp.

51 {
52
54
55 widget->setResourcesInterface(resourcesInterface);
56 widget->setCanvasResourcesInterface(canvasResourcesInterface);
57
58 return widget;
59}
virtual void setCanvasResourcesInterface(KoCanvasResourcesInterfaceSP canvasResourcesInterface)
virtual void setResourcesInterface(KisResourcesInterfaceSP resourcesInterface)

References KisConfigWidget::setCanvasResourcesInterface(), and KisPaintOpConfigWidget::setResourcesInterface().

◆ createOp()

KisPaintOp * KisMyPaintOpFactory::createOp ( const KisPaintOpSettingsSP settings,
KisPainter * painter,
KisNodeSP node,
KisImageSP image )
overridevirtual

Create a KisPaintOp with the given settings and painter.

Parameters
settingsthe settings associated with the input device
painterthe painter used to draw
nodethe node used to draw
imagethe image used to draw

Implements KisPaintOpFactory.

Definition at line 38 of file MyPaintPaintOpFactory.cpp.

38 {
39
40 KisPaintOp* op = new KisMyPaintPaintOp(settings, painter, node, image);
41 Q_CHECK_PTR(op);
42 return op;
43}

◆ createSettings()

KisPaintOpSettingsSP KisMyPaintOpFactory::createSettings ( KisResourcesInterfaceSP resourcesInterface)
overridevirtual

Create and return an settings object for this paintop.

Implements KisPaintOpFactory.

Definition at line 45 of file MyPaintPaintOpFactory.cpp.

45 {
46
47 KisPaintOpSettingsSP settings = new KisMyPaintOpSettings(resourcesInterface);
48 return settings;
49}

◆ icon()

QIcon KisMyPaintOpFactory::icon ( )
overridevirtual

icon

Returns
the icon to represent this paintop.

Reimplemented from KisPaintOpFactory.

Definition at line 71 of file MyPaintPaintOpFactory.cpp.

71 {
72
73 return KisIconUtils::loadIcon(id());
74}
QIcon loadIcon(const QString &name)

References KisIconUtils::loadIcon().

◆ id()

QString KisMyPaintOpFactory::id ( ) const
overridevirtual

Implements KisPaintOpFactory.

Definition at line 61 of file MyPaintPaintOpFactory.cpp.

61 {
62
63 return "mypaintbrush";
64}

◆ lodSizeThresholdSupported()

bool KisMyPaintOpFactory::lodSizeThresholdSupported ( ) const
overridevirtual

Implements KisPaintOpFactory.

Definition at line 97 of file MyPaintPaintOpFactory.cpp.

98{
99 return true;
100}

◆ name()

QString KisMyPaintOpFactory::name ( ) const
overridevirtual

Implements KisPaintOpFactory.

Definition at line 66 of file MyPaintPaintOpFactory.cpp.

66 {
67
68 return "MyPaint";
69}

◆ prepareEmbeddedResources()

QList< KoResourceLoadResult > KisMyPaintOpFactory::prepareEmbeddedResources ( const KisPaintOpSettingsSP settings,
KisResourcesInterfaceSP resourcesInterface )
overridevirtual
Returns
all the resources embedded into settings. The resources are first tried to be loaded from resourcesInterface, and, if it fails, loaded from the embedded data.

Implements KisPaintOpFactory.

Definition at line 89 of file MyPaintPaintOpFactory.cpp.

90{
91 Q_UNUSED(settings)
92 Q_UNUSED(resourcesInterface);
93
94 return {};
95}

◆ prepareLinkedResources()

QList< KoResourceLoadResult > KisMyPaintOpFactory::prepareLinkedResources ( const KisPaintOpSettingsSP settings,
KisResourcesInterfaceSP resourcesInterface )
overridevirtual
Returns
all the resources linked to settings.

Implements KisPaintOpFactory.

Definition at line 81 of file MyPaintPaintOpFactory.cpp.

82{
83 Q_UNUSED(settings)
84 Q_UNUSED(resourcesInterface);
85
86 return {};
87}

Member Data Documentation

◆ m_d

Private* const KisMyPaintOpFactory::m_d
private

Definition at line 38 of file MyPaintPaintOpFactory.h.


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