contrib/parameter_gui/main.cpp

00001 //---------------------------------------------------------------------------
00002 //
00003 //    Copyright (C) 2010, 2011 by the deal.II authors
00004 //
00005 //    This file is subject to QPL and may not be  distributed
00006 //    without copyright and license information. Please refer
00007 //    to the file deal.II/doc/license.html for the  text  and
00008 //    further information on this license.
00009 //
00010 //---------------------------------------------------------------------------
00011 
00012 #include <QApplication>
00013 #include <QSplashScreen>
00014 #include <QTimer>
00015 
00016 #include "mainwindow.h"
00017 
00042 int main(int argc, char *argv[])
00043 {
00044   Q_INIT_RESOURCE(application);                                         // init resources such as icons or graphics
00045 
00046   QApplication app(argc, argv);
00047 
00048   QSplashScreen * splash = new QSplashScreen;                           // setup a splash screen
00049   splash->setPixmap(QPixmap(":/images/logo_dealii_gui.png"));
00050   splash->show();
00051 
00052   QTimer::singleShot(3000, splash, SLOT(close()));                      // and close it after 3000 ms
00053 
00054   app.setApplicationName("parameterGUI for deal.II");                   // setup the application name
00055 
00056   ::ParameterGui::MainWindow * main_win =
00057     new ::ParameterGui::MainWindow (argv[1]);                   // give command line arguments to main_win
00058                                                                         // if a parameter file is specified at the
00059                                                                         // command line, give it to the MainWindow.
00060 
00061   QTimer::singleShot(1500, main_win, SLOT(show()));                     // show the main window with a short delay
00062                                                                         // so we can see the splash screen
00063   return app.exec();
00064 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Tue May 22 2012 12:06:02 by doxygen 1.7.3