Loading elements collections doesn't freeze gui anymore.

This commit is contained in:
Claveau Joshua
2020-01-19 11:53:40 +01:00
parent ed2e72e995
commit f297e28b64
7 changed files with 64 additions and 52 deletions

View File

@@ -60,8 +60,9 @@ class ElementsCollectionModel : public QStandardItemModel
QModelIndex indexFromLocation(const ElementsLocation &location);
signals:
void loadingMaxValue(int);
void loadingProgressValue(int);
void loadingProgressValueChanged(int);
void loadingProgressRangeChanged(int, int);
void loadingFinished();
private:
void elementIntegratedToCollection (const QString& path);
@@ -72,6 +73,8 @@ class ElementsCollectionModel : public QStandardItemModel
QList <QETProject *> m_project_list;
QHash <QETProject *, XmlProjectElementCollectionItem *> m_project_hash;
bool m_hide_element = false;
QFuture<void> m_future;
QList <ElementCollectionItem *> m_items_list_to_setUp;
};
#endif // ELEMENTSCOLLECTIONMODEL2_H