1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
/* vi: set sw=4 ts=4:
*
* Copyright (C) 2018 - 2020 Christian Hohnstaedt.
*
* All rights reserved.
*/
#ifndef __XCAWARNING_H
#define __XCAWARNING_H
#include "lib/XcaWarningCore.h"
#include <QMessageBox>
class xcaWarningBox: public QMessageBox
{
Q_OBJECT
public:
xcaWarningBox(QWidget *w, const QString &txt,
QMessageBox::Icon icn = QMessageBox::Warning);
void addButton(QMessageBox::StandardButton button,
const QString &text = QString());
};
class xcaWarningGui : public QObject, public xcaWarning_i
{
Q_OBJECT
int showBox(const QString &txt, QMessageBox::Icon icn,
QMessageBox::StandardButtons b);
public:
void information(const QString &msg);
void warning(const QString &msg);
void warningv3(const QString &msg, const extList &el);
bool yesno(const QString &msg);
bool okcancel(const QString &msg);
void sqlerror(QSqlError err);
void error(const QString &msg);
};
#endif
|