mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-27 22:27:46 +00:00
33 lines
854 B
C
33 lines
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);
|
||
|
};
|