Engauge Digitizer
2
Loading...
Searching...
No Matches
main
MainWindowMsg.cpp
Go to the documentation of this file.
1
/******************************************************************************************************
2
* (C) 2020 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3
* under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4
* LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5
******************************************************************************************************/
6
7
#include "
MainWindowMsg.h
"
8
#include <QApplication>
9
#include <QMessageBox>
10
11
MainWindowMsg::MainWindowMsg
(
const
QString &msg) :
12
QMainWindow(),
13
m_msg (msg)
14
{
15
}
16
17
MainWindowMsg::~MainWindowMsg
()
18
{
19
}
20
21
void
MainWindowMsg::showEvent
(QShowEvent *
/* event */
)
22
{
23
// Show message in gui instead of cout or cerr since console output is disabled in at least Microsoft Windows
24
QMessageBox msgBox (QMessageBox::Information,
25
QObject::tr (
"Engauge Digitizer"
),
26
m_msg);
27
28
// Connect so closing dialog also closes this class
29
connect (&msgBox, SIGNAL (buttonClicked (QAbstractButton *)),
this
, SLOT (slotClose (QAbstractButton *)));
30
31
msgBox.exec();
32
}
33
34
void
MainWindowMsg::slotClose (QAbstractButton *)
35
{
36
close ();
37
qApp->quit();
38
39
exit (0);
40
}
MainWindowMsg.h
MainWindowMsg::MainWindowMsg
MainWindowMsg(const QString &msg)
Single constructor.
Definition
MainWindowMsg.cpp:11
MainWindowMsg::showEvent
virtual void showEvent(QShowEvent *)
Processing performed after gui becomes available.
Definition
MainWindowMsg.cpp:21
MainWindowMsg::~MainWindowMsg
~MainWindowMsg()
Definition
MainWindowMsg.cpp:17
Generated on
for Engauge Digitizer by
1.14.0