2#include <NDEVR/DesignPropertyTable.h>
3#include <NDEVR/ModelTileGroup.h>
4#include <NDEVR/QTTools.h>
5#include <NDEVR/QTModelManager.h>
6#include <NDEVR/QTDesignObject.h>
7#include <NDEVR/ShowPropertiesSettings.h>
56 setWindowTitle(_tqs(
"Symbol"));
72 m_table_view->sortByColumn(0, Qt::SortOrder::DescendingOrder);
The equivelent of std::vector but with a bit more control.
constexpr decltype(auto) get(t_property_type property) const
Retrieves a property value from the database, cast to the requested type.
bool isValid() const
Checks whether this design object has a valid index into the database.
bool is(t_property_type property, const StringView &value) const
Checks whether a string property matches the given StringView value.
A definition of data that is logically stored in the Model hierarchy.
DesignPropertyTableView * m_table_view
The table view displaying design object properties.
void setEditable(bool editable)
Sets whether the entire table is editable.
uint04 addColumn(NDPO property, bool is_editable=true)
Adds a column displaying the given NDPO property.
void setAddedFilter(const std::function< bool(const Model &)> &callback)
Sets a custom filter callback applied when objects are added.
Button * addNewButton(std::function< void(Button *)> callback, const TranslatedString &new_title=_t("Add New"), const StringView &add_icon="plus")
Adds an "Add New" button to the bottom button bar.
DesignPropertyTable(QWidget *parent=nullptr)
Constructs a DesignPropertyTable without a model manager.
void setModels(const Buffer< Model > &models)
Sets the table contents from a buffer of Models.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
A Model subclass that manages tiling (repeating) a source model along a path or surface.
static constexpr StringView TypeName()
Returns the type name identifier for this model type.
void setTarget(const DynamicPointer< QTDesignObject > &target)
Sets the target design object and populates the table with its tile group descendants.
void init()
Initializes columns, filters, sorting, and the new-item button.
DynamicPointer< QTDesignObject > m_object_parent
The parent design object whose tile group children are displayed.
ModelTileTable(QWidget *parent=nullptr)
Constructs the tile table with no initial target.
ModelTileTable(const DynamicPointer< QTDesignObject > &target, QWidget *parent=nullptr)
Constructs the tile table bound to the given design object.
A core class that represents a node on model hierarchy.
Model getParent() const
Returns the parent model of this model.
Model createChild()
Creates a new child model and appends it to this model's child list.
ModelBuffer getDescendantsByType(const StringView &type, uint04 max_count=Constant< uint04 >::Max) const
Recursively searches all descendants for models matching the given type.
Used to lock a particular variable for writing.
The primary namespace for the NDEVR SDK.
@ type
The type identifier string for this model node.
@ guid
A 128-bit globally unique identifier for the object.
@ name
The display name of the object.
@ icon
Icon identifier for the object.
@ spacial_visible
Whether the object is visible in the 3D spatial view.
@ e_object_creation
Dialog for creating a new object.
Stores settings for setting up and displaying a DesignObjectDialog such as whether the dialog is part...
void setupForStyle(DesignDialogStyle style)
Configures the button titles and icons based on the given dialog style.