dolphin/Source/Core/DolphinQt2/Config/FilesystemWidget.h
Lioncash d1d584d16b FilesystemWidget: Replace DiscIO includes with forward declarations
Avoids the need to use an ugly ifdef around a header, and also resolves
an indirect inclusion in PropertiesDialog.
2018-05-13 16:01:16 -04:00

55 lines
1.4 KiB
C++

// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <QDialog>
#include <memory>
#include "UICommon/GameFile.h"
class QStandardItem;
class QStandardItemModel;
class QTreeView;
namespace DiscIO
{
class FileInfo;
class Volume;
struct Partition;
} // namespace DiscIO
class FilesystemWidget final : public QWidget
{
Q_OBJECT
public:
explicit FilesystemWidget(const UICommon::GameFile& game);
~FilesystemWidget() override;
private:
void CreateWidgets();
void ConnectWidgets();
void PopulateView();
void PopulateDirectory(int partition_id, QStandardItem* root, const DiscIO::Partition& partition);
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& partition, const QString& path, const QString& out);
bool 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;
UICommon::GameFile m_game;
std::unique_ptr<DiscIO::Volume> m_volume;
};