OGS
main.cpp File Reference
#include <QVTKOpenGLNativeWidget.h>
#include <vtkSmartPointer.h>
#include <QApplication>
#include <QSurfaceFormat>
#include <memory>
#include "InfoLib/GitInfo.h"
#include "VtkVis/VtkConsoleOutputWindow.h"
#include "mainwindow.h"
Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 21 of file main.cpp.

22{
23 // needed to ensure appropriate OpenGL context is created for VTK rendering.
24 QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
25
26 auto myOutputWindow = vtkSmartPointer<VtkConsoleOutputWindow>::New();
27 vtkOutputWindow::SetInstance(myOutputWindow);
28
29 QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
30 QApplication a(argc, argv);
31 QApplication::setApplicationName("OpenGeoSys - Data Explorer");
32 QApplication::setApplicationVersion(
33 QString::fromStdString(GitInfoLib::GitInfo::ogs_version));
34 QApplication::setOrganizationName("OpenGeoSys Community");
35 QApplication::setOrganizationDomain("opengeosys.org");
36 setlocale(LC_NUMERIC, "C");
37 QLocale::setDefault(QLocale::German);
38 auto w = std::make_unique<MainWindow>();
39 w->setWindowTitle(w->windowTitle() + " - " +
40 QString::fromStdString(GitInfoLib::GitInfo::ogs_version));
41 if (QCoreApplication::arguments().size() > 1)
42 {
43 w->loadFileOnStartUp(QCoreApplication::arguments().at(1));
44 }
45 w->show();
46 int returncode = QApplication::exec();
47
48 return returncode;
49}
GITINFOLIB_EXPORT const std::string ogs_version
constexpr int size(int const displacement_dim)
Vectorized tensor size for given displacement dimension.

References GitInfoLib::GitInfo::ogs_version.