CCIMXDesktop
 
Loading...
Searching...
No Matches
DesktopDirentLocationManager.h
Go to the documentation of this file.
1
6#ifndef DESKTOPDIRENTLOCATIONMANAGER_H
7#define DESKTOPDIRENTLOCATIONMANAGER_H
8
9#include "DesktopDirentInfoSettings.h" // Assumed to contain DesktopDirentType, DesktopServerType, ConfigureFileName
10#include <QObject> // Base class for DesktopDirentLocationManager
11
12// Forward declaration to avoid circular dependencies and improve compilation time
14
24class DesktopDirentLocationManager : public QObject {
25 Q_OBJECT
26
27public:
33 explicit DesktopDirentLocationManager(const QString& root_path, DesktopMainWindow* parent = nullptr);
34
41 void checkSelfOnce();
42
48 QString queryFromType(const DesktopDirentType type);
49
55 QString queryFromType(const DesktopServerType serverType);
56
62 bool checkComponentFolder(const DesktopDirentType type);
63
69 bool checkServerFolder(const DesktopServerType serverType);
70
76 QString queryConfigType(const ConfigureFileName name);
77
83 bool checkConfigExsited(const ConfigureFileName name);
84
85signals:
91 void missingDirentFolder(const QString& folder, const DesktopDirentType type);
92
98 void missingServerFolder(const QString& folder, const DesktopServerType type);
99
100private:
104 QString root_path;
105
109 DesktopMainWindow* bindingWindow;
110
116 void check_root_path_sessions();
117
123 void iterate_check_basefolder_components(const DesktopDirentType t, const QString& metaMessage);
124
130 void iterate_check_server_components(const DesktopServerType t, const QString& metaMessage);
131};
132
133#endif // DESKTOPDIRENTLOCATIONMANAGER_H
Manages the locations and existence of various desktop directory entries and configuration files.
Definition DesktopDirentLocationManager.h:24
QString queryFromType(const DesktopDirentType type)
Queries the expected path for a given DesktopDirentType.
Definition DesktopDirentLocationManager.cpp:78
bool checkComponentFolder(const DesktopDirentType type)
Checks if a component folder of a specific type exists.
Definition DesktopDirentLocationManager.cpp:87
void missingServerFolder(const QString &folder, const DesktopServerType type)
Signal emitted when an expected server-related folder is missing.
void checkSelfOnce()
Performs a one-time check of all critical directory entries and configurations.
Definition DesktopDirentLocationManager.cpp:62
void missingDirentFolder(const QString &folder, const DesktopDirentType type)
Signal emitted when an expected desktop directory entry folder is missing.
QString queryConfigType(const ConfigureFileName name)
Queries the expected path for a given configuration file name.
Definition DesktopDirentLocationManager.cpp:97
bool checkServerFolder(const DesktopServerType serverType)
Checks if a server folder of a specific type exists.
Definition DesktopDirentLocationManager.cpp:92
bool checkConfigExsited(const ConfigureFileName name)
Checks if a configuration file of a specific name exists.
Definition DesktopDirentLocationManager.cpp:102
DesktopMainWindow is the main frontend window of the application. For beginners, this is the starting...
Definition desktopmainwindow.h:39