2022-12-31 01:06:17 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QItemSelection>
|
|
|
|
|
|
|
|
#include "minecraft/mod/tasks/LocalResourceParse.h"
|
2023-01-10 00:12:28 +00:00
|
|
|
#include "ui/instanceview/InstanceProxyModel.h"
|
2022-12-31 01:06:17 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ImportResourceDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class ImportResourceDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-01-10 00:12:28 +00:00
|
|
|
explicit ImportResourceDialog(QString file_path, PackedResourceType type, QWidget* parent = nullptr);
|
|
|
|
~ImportResourceDialog() override;
|
2022-12-31 01:06:17 +00:00
|
|
|
QString selectedInstanceKey;
|
2023-01-10 00:12:28 +00:00
|
|
|
|
2022-12-31 01:06:17 +00:00
|
|
|
private:
|
|
|
|
Ui::ImportResourceDialog* ui;
|
|
|
|
PackedResourceType m_resource_type;
|
|
|
|
QString m_file_path;
|
2023-01-10 00:12:28 +00:00
|
|
|
InstanceProxyModel* proxyModel;
|
2022-12-31 01:06:17 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void selectionChanged(QItemSelection, QItemSelection);
|
|
|
|
void activated(QModelIndex);
|
|
|
|
};
|