Forked from
ogs / ogs
23068 commits behind the upstream repository.
-
Lars Bilke authoredLars Bilke authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
OGSError.cpp 1016 B
/**
* \file
* \author Karsten Rink
* \date no date
* \brief Implementation of the OGSError class.
*
* \copyright
* Copyright (c) 2012-2015, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "OGSError.h"
#include <QMessageBox>
#include <QString>
OGSError::OGSError()
{}
OGSError::~OGSError()
{}
void OGSError::box(const QString &e)
{
box(e, "OpenGeoSys");
}
void OGSError::box(const QString &e, const QString &t)
{
QMessageBox msgBox;
msgBox.setWindowTitle(t);
msgBox.setText(e);
msgBox.exec();
}
bool OGSError::question(const QString &e, const QString &t)
{
QMessageBox msgBox;
msgBox.setWindowTitle(t);
msgBox.setText(e);
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Cancel);
if (msgBox.exec() == QMessageBox::Ok)
return true;
return false;
}