]>
vaikene.ee Git - evaf/blob - main/GUI/fatalerr.h
2 * @file main/GUI/fatalerr.h
3 * @brief Fatal error message dialog box
6 * Copyright (c) 2011 Enar Vaikene
8 * This file is part of the eVaf C++ cross-platform application development framework.
10 * This file can be used under the terms of the GNU General Public License
11 * version 3.0 as published by the Free Software Foundation and appearing in
12 * the file LICENSE included in the packaging of this file. Please review the
13 * the following information to ensure the GNU General Public License version
14 * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
16 * Alternatively, this file may be used in accordance with the Commercial License
17 * Agreement provided with the Software.
20 #ifndef __GUI_FATALERR_H
21 # define __GUI_FATALERR_H
32 * Fatal error message dialog box
34 * The fatal error message dialog box shows a fatal error message and starts a count-down
35 * to close the dialog box and abort the application. Users can click on the Ignore button
36 * to keep the application running for diagnostics.
38 class FatalErr
: public QDialog
46 Abort
= 0, ///< User clicked on the Abort button or the dialog box timed out
47 Ignore
= 1 ///< User clicked on the Ignore button
51 * Creates the fatal error message dialog box
52 * @param title Title of the dialog box
53 * @param text Text shown on the dialog box
54 * @param parent Optional parent widget
56 FatalErr(QString
const & title
, QString
const & text
, QWidget
* parent
= 0);
59 * Shows a fatal error message dialog box
60 * @param title Title of the dialog box
61 * @param text Text shown on the dialog box
62 * @param parent Optional parent widget
63 * @return The result code
65 static int message(QString
const & title
, QString
const & text
, QWidget
* parent
= 0);
70 /// Timer event handler
71 virtual void timerEvent(QTimerEvent
*);
76 /// Ignore button clicked
79 /// Abort button clicked
85 /// Count-down time in secons
86 static int const Timer
= 60;
96 } // namespace eVaf::GUI::Internal
97 } // namespace eVaf::GUI