API Documentation
|
Provides the ability to pull data from a DesignObjectLookup for display in tables within the NDEVR API. More...
#include <DesignTableModel.h>
Public Slots | |
void | modelUpdatedSlot (const Buffer< UUID > &ids) |
void | objectAddedSlot (const Buffer< UUID > &ids) |
void | objectDeletedSlot (const Buffer< UUID > &ids) |
Public Member Functions | |
uint04 | addColumn (const DesignParameter ¶meter, 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 ¶m, bool is_editable, const TranslatedString &custom_column_name=TranslatedString()) |
uint04 | addParentPathColumn (const TranslatedString &custom_column_name=TranslatedString()) |
bool | canAddObject (const Model &object) const |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
DesignTableModel (QObject *parent=nullptr) | |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
const ModelTableColumnSpec & | getColumnSpec (uint04 column) const |
DynamicPointer< QTDesignObject > | getDesignObject (QModelIndex index) const |
DynamicPointer< QTDesignObject > | getDesignObject (QModelIndex index, int row) const |
Model | getModel (QModelIndex index) const |
DesignObject | getObject (QModelIndex index) const |
DesignObject | getObject (QModelIndex index, int row) const |
UUID | getUUID (QModelIndex index) const |
UUID | getUUID (QModelIndex index, int row) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
bool | isEditable () const |
bool | isMaterialIndex (const QModelIndex &index) const |
bool | isObjectAllowed (const Model &object) const |
bool | isObjectAllowed (const UUID &object) const |
bool | isSpecialCallbackIndex (const QModelIndex &index) const |
QTModelManager * | modelManager () const |
virtual void | modelUpdated (const Buffer< UUID > &ids) |
virtual void | objectAdded (const Buffer< UUID > &ids) |
virtual void | objectDeleted (const Buffer< UUID > &ids) |
void | onSelected (QModelIndex index, const QRect &rect) |
void | refreshAll () |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
void | setAddedFilter (const std::function< bool(const Model &)> &callback) |
void | setColumnEditable (uint04 column, bool is_editable) |
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
void | setIsEditable (bool is_editable) |
void | setList (const Buffer< UUID > &models) |
void | setModelManager (QTModelManager *manager) |
void | setup () |
QVariant | userData (const QModelIndex &index, int role) const |
virtual | ~DesignTableModel () |
Protected Member Functions | |
void | updateColumn (uint04 index) |
Protected Attributes | |
std::function< bool(const Model &)> | m_added_filter |
QTResourceListener * | m_angle_listener = nullptr |
Buffer< BitFlag > | m_callback_clicked |
Buffer< ModelTableColumnSpec > | m_columns |
QTResourceListener * | m_coord_listener = nullptr |
Buffer< TranslatedString > | m_custom_column_titles |
bool | m_is_editable |
QTModelManager * | m_manager |
Buffer< UUID > | m_models |
QTResourceListener * | m_orientation_listener = nullptr |
Provides the ability to pull data from a DesignObjectLookup for display in tables within the NDEVR API.
|
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 |