![]() |
NDEVR
API Documentation
|
Used with DesignObjectLookups to lock the application for a critical process. More...
Public Member Functions | |
| CommandLockObject (DesignCommandManager *manager, const TranslatedString &title=TranslatedString()) | |
| Constructs a CommandLockObject associated with the given command manager. | |
| ~CommandLockObject () | |
| Destroys the CommandLockObject, releasing the lock if held. | |
| const TranslatedString | hint () const |
| Returns the hint string for this lock. | |
| bool | isLocked () const |
| Checks whether this lock is currently held. | |
| void | lock () |
| Acquires the lock, blocking until it is available. | |
| void | setHint (const TranslatedString &hint) |
| Sets a hint string providing additional context about the locked operation. | |
| void | setTitle (const TranslatedString &title) |
| Sets the user-facing title describing the locked operation. | |
| const TranslatedString | title () const |
| Returns the title string for this lock. | |
| void | tryLock () |
| Attempts to acquire the lock without blocking. | |
| void | unlock () |
| Releases the lock so other operations may proceed. | |
Protected Attributes | |
| TranslatedString | m_hint |
| Additional hint text providing context about the locked operation. | |
| UUID | m_id |
| Unique identifier for this lock instance. | |
| DesignCommandManager * | m_manager |
| The command manager that owns and coordinates this lock. | |
| TranslatedString | m_title |
| User-facing title describing the locked operation. | |
Used with DesignObjectLookups to lock the application for a critical process.
Will potentially display the title to the end user.
Definition at line 45 of file CommandLock.h.
| CommandLockObject::CommandLockObject | ( | DesignCommandManager * | manager, |
| const TranslatedString & | title = TranslatedString() ) |
Constructs a CommandLockObject associated with the given command manager.
| [in] | manager | The DesignCommandManager that owns this lock. |
| [in] | title | An optional user-facing title describing the locked operation. |
References title().
| const TranslatedString CommandLockObject::hint | ( | ) | const |
Returns the hint string for this lock.
Referenced by setHint().
| bool CommandLockObject::isLocked | ( | ) | const |
Checks whether this lock is currently held.
| void CommandLockObject::setHint | ( | const TranslatedString & | hint | ) |
| void CommandLockObject::setTitle | ( | const TranslatedString & | title | ) |
| const TranslatedString CommandLockObject::title | ( | ) | const |
Returns the title string for this lock.
Referenced by CommandLockObject(), and setTitle().
| void CommandLockObject::tryLock | ( | ) |
Attempts to acquire the lock without blocking.
Does nothing if the lock cannot be acquired.