Debian Codegraph @

src/Gui/StartupProcess.h

raw
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2
3 /***************************************************************************
4 * Copyright (c) 2024 Werner Mayer <wmayer[at]users.sourceforge.net> *
5 * *
6 * This file is part of FreeCAD. *
7 * *
8 * FreeCAD is free software: you can redistribute it and/or modify it *
9 * under the terms of the GNU Lesser General Public License as *
10 * published by the Free Software Foundation, either version 2.1 of the *
11 * License, or (at your option) any later version. *
12 * *
13 * FreeCAD is distributed in the hope that it will be useful, but *
14 * WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with FreeCAD. If not, see *
20 * <https://www.gnu.org/licenses/>. *
21 * *
22 **************************************************************************/
23
24 #ifndef GUI_STARTUPPROCESS_H
25 #define GUI_STARTUPPROCESS_H
26
27 #include <FCGlobal.h>
28 #include <QStringList>
29
30 class QApplication;
31 class QMessageBox;
32
33 namespace Gui
34 {
35
36 class Application;
37 class MainWindow;
38
39 class GuiExport StartupProcess
40 {
41 public:
42 StartupProcess();
43 static void setupApplication();
44 void execute();
45
46 private:
47 void setLibraryPath();
48 void setStyleSheetPaths();
49 void setImagePaths();
50 void registerEventType();
51 void setThemePaths();
52 void setupFileDialog();
53 };
54
55 class GuiExport StartupPostProcess
56 {
57 public:
58 StartupPostProcess(MainWindow* mw, Application& guiApp, QApplication* app);
59 void setLoadFromPythonModule(bool value);
60 void execute();
61
62 private:
63 void setWindowTitle();
64 void setProcessMessages();
65 void setAutoSaving();
66 void setToolBarIconSize();
67 void setWheelEventFilter();
68 void setLocale();
69 void setCursorFlashing();
70 void setQtStyle();
71 void migrateOldTheme(const std::string& style);
72 void checkOpenGL();
73 void loadOpenInventor();
74 void setBranding();
75 void setStyleSheet();
76 void autoloadModules(const QStringList& wb);
77 void setImportImageFormats();
78 void showMainWindow();
79 void activateWorkbench();
80 void checkParameters();
81 void checkVersionMigration() const;
82
83 private:
84 bool loadFromPythonModule = false;
85 MainWindow* mainWindow;
86 Application& guiApp;
87 QApplication* qtApp;
88 };
89
90
91 } // namespace Gui
92
93 #endif // GUI_STARTUPPROCESS_H