10#include <klocalizedstring.h>
124 shapeLayer->disconnect(
this);
160 Q_FOREACH (
KoShape *shape, shapes) {
168 bool allSameBelongsToShapeSelection =
true;
170 Q_FOREACH (
KoShape *shape, shapes) {
176 if (baseBelongsToSelection && allSameBelongsToShapeSelection) {
181 if (!shapeSelectionComponent) {
187 resultParent = shapeSelection;
194 if (!shapeLayer || forceNewLayer) {
202 image()->rootLayer(),
203 image()->rootLayer()->childCount()));
206 resultParent = shapeLayer;
215 return image ?
image->
bounds() : QRect(0, 0, 666, 777);
221 return image ?
image->
xRes() * 72.0 : 72.0;
226 if (!
image())
return;
const quint8 OPACITY_OPAQUE_U8
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisSelectedShapesProxy selectedShapesProxy
KoShapeManager shapeManager
KisViewManager * viewManager() const
KisImageWSP image() const
void setImage(KisImageWSP image)
The command for adding a layer.
QRect bounds() const override
bool containsNode(KisNodeSP node) const
KisNodeDummy * nodeToDummy(KisNodeSP node)
KisNodeDummy * rootDummy() const
KisNodeShape * addNode(KisNodeSP node, KisNodeSP parent, KisNodeSP aboveThis)
KisNodeShape * nodeToShape(KisNodeSP node)
void removeNode(KisNodeSP node)
KoSelection * selection() override
void setImage(KisImageWSP image, KisNodeSP activeNode) override
qreal pixelsPerInch() const override
bool hasDummyForNode(KisNodeSP node) const override
int dummiesCount() const override
void slotUpdateDocumentResolution()
void addNodeImpl(KisNodeSP node, KisNodeSP parent, KisNodeSP aboveThis) override
KisNodeDummy * rootDummy() const override
KisShapeController(KisNameServer *nameServer, KUndo2Stack *undoStack, QObject *parent=0)
void setInitialShapeForCanvas(KisCanvas2 *canvas)
void currentLayerChanged(const KoShapeLayer *)
void selectionContentChanged()
QRectF documentRectInPixels() const override
void slotUpdateDocumentSize()
void removeNodeImpl(KisNodeSP node) override
KoShapeLayer * shapeForNode(KisNodeSP layer) const
KisNodeDummy * dummyForNode(KisNodeSP layer) const override
KoShapeContainer * createParentForShapes(const QList< KoShape * > shapes, bool forceNewLayer, KUndo2Command *parentCommand) override
~KisShapeController() override
KoShapeManager * shapeManager() const
void addConnection(Sender sender, Signal signal, Receiver receiver, Method method, Qt::ConnectionType type=Qt::AutoConnection)
KisSelectionSP selection()
virtual KoCanvasBase * canvas() const
void setUndoStack(KUndo2Stack *undoStack)
void setResource(int key, const QVariant &value)
@ DocumentRectInPixels
Bounds of the document in pixels.
@ DocumentResolution
Pixels-per-inch resolution of the document.
void select(KoShape *shape)
const QList< KoShape * > selectedShapes() const
KoShapeLayer * activeLayer() const
virtual KoDocumentResourceManager * resourceManager() const
KoShapeUserData * userData() const
KoShapeContainer * parent() const
#define KIS_SAFE_ASSERT_RECOVER_BREAK(cond)
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
static bool belongsToShapeSelection(KoShape *shape)
void addCommand(KUndo2Command *cmd)
KUndo2Command * convertToVectorSelection(KisSelectionComponent *shapeSelection)
converts shape selection into the vector state
KisSelectionComponent * shapeSelection
KisSignalAutoConnectionsStore imageConnections
KisNameServer * nameServer
KisNodeShapesGraph shapesGraph