2016-02-29 08:52:15 +00:00
|
|
|
// Copyright 2016 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QDialog>
|
2017-08-25 18:32:37 +00:00
|
|
|
#include <memory>
|
2016-02-29 08:52:15 +00:00
|
|
|
|
2017-08-25 18:32:37 +00:00
|
|
|
#include "DiscIO/Volume.h"
|
2016-02-29 08:52:15 +00:00
|
|
|
#include "DolphinQt2/GameList/GameFile.h"
|
|
|
|
|
2017-08-25 18:32:37 +00:00
|
|
|
class QStandardItem;
|
|
|
|
class QStandardItemModel;
|
|
|
|
class QTreeView;
|
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
|
|
|
class FileInfo;
|
|
|
|
struct Partition;
|
|
|
|
};
|
|
|
|
|
2016-02-29 08:52:15 +00:00
|
|
|
class FilesystemWidget final : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit FilesystemWidget(const GameFile& game);
|
|
|
|
|
|
|
|
private:
|
2017-08-25 18:32:37 +00:00
|
|
|
void CreateWidgets();
|
|
|
|
void ConnectWidgets();
|
|
|
|
void PopulateView();
|
|
|
|
void PopulateDirectory(int partition_id, QStandardItem* root, const DiscIO::FileInfo& directory);
|
|
|
|
|
|
|
|
void ShowContextMenu(const QPoint&);
|
|
|
|
|
|
|
|
void ExtractPartition(const DiscIO::Partition& partition, const QString& out);
|
|
|
|
void ExtractDirectory(const DiscIO::Partition& partition, const QString path, const QString& out);
|
|
|
|
void ExtractFile(const DiscIO::Partition& pratition, const QString& path, const QString& out);
|
|
|
|
void ExtractSystemData(const DiscIO::Partition& partition, const QString& out);
|
|
|
|
void CheckIntegrity(const DiscIO::Partition& partition);
|
|
|
|
|
|
|
|
DiscIO::Partition GetPartitionFromID(int id);
|
|
|
|
|
|
|
|
QStandardItemModel* m_tree_model;
|
|
|
|
QTreeView* m_tree_view;
|
|
|
|
|
2016-02-29 08:52:15 +00:00
|
|
|
GameFile m_game;
|
2017-08-25 18:32:37 +00:00
|
|
|
std::unique_ptr<DiscIO::Volume> m_volume;
|
2016-02-29 08:52:15 +00:00
|
|
|
};
|