11#include <QVariantList>
49 QObject* parent =
nullptr);
67 void setName(
const QString& value);
85 return aliasInputText_;
109 return selectedContractIds_;
154 Q_INVOKABLE
bool canAddAlias(
const QString& value)
const;
159 Q_INVOKABLE
void addAlias(
const QString& value);
175 Q_INVOKABLE
void next();
180 Q_INVOKABLE QString
submit();
188 Q_INVOKABLE
void clear();
206 void setCurrentId(
const QString&
id);
217 void reloadFromSelection(
bool forceReload);
221 void clearFormState();
226 bool hasValidAliasSelection()
const;
230 void captureSavedState();
235 void applyFormState(
const QVariantMap& state);
242 void reloadFormState(
bool forceReload,
const QVariantMap& state);
248 QString currentOwnerId_;
250 QVariantList aliases_;
251 QString aliasInputText_;
252 int aliasIndex_ = -1;
254 QVariantList savedAliases_;
255 QVariantList selectedContractIds_;
256 QVariantList savedSelectedContractIds_;
Q_INVOKABLE void addAlias(const QString &value)
Adds an alias to the property form.
Q_INVOKABLE void previous()
Selects the previous property row.
Q_INVOKABLE void selectProperty(const QString &id)
Selects a property for editing.
Q_INVOKABLE bool canAddAlias(const QString &value) const
Checks whether an alias value can be added to the form.
Q_INVOKABLE void clear()
Clears the editable property form.
Q_INVOKABLE void next()
Selects the next property row.
void changed()
Emitted when property view model state changed.
QVariantList selectedContractIds
int aliasIndex() const
Returns the selected alias index.
QString aliasInputText() const
Returns the current alias input text.
Q_INVOKABLE QString submit()
Creates or updates the property through workspace commands.
void setAliasInputText(const QString &value)
Updates the current alias input text.
QVariantList contractRows
Q_INVOKABLE void setContractSelected(const QString &contractId, bool selected)
Adds or removes a contract id from the property form selection.
QVariantList selectedContractIds() const
Returns selected contract ids in the property form.
QVariantList propertyRows
PropertyViewModel(WorkspaceStore *store, WorkspaceCommands *commands, WorkspaceSelection *selection, WorkspaceSelectors *selectors, QObject *parent=nullptr)
Creates the property view model bound to workspace roles.
Q_INVOKABLE void requestRemoveSelectedAlias()
Removes the currently selected alias when possible.
void setName(const QString &value)
Updates the editable property name.
QVariantList aliases() const
Returns editable property aliases.
void setAliases(const QVariantList &value)
Replaces editable property aliases.
Q_INVOKABLE void enterCreateMode()
Clears selection and opens an empty create form.
Q_INVOKABLE void deleteCurrent()
Deletes the selected property through workspace commands.
void setAliasIndex(int value)
Updates the selected alias index.
void setSelectedContractIds(const QVariantList &value)
Replaces selected contract ids in the property form.
Maps UI intent to core workspace writer commands.
Tracks the currently selected workspace entities.
Projects workspace store data into QML-facing read models.
Owns the current UI-side workspace snapshot and revision lifecycle.