Class DrawingTemplateModel
ClassList > DrawingTemplateModel
Inherits the following classes: QAbstractListModel
Public Types
| Type | Name |
|---|---|
| enum | Role |
| enum | TemplateType |
Public Properties
| Type | Name |
|---|---|
| property bool | hasProjectTemplate |
| property QString | projectFilePath |
Public Signals
| Type | Name |
|---|---|
| signal void | hasProjectTemplateChanged |
| signal void | projectFilePathChanged |
Public Functions
| Type | Name |
|---|---|
| DrawingTemplateModel (QObject * parent=nullptr) |
|
| QVariant | data (const QModelIndex & index, int role) override const |
| bool | hasProjectTemplate () const |
| QString | projectFilePath () const |
| Q_INVOKABLE void | reloadModel () |
| QHash< int, QByteArray > | roleNames () override const |
| int | rowCount (const QModelIndex & parent) override const |
| void | setProjectFilePath (const QString & path) |
Public Types Documentation
enum Role
enum DrawingTemplateModel::Role {
TemplateTypeRole = Qt::UserRole,
TemplateTitleRole,
TemplatePathRole
};
enum TemplateType
enum DrawingTemplateModel::TemplateType {
AppTemplate,
ProjectTemplate
};
Public Properties Documentation
property hasProjectTemplate [1/2]
bool DrawingTemplateModel::hasProjectTemplate;
This property holds whether the model contains project templates.
property projectFilePath [1/2]
QString DrawingTemplateModel::projectFilePath;
This property holds the project file path where project templates will be looked for.
Public Signals Documentation
signal hasProjectTemplateChanged
void DrawingTemplateModel::hasProjectTemplateChanged;
signal projectFilePathChanged
void DrawingTemplateModel::projectFilePathChanged;
Public Functions Documentation
function DrawingTemplateModel
explicit DrawingTemplateModel::DrawingTemplateModel (
QObject * parent=nullptr
)
function data
QVariant DrawingTemplateModel::data (
const QModelIndex & index,
int role
) override const
function hasProjectTemplate [2/2]
bool DrawingTemplateModel::hasProjectTemplate () const
This property holds whether the model contains project templates.
function projectFilePath [2/2]
QString DrawingTemplateModel::projectFilePath () const
This property holds the project file path where project templates will be looked for.
function reloadModel
Q_INVOKABLE void DrawingTemplateModel::reloadModel ()
Reloads the drawing template model.
function roleNames
QHash< int, QByteArray > DrawingTemplateModel::roleNames () override const
function rowCount
int DrawingTemplateModel::rowCount (
const QModelIndex & parent
) override const
function setProjectFilePath
void DrawingTemplateModel::setProjectFilePath (
const QString & path
)
This property holds the project file path where project templates will be looked for.
The documentation for this class was generated from the following file src/core/drawingtemplatemodel.h