Class sh::ui::DialogManager¶
-
class
sh::ui
::
DialogManager
¶ Creates and drives dialogs (in child windows), i.e. instances of Dialog.
Subclass it for implementing the low level mechanisms for handling dialogs in a particular ui mode (e.g. qt, web).
The infrastructure will use one of this implementations for creating and managing most kinds of dialogs.
Subclassed by sh::ui::qt::QtDialogManager, sh::ui::web::WebDialogManager
Public Functions
-
std::shared_ptr<Dialog>
getDialogById
(qint64 id)¶ Returns a Dialog by dialog id.
Must be called in main thread.
-
QList<std::shared_ptr<Dialog>>
getAllDialogs
()¶ Returns a list of all dialogs currently shown (in order of creation).
Must be called in main thread.
-
QList<qint64>
getAllDialogIds
()¶ Returns a list of dialog ids of all dialogs currently shown (in order of creation).
Must be called in main thread.
Creates and shows a Dialog by class and constructor parameters.
Those dialogs (TDlg) have to implement Dialog (typically a subclass of it, representing a particular dialog, like FilePropertyDialog), and also some ui mode (e.g. qt, web) specific class (depends on that ui mode).
You typically should not have to use it outside of MainWindow or subclasses. The MainWindow interface allows to create all available dialogs in a ui mode independent way.
May be called in any thread.
- Return
The created Dialog instance.
-
~DialogManager
()¶
Private Functions
Closes this dialog, including internal bookkeeping.
Must be called in main thread.
Initializes and shows a freshly created dialog.
Must be called in main thread.
Returns if the dialog was ‘accepted’ by the user (typically by clicking some ‘OK’ button).
The result is undefined before the dialog was closed.
Must be called in main thread.
Wait until the user closed the dialog in some way.
May be called in any thread.
This method implements the ui mode specific mechanism for stopping (i.e. closing) a dialog.
Must be called in main thread.
This method implements the ui mode specific mechanism for showing a dialog.
Must be called in main thread.
Friends
- friend class Dialog
-
std::shared_ptr<Dialog>