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/preview_bsa/src/simplefiletreemodel.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/preview_bsa/src/simplefiletreemodel.h')
| -rw-r--r-- | libs/preview_bsa/src/simplefiletreemodel.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/libs/preview_bsa/src/simplefiletreemodel.h b/libs/preview_bsa/src/simplefiletreemodel.h new file mode 100644 index 0000000..5189d89 --- /dev/null +++ b/libs/preview_bsa/src/simplefiletreemodel.h @@ -0,0 +1,48 @@ +#ifndef SIMPLEFILETREEMODEL_H +#define SIMPLEFILETREEMODEL_H + +#include <QAbstractItemModel> +#include <QIcon> +#include <QLineEdit> +#include <QModelIndex> +#include <QVariant> + +#include <uibase/filterwidget.h> + +using namespace MOBase; + +class SimpleFileTreeItem; + +class SimpleFileTreeModel : public QAbstractItemModel +{ + Q_OBJECT + +public: + explicit SimpleFileTreeModel(const QStringList& data, QObject* parent = nullptr); + ~SimpleFileTreeModel(); + + void setFilterWidgetList(QAbstractItemView* list) { m_FilterWidget.setList(list); } + void setFilterWidgetEdit(QLineEdit* edit) { m_FilterWidget.setEdit(edit); } + + QVariant data(const QModelIndex& index, int role) const override; + Qt::ItemFlags flags(const QModelIndex& index) const override; + QVariant headerData(int section, Qt::Orientation orientation, + int role = Qt::DisplayRole) const override; + QModelIndex index(int row, int column, + const QModelIndex& parent = QModelIndex()) const override; + QModelIndex parent(const QModelIndex& index) const override; + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + int columnCount(const QModelIndex& parent = QModelIndex()) const override; + +private: + // takes a list of relative file paths assumed with the same base folder and generates + // the filetree model + void setupModelData(const QStringList& lines, SimpleFileTreeItem* parent); + const int m_ColumnCount = 1; + SimpleFileTreeItem* m_RootItem; + FilterWidget m_FilterWidget; + QIcon m_FileIcon; + QIcon m_FolderIcon; +}; + +#endif // SIMPLEFILETREEMODEL_H |
