|
Krita Source Code Documentation
|
Factory for path shapes. More...
#include <EnhancedPathShapeFactory.h>
Inheritance diagram for EnhancedPathShapeFactory:Public Member Functions | |
| KoShape * | createDefaultShape (KoDocumentResourceManager *documentResources=0) const override |
| KoShape * | createShape (const KoProperties *params, KoDocumentResourceManager *documentResources=0) const override |
| EnhancedPathShapeFactory () | |
| constructor | |
| bool | supports (const QDomElement &e, KoShapeLoadingContext &context) const override |
| ~EnhancedPathShapeFactory () override | |
Public Member Functions inherited from KoShapeFactoryBase | |
| 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< KoShapeTemplate > | templates () const |
| QString | toolTip () const |
| ~KoShapeFactoryBase () override | |
| ~Private () | |
Private Types | |
| typedef QMap< QString, QVariant > | ComplexType |
| typedef QList< QVariant > | ListType |
Private Member Functions | |
| void | addArrow () |
| void | addCallout () |
| void | addCircularArrow () |
| void | addCross () |
| void | addGearhead () |
| void | addSmiley () |
| KoProperties * | dataToProperties (const QString &modifiers, const QStringList &commands, const ListType &handles, const ComplexType &formulae) const |
Additional Inherited Members | |
Public Attributes inherited from KoShapeFactoryBase | |
| KoDeferredShapeFactoryBase * | deferredFactory |
| QString | deferredPluginName |
| QString | family |
| bool | hidden |
| QString | iconName |
| const QString | id |
| int | loadingPriority |
| const QString | name |
| QMutex | pluginLoadingMutex |
| QList< QPointer< KoDocumentResourceManager > > | resourceManagers |
| QList< KoShapeTemplate > | templates |
| QString | tooltip |
| QList< QPair< QString, QStringList > > | xmlElements |
Protected Member Functions inherited from KoShapeFactoryBase | |
| void | addTemplate (const KoShapeTemplate ¶ms) |
| 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) |
Factory for path shapes.
Definition at line 15 of file EnhancedPathShapeFactory.h.
|
private |
Definition at line 32 of file EnhancedPathShapeFactory.h.
|
private |
Definition at line 33 of file EnhancedPathShapeFactory.h.
| EnhancedPathShapeFactory::EnhancedPathShapeFactory | ( | ) |
constructor
Definition at line 25 of file EnhancedPathShapeFactory.cpp.
References KoXmlNS::draw, koIconNameCStr, KoShapeFactoryBase::setIconName(), KoShapeFactoryBase::setLoadingPriority(), KoShapeFactoryBase::setToolTip(), and KoShapeFactoryBase::setXmlElementNames().
|
inlineoverride |
Definition at line 20 of file EnhancedPathShapeFactory.h.
|
private |
Definition at line 160 of file EnhancedPathShapeFactory.cpp.
References KoShapeFactoryBase::addTemplate(), dataToProperties(), KoShapeTemplate::family, KoShapeTemplate::iconName, KoShapeTemplate::id, koIconName, KoPathShapeId, KoShapeTemplate::name, KoShapeTemplate::properties, KoShapeTemplate::templateId, and KoShapeTemplate::toolTip.
|
private |
Definition at line 299 of file EnhancedPathShapeFactory.cpp.
References KoShapeFactoryBase::addTemplate(), dataToProperties(), KoShapeTemplate::family, KoShapeTemplate::iconName, KoShapeTemplate::id, koIconName, KoPathShapeId, KoShapeTemplate::name, KoShapeTemplate::properties, KoProperties::setProperty(), KoShapeTemplate::templateId, and KoShapeTemplate::toolTip.
|
private |
Definition at line 425 of file EnhancedPathShapeFactory.cpp.
References KoShapeFactoryBase::addTemplate(), dataToProperties(), KoShapeTemplate::family, KoShapeTemplate::iconName, KoShapeTemplate::id, koIconName, KoPathShapeId, KoShapeTemplate::name, KoShapeTemplate::properties, KoProperties::setProperty(), KoShapeTemplate::templateId, and KoShapeTemplate::toolTip.
|
private |
Definition at line 126 of file EnhancedPathShapeFactory.cpp.
References KoShapeFactoryBase::addTemplate(), dataToProperties(), KoShapeTemplate::family, KoShapeTemplate::iconName, KoShapeTemplate::id, koIconName, KoPathShapeId, KoShapeTemplate::name, KoShapeTemplate::properties, KoShapeTemplate::templateId, and KoShapeTemplate::toolTip.
|
private |
Definition at line 504 of file EnhancedPathShapeFactory.cpp.
References KoShapeFactoryBase::addTemplate(), dataToProperties(), KoShapeTemplate::family, KoShapeTemplate::iconName, KoShapeTemplate::id, koIconName, KoPathShapeId, M_PI, KoShapeTemplate::name, KoShapeTemplate::properties, KoProperties::setProperty(), KoShapeTemplate::templateId, and KoShapeTemplate::toolTip.
|
private |
Definition at line 379 of file EnhancedPathShapeFactory.cpp.
References KoShapeFactoryBase::addTemplate(), dataToProperties(), KoShapeTemplate::family, KoShapeTemplate::iconName, KoShapeTemplate::id, koIconName, KoPathShapeId, KoShapeTemplate::name, KoShapeTemplate::properties, KoProperties::setProperty(), KoShapeTemplate::templateId, and KoShapeTemplate::toolTip.
|
overridevirtual |
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.
| documentResources | the resources manager that has all the document wide resources which can be used to create the object. |
Reimplemented from KoShapeFactoryBase.
Definition at line 41 of file EnhancedPathShapeFactory.cpp.
References EnhancedPathShape::addCommand(), EnhancedPathShape::addFormula(), EnhancedPathShape::addHandle(), EnhancedPathShape::addModifiers(), KoPathShapeId, KoShape::setShapeId(), EnhancedPathShape::setSize(), KoShape::setStroke(), and toQShared().
|
overridevirtual |
This method should be implemented by factories to create a shape based on a set of properties that are specifically made for this shape-type. This method should also set this factories shapeId on the shape using KoShape::setShapeId() The default implementation just ignores 'params' and calls createDefaultShape()
| params | the parameters to use when creating the shape |
| documentResources | the resources manager that has all the document wide resources which can be used to create the object. |
Reimplemented from KoShapeFactoryBase.
Definition at line 68 of file EnhancedPathShapeFactory.cpp.
References EnhancedPathShape::addCommand(), EnhancedPathShape::addFormula(), EnhancedPathShape::addHandle(), EnhancedPathShape::addModifiers(), KoPathShapeId, KoProperties::property(), KoShape::setBackground(), KoShape::setShapeId(), EnhancedPathShape::setSize(), KoShape::setStroke(), KoPathShape::size(), KoProperties::stringProperty(), toQShared(), and v.
|
private |
Definition at line 112 of file EnhancedPathShapeFactory.cpp.
References KoProperties::setProperty().
|
overridevirtual |
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 550 of file EnhancedPathShapeFactory.cpp.
References KoXmlNS::draw.