API Documentation
|
#include <DesignTableModel.h>
Public Slots | |
void | objectAddedSlot (const Buffer< UUID > &ids) |
void | objectDeletedSlot (const Buffer< UUID > &ids) |
void | modelUpdatedSlot (const Buffer< UUID > &ids) |
Public Member Functions | |
DesignTableModel (QObject *parent=nullptr) | |
virtual | ~DesignTableModel () |
void | setup () |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
void | setList (const Buffer< UUID > &models) |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
QVariant | userData (const QModelIndex &index, int role) const |
bool | isMaterialIndex (const QModelIndex &index) const |
bool | isSpecialCallbackIndex (const QModelIndex &index) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
void | setModelManager (QTModelManager *manager) |
void | setAddedFilter (const std::function< bool(const Model &)> &callback) |
uint04 | addColumn (DesignObject::DesignProperty property, bool is_editable) |
uint04 | addColumn (const DesignParameter ¶meter, bool is_editable) |
uint04 | addColumn (const TranslatedString &name, const String &icon, const std::function< void(UUID)> &callback) |
uint04 | addColumn (const ModelTableColumnSpec &column) |
uint04 | addParentPathColumn (const TranslatedString &custom_column_name=TranslatedString()) |
uint04 | addParentDataColumn (const DesignParameter ¶m, bool is_editable, const TranslatedString &custom_column_name=TranslatedString()) |
uint04 | addGrandparentNameColumn (const TranslatedString &custom_column_name=TranslatedString()) |
uint04 | addMaterialDataColumn (const TranslatedString &custom_column_name=TranslatedString()) |
const ModelTableColumnSpec & | getColumnSpec (uint04 column) const |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
QTModelManager * | modelManager () const |
UUID | getUUID (QModelIndex index) const |
UUID | getUUID (QModelIndex index, int row) const |
DynamicPointer< QTDesignObject > | getDesignObject (QModelIndex index) const |
DynamicPointer< QTDesignObject > | getDesignObject (QModelIndex index, int row) const |
Model | getModel (QModelIndex index) const |
DesignObject | getObject (QModelIndex index, int row) const |
DesignObject | getObject (QModelIndex index) const |
void | onSelected (QModelIndex index, const QRect &rect) |
bool | isEditable () const |
bool | isObjectAllowed (const UUID &object) const |
bool | canAddObject (const Model &object) const |
bool | isObjectAllowed (const Model &object) const |
void | setIsEditable (bool is_editable) |
void | setColumnEditable (uint04 column, bool is_editable) |
void | refreshAll () |
virtual void | objectAdded (const Buffer< UUID > &ids) |
virtual void | objectDeleted (const Buffer< UUID > &ids) |
virtual void | modelUpdated (const Buffer< UUID > &ids) |
Protected Member Functions | |
void | updateColumn (uint04 index) |
Protected Attributes | |
QTModelManager * | m_manager |
Buffer< UUID > | m_models |
std::function< bool(const Model &)> | m_added_filter |
Buffer< ModelTableColumnSpec > | m_columns |
Buffer< TranslatedString > | m_custom_column_titles |
Buffer< BitFlag > | m_callback_clicked |
QTResourceListener * | m_coord_listener = nullptr |
QTResourceListener * | m_orientation_listener = nullptr |
QTResourceListener * | m_angle_listener = nullptr |
bool | m_is_editable |
|
explicit |
|
virtual |
uint04 addColumn | ( | const DesignParameter & | parameter, |
bool | is_editable ) |
uint04 addColumn | ( | const ModelTableColumnSpec & | column | ) |
uint04 addColumn | ( | const TranslatedString & | name, |
const String & | icon, | ||
const std::function< void(UUID)> & | callback ) |
uint04 addColumn | ( | DesignObject::DesignProperty | property, |
bool | is_editable ) |
uint04 addGrandparentNameColumn | ( | const TranslatedString & | custom_column_name = TranslatedString() | ) |
uint04 addMaterialDataColumn | ( | const TranslatedString & | custom_column_name = TranslatedString() | ) |
uint04 addParentDataColumn | ( | const DesignParameter & | param, |
bool | is_editable, | ||
const TranslatedString & | custom_column_name = TranslatedString() ) |
uint04 addParentPathColumn | ( | const TranslatedString & | custom_column_name = TranslatedString() | ) |
bool canAddObject | ( | const Model & | object | ) | const |
|
nodiscardoverride |
|
nodiscardoverride |
|
nodiscardoverride |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscardoverride |
bool isEditable | ( | ) | const |
|
nodiscard |
bool isObjectAllowed | ( | const Model & | object | ) | const |
bool isObjectAllowed | ( | const UUID & | object | ) | const |
|
nodiscard |
|
inlinenodiscard |
void onSelected | ( | QModelIndex | index, |
const QRect & | rect ) |
void refreshAll | ( | ) |
|
nodiscardoverride |
|
inline |
void setColumnEditable | ( | uint04 | column, |
bool | is_editable ) |
|
nodiscardoverride |
void setIsEditable | ( | bool | is_editable | ) |
void setModelManager | ( | QTModelManager * | manager | ) |
void setup | ( | ) |
|
protected |
|
nodiscard |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |