27 QUndoCommand( text, parent ), mGroup( item ), mComposition( c ), mState( s ), mFirstRun( true )
29 mItems = mGroup->
items();
61 void QgsGroupUngroupItemsCommand::switchState()
83 for ( ; itemIter != mItems.
end(); ++itemIter )
90 mComposition->
addItem( mGroup );
void setDirty(bool b=true)
Flag the project as dirty (modified).
QgsComposerModel * itemsModel()
Returns the items model attached to the composition.
void removeItems() override
Removes the items but does not delete them.
A container for grouping several QgsComposerItems.
void setItemRestored(QgsComposerItem *item)
Restores an item to the composition.
QSet< QgsComposerItem * > items()
State
Command kind, and state.
void removeItem(QGraphicsItem *item)
void addItem(QgsComposerItem *item) override
Adds an item to the group.
QgsGroupUngroupItemsCommand(State s, QgsComposerItemGroup *item, QgsComposition *c, const QString &text, QUndoCommand *parent=nullptr)
Create a group or ungroup command.
~QgsGroupUngroupItemsCommand()
void itemRemoved(QgsComposerItem *item)
Signals removal of an item (the group)
Graphics scene for map printing.
static QgsProject * instance()
Returns the QgsProject singleton instance.
void setItemRemoved(QgsComposerItem *item)
Marks an item as removed from the composition.
void addItem(QGraphicsItem *item)
void itemAdded(QgsComposerItem *item)
Signals addition of an item (the group)