Improve the way how an element is updated in the new element panel.

Now Qet only use the new embbeded collection (XmlElementCollection).
No need to reload the old element panel for add a new element created by the new element panel
Elements are always imported to the embbeded collection of a project


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4468 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-05-05 13:31:04 +00:00
parent dd1bfabe2d
commit 168467abb0
18 changed files with 522 additions and 271 deletions

View File

@@ -391,40 +391,6 @@ QString FileElementCollectionItem::name()
return m_name;
}
/**
* @brief FileElementCollectionItem::canRemoveContent
* Reimplemented from ElementCollectionItem
* @return
*/
bool FileElementCollectionItem::canRemoveContent()
{
if (isCommonCollection()) return false;
else if (isDir() && isCollectionRoot()) return false;
else return true;
}
/**
* @brief FileElementCollectionItem::removeContent
* Reimplemented from ElementCollectionItem
* @return
*/
bool FileElementCollectionItem::removeContent()
{
if (!canRemoveContent()) return false;
if (isElement())
{
QFile file(fileSystemPath());
return file.remove();
}
else if (isDir() && !isCollectionRoot())
{
QDir dir (fileSystemPath());
return dir.removeRecursively();
}
return false;
}
void FileElementCollectionItem::insertNewItem(const QString &collection_name)
{
if (collection_name.isEmpty()) return;