make universal resource type
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@@ -8,10 +8,11 @@
|
||||
#include "InstanceList.h"
|
||||
|
||||
#include <InstanceList.h>
|
||||
#include "modplatform/ResourceType.h"
|
||||
#include "ui/instanceview/InstanceDelegate.h"
|
||||
#include "ui/instanceview/InstanceProxyModel.h"
|
||||
|
||||
ImportResourceDialog::ImportResourceDialog(QString file_path, PackedResourceType type, QWidget* parent)
|
||||
ImportResourceDialog::ImportResourceDialog(QString file_path, ModPlatform::ResourceType type, QWidget* parent)
|
||||
: QDialog(parent), ui(new Ui::ImportResourceDialog), m_resource_type(type), m_file_path(file_path)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -42,7 +43,7 @@ ImportResourceDialog::ImportResourceDialog(QString file_path, PackedResourceType
|
||||
connect(contentsWidget->selectionModel(), &QItemSelectionModel::selectionChanged, this, &ImportResourceDialog::selectionChanged);
|
||||
|
||||
ui->label->setText(
|
||||
tr("Choose the instance you would like to import this %1 to.").arg(ResourceUtils::getPackedTypeName(m_resource_type)));
|
||||
tr("Choose the instance you would like to import this %1 to.").arg(ModPlatform::ResourceTypeUtils::getName(m_resource_type)));
|
||||
ui->label_file_path->setText(tr("File: %1").arg(m_file_path));
|
||||
|
||||
ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <QDialog>
|
||||
#include <QItemSelection>
|
||||
|
||||
#include "minecraft/mod/tasks/LocalResourceParse.h"
|
||||
#include "modplatform/ResourceType.h"
|
||||
#include "ui/instanceview/InstanceProxyModel.h"
|
||||
|
||||
namespace Ui {
|
||||
@@ -14,13 +14,13 @@ class ImportResourceDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ImportResourceDialog(QString file_path, PackedResourceType type, QWidget* parent = nullptr);
|
||||
explicit ImportResourceDialog(QString file_path, ModPlatform::ResourceType type, QWidget* parent = nullptr);
|
||||
~ImportResourceDialog() override;
|
||||
QString selectedInstanceKey;
|
||||
|
||||
private:
|
||||
Ui::ImportResourceDialog* ui;
|
||||
PackedResourceType m_resource_type;
|
||||
ModPlatform::ResourceType m_resource_type;
|
||||
QString m_file_path;
|
||||
InstanceProxyModel* proxyModel;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user