mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
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.
41 lines
911 B
C++
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
|