mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-06 16:49:09 +00:00
UI updates
- add import dialog this is more complex than I thought - added scope exit grammar sugar - main dialog is now linked to import dialog - importer citra file path is fixed - importer now reports maximum size - file util is improved with GetDirectoryTreeSize
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
// Copyright 2019 threeSD Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <QDialog>
|
||||
#include "core/importer.h"
|
||||
|
||||
class QTreeWidgetItem;
|
||||
|
||||
namespace Ui {
|
||||
class ImportDialog;
|
||||
}
|
||||
|
||||
class ImportDialog : public QDialog {
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
explicit ImportDialog(QWidget* parent, const Core::Config& config);
|
||||
~ImportDialog() override;
|
||||
|
||||
private:
|
||||
void PopulateContent();
|
||||
void UpdateSizeDisplay();
|
||||
void UpdateItemCheckState(QTreeWidgetItem* item);
|
||||
|
||||
std::unique_ptr<Ui::ImportDialog> ui;
|
||||
|
||||
std::string user_path;
|
||||
Core::SDMCImporter importer;
|
||||
std::vector<Core::ContentSpecifier> contents;
|
||||
u64 total_size = 0;
|
||||
|
||||
// HACK: To tell whether the checkbox state change is a programmatic trigger
|
||||
// TODO: Is there a more elegant way of doing the same?
|
||||
bool program_trigger = false;
|
||||
};
|
||||
Reference in New Issue
Block a user