Diagram editor : add new action in the context menu : multiple paste.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5319 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2018-04-08 16:50:52 +00:00
parent b9e24cd08f
commit 12e7a7002e
7 changed files with 322 additions and 0 deletions

View File

@@ -265,6 +265,51 @@ int DiagramContent::removeNonMovableItems()
return count_;
}
DiagramContent &DiagramContent::operator+=(const DiagramContent &other)
{
for(Element *elmt : other.m_elements)
if(!m_elements.contains(elmt))
m_elements << elmt;
for(IndependentTextItem *iti : other.m_text_fields)
if(!m_text_fields.contains(iti))
m_text_fields << iti;
for(DiagramImageItem *dii : other.m_images)
if(!m_images.contains(dii))
m_images << dii;
for(QetShapeItem *qsi : other.m_shapes)
if(!m_shapes.contains(qsi))
m_shapes << qsi;
for(Conductor *c : other.m_conductors_to_update)
if(!m_conductors_to_update.contains(c))
m_conductors_to_update << c;
for(Conductor *c : other.m_conductors_to_move)
if(!m_conductors_to_move.contains(c))
m_conductors_to_move << c;
for(Conductor *c : other.m_other_conductors)
if(!m_other_conductors.contains(c))
m_other_conductors << c;
for(DynamicElementTextItem *deti : other.m_element_texts)
if(!m_element_texts.contains(deti))
m_element_texts << deti;
for(ElementTextItemGroup *etig : other.m_texts_groups)
if(!m_texts_groups.contains(etig))
m_texts_groups << etig;
for(QGraphicsItem *qgi : other.m_selected_items)
if(!m_selected_items.contains(qgi))
m_selected_items << qgi;
return *this;
}
/**
* @brief DiagramContent::items
* @param filter