fix: resource pack import dialog icons and add message
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
This commit is contained in:
parent
1f6b8f9d2b
commit
a99cd16422
@ -8,6 +8,7 @@
|
||||
#include "InstanceList.h"
|
||||
|
||||
#include <InstanceList.h>
|
||||
#include "ui/instanceview/InstanceProxyModel.h"
|
||||
#include "ui/instanceview/InstanceDelegate.h"
|
||||
|
||||
ImportResourcePackDialog::ImportResourcePackDialog(QWidget* parent) : QDialog(parent), ui(new Ui::ImportResourcePackDialog)
|
||||
@ -32,7 +33,10 @@ ImportResourcePackDialog::ImportResourcePackDialog(QWidget* parent) : QDialog(pa
|
||||
contentsWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
contentsWidget->setItemDelegate(new ListViewDelegate());
|
||||
|
||||
contentsWidget->setModel(APPLICATION->instances().get());
|
||||
proxyModel = new InstanceProxyModel(this);
|
||||
proxyModel->setSourceModel(APPLICATION->instances().get());
|
||||
proxyModel->sort(0);
|
||||
contentsWidget->setModel(proxyModel);
|
||||
|
||||
connect(contentsWidget, SIGNAL(doubleClicked(QModelIndex)), SLOT(activated(QModelIndex)));
|
||||
connect(contentsWidget->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include <QDialog>
|
||||
#include <QItemSelection>
|
||||
|
||||
#include "ui/instanceview/InstanceProxyModel.h"
|
||||
|
||||
namespace Ui {
|
||||
class ImportResourcePackDialog;
|
||||
}
|
||||
@ -13,6 +15,7 @@ class ImportResourcePackDialog : public QDialog {
|
||||
public:
|
||||
explicit ImportResourcePackDialog(QWidget* parent = 0);
|
||||
~ImportResourcePackDialog();
|
||||
InstanceProxyModel* proxyModel;
|
||||
QString selectedInstanceKey;
|
||||
|
||||
private:
|
||||
|
@ -11,9 +11,16 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Pick icon</string>
|
||||
<string>Choose instance to import</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Choose the instance you would like to import this resource pack to.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListView" name="instanceView"/>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user