Newer
Older
// ************************************************************************** //
//
// BornAgain: simulate and fit scattering at grazing incidence
//

Wuttke, Joachim
committed
//! @file GUI/main/main.cpp
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************** //
#include "appoptions.h"
#include "FitProgressInfo.h"
void messageHandler(QtMsgType, const QMessageLogContext&, const QString&) {}
Mohammad Mahadi Hasan
committed
int main(int argc, char* argv[])
ApplicationOptions options(argc, argv);
if (!options.isConsistent())
return 0;
QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
qRegisterMetaType<QVector<double>>("QVector<double>");
if( options.enableHighDPISupport())
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(argc, argv);
if (!options.find("with-debug"))
Mohammad Mahadi Hasan
committed
qInstallMessageHandler(messageHandler);
std::unique_ptr<SplashScreen> splash;
if (!options.find("no-splash")) {
splash.reset(new SplashScreen);
splash->start(/*show_during*/1200);
}
if (options.find("geometry"))
win.resize(options.mainWindowSize());
if (splash)
splash->finish(&win);