mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
XcaWarning: Split into Core and GUI element
one more step to split core and GUI components
This commit is contained in:
parent
c8d994225d
commit
0c5603ec20
@ -39,5 +39,5 @@ db_x509req.h pki_crl.h x509v3ext.cpp
|
||||
db_x509super.cpp pki_evp.cpp x509v3ext.h
|
||||
db_x509super.h pki_evp.h xfile.h
|
||||
dhgen.cpp dhgen.h XcaProgress.cpp
|
||||
XcaProgress.h
|
||||
XcaProgress.h XcaWarningCore.cpp XcaWarningCore.h
|
||||
)
|
||||
|
||||
76
lib/XcaWarningCore.cpp
Normal file
76
lib/XcaWarningCore.cpp
Normal file
@ -0,0 +1,76 @@
|
||||
/* vi: set sw=4 ts=4:
|
||||
*
|
||||
* Copyright (C) 2018 Christian Hohnstaedt.
|
||||
*
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
#include "XcaWarningCore.h"
|
||||
#include "lib/func.h"
|
||||
#include <QDebug>
|
||||
#include <QSqlDatabase>
|
||||
|
||||
class xcaWarning_i *xcaWarningCore::gui;
|
||||
|
||||
static bool print_cmdline(const char *color, const QString &msg)
|
||||
{
|
||||
console_write(stdout, QString("%1:" COL_RESET " %2\n")
|
||||
.arg(color).arg(msg).toUtf8());
|
||||
return true;
|
||||
}
|
||||
|
||||
void xcaWarningCore::information(const QString &msg)
|
||||
{
|
||||
if (gui)
|
||||
gui->information(msg);
|
||||
else
|
||||
print_cmdline(COL_CYAN "Information", msg);
|
||||
}
|
||||
|
||||
void xcaWarningCore::warning(const QString &msg)
|
||||
{
|
||||
if (gui)
|
||||
gui->warning(msg);
|
||||
else
|
||||
print_cmdline(COL_RED "Warning", msg);
|
||||
}
|
||||
|
||||
bool xcaWarningCore::yesno(const QString &msg)
|
||||
{
|
||||
return gui ? gui->yesno(msg) :
|
||||
print_cmdline(COL_BLUE "Question", msg);
|
||||
}
|
||||
|
||||
bool xcaWarningCore::okcancel(const QString &msg)
|
||||
{
|
||||
return gui ? gui->okcancel(msg) :
|
||||
print_cmdline(COL_BLUE "Question", msg);
|
||||
}
|
||||
|
||||
void xcaWarningCore::sqlerror(QSqlError err)
|
||||
{
|
||||
if (!err.isValid())
|
||||
err = QSqlDatabase::database().lastError();
|
||||
if (!err.isValid())
|
||||
return;
|
||||
if (gui)
|
||||
qCritical() << "SQL ERROR:" << err.text();
|
||||
|
||||
warning(err.text());
|
||||
}
|
||||
|
||||
void xcaWarningCore::error(const errorEx &err)
|
||||
{
|
||||
if (err.isEmpty())
|
||||
return;
|
||||
QString msg = QObject::tr("The following error occurred:") +
|
||||
"\n" + err.getString();
|
||||
if (gui)
|
||||
gui->error(msg);
|
||||
}
|
||||
|
||||
void xcaWarningCore::setGui(class xcaWarning_i *g)
|
||||
{
|
||||
delete gui;
|
||||
gui = g;
|
||||
}
|
||||
50
lib/XcaWarningCore.h
Normal file
50
lib/XcaWarningCore.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* vi: set sw=4 ts=4:
|
||||
*
|
||||
* Copyright (C) 2018 - 2020 Christian Hohnstaedt.
|
||||
*
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __XCAWARNINGCORE_H
|
||||
#define __XCAWARNINGCORE_H
|
||||
|
||||
#include "lib/base.h"
|
||||
#include "lib/exception.h"
|
||||
#include <QSqlError>
|
||||
|
||||
#define XCA_INFO(msg) xcaWarningCore::information(msg)
|
||||
#define XCA_WARN(msg) xcaWarningCore::warning(msg)
|
||||
#define XCA_YESNO(msg) xcaWarningCore::yesno(msg)
|
||||
#define XCA_OKCANCEL(msg) xcaWarningCore::okcancel(msg)
|
||||
#define XCA_ERROR(err) xcaWarningCore::error(err)
|
||||
#define XCA_SQLERROR(err) xcaWarningCore::sqlerror(err)
|
||||
#define XCA_PASSWD_ERROR() XCA_WARN(QObject::tr("Password verify error, please try again"))
|
||||
|
||||
class xcaWarning_i
|
||||
{
|
||||
public:
|
||||
virtual void information(const QString &msg) = 0;
|
||||
virtual void warning(const QString &msg) = 0;
|
||||
virtual bool yesno(const QString &msg) = 0;
|
||||
virtual bool okcancel(const QString &msg) = 0;
|
||||
virtual void error(const errorEx &err) = 0;
|
||||
};
|
||||
|
||||
class xcaWarningCore
|
||||
{
|
||||
static class xcaWarning_i *gui;
|
||||
|
||||
public:
|
||||
xcaWarningCore() = delete;
|
||||
xcaWarningCore(const xcaWarningCore &) = delete;
|
||||
~xcaWarningCore() = delete;
|
||||
|
||||
static void information(const QString &msg);
|
||||
static void warning(const QString &msg);
|
||||
static bool yesno(const QString &msg);
|
||||
static bool okcancel(const QString &msg);
|
||||
static void sqlerror(QSqlError err);
|
||||
static void error(const errorEx &err);
|
||||
static void setGui(class xcaWarning_i *g);
|
||||
};
|
||||
#endif
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
#include "widgets/PwDialog.h"
|
||||
|
||||
#include "exception.h"
|
||||
|
||||
@ -11,15 +11,12 @@
|
||||
|
||||
#include "pki_scard.h"
|
||||
#include "main.h"
|
||||
#include <QDialog>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "exception.h"
|
||||
#include "ui_NewKey.h"
|
||||
#include "pkcs11.h"
|
||||
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
#include "widgets/PwDialog.h"
|
||||
#include "widgets/ExportDialog.h"
|
||||
|
||||
|
||||
@ -8,14 +8,11 @@
|
||||
|
||||
#include "db_temp.h"
|
||||
#include "func.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
#include "widgets/NewX509.h"
|
||||
#include "ui_NewX509.h"
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
#include <QContextMenuEvent>
|
||||
#include <QAction>
|
||||
#include <QInputDialog>
|
||||
#include <QFileInfo>
|
||||
|
||||
db_temp::db_temp() : db_x509name("templates")
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
#include "exception.h"
|
||||
#include "pki_scard.h"
|
||||
#include "sql.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
|
||||
db_token::db_token() : db_base("manageTokens")
|
||||
{
|
||||
|
||||
@ -17,24 +17,18 @@
|
||||
#include "database_model.h"
|
||||
#include "entropy.h"
|
||||
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
#include "widgets/CertExtend.h"
|
||||
#include "widgets/ExportDialog.h"
|
||||
#include "widgets/MainWindow.h"
|
||||
#include "widgets/PwDialog.h"
|
||||
#include "widgets/RevocationList.h"
|
||||
#include "widgets/NewX509.h"
|
||||
#include "widgets/Help.h"
|
||||
|
||||
#include "ui_RevocationList.h"
|
||||
#include "ui_CertExtend.h"
|
||||
#include "ui_Revoke.h"
|
||||
#include "ui_Help.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QContextMenuEvent>
|
||||
#include <QAction>
|
||||
|
||||
#include <openssl/rand.h>
|
||||
|
||||
db_x509::db_x509() : db_x509super("certificates")
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "pki_x509req.h"
|
||||
#include "pki_temp.h"
|
||||
#include "widgets/NewX509.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
#include "widgets/ExportDialog.h"
|
||||
|
||||
db_x509req::db_x509req() : db_x509super("requests")
|
||||
|
||||
@ -8,13 +8,12 @@
|
||||
#include "pki_base.h"
|
||||
#include "pki_temp.h"
|
||||
#include "db_x509super.h"
|
||||
#include "db_temp.h"
|
||||
#include "database_model.h"
|
||||
#include "oid.h"
|
||||
|
||||
#include "widgets/MainWindow.h"
|
||||
#include "widgets/CertDetail.h"
|
||||
#include "widgets/XcaDialog.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
|
||||
#include "ui_CertDetail.h"
|
||||
|
||||
|
||||
@ -9,10 +9,9 @@
|
||||
#include <unistd.h>
|
||||
#include "func.h"
|
||||
#include "exception.h"
|
||||
#include "lib/asn1time.h"
|
||||
#include "lib/settings.h"
|
||||
#include "widgets/validity.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "asn1time.h"
|
||||
#include "settings.h"
|
||||
#include "XcaWarningCore.h"
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
#include "widgets/MainWindow.h"
|
||||
#include "widgets/XcaApplication.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
#include "func.h"
|
||||
#include "xfile.h"
|
||||
#include "main.h"
|
||||
|
||||
@ -9,14 +9,12 @@
|
||||
|
||||
#include <openssl/objects.h>
|
||||
#include <QStringList>
|
||||
#include <QMessageBox>
|
||||
#include <QTextEdit>
|
||||
#include <QStandardPaths>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include "func.h"
|
||||
#include "oid.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "widgets/MainWindow.h"
|
||||
#include "XcaWarningCore.h"
|
||||
|
||||
int first_additional_oid = 0;
|
||||
|
||||
|
||||
@ -19,13 +19,12 @@
|
||||
#include <openssl/engine.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <QPushButton>
|
||||
#include <QMessageBox>
|
||||
#include <QThread>
|
||||
|
||||
#include <ltdl.h>
|
||||
#include "ui_SelectToken.h"
|
||||
#include "widgets/PwDialog.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
|
||||
void waitcursor(int start, int line)
|
||||
{
|
||||
|
||||
@ -10,12 +10,11 @@
|
||||
#include "xfile.h"
|
||||
#include "pki_base.h"
|
||||
#include "exception.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
#include <QString>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/md5.h>
|
||||
#include <typeinfo>
|
||||
|
||||
pki_lookup Store;
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
#include "openssl_compat.h"
|
||||
|
||||
#include "widgets/PwDialog.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "func.h"
|
||||
#include "pkcs11.h"
|
||||
#include "exportType.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/pem.h>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#include <QHash>
|
||||
#include <QDebug>
|
||||
|
||||
#include <widgets/XcaWarning.h>
|
||||
#include "XcaWarningCore.h"
|
||||
|
||||
#include "base.h"
|
||||
#include "sql.h"
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
#include "exception.h"
|
||||
#include "func.h"
|
||||
#include "xfile.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
#include <QList>
|
||||
|
||||
pki_multi::pki_multi(const QString &name)
|
||||
|
||||
@ -14,14 +14,13 @@
|
||||
#include "exception.h"
|
||||
#include "func.h"
|
||||
#include "widgets/PwDialog.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/pkcs12.h>
|
||||
#include <openssl/stack.h>
|
||||
|
||||
#warning split PwDialog into console and GUI
|
||||
#include "ui_PwDialog.h"
|
||||
#include <QMessageBox>
|
||||
|
||||
pki_pkcs12::pki_pkcs12(const QString &d, pki_x509 *acert, pki_key *akey)
|
||||
:pki_multi(d), cert(acert), key(akey)
|
||||
|
||||
@ -16,10 +16,9 @@
|
||||
#include "func.h"
|
||||
#include "XcaProgress.h"
|
||||
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
|
||||
#warning Drop "widgets dependency"
|
||||
#include "ui_MainWindow.h"
|
||||
|
||||
#include <QThread>
|
||||
#include <QProgressBar>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "base.h"
|
||||
#include "sql.h"
|
||||
#include "settings.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "XcaWarningCore.h"
|
||||
|
||||
int DbTransaction::mutex;
|
||||
int DbTransaction::error;
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
#include "MainWindow.h"
|
||||
#include "distname.h"
|
||||
#include "clicklabel.h"
|
||||
#include "XcaWarning.h"
|
||||
#include "Help.h"
|
||||
#include "OidResolver.h"
|
||||
#include "lib/func.h"
|
||||
#include "lib/XcaWarningCore.h"
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QLineEdit>
|
||||
|
||||
@ -133,6 +133,8 @@ MainWindow::MainWindow() : QMainWindow()
|
||||
v->setMainwin(this, searchEdit);
|
||||
|
||||
XcaProgress::setGui(new XcaProgressGui(this));
|
||||
xcaWarningCore::setGui(new xcaWarningGui());
|
||||
|
||||
dhgen = nullptr;
|
||||
dhgenProgress = nullptr;
|
||||
}
|
||||
|
||||
@ -13,111 +13,55 @@
|
||||
#include <QDebug>
|
||||
#include <QSqlDatabase>
|
||||
|
||||
xcaWarning::xcaWarning(QWidget *w, const QString &txt, QMessageBox::Icon icn)
|
||||
xcaWarning::xcaWarning(QWidget *w, const QString &txt,
|
||||
QMessageBox::Icon icn)
|
||||
: QMessageBox(icn, XCA_TITLE, txt, QMessageBox::NoButton, w)
|
||||
{
|
||||
buttons = QMessageBox::NoButton;
|
||||
m = NULL;
|
||||
msg = txt;
|
||||
icon = icn;
|
||||
|
||||
if (IS_GUI_APP) {
|
||||
m = new QMessageBox(icn, XCA_TITLE, txt, buttons, w);
|
||||
m->setTextFormat(Qt::PlainText);
|
||||
return;
|
||||
}
|
||||
button_texts[QMessageBox::Ok] = QMessageBox::tr("Ok");
|
||||
button_texts[QMessageBox::Close] = QMessageBox::tr("Close");
|
||||
button_texts[QMessageBox::Cancel] = QMessageBox::tr("Cancel");
|
||||
button_texts[QMessageBox::Apply] = QMessageBox::tr("Apply");
|
||||
button_texts[QMessageBox::Yes] = QMessageBox::tr("Yes");
|
||||
button_texts[QMessageBox::No] = QMessageBox::tr("No");
|
||||
}
|
||||
|
||||
xcaWarning::~xcaWarning()
|
||||
{
|
||||
delete m;
|
||||
}
|
||||
|
||||
void xcaWarning::setStandardButtons(QMessageBox::StandardButtons b)
|
||||
{
|
||||
buttons = b;
|
||||
if (m)
|
||||
m->setStandardButtons(b);
|
||||
}
|
||||
|
||||
int xcaWarning::exec()
|
||||
{
|
||||
if (m)
|
||||
return m->exec();
|
||||
|
||||
QMap<QMessageBox::Icon, const char *> colors;
|
||||
colors[QMessageBox::Information] = COL_CYAN "Information";
|
||||
colors[QMessageBox::Warning] = COL_RED "Warning";
|
||||
colors[QMessageBox::Critical] = COL_RED "Critical";
|
||||
colors[QMessageBox::Question] = COL_BLUE "Question";
|
||||
|
||||
console_write(stdout, QString("%1:" COL_RESET " %2\n")
|
||||
.arg(colors[icon]).arg(msg).toUtf8());
|
||||
return QMessageBox::Ok;
|
||||
setTextFormat(Qt::PlainText);
|
||||
}
|
||||
|
||||
void xcaWarning::addButton(QMessageBox::StandardButton button,
|
||||
const QString &text)
|
||||
{
|
||||
if (m) {
|
||||
QPushButton *b = m->addButton(button);
|
||||
if (b && !text.isEmpty())
|
||||
b->setText(text);
|
||||
} else {
|
||||
buttons |= button;
|
||||
if (!text.isEmpty())
|
||||
button_texts[button] = text;
|
||||
}
|
||||
QPushButton *b = QMessageBox::addButton(button);
|
||||
if (b && !text.isEmpty())
|
||||
b->setText(text);
|
||||
}
|
||||
|
||||
void xcaWarning::information(const QString &msg)
|
||||
int xcaWarningGui::showBox(const QString &txt, QMessageBox::Icon icn,
|
||||
QMessageBox::StandardButtons b)
|
||||
{
|
||||
xcaWarning m(NULL, msg, QMessageBox::Information);
|
||||
m.setStandardButtons(QMessageBox::Ok);
|
||||
m.exec();
|
||||
xcaWarning *w = new xcaWarning(NULL, txt, icn);
|
||||
w->setStandardButtons(b);
|
||||
int n = w->exec();
|
||||
delete w;
|
||||
return n;
|
||||
}
|
||||
|
||||
void xcaWarning::warning(const QString &msg)
|
||||
void xcaWarningGui::information(const QString &msg)
|
||||
{
|
||||
xcaWarning m(NULL, msg, QMessageBox::Warning);
|
||||
m.setStandardButtons(QMessageBox::Ok);
|
||||
m.exec();
|
||||
showBox(msg, QMessageBox::Information, QMessageBox::Ok);
|
||||
}
|
||||
|
||||
bool xcaWarning::yesno(const QString &msg)
|
||||
void xcaWarningGui::warning(const QString &msg)
|
||||
{
|
||||
xcaWarning m(NULL, msg, QMessageBox::Question);
|
||||
m.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
|
||||
return m.exec() == QMessageBox::Yes;
|
||||
showBox(msg, QMessageBox::Warning, QMessageBox::Ok);
|
||||
}
|
||||
|
||||
bool xcaWarning::okcancel(const QString &msg)
|
||||
bool xcaWarningGui::yesno(const QString &msg)
|
||||
{
|
||||
xcaWarning m(NULL, msg, QMessageBox::Warning);
|
||||
m.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||
return m.exec() == QMessageBox::Ok;
|
||||
return showBox(msg, QMessageBox::Question,
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes;
|
||||
}
|
||||
|
||||
void xcaWarning::sqlerror(QSqlError err)
|
||||
bool xcaWarningGui::okcancel(const QString &msg)
|
||||
{
|
||||
if (!err.isValid())
|
||||
err = QSqlDatabase::database().lastError();
|
||||
|
||||
if (err.isValid()) {
|
||||
qCritical() << "SQL ERROR:" << err.text();
|
||||
XCA_WARN(err.text());
|
||||
}
|
||||
return showBox(msg, QMessageBox::Warning,
|
||||
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok;
|
||||
}
|
||||
|
||||
void xcaWarning::error(const errorEx &err)
|
||||
void xcaWarningGui::error(const errorEx &err)
|
||||
{
|
||||
if (err.isEmpty())
|
||||
return;
|
||||
QString msg = tr("The following error occurred:") +
|
||||
"\n" + err.getString();
|
||||
xcaWarning box(NULL, msg);
|
||||
|
||||
@ -8,45 +8,28 @@
|
||||
#ifndef __XCAWARNING_H
|
||||
#define __XCAWARNING_H
|
||||
|
||||
#include "lib/base.h"
|
||||
#include "lib/exception.h"
|
||||
#include "lib/XcaWarningCore.h"
|
||||
#include <QMessageBox>
|
||||
#include <QMap>
|
||||
#include <QSqlError>
|
||||
|
||||
#define XCA_INFO(msg) xcaWarning::information(msg)
|
||||
#define XCA_WARN(msg) xcaWarning::warning(msg)
|
||||
#define XCA_YESNO(msg) xcaWarning::yesno(msg)
|
||||
#define XCA_OKCANCEL(msg) xcaWarning::okcancel(msg)
|
||||
#define XCA_ERROR(err) xcaWarning::error(err)
|
||||
#define XCA_SQLERROR(err) xcaWarning::sqlerror(err)
|
||||
#define XCA_PASSWD_ERROR() XCA_WARN(QObject::tr("Password verify error, please try again"))
|
||||
|
||||
class xcaWarning: public QObject
|
||||
class xcaWarning: public QMessageBox
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
QMessageBox *m;
|
||||
QMessageBox::StandardButtons buttons;
|
||||
QMap<QMessageBox::StandardButton, QString> button_texts;
|
||||
QMessageBox::Icon icon;
|
||||
QString msg;
|
||||
|
||||
public:
|
||||
xcaWarning(QWidget *w, const QString &txt,
|
||||
QMessageBox::Icon icn = QMessageBox::Warning);
|
||||
~xcaWarning();
|
||||
void setStandardButtons(QMessageBox::StandardButtons b);
|
||||
void addButton(QMessageBox::StandardButton button,
|
||||
const QString &text = QString());
|
||||
int exec();
|
||||
};
|
||||
|
||||
static void information(const QString &msg);
|
||||
static void warning(const QString &msg);
|
||||
static bool yesno(const QString &msg);
|
||||
static bool okcancel(const QString &msg);
|
||||
static void sqlerror(QSqlError err);
|
||||
static void error(const errorEx &err);
|
||||
class xcaWarningGui : public QObject, public xcaWarning_i
|
||||
{
|
||||
public:
|
||||
int showBox(const QString &txt, QMessageBox::Icon icn,
|
||||
QMessageBox::StandardButtons b);
|
||||
void information(const QString &msg);
|
||||
void warning(const QString &msg);
|
||||
bool yesno(const QString &msg);
|
||||
bool okcancel(const QString &msg);
|
||||
void sqlerror(QSqlError err);
|
||||
void error(const errorEx &err);
|
||||
};
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user