ORE Studio 0.0.4
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
AccountDetailDialog Class Referencefinal

Dialog widget for creating and editing user accounts. More...

#include <AccountDetailDialog.hpp>

Inheritance diagram for AccountDetailDialog:
Inheritance graph
Collaboration diagram for AccountDetailDialog:
Collaboration graph

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.
 

Additional Inherited Members

- 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.
 

Detailed Description

Dialog widget for creating and editing user accounts.

In create mode (new account):

In edit mode (existing account):

Member Function Documentation

◆ setAccount()

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.

Parameters
accountThe account to display/edit

◆ setLoginInfo()

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.

Parameters
loginInfoThe login info to display, or nullopt to clear

◆ getAccount()

iam::domain::account getAccount ( ) const

Gets the current account state from the form.

Returns
The account with values from the form fields

◆ setReadOnly()

void setReadOnly ( bool  readOnly,
int  versionNumber = 0 
)

Sets the dialog to read-only mode for viewing historical versions.

In read-only mode:

  • All fields are disabled
  • Save button is hidden
  • Delete button is hidden
  • Revert button is shown
  • Toolbar shows version information
Parameters
readOnlyTrue to enable read-only mode
versionNumberThe historical version number being displayed

◆ markAsStale()

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.

◆ revertRequested

void revertRequested ( const iam::domain::account account)
signal

Emitted when user requests to revert to the displayed historical version.

Parameters
accountThe account data to revert to.