Began switching the GUI system to use a QSettings object.
[aesalon.git] / src / gui / Application.cpp
blob4d62cd59cf96ecc62d2ec76fa6f4f218bb7024f7
1 #include <iostream>
2 #include <QMessageBox>
3 #include "Application.h"
4 #include "platform/PlatformException.h"
6 namespace Aesalon {
7 namespace GUI {
9 Application::Application(int argc, char *argv[]) : QApplication(argc, argv) {
10 QCoreApplication::setApplicationName("Aesalon GUI");
11 QCoreApplication::setOrganizationName("Aesalon development team");
12 QCoreApplication::setOrganizationDomain("");
15 bool Application::notify(QObject *object, QEvent *event) {
16 try {
17 return QApplication::notify(object, event);
19 catch(Platform::PlatformException pe) {
20 QMessageBox::critical(NULL, tr("Platform exception"), QString(pe.get_message().c_str()), 0, 0);
21 return false;
23 catch(Misc::Exception e) {
24 QMessageBox::critical(NULL, tr("Exception"), QString(e.get_message().c_str()), 0, 0);
25 return false;
29 } // namespace GUI
30 } // namespace Aesalon