yhkylin-backup-tools/kybackup/messageboxutils.h

35 lines
1.0 KiB
C
Raw Normal View History

2021-12-01 15:12:38 +08:00
#ifndef MESSAGEBOXUTILS_H
#define MESSAGEBOXUTILS_H
#include <QWidget>
#include <QString>
2022-03-02 11:24:54 +08:00
#include <QMessageBox>
class MyMessageBox : public QMessageBox
{
Q_OBJECT
public:
MyMessageBox(QWidget *parent = nullptr);
virtual ~MyMessageBox();
void setThemeIcon(const QString& themeIcon);
public slots:
void on_themeIconChanged();
private:
QString m_themeIcon;
};
2021-12-01 15:12:38 +08:00
class MessageBoxUtils
{
public:
2022-02-15 16:51:03 +08:00
static void QMESSAGE_BOX_INFORMATION(QWidget* q_parent, const QString& typelabel, const QString& message, const QString& label);
2021-12-01 15:12:38 +08:00
static void QMESSAGE_BOX_WARNING(QWidget* q_parent, const QString& typelabel, const QString& message, const QString& label);
static void QMESSAGE_BOX_CRITICAL(QWidget* q_parent, const QString& typelabel, const QString& message, const QString& label);
static bool QMESSAGE_BOX_WARNING_CANCEL(QWidget* q_parent, const QString& typelabel, const QString& message,
const QString& label_yes, const QString& label_no);
};
#endif // MESSAGEBOXUTILS_H