Class sh::ui::Dialog¶
-
class
sh::ui
::
Dialog
: public std::enable_shared_from_this<Dialog>¶ Abstract subclass for Shallot dialogs (in child windows).
Subclasses of Dialog represent particular dialog types (like ManageBookmarksDialog).
For each ui mode, there typically is an implementation for all of these types, implementing one of this dialog types subclasses (mentioned before) and also some ui mode specific class.
Note: Unless stated otherwise, all methods must be called from main thread!
Note: It’s not allowed to show one web dialog instance more than once. After closing it, it’s sole use is to fetch answer data from it.
Note: You should not create instances directly. It’s required to use DialogManager::createAndShowDialog() for actually showing those dialogs. Even this should not be used directly, because call depends on the current ui mode. Use the show*() methods in sh::ui::MainWindow for creating dialogs in a ui mode independent way.
Subclassed by sh::ui::AboutDialog, sh::ui::ExceptionDialog, sh::ui::FilePropertyDialog, sh::ui::LogViewDialog, sh::ui::ManageBookmarksDialog, sh::ui::ManageProfilesDialog, sh::ui::OpenWithDialog, sh::ui::StoreProfileDialog, sh::ui::TuningDialog
Public Functions
-
Dialog
()¶
-
~Dialog
()¶
-
qint64
dialogId
()¶ Returns the dialog id.
Each instance has an id unique in the complete Shallot process lifetime.
Must be called in main thread.
-
bool
isInited
()¶ Returns if this dialog is initialized.
Must be called in main thread.
-
bool
wasAccepted
()¶ Returns if this dialog was ‘accepted’ by the user (typically by clicking some ‘OK’ button).
Must be called in main thread.
-
void
waitClosed
()¶ Wait until the user closed the dialog in some way.
May be called in any thread.
-
void
close
()¶ Closes the dialog.
Must be called in main thread.
-
bool
wasClosed
()¶ Returns if this dialog was closed.
Must be called in main thread.
-
DialogManager *
manager
()¶ Returns the DialogManager which hosts this dialog.
Private Functions
-
void
setup
(DialogManager *manager, qint64 dialogId)¶ Sets manager and id for this dialog (right after creation).
Private Members
-
DialogManager *
_manager
¶
-
qint64
_dialogId
= -1¶
-
bool
_closed
= false¶
-
bool
_inited
= false¶
Friends
- friend class MainWindow
- friend class DialogManager
-