libquentier  0.4.0
The library for rich desktop clients of Evernote service
MessageBox.h
1 /*
2  * Copyright 2017 Dmitry Ivanov
3  *
4  * This file is part of libquentier
5  *
6  * libquentier is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, version 3 of the License.
9  *
10  * libquentier is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libquentier. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef LIB_QUENTIER_UTILITY_MESSAGE_BOX_H
20 #define LIB_QUENTIER_UTILITY_MESSAGE_BOX_H
21 
22 #include <quentier/utility/Macros.h>
23 #include <quentier/utility/Linkage.h>
24 #include <QMessageBox>
25 
26 namespace quentier {
27 
28 int QUENTIER_EXPORT genericMessageBox(QWidget * parent, const QString & title,
29  const QString & briefText, const QString & detailedText = QString(),
30  const QMessageBox::StandardButtons standardButtons = QMessageBox::Ok);
31 int QUENTIER_EXPORT informationMessageBox(QWidget * parent, const QString & title,
32  const QString & briefText, const QString & detailedText = QString(),
33  const QMessageBox::StandardButtons standardButtons = QMessageBox::Ok);
34 int QUENTIER_EXPORT warningMessageBox(QWidget * parent, const QString & title,
35  const QString & briefText, const QString & detailedText = QString(),
36  const QMessageBox::StandardButtons standardButtons = QMessageBox::Ok);
37 int QUENTIER_EXPORT criticalMessageBox(QWidget * parent, const QString & title,
38  const QString & briefText, const QString & detailedText = QString(),
39  const QMessageBox::StandardButtons standardButtons = QMessageBox::Ok);
40 int QUENTIER_EXPORT questionMessageBox(QWidget * parent, const QString & title,
41  const QString & briefText, const QString & detailedText = QString(),
42  const QMessageBox::StandardButtons standardButtons = QMessageBox::Ok | QMessageBox::Cancel);
43 
44 // Convenience function for critical message box due to internal error, has built-in title
45 // ("Internal error") and brief text so the caller only needs to provide the detailed text
46 void QUENTIER_EXPORT internalErrorMessageBox(QWidget * parent, QString detailedText = QString());
47 
48 } // namespace quentier
49 
50 #endif // LIB_QUENTIER_UTILITY_MESSAGE_BOX_H