|
ORE Studio 0.0.4
|
Dialog widget for creating and editing user accounts. More...
#include <AccountDetailDialog.hpp>


Signals | |
| void | accountUpdated (const boost::uuids::uuid &account_id) |
| void | accountCreated (const boost::uuids::uuid &account_id) |
| void | accountDeleted (const boost::uuids::uuid &account_id) |
| void | isDirtyChanged (bool isDirty) |
| void | revertRequested (const iam::domain::account &account) |
| Emitted when user requests to revert to the displayed historical version. | |
Signals inherited from DetailDialogBase | |
| void | closeRequested () |
| Emitted when the dialog wants to close its container window. | |
| void | statusMessage (const QString &message) |
| Emitted to show a status message in the status bar. | |
| void | errorMessage (const QString &message) |
| Emitted when an error occurs that should be shown to the user. | |
Public Member Functions | |
| AccountDetailDialog (QWidget *parent=nullptr) | |
| void | setClientManager (ClientManager *clientManager) |
| void | setUsername (const std::string &username) |
| void | setAccount (const iam::domain::account &account) |
| Sets the account to display/edit. | |
| void | setLoginInfo (const std::optional< iam::domain::login_info > &loginInfo) |
| Sets the login info to display (read-only). | |
| iam::domain::account | getAccount () const |
| Gets the current account state from the form. | |
| void | clearDialog () |
| Clears all form fields and resets dialog state. | |
| void | save () |
| Saves the account (create or update). | |
| void | setReadOnly (bool readOnly, int versionNumber=0) |
| Sets the dialog to read-only mode for viewing historical versions. | |
| void | markAsStale () |
| Mark the dialog data as stale. | |
| QString | accountId () const |
| Returns the account ID of the account being edited. | |
Public Member Functions inherited from DetailDialogBase | |
| bool | isCloseConfirmed () const |
| Returns true if the user has already confirmed closing this dialog. | |
| void | setChangeReasonCache (ChangeReasonCache *cache) |
| Inject the shared change reason cache. | |
Protected Member Functions | |
| QTabWidget * | tabWidget () const override |
| Returns the dialog's QTabWidget (named "tabWidget" in .ui). | |
| QWidget * | provenanceTab () const override |
| Returns the Provenance tab widget (named "provenanceTab" in .ui). | |
| ProvenanceWidget * | provenanceWidget () const override |
| Returns the promoted ProvenanceWidget (named "provenanceWidget" in .ui). | |
| bool | hasUnsavedChanges () const override |
Protected Member Functions inherited from DetailDialogBase | |
| void | requestClose () |
| Request closure of the container window. | |
| void | notifySaveSuccess (const QString &message) |
| Notify that a save operation completed successfully. | |
| void | setProvenanceEnabled (bool enabled) |
| Enable or disable the Provenance tab. | |
| void | populateProvenance (int version, const std::string &modified_by, const std::string &performed_by, std::chrono::system_clock::time_point recorded_at, const std::string &change_reason_code, const std::string &change_commentary) |
| Populate the embedded ProvenanceWidget with entity data. | |
| void | clearProvenance () |
| Clear all fields in the embedded ProvenanceWidget. | |
| std::optional< change_reason_selection > | promptChangeReason (ChangeReasonDialog::OperationType opType, bool isDirty, std::string_view category="system") |
| Show the change reason dialog and return the user's selection. | |
Additional Inherited Members | |
Protected Slots inherited from DetailDialogBase | |
| void | onCloseClicked () |
| Called when the Close button is clicked. | |
Static Protected Member Functions inherited from DetailDialogBase | |
| template<typename T > | |
| static std::optional< T > | nulloptIfZero (T v) |
| Return std::optional(v) when v is non-zero, std::nullopt otherwise. | |
Dialog widget for creating and editing user accounts.
In create mode (new account):
In edit mode (existing account):
| void setAccount | ( | const iam::domain::account & | account | ) |
Sets the account to display/edit.
If account has an empty username, dialog enters create mode. Otherwise, dialog enters edit mode with username read-only.
| account | The account to display/edit |
| void setLoginInfo | ( | const std::optional< iam::domain::login_info > & | loginInfo | ) |
Sets the login info to display (read-only).
This populates the Login Status group with the current login status information for the account.
| loginInfo | The login info to display, or nullopt to clear |
| iam::domain::account getAccount | ( | ) | const |
Gets the current account state from the form.
| void setReadOnly | ( | bool | readOnly, |
| int | versionNumber = 0 |
||
| ) |
Sets the dialog to read-only mode for viewing historical versions.
In read-only mode:
| readOnly | True to enable read-only mode |
| versionNumber | The historical version number being displayed |
| void markAsStale | ( | ) |
Mark the dialog data as stale.
Called when a notification is received indicating this account has changed on the server. Shows a visual indicator that the data may be out of date.
|
signal |
Emitted when user requests to revert to the displayed historical version.
| account | The account data to revert to. |
|
overrideprotectedvirtual |
Returns the dialog's QTabWidget (named "tabWidget" in .ui).
Implements DetailDialogBase.
|
overrideprotectedvirtual |
Returns the Provenance tab widget (named "provenanceTab" in .ui).
Implements DetailDialogBase.
|
overrideprotectedvirtual |
Returns the promoted ProvenanceWidget (named "provenanceWidget" in .ui).
Implements DetailDialogBase.
|
overrideprotectedvirtual |
Returns true if the dialog has unsaved changes. Subclasses override.
Reimplemented from DetailDialogBase.