Class sh::ui::ExceptionDialog

class sh::ui::ExceptionDialog : public sh::ui::Dialog

The ‘Exception’ dialog.

Subclassed by sh::ui::qt::QtExceptionDialog, sh::ui::web::WebExceptionDialog

Public Functions

ExceptionDialog(QString error1, QString error2, QString details, QString icon, bool mayRetry, bool mayClose, bool mayCancel, bool showLoglabelAndDetails)

Parameters
  • error1: The 1st error text.

  • error2: The 2nd error text.

  • details: The error details.

  • icon: An icon (as name resolveable by sh::base::IconManager).

  • mayRetry: If it’s allowed to retry.

  • mayClose: If it’s allowed to just close and continue without closing Shallot.

  • mayCancel: If it’s allowed to cancel, i.e. throwing a sh::exceptions::CancelException.

  • showLoglabelAndDetails: If the dialog shall allow to read the details.

QString error1()

Returns the 1st error text.

QString error2()

Returns the 2nd error text.

QString details()

Returns the error details.

QString icon()

Returns the icon (as name resolveable by sh::base::IconManager).

bool mayRetry()

Returns if it’s allowed to retry.

bool mayClose()

Returns if it’s allowed to just close and continue without closing Shallot.

bool mayCancel()

Returns if it’s allowed to cancel, i.e. throwing a sh::exceptions::CancelException.

bool showLoglabelAndDetails()

Returns if the dialog shall allow to read the details.

ExceptionDialogResult answer() = 0

Returns the answer the user has given in this 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 Members

QString _error1
QString _error2
QString _details
QString _icon
bool _mayRetry
bool _mayClose
bool _mayCancel
bool _showLoglabelAndDetails