Manages the locations and existence of various desktop directory entries and configuration files.
More...
#include <DesktopDirentLocationManager.h>
|
void | missingDirentFolder (const QString &folder, const DesktopDirentType type) |
| Signal emitted when an expected desktop directory entry folder is missing.
|
|
void | missingServerFolder (const QString &folder, const DesktopServerType type) |
| Signal emitted when an expected server-related folder is missing.
|
|
|
| DesktopDirentLocationManager (const QString &root_path, DesktopMainWindow *parent=nullptr) |
| Constructs a DesktopDirentLocationManager object.
|
|
void | checkSelfOnce () |
| Performs a one-time check of all critical directory entries and configurations.
|
|
QString | queryFromType (const DesktopDirentType type) |
| Queries the expected path for a given DesktopDirentType.
|
|
QString | queryFromType (const DesktopServerType serverType) |
| Queries the expected path for a given DesktopServerType.
|
|
bool | checkComponentFolder (const DesktopDirentType type) |
| Checks if a component folder of a specific type exists.
|
|
bool | checkServerFolder (const DesktopServerType serverType) |
| Checks if a server folder of a specific type exists.
|
|
QString | queryConfigType (const ConfigureFileName name) |
| Queries the expected path for a given configuration file name.
|
|
bool | checkConfigExsited (const ConfigureFileName name) |
| Checks if a configuration file of a specific name exists.
|
|
Manages the locations and existence of various desktop directory entries and configuration files.
This class is responsible for verifying the presence of critical directories and files related to desktop components and server types within a specified root path. It provides methods to query paths based on types and to check for their existence. Signals are emitted when expected folders or configuration files are missing.
◆ DesktopDirentLocationManager()
DesktopDirentLocationManager::DesktopDirentLocationManager |
( |
const QString & |
root_path, |
|
|
DesktopMainWindow * |
parent = nullptr |
|
) |
| |
|
explicit |
Constructs a DesktopDirentLocationManager object.
- Parameters
-
root_path | The base directory path where all desktop directory entries are expected to reside. |
parent | A pointer to the parent QObject, typically the DesktopMainWindow. Defaults to nullptr. |
◆ checkComponentFolder()
bool DesktopDirentLocationManager::checkComponentFolder |
( |
const DesktopDirentType |
type | ) |
|
Checks if a component folder of a specific type exists.
- Parameters
-
type | The DesktopDirentType to check. |
- Returns
- True if the folder exists, false otherwise.
◆ checkConfigExsited()
bool DesktopDirentLocationManager::checkConfigExsited |
( |
const ConfigureFileName |
name | ) |
|
Checks if a configuration file of a specific name exists.
- Parameters
-
name | The ConfigureFileName to check. |
- Returns
- True if the configuration file exists, false otherwise.
◆ checkSelfOnce()
void DesktopDirentLocationManager::checkSelfOnce |
( |
| ) |
|
Performs a one-time check of all critical directory entries and configurations.
- This method initiates a comprehensive check of all expected component folders, server folders, and configuration files under the
root_path
. It will emit missingDirentFolder
or missingServerFolder
signals for any missing entries.
◆ checkServerFolder()
bool DesktopDirentLocationManager::checkServerFolder |
( |
const DesktopServerType |
serverType | ) |
|
Checks if a server folder of a specific type exists.
- Parameters
-
serverType | The DesktopServerType to check. |
- Returns
- True if the folder exists, false otherwise.
◆ missingDirentFolder
void DesktopDirentLocationManager::missingDirentFolder |
( |
const QString & |
folder, |
|
|
const DesktopDirentType |
type |
|
) |
| |
|
signal |
Signal emitted when an expected desktop directory entry folder is missing.
- Parameters
-
folder | The full path of the missing folder. |
type | The DesktopDirentType of the missing folder. |
◆ missingServerFolder
void DesktopDirentLocationManager::missingServerFolder |
( |
const QString & |
folder, |
|
|
const DesktopServerType |
type |
|
) |
| |
|
signal |
Signal emitted when an expected server-related folder is missing.
- Parameters
-
folder | The full path of the missing server folder. |
type | The DesktopServerType of the missing server folder. |
◆ queryConfigType()
QString DesktopDirentLocationManager::queryConfigType |
( |
const ConfigureFileName |
name | ) |
|
Queries the expected path for a given configuration file name.
- Parameters
-
name | The ConfigureFileName to query for (e.g., main config, user settings). |
- Returns
- The absolute path string for the specified configuration file.
◆ queryFromType() [1/2]
QString DesktopDirentLocationManager::queryFromType |
( |
const DesktopDirentType |
type | ) |
|
Queries the expected path for a given DesktopDirentType.
- Parameters
-
type | The type of desktop directory entry to query for (e.g., applications, documents). |
- Returns
- The absolute path string for the specified directory entry.
◆ queryFromType() [2/2]
QString DesktopDirentLocationManager::queryFromType |
( |
const DesktopServerType |
serverType | ) |
|
Queries the expected path for a given DesktopServerType.
- Parameters
-
serverType | The type of desktop server directory to query for (e.g., database, web server). |
- Returns
- The absolute path string for the specified server directory.
The documentation for this class was generated from the following files: