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

#include <kis_shape_selection.h>

+ Inheritance diagram for KisShapeSelectionFactory:

Public Member Functions

KoShapecreateDefaultShape (KoDocumentResourceManager *documentResources=0) const override
 
 KisShapeSelectionFactory ()
 
bool supports (const QDomElement &e, KoShapeLoadingContext &context) const override
 
 ~KisShapeSelectionFactory () override
 
- Public Member Functions inherited from KoShapeFactoryBase
virtual KoShapecreateShape (const KoProperties *params, KoDocumentResourceManager *documentResources=0) const
 
virtual QList< KoShapeConfigWidgetBase * > createShapeOptionPanels ()
 
QString family () const
 
bool hidden () const
 
QString iconName () const
 
QString id () const
 
 KoShapeFactoryBase (const QString &id, const QString &name, const QString &deferredPluginName=QString())
 
int loadingPriority () const
 lower prio means the shape is more generic and will be checked later
 
QString name () const
 
virtual void newDocumentResourceManager (KoDocumentResourceManager *manager) const
 
QList< QPair< QString, QStringList > > odfElements () const
 
 Private (const QString &_id, const QString &_name, const QString &_deferredPluginName)
 
QList< KoShapeTemplatetemplates () const
 
QString toolTip () const
 
 ~KoShapeFactoryBase () override
 
 ~Private ()
 

Additional Inherited Members

- Public Attributes inherited from KoShapeFactoryBase
KoDeferredShapeFactoryBasedeferredFactory
 
QString deferredPluginName
 
QString family
 
bool hidden
 
QString iconName
 
const QString id
 
int loadingPriority
 
const QString name
 
QMutex pluginLoadingMutex
 
QList< QPointer< KoDocumentResourceManager > > resourceManagers
 
QList< KoShapeTemplatetemplates
 
QString tooltip
 
QList< QPair< QString, QStringList > > xmlElements
 
- Protected Member Functions inherited from KoShapeFactoryBase
void addTemplate (const KoShapeTemplate &params)
 
void setFamily (const QString &family)
 
void setHidden (bool hidden)
 
void setIconName (const char *iconName)
 
void setLoadingPriority (int priority)
 
void setToolTip (const QString &tooltip)
 
void setXmlElementNames (const QString &nameSpace, const QStringList &elementNames)
 
void setXmlElements (const QList< QPair< QString, QStringList > > &elementNamesList)
 

Detailed Description

Definition at line 115 of file kis_shape_selection.h.

Constructor & Destructor Documentation

◆ KisShapeSelectionFactory()

KisShapeSelectionFactory::KisShapeSelectionFactory ( )

Definition at line 278 of file kis_shape_selection.cpp.

279 : KoShapeFactoryBase("KisShapeSelection", "selection shape container")
280{
281 setHidden(true);
282}
void setHidden(bool hidden)
KoShapeFactoryBase(const QString &id, const QString &name, const QString &deferredPluginName=QString())

References KoShapeFactoryBase::setHidden().

◆ ~KisShapeSelectionFactory()

KisShapeSelectionFactory::~KisShapeSelectionFactory ( )
inlineoverride

Definition at line 120 of file kis_shape_selection.h.

120{}

Member Function Documentation

◆ createDefaultShape()

KoShape * KisShapeSelectionFactory::createDefaultShape ( KoDocumentResourceManager * documentResources = 0) const
inlineoverridevirtual

This method should be implemented by factories to create a shape that the user gets when doing a base insert. For example from a script. The created shape should have its values set to good defaults that the user can then adjust further if needed. Including the KoShape:setShapeId(), with the Id from this factory The default shape position is not relevant, it will be moved by the caller.

Parameters
documentResourcesthe resources manager that has all the document wide resources which can be used to create the object.
Returns
a new shape
See also
createShape() newDocumentResourceManager()

Reimplemented from KoShapeFactoryBase.

Definition at line 122 of file kis_shape_selection.h.

122 {
123 Q_UNUSED(documentResources);
124 return 0;
125 }

◆ supports()

bool KisShapeSelectionFactory::supports ( const QDomElement & element,
KoShapeLoadingContext & context ) const
inlineoverridevirtual

returns true if this shapeFactory is able to load the ODF type started at argument element. ('draw:line' / 'draw:frame' / etc)

Implements KoShapeFactoryBase.

Definition at line 127 of file kis_shape_selection.h.

127 {
128 Q_UNUSED(e);
129 Q_UNUSED(context);
130 return false;
131 }

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