xca/widgets/XcaWarning.h
Christian Hohnstaedt 993da2d474 Use C++11 initializers for all non-static class members
When XCA started in 2002, there were no C++ initializers.
Drop explicit initializers from the constructors.

 - Fix indentations of section declarators.
 - Replace NULL by nullptr when feasible.
 - Sort private section: properties first, then methods.
2023-10-08 22:19:18 +02:00

41 lines
911 B
C++

/* 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