OGS
OGSError.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#include "
Base/OGSError.h
"
5
6
#include <QMessageBox>
7
#include <QString>
8
9
OGSError::OGSError
() =
default
;
10
11
OGSError::~OGSError
() =
default
;
12
13
void
OGSError::box
(
const
QString& e)
14
{
15
box
(e,
"OpenGeoSys"
);
16
}
17
18
void
OGSError::box
(
const
QString& e,
const
QString& t)
19
{
20
QMessageBox msgBox;
21
msgBox.setWindowTitle(t);
22
msgBox.setText(e);
23
msgBox.exec();
24
}
25
26
bool
OGSError::question
(
const
QString& e,
const
QString& t)
27
{
28
QMessageBox msgBox;
29
msgBox.setWindowTitle(t);
30
msgBox.setText(e);
31
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
32
msgBox.setDefaultButton(QMessageBox::Cancel);
33
34
return
msgBox.exec() == QMessageBox::Ok;
35
}
OGSError.h
OGSError::box
static void box(const QString &e)
Definition
OGSError.cpp:13
OGSError::~OGSError
~OGSError()
OGSError::OGSError
OGSError()
OGSError::question
static bool question(const QString &e, const QString &t)
Definition
OGSError.cpp:26
Applications
DataExplorer
Base
OGSError.cpp
Generated by
1.14.0