typedef for QMultiMap specified

preferencesAboutTextFull
Ilia Ryabokon 12 years ago
parent dc492cb245
commit 46b81abe15
  1. 2
      src/domain/UBGraphicsItemUndoCommand.cpp
  2. 6
      src/domain/UBGraphicsItemUndoCommand.h
  3. 2
      src/domain/UBGraphicsScene.cpp

@ -27,7 +27,7 @@
#include "domain/UBGraphicsGroupContainerItem.h" #include "domain/UBGraphicsGroupContainerItem.h"
UBGraphicsItemUndoCommand::UBGraphicsItemUndoCommand(UBGraphicsScene* pScene, const QSet<QGraphicsItem*>& pRemovedItems, UBGraphicsItemUndoCommand::UBGraphicsItemUndoCommand(UBGraphicsScene* pScene, const QSet<QGraphicsItem*>& pRemovedItems,
const QSet<QGraphicsItem*>& pAddedItems, const QMultiMap<UBGraphicsGroupContainerItem*, QUuid> &groupsMap) const QSet<QGraphicsItem*>& pAddedItems, const GroupDataTable &groupsMap)
: mScene(pScene) : mScene(pScene)
, mRemovedItems(pRemovedItems - pAddedItems) , mRemovedItems(pRemovedItems - pAddedItems)
, mAddedItems(pAddedItems - pRemovedItems) , mAddedItems(pAddedItems - pRemovedItems)

@ -27,8 +27,10 @@ class UBGraphicsScene;
class UBGraphicsItemUndoCommand : public UBAbstractUndoCommand class UBGraphicsItemUndoCommand : public UBAbstractUndoCommand
{ {
public: public:
typedef QMultiMap<UBGraphicsGroupContainerItem*, QUuid> GroupDataTable;
UBGraphicsItemUndoCommand(UBGraphicsScene* pScene, const QSet<QGraphicsItem*>& pRemovedItems, UBGraphicsItemUndoCommand(UBGraphicsScene* pScene, const QSet<QGraphicsItem*>& pRemovedItems,
const QSet<QGraphicsItem*>& pAddedItems, const QMultiMap<UBGraphicsGroupContainerItem*, QUuid> &groupsMap = QMultiMap<UBGraphicsGroupContainerItem*, QUuid>()); const QSet<QGraphicsItem*>& pAddedItems, const GroupDataTable &groupsMap = GroupDataTable());
UBGraphicsItemUndoCommand(UBGraphicsScene* pScene, QGraphicsItem* pRemovedItem, UBGraphicsItemUndoCommand(UBGraphicsScene* pScene, QGraphicsItem* pRemovedItem,
QGraphicsItem* pAddedItem); QGraphicsItem* pAddedItem);
@ -48,7 +50,7 @@ class UBGraphicsItemUndoCommand : public UBAbstractUndoCommand
UBGraphicsScene* mScene; UBGraphicsScene* mScene;
QSet<QGraphicsItem*> mRemovedItems; QSet<QGraphicsItem*> mRemovedItems;
QSet<QGraphicsItem*> mAddedItems; QSet<QGraphicsItem*> mAddedItems;
QMultiMap<UBGraphicsGroupContainerItem*, QUuid> mExcludedFromGroup; GroupDataTable mExcludedFromGroup;
bool mFirstRedo; bool mFirstRedo;
}; };

@ -1067,7 +1067,7 @@ UBItem* UBGraphicsScene::deepCopy() const
void UBGraphicsScene::clearContent(clearCase pCase) void UBGraphicsScene::clearContent(clearCase pCase)
{ {
QSet<QGraphicsItem*> removedItems; QSet<QGraphicsItem*> removedItems;
QMultiMap<UBGraphicsGroupContainerItem*, QUuid> groupsMap; UBGraphicsItemUndoCommand::GroupDataTable groupsMap;
switch (pCase) { switch (pCase) {
case clearBackground : case clearBackground :

Loading…
Cancel
Save