mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-27 14:17:45 +00:00
File Explorer is still in functionality limbo, but this at least removes the libxiv dependency and will make it easier to use the new GUI parts system in the future.
33 lines
No EOL
854 B
C++
33 lines
No EOL
854 B
C++
#pragma once
|
|
|
|
#include <QMdiSubWindow>
|
|
#include <physis.hpp>
|
|
|
|
struct PathPart {
|
|
uint32_t crcHash;
|
|
QMap<QString, PathPart> children;
|
|
};
|
|
|
|
|
|
class FileTreeWindow : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit FileTreeWindow(GameData* data, QWidget *parent = nullptr);
|
|
|
|
private:
|
|
GameData* data = nullptr;
|
|
|
|
void addPath(QString path);
|
|
void addUnknownPath(QString knownDirectory, uint32_t crcHash);
|
|
void traversePart(QList<QString> tokens, PathPart& part, QString pathSoFar);
|
|
std::tuple<bool, QString> traverseUnknownPath(uint32_t crcHash, PathPart& part, QString pathSoFar);
|
|
|
|
QMap<QString, PathPart> rootParts;
|
|
|
|
void addPaths(QTreeWidget *pWidget);
|
|
|
|
QTreeWidgetItem* addPartAndChildren(const QString& qString, const PathPart& part, const QString& pathSoFar);
|
|
|
|
signals:
|
|
void openFileProperties(QString path);
|
|
}; |