Class QfDrawingTemplateModel
ClassList > QfDrawingTemplateModel
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 |
|---|---|
| QfDrawingTemplateModel (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 QfDrawingTemplateModel::Role {
TemplateTypeRole = Qt::UserRole,
TemplateTitleRole,
TemplatePathRole
};
enum TemplateType
enum QfDrawingTemplateModel::TemplateType {
AppTemplate,
ProjectTemplate
};
Public Properties Documentation
property hasProjectTemplate [1/2]
bool QfDrawingTemplateModel::hasProjectTemplate;
This property holds whether the model contains project templates.
property projectFilePath [1/2]
QString QfDrawingTemplateModel::projectFilePath;
This property holds the project file path where project templates will be looked for.
Public Signals Documentation
signal hasProjectTemplateChanged
void QfDrawingTemplateModel::hasProjectTemplateChanged;
signal projectFilePathChanged
void QfDrawingTemplateModel::projectFilePathChanged;
Public Functions Documentation
function QfDrawingTemplateModel
explicit QfDrawingTemplateModel::QfDrawingTemplateModel (
QObject * parent=nullptr
)
function data
QVariant QfDrawingTemplateModel::data (
const QModelIndex & index,
int role
) override const
function hasProjectTemplate [2/2]
bool QfDrawingTemplateModel::hasProjectTemplate () const
This property holds whether the model contains project templates.
function projectFilePath [2/2]
QString QfDrawingTemplateModel::projectFilePath () const
This property holds the project file path where project templates will be looked for.
function reloadModel
Q_INVOKABLE void QfDrawingTemplateModel::reloadModel ()
Reloads the drawing template model.
function roleNames
QHash< int, QByteArray > QfDrawingTemplateModel::roleNames () override const
function rowCount
int QfDrawingTemplateModel::rowCount (
const QModelIndex & parent
) override const
function setProjectFilePath
void QfDrawingTemplateModel::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/gui/qfdrawingtemplatemodel.h