MCPcopy Create free account
hub / github.com/colmap/colmap / RunGraphicalUserInterface

Function RunGraphicalUserInterface

src/colmap/exe/gui.cc:40–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace colmap {
39
40int RunGraphicalUserInterface(int argc, char** argv) {
41#if !defined(COLMAP_GUI_ENABLED)
42 LOG(ERROR)
43 << "Cannot start graphical user interface. COLMAP was built without GUI "
44 "support or Qt dependency was not found.";
45 return EXIT_FAILURE;
46#else
47 OptionManager options;
48
49 std::filesystem::path import_path;
50
51 if (argc > 1) {
52 options.AddDefaultOption("import_path", &import_path);
53 options.AddAllOptions();
54 if (!options.Parse(argc, argv)) {
55 return EXIT_FAILURE;
56 }
57 }
58
59 QApplication app(argc, argv);
60
61#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) && \
62 (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
63 app.setAttribute(Qt::AA_EnableHighDpiScaling);
64 app.setAttribute(Qt::AA_UseHighDpiPixmaps);
65#endif
66 app.setAttribute(Qt::AA_DontShowIconsInMenus, false);
67
68 MainWindow main_window(std::move(options));
69 main_window.show();
70
71 if (!import_path.empty()) {
72 main_window.ImportReconstruction(import_path);
73 }
74
75 return app.exec();
76#endif
77}
78
79int RunProjectGenerator(int argc, char** argv) {
80 std::filesystem::path output_path;

Callers

nothing calls this directly

Calls 6

AddDefaultOptionMethod · 0.80
ParseMethod · 0.80
showMethod · 0.80
emptyMethod · 0.80
ImportReconstructionMethod · 0.80
AddAllOptionsMethod · 0.45

Tested by

no test coverage detected