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