mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-17 16:59:59 +01:00
Improve the remove of an item in the new panel. No need to reload the collection, use QAbstractItemModel::removeRows instead.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4285 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -40,6 +40,7 @@ class ElementCollectionItem
|
||||
virtual int type() const {return Type;}
|
||||
|
||||
void appendChild (ElementCollectionItem *item);
|
||||
bool removeChild (int row, int count);
|
||||
ElementCollectionItem *child(int row);
|
||||
int childCount() const;
|
||||
int columnCount() const;
|
||||
@@ -57,6 +58,9 @@ class ElementCollectionItem
|
||||
virtual bool isValid() const;
|
||||
virtual QList <ElementCollectionItem *> items() const;
|
||||
|
||||
virtual bool canRemoveContent();
|
||||
virtual bool removeContent();
|
||||
|
||||
protected:
|
||||
ElementCollectionItem *m_parent_item;
|
||||
QList <ElementCollectionItem *> m_child_items;
|
||||
|
||||
Reference in New Issue
Block a user