Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
main.cpp
1 // ---------------------------------------------------------------------
2 // @f$Id: main.cpp 31527 2013-11-03 09:58:45Z maier @f$
3 //
4 // Copyright (C) 2013 by Martin Steigemann and Wolfgang Bangerth
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 
18 #include <QApplication>
19 #include <QSplashScreen>
20 #include <QTimer>
21 
22 #include "mainwindow.h"
23 
48 int main(int argc, char *argv[])
49 {
50  Q_INIT_RESOURCE(application); // init resources such as icons or graphics
51 
52  QApplication app(argc, argv);
53 
54  QSplashScreen * splash = new QSplashScreen; // setup a splash screen
55  splash->setPixmap(QPixmap(":/images/logo_dealii_gui.png"));
56  splash->show();
57 
58  QTimer::singleShot(3000, splash, SLOT(close())); // and close it after 3000 ms
59 
60  app.setApplicationName("parameterGUI for deal.II"); // setup the application name
61 
62  ::ParameterGui::MainWindow * main_win =
63  new ::ParameterGui::MainWindow (argv[1]); // give command line arguments to main_win
64  // if a parameter file is specified at the
65  // command line, give it to the MainWindow.
66 
67  QTimer::singleShot(1500, main_win, SLOT(show())); // show the main window with a short delay
68  // so we can see the splash screen
69  return app.exec();
70 }
int main(int argc, char *argv[])
Definition: main.cpp:48