18#ifndef ELEMENTSCOLLECTIONMODEL2_H
19#define ELEMENTSCOLLECTIONMODEL2_H
21#include <QStandardItemModel>
40 QVariant
data(
const QModelIndex &index,
int role)
const override;
41 QMimeData *
mimeData(
const QModelIndexList &indexes)
const override;
43 bool canDropMimeData(
const QMimeData *
data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent)
const override;
44 bool dropMimeData(
const QMimeData *
data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent)
override;
46 void loadCollections(
bool common_collection,
bool company_collection,
bool custom_collection, QList<QETProject *> projects);
57 QList<QETProject *>
project()
const;
61 QList <ElementCollectionItem *>
items()
const;
The ElementCollectionItem class This class represent a item (a directory or an element) in a element ...
Definition elementcollectionitem.h:30
void highlightUnusedElement()
ElementsCollectionModel::highlightUnusedElement Highlight every unused element of managed project.
Definition elementscollectionmodel.cpp:546
void elementIntegratedToCollection(const QString &path)
ElementsCollectionModel::elementIntegratedToCollection When an element is added to embedded collectio...
Definition elementscollectionmodel.cpp:680
QVariant data(const QModelIndex &index, int role) const override
ElementsCollectionModel::data Reimplemented from QStandardItemModel.
Definition elementscollectionmodel.cpp:62
void loadMacrosCollection()
ElementsCollectionModel::loadMacrosCollection Load the macros collection synchronously to avoid threa...
Definition elementscollectionmodel.cpp:320
QStringList mimeTypes() const override
ElementsCollectionModel::mimeTypes Reimplemented from QStandardItemModel.
Definition elementscollectionmodel.cpp:110
bool isHideElement()
Definition elementscollectionmodel.h:64
QList< ElementCollectionItem * > m_items_list_to_setUp
Definition elementscollectionmodel.h:82
void itemRemovedFromCollection(const QString &path)
ElementsCollectionModel::itemRemovedFromCollection This method must be called by a signal,...
Definition elementscollectionmodel.cpp:715
void addMacrosCollection(bool set_data=true)
ElementsCollectionModel::addMacrosCollection Add the user macros collection to this model.
Definition elementscollectionmodel.cpp:331
bool m_hide_element
Definition elementscollectionmodel.h:80
void addCompanyCollection(bool set_data=true)
ElementsCollectionModel::addCompanyCollection Add the company elements collection to this model.
Definition elementscollectionmodel.cpp:374
QList< QETProject * > m_project_list
Definition elementscollectionmodel.h:78
void hideElement()
ElementsCollectionModel::hideElement Hide element in this model, only directory is managed.
Definition elementscollectionmodel.cpp:617
ElementsCollectionModel(QObject *parent=Q_NULLPTR)
ElementsCollectionModel::ElementsCollectionModel Constructor.
Definition elementscollectionmodel.cpp:36
QMimeData * mimeData(const QModelIndexList &indexes) const override
ElementsCollectionModel::mimeData Reimplemented from QStandardItemModel.
Definition elementscollectionmodel.cpp:83
QList< ElementCollectionItem * > projectItems(QETProject *project) const
ElementsCollectionModel::projectItems.
Definition elementscollectionmodel.cpp:599
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
ElementsCollectionModel::dropMimeData Reimplemented from QStandardItemModel.
Definition elementscollectionmodel.cpp:179
QHash< QETProject *, XmlProjectElementCollectionItem * > m_project_hash
Definition elementscollectionmodel.h:79
QModelIndex indexFromLocation(const ElementsLocation &location)
ElementsCollectionModel::indexFromLocation Return the index who represent location....
Definition elementscollectionmodel.cpp:634
QFuture< void > m_future
Definition elementscollectionmodel.h:81
void updateItem(const QString &path)
ElementsCollectionModel::updateItem Update the item at path.
Definition elementscollectionmodel.cpp:744
void addCommonCollection(bool set_data=true)
ElementsCollectionModel::addCommonCollection Add the common elements collection to this model.
Definition elementscollectionmodel.cpp:355
void addCustomCollection(bool set_data=true)
ElementsCollectionModel::addCustomCollection Add the custom elements collection to this model.
Definition elementscollectionmodel.cpp:393
void loadingProgressRangeChanged(int, int)
void addProject(QETProject *project, bool set_data=true)
ElementsCollectionModel::addProject Add project to this model.
Definition elementscollectionmodel.cpp:472
void loadCollections(bool common_collection, bool company_collection, bool custom_collection, QList< QETProject * > projects)
ElementsCollectionModel::loadCollections Load the several collections in this model....
Definition elementscollectionmodel.cpp:277
QList< QETProject * > project() const
ElementsCollectionModel::project.
Definition elementscollectionmodel.cpp:536
~ElementsCollectionModel() override
ElementsCollectionModel::~ElementsCollectionModel Destructor. loadCollections() may still have backgr...
Definition elementscollectionmodel.cpp:50
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override
ElementsCollectionModel::canDropMimeData Reimplemented from QStandardItemModel.
Definition elementscollectionmodel.cpp:128
void removeProject(QETProject *project)
ElementsCollectionModel::removeProject Remove project from this model.
Definition elementscollectionmodel.cpp:505
void addLocation(const ElementsLocation &location)
ElementsCollectionModel::addLocation Add the element or directory to this model. If the location is a...
Definition elementscollectionmodel.cpp:413
void loadingProgressValueChanged(int)
QList< ElementCollectionItem * > items() const
ElementsCollectionModel::items.
Definition elementscollectionmodel.cpp:581
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition elementslocation.h:47
Definition qetproject.h:77
The XmlProjectElementCollectionItem class This class specialise ElementCollectionItem for manage an x...
Definition xmlprojectelementcollectionitem.h:32