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 DataExplorer/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 24 of file DataExplorer/main.cpp.

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

References BaseLib::initOGSLogger(), and GitInfoLib::GitInfo::ogs_version.