diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
| commit | 7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch) | |
| tree | 27fb39be241fdb5ac2734c574de678977d1856d0 /libs/game_features/src/moddatacontent.h | |
Fluorine Manager: full Linux port of Mod Organizer 2
Complete native Linux port with FUSE-based virtual filesystem,
Proton/umu-run integration, and Flatpak packaging.
Key features:
- FUSE VFS replacing Windows USVFS (in-process + standalone helper for Flatpak)
- Proton/GE-Proton/umu-run launcher with env var forwarding
- Flatpak support (sandbox-aware VFS, NXM handler, umu-run)
- Wine prefix management UI
- Case-insensitive path resolution for Linux filesystems
- QSettings-safe INI handling (avoids Bethesda INI corruption)
- Portable instance support with auto-generated launcher scripts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/game_features/src/moddatacontent.h')
| -rw-r--r-- | libs/game_features/src/moddatacontent.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/libs/game_features/src/moddatacontent.h b/libs/game_features/src/moddatacontent.h new file mode 100644 index 0000000..e17bd66 --- /dev/null +++ b/libs/game_features/src/moddatacontent.h @@ -0,0 +1,112 @@ +#ifndef MODDATACONTENT_H +#define MODDATACONTENT_H + +#include <algorithm> +#include <memory> +#include <vector> + +#include <QString> + +namespace MOBase { + + class IFileTree; + +}; + +/** + * The ModDataContent feature is used (when available) to indicate to users the content + * of mods in the "Content" column. + * + * The feature exposes a list of possible content types, each associated with an ID, a name + * and an icon. The icon is the path to either: + * - A Qt resource or; + * - A file on the disk. + * + * In order to facilitate the implementation, MO2 already provides a set of icons that can + * be used. Those icons are all under :/MO/gui/content (e.g. :/MO/gui/content/plugin or :/MO/gui/content/music). + * + * The list of available icons is: + * - plugin: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/jigsaw-piece.png + * - skyproc: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/hand-of-god.png + * - texture: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/empty-chessboard.png + * - music: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/double-quaver.png + * - sound: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/lyre.png + * - interface: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/usable.png + * - skse: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/checkbox-tree.png + * - script: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/tinker.png + * - mesh: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/breastplate.png + * - string: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/conversation.png + * - bsa: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/locked-chest.png + * - menu: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/config.png + * - inifile: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/feather-and-scroll.png + * - modgroup: https://github.com/ModOrganizer2/modorganizer/blob/master/src/resources/contents/xedit.png + */ +class ModDataContent { +public: + + struct Content { + + /** + * @param id ID of this content. + * @param name Name of this content. + * @param icon Path to the icon for this content. Can be either a path + * to an image on the disk, or to a resource. Can be an empty string if filterOnly + * is true. + * @param filterOnly Indicates if the content should only be show in the filter + * criteria and not in the actual Content column. + */ + Content(int id, QString name, QString icon, bool filterOnly = false) : + m_Id{ id }, m_Name{ name }, m_Icon{ icon }, m_FilterOnly{ filterOnly } { } + + /** + * @return the ID of this content. + */ + int id() const { return m_Id; } + + /** + * @return the name of this content. + */ + QString name() const { return m_Name; } + + /** + * @return the path to the icon of this content (can be a Qt resource path). + */ + QString icon() const { return m_Icon; } + + /** + * @return true if this content is only meant to be used as a filter criteria. + */ + bool isOnlyForFilter() const { return m_FilterOnly; } + + private: + + int m_Id; + QString m_Name; + QString m_Icon; + bool m_FilterOnly; + }; + + /** + * @return the list of all possible contents for the corresponding game. + */ + virtual std::vector<Content> getAllContents() const = 0; + + /** + * @brief Retrieve the list of contents in the given tree. + * + * @param fileTree The tree corresponding to the mod to retrieve contents for. + * + * @return the IDs of the content in the given tree. + */ + virtual std::vector<int> getContentsFor(std::shared_ptr<const MOBase::IFileTree> fileTree) const = 0; + +public: + + /** + * + */ + virtual ~ModDataContent() { } + +}; + +#endif
\ No newline at end of file |
