35 throw GUIHelpers::Error(
"GroupItem::setGroup() -> Error. Attempt to set group twice.");
37 m_controller = std::make_unique<GroupItemController>(
this, groupInfo);
71 if (!
value().canConvert<ComboProperty>())
72 throw GUIHelpers::Error(
"GroupItem::onValueChange() -> Error. Wrong property type");
75 if (property.currentIndex() !=
m_controller->currentIndex()) {
Defines class ComboProperty.
Defines class GUIHelpers functions.
Defines class GroupItemController.
Custom property to define list of string values with multiple selections.
Defines info for GroupProperty, i.e.
SessionItem * setCurrentType(const QString &modelType)
void setGroupInfo(const GroupInfo &groupInfo)
QStringList translateList(const QStringList &list) const
SessionItem * currentItem() const
QString currentType() const
SessionItem * getItemOfType(const QString &type)
std::unique_ptr< GroupItemController > m_controller
static const QString T_ITEMS
void setOnValueChange(std::function< void(void)> f, const void *caller=0)
bool registerTag(const QString &name, int min=0, int max=-1, QStringList modelTypes={})
Add new tag to this item with given name, min, max and types.
QVariant value() const
Get value.
bool setValue(QVariant value)
Set value, ensure that variant types match.
ModelMapper * mapper()
Returns the current model mapper of this item. Creates new one if necessary.
void setDefaultTag(const QString &tag)
Set default tag.
void emitDataChanged(int role=Qt::DisplayRole)
Notify model about data changes.
QString modelType() const
Get model type.