24 QgsLayoutItemGroupUndoCommand::QgsLayoutItemGroupUndoCommand( State s, 
QgsLayoutItemGroup *group, 
QgsLayout *layout, 
const QString &text, QUndoCommand *parent )
 
   25   : QUndoCommand( text, parent )
 
   26   , mGroupUuid( group->uuid() )
 
   30   const QList< QgsLayoutItem * > items = group->
items();
 
   33     mItemUuids.insert( i->uuid() );
 
   37 void QgsLayoutItemGroupUndoCommand::redo()
 
   47 void QgsLayoutItemGroupUndoCommand::undo()
 
   57 void QgsLayoutItemGroupUndoCommand::switchState()
 
   59   if ( mState == Grouped )
 
   63     Q_ASSERT_X( group, 
"QgsLayoutItemGroupUndoCommand::switchState", 
"Could not find group" );
 
   65     mLayout->removeLayoutItemPrivate( group );
 
   75       mLayout->addLayoutItemPrivate( group );
 
   78     for ( 
const QString &childUuid : std::as_const( mItemUuids ) )
 
   86   mLayout->project()->setDirty( 
true );
 
A container for grouping several QgsLayoutItems.
void removeItems()
Removes all items from the group (but does not delete them).
void addItem(QgsLayoutItem *item)
Adds an item to the group.
QList< QgsLayoutItem * > items() const
Returns a list of items contained by the group.
Base class for graphical items within a QgsLayout.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.