1 #ifndef ITEMTEMPLATESMODEL_H 2 #define ITEMTEMPLATESMODEL_H 4 #include <QStandardItemModel> 6 #include <QDomDocument> 15 using Template = QPair<QString, QDomDocument>;
16 using TemplatesContainer = QVector<Template>;
19 bool canDropMimeData(QMimeData
const* data, Qt::DropAction action,
int row,
int column, QModelIndex
const& parent)
const;
20 QMimeData* mimeData(QModelIndexList
const& indexes)
const;
21 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent);
22 QStringList mimeTypes()
const;
23 bool setData(
const QModelIndex &index,
const QVariant &value,
int role);
24 bool isDuplicate(QString
const& text)
const;
25 void deleteTemplates(QModelIndexList
const& indexes);
30 void templateRenamed(QString
const& oldName, QString
const& newName);
33 TemplatesContainer _templates;
36 void loadTemplates(TemplatesContainer
const& templates);
39 Q_DECLARE_METATYPE(ItemTemplatesModel::TemplatesContainer)
40 Q_DECLARE_METATYPE(ItemTemplatesModel::Template)
44 #endif // ITEMTEMPLATESMODEL_H
#define STARTUP_ADD_COMPONENT(type)
This macro will automatically call StartupHelper::addComponent() for the passed Type before the app s...
Definition: startup_helper.h:80
Definition: item_templates_model.h:10