Utility class for loading an existing sky culture.
More...
#include <ScmSCLoader.hpp>
|
| static scm::ScmSkyCulture * | loadFromDirectory (const QDir &dir, QString *errorMsg=nullptr, QStringList *unrecognizedHeadings=nullptr) |
| | Loads a sky culture from a given directory. More...
|
| |
| static scm::ScmSkyCulture * | selectAndLoad (QWidget *parent=nullptr, const QString &defaultPath={}, QString *errorMsg=nullptr, QStringList *unrecognizedHeadings=nullptr) |
| | Opens a directory picker and loads the selected sky culture. More...
|
| |
Utility class for loading an existing sky culture.
◆ loadFromDirectory()
| static scm::ScmSkyCulture* ScmSCLoader::loadFromDirectory |
( |
const QDir & |
dir, |
|
|
QString * |
errorMsg = nullptr, |
|
|
QStringList * |
unrecognizedHeadings = nullptr |
|
) |
| |
|
static |
Loads a sky culture from a given directory.
The directory must contain at least an index.json file. The files territory.geojson and description.md are loaded when present.
- Parameters
-
| dir | Sky culture directory to load. |
| errorMsg | If non-null, receives a human-readable error description on failure. |
| unrecognizedHeadings | If non-null, receives the list of headings in description.md that could not be mapped to a known section or constellation. |
- Returns
- Newly heap-allocated ScmSkyCulture on success, nullptr on failure.
◆ selectAndLoad()
| static scm::ScmSkyCulture* ScmSCLoader::selectAndLoad |
( |
QWidget * |
parent = nullptr, |
|
|
const QString & |
defaultPath = {}, |
|
|
QString * |
errorMsg = nullptr, |
|
|
QStringList * |
unrecognizedHeadings = nullptr |
|
) |
| |
|
static |
Opens a directory picker and loads the selected sky culture.
- Parameters
-
| parent | Parent widget for the file dialog (may be nullptr). |
| defaultPath | Initial directory shown in the picker. |
| errorMsg | If non-null, receives a human-readable error on failure. |
| unrecognizedHeadings | If non-null, receives the list of headings in description.md that could not be mapped to a known section or constellation. |
- Returns
- Newly heap-allocated ScmSkyCulture, or nullptr if the user cancelled or loading failed.