10#include <QVariantList>
55 QObject* parent =
nullptr);
73 void setName(
const QString& value);
91 return aliasInputText_;
115 QString
type()
const;
121 void setType(
const QString& value);
205 Q_INVOKABLE
bool canAddAlias(
const QString& value)
const;
210 Q_INVOKABLE
void addAlias(
const QString& value);
219 Q_INVOKABLE
void clear();
254 Q_INVOKABLE
void next();
260 Q_INVOKABLE QString
submit();
278 QVariantList actorRows()
const;
284 void reloadFromSelection(
bool forceReload);
287 void captureSavedState();
293 void applyFormState(
const QVariantMap& state);
296 void clearFormState();
301 bool hasValidAliasSelection()
const;
306 QString currentOwnerId_;
308 QVariantList aliases_;
309 QString aliasInputText_;
310 int aliasIndex_ = -1;
312 QVariantList savedAliases_;
314 QString allocatableMode_ = QStringLiteral(
"mixed");
315 QVariantList selectedActorIds_;
316 QVariantList selectedPropertyIds_;
318 QString savedAllocatableMode_ = QStringLiteral(
"mixed");
319 QVariantList savedSelectedActorIds_;
320 QVariantList savedSelectedPropertyIds_;
void setSelectedPropertyIds(const QVariantList &value)
Replaces selected property ids for this contract.
QVariantList propertyRows
void setName(const QString &value)
Updates the editable contract name.
void setAliasInputText(const QString &value)
Updates the current alias input text.
Q_INVOKABLE void addAlias(const QString &value)
Adds an alias to the contract form.
Q_INVOKABLE void clear()
Clears the current contract form without changing workspace data.
Q_INVOKABLE void requestRemoveSelectedAlias()
Removes the currently selected alias when possible.
QVariantList actorDisplayRows
void setType(const QString &value)
Updates the editable contract type.
Q_INVOKABLE void setPropertySelected(const QString &propertyId, bool selected)
Toggles a property link in the current form.
void setSelectedActorIds(const QVariantList &value)
Replaces selected actor ids for this contract.
ContractViewModel(WorkspaceStore *store, WorkspaceCommands *commands, WorkspaceSelection *selection, WorkspaceSelectors *selectors, QObject *parent=nullptr)
Creates the contract view model bound to workspace roles.
Q_INVOKABLE void selectPrimaryActor(const QString &actorId)
Selects the primary actor for the contract.
Q_INVOKABLE QString submit()
Creates or updates the current contract through workspace commands.
Q_INVOKABLE void deleteCurrent()
Deletes the selected contract through workspace commands.
Q_INVOKABLE void next()
Selects the next contract row.
QVariantList aliases() const
Returns editable contract aliases.
Q_INVOKABLE void selectContract(const QString &id)
Selects a contract for editing.
void setAliasIndex(int value)
Updates the selected alias index.
void setAliases(const QVariantList &value)
Replaces editable contract aliases.
Q_INVOKABLE bool canAddAlias(const QString &value) const
Checks whether an alias value can be added to the form.
QString aliasInputText() const
Returns the current alias input text.
int aliasIndex() const
Returns the selected alias index.
Q_INVOKABLE void previous()
Selects the previous contract row.
QVariantList contractRows
Q_INVOKABLE void enterCreateMode()
Enters create mode and clears the contract form.
QVariantList selectedPropertyIds
void setAllocatableMode(const QString &value)
Updates the editable allocatable mode.
QVariantList selectedActorIds
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.