| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#ifndef KSNIP_MESSAGEBOXSERVICE_H |
| 21 |
#define KSNIP_MESSAGEBOXSERVICE_H |
| 22 |
|
| 23 |
#include <QMessageBox> |
| 24 |
|
| 25 |
#include "IMessageBoxService.h" |
| 26 |
#include "src/common/enum/MessageBoxResponse.h" |
| 27 |
|
| 28 |
class MessageBoxService : public IMessageBoxService |
| 29 |
{ |
| 30 |
public: |
| 31 |
explicit MessageBoxService() = default; |
| 32 |
~MessageBoxService() override = default; |
| 33 |
bool yesNo(const QString &title, const QString &question) override; |
| 34 |
MessageBoxResponse yesNoCancel(const QString &title, const QString &question) override; |
| 35 |
void ok(const QString &title, const QString &info) override; |
| 36 |
bool okCancel(const QString &title, const QString &info) override; |
| 37 |
|
| 38 |
private: |
| 39 |
static MessageBoxResponse mapReplyToMessageBoxResponse(int reply); |
| 40 |
}; |
| 41 |
|
| 42 |
#endif |