27#include <kpagedialog.h>
28#include <klocalizedstring.h>
45 if (showDialog && !shape->
shapeId().isEmpty()) {
56 dialog->setWindowTitle(i18n(
"%1 Options", factory->
name()));
64 panel->connect(panel, SIGNAL(accept()), dialog, SLOT(accept()));
65 widgets.append(panel);
68 QString title = panel->windowTitle().isEmpty() ? panel->objectName() : panel->windowTitle();
69 dialog->addPage(panel, title);
75 dialog->setFaceType(KPageDialog::Tabbed);
76 if (dialog->exec() != KPageDialog::Accepted) {
103 return resultCommand;
127 return d->
addShape(shape,
true, parentShape, parent);
174 qWarning() <<
"THIS IS NOT GOOD!";
void setText(const KUndo2MagicString &text)
KUndo2MagicString text() const
virtual KoShapeManager * shapeManager() const =0
virtual KoUnit unit() const =0
virtual QWidget * canvasWidget()=0
QPointer< KoCanvasResourceProvider > resourceManager
const T value(const QString &id) const
QRectF documentRect() const
virtual qreal pixelsPerInch() const =0
virtual KoShapeContainer * createParentForShapes(const QList< KoShape * > shapes, bool forceNewLayer, KUndo2Command *parentCommand)
virtual QRectF documentRectInPixels() const =0
virtual KoDocumentResourceManager * resourceManager() const
KUndo2Command * addShapesDirect(const QList< KoShape * > shapes, KoShapeContainer *parentShape, KUndo2Command *parent)
KoShapeControllerBase * shapeController
KUndo2Command * addShape(KoShape *shape, bool showDialog, KoShapeContainer *parentShape, KUndo2Command *parent)
KUndo2Command * addShape(KoShape *shape, KoShapeContainer *parentShape, KUndo2Command *parent=0)
Add a shape to the document. If the shape has no parent, the active layer will become its parent.
QRectF documentRect() const
KoDocumentResourceManager * resourceManager() const
void setShapeControllerBase(KoShapeControllerBase *shapeController)
Set the KoShapeControllerBase used to add/remove shapes.
KoShapeController(KoCanvasBase *canvas, KoShapeControllerBase *shapeController)
KUndo2Command * addShapeDirect(KoShape *shape, KoShapeContainer *parentShape, KUndo2Command *parent=0)
Add a shape to the document, skipping any dialogs or other user interaction.
void reset()
reset sets the canvas and shapebased document to 0.
~KoShapeController() override
destructor
KUndo2Command * removeShape(KoShape *shape, KUndo2Command *parent=0)
Remove a shape from the document.
KoShapeControllerBase * documentBase() const
Returns the KoShapeControllerBase used to add/remove shapes.
qreal pixelsPerInch() const
QRectF documentRectInPixels() const
KUndo2Command * addShapesDirect(const QList< KoShape * > shape, KoShapeContainer *parentShape, KUndo2Command *parent=0)
Add shapes to the document, skipping any dialogs or other user interaction.
KUndo2Command * removeShapes(const QList< KoShape * > &shapes, KUndo2Command *parent=0)
The undo / redo command for creating shapes.
The undo / redo command for deleting shapes.
virtual QList< KoShapeConfigWidgetBase * > createShapeOptionPanels()
QList< KoShape * > shapes
static KoShapeRegistry * instance()
void setZIndex(qint16 zIndex)