Krita Source Code Documentation
Loading...
Searching...
No Matches
PathToolOptionWidget.cpp File Reference
#include "PathToolOptionWidget.h"
#include "KoPathTool.h"
#include <QAction>
#include <KoPathShape.h>
#include <KoParameterShape.h>
#include <KoShapeConfigWidgetBase.h>
#include <QVBoxLayout>
#include <KoCanvasBase.h>
#include <KoShapeRegistry.h>
#include <KoShapeFactoryBase.h>
#include <KoUnit.h>
#include "kis_assert.h"

Go to the source code of this file.

Functions

QString shapeIdFromShape (KoPathShape *pathShape)
 

Function Documentation

◆ shapeIdFromShape()

QString shapeIdFromShape ( KoPathShape * pathShape)

Definition at line 62 of file PathToolOptionWidget.cpp.

63{
64 if (!pathShape) return QString();
65
66 QString shapeId = pathShape->pathShapeId();
67
68 KoParameterShape *paramShape = dynamic_cast<KoParameterShape *>(pathShape);
69 if (paramShape && !paramShape->isParametricShape()) {
70 shapeId = paramShape->shapeId();
71 }
72
73 return shapeId;
74}
bool isParametricShape() const
Check if object is a parametric shape.
virtual QString pathShapeId() const
QString shapeId() const
Definition KoShape.cpp:1057

References KoParameterShape::isParametricShape(), KoPathShape::pathShapeId(), and KoShape::shapeId().