Class sh::ui::web::WebActionExecutionInfoDialog

class sh::ui::web::WebActionExecutionInfoDialog : public sh::ui::ActionExecutionInfoDialog

Web based action execution dialog.

Public Types

enum MessageBoxButton

Buttons in a message box from ActionExecutionUserFeedback.

Values:

enumerator NONE = 0
enumerator OK = 1 << 0
enumerator Continue = 1 << 1
enumerator Cancel = 1 << 2
enumerator Retry = 1 << 3
enumerator Yes = 1 << 4
enumerator No = 1 << 5

Public Functions

WebActionExecutionInfoDialog(sh::actions::ActionExecutionInfo *info)
void setDetails(QString fv, QString fob, QString tv, QString tob)

Sets the item details text (‘from a/foo.jpg’, ‘to b/foo.jpg’). .

void setHead(QString txt)

Sets the header text. .

void setProgress(bool isDeterminate, quint64 done, quint64 all, QString text)

Sets the progress. .

int messageBox(QString text, QList<QString> answers, QString icon = QString(), int defaultanswer = -1, int cancelanswer = -1, QList<QString> answericons = QList<QString>())
int inputBox(QString text, QList<QString> answers, QString *value, QString icon = QString(), int defaultanswer = -1, int cancelanswer = -1, int valuePreselectFrom = -1, int valuePreselectTo = -1)
int multilineInputBox(QString text, QList<QString> answers, QString *value, QString icon = QString(), int defaultanswer = -1, int cancelanswer = -1)
int simpleChooserGridform(QString text, GridformEntries *entries, QStringList answers, int defaultanswer = -1, int cancelanswer = -1)
bool credentialsDialog(QString text, bool showDomain, bool showUsername, bool showPassword, bool showAnonymous, bool showRemember, QString *domain, QString *username, QString *password, bool *isAnonymous, bool *isRemember)
bool unixPermissionsDialog(bool *userMayRead, bool *userMayWrite, bool *userMayExecute, bool *groupMayRead, bool *groupMayWrite, bool *groupMayExecute, bool *othersMayRead, bool *othersMayWrite, bool *othersMayExecute, bool *sticky, bool *setuid, bool *setgid, QStringList users, QStringList groups, QString *ownerUser, QString *ownerGroup)
qint64 id()
qint64 webts_created()
QString details_fromverb()
QString details_fromobject()
QString details_toverb()
QString details_toobject()
QString head()
bool progress_isDeterminate()
quint64 progress_done()
quint64 progress_all()
QString progress_text()
QJsonValue userFeedbackAsJsonValue()
bool isLogicallyVisible()

Returns if this dialog is logically visible (i.e. set visible by the action).

void setLogicallyVisible(bool v)

Sets if this dialog is logically visible (i.e. set visible by the action). .

bool isBackground()

Returns if this dialog is currently in background mode (i.e. not visible).

void setBackground(bool v)

Sets if this dialog is currently in background mode (i.e. not visible). .

void setForceForeground(bool v)

Sets if this dialog is currently forced to be visible in foreground. .

QString simpleInputBox(QString text, QString deflt, int valuePreselectFrom = -1, int valuePreselectTo = -1)
int simpleMessageBox(QString text, int buttons = (int)MessageBoxButton::OK, QString icon = QString(), int defaultbutton = (MessageBoxButton)0, int cancelbutton = (MessageBoxButton)0)

Private Functions

void _handleUserFeedback(QString kind, std::shared_ptr<UserFeedback> userfeedback)
void _triggerChanged()

Private Members

qint64 _id
QString _details_fv
QString _details_fob
QString _details_tv
QString _details_tob
QString _head
bool _progress_isDeterminate
quint64 _progress_done
quint64 _progress_all
QString _progress_text
std::shared_ptr<UserFeedback> _currentUserFeedback = 0
QMutex _currentUserFeedbackMutex
QWaitCondition _currentUserFeedbackChangedCondition
qint64 _webts_created

Private Static Functions

QByteArray iconToBase64Src(QString icon, int sizeInPt)
QList<QVariant> iconsToBase64Srcs(QStringList icons, int sizeInPt)

Friends

friend class WebActionManager
class UserFeedback : public QMap<QString, QVariant>

Public Members

qint64 id = -1
bool answered = false