summaryrefslogtreecommitdiffstats
path: root/application/pages
diff options
context:
space:
mode:
Diffstat (limited to 'application/pages')
-rw-r--r--application/pages/global/AccountListPage.cpp13
-rw-r--r--application/pages/global/AccountListPage.h2
-rw-r--r--application/pages/global/AccountListPage.ui10
3 files changed, 25 insertions, 0 deletions
diff --git a/application/pages/global/AccountListPage.cpp b/application/pages/global/AccountListPage.cpp
index 89b853c5..eb3ddff9 100644
--- a/application/pages/global/AccountListPage.cpp
+++ b/application/pages/global/AccountListPage.cpp
@@ -28,6 +28,7 @@
#include "dialogs/AccountSelectDialog.h"
#include "dialogs/LoginDialog.h"
#include "dialogs/CustomMessageBox.h"
+#include "dialogs/SkinUploadDialog.h"
#include "tasks/Task.h"
#include "minecraft/auth/YggdrasilTask.h"
@@ -139,3 +140,15 @@ void AccountListPage::addAccount(const QString &errMsg)
job->start();
}
}
+
+void AccountListPage::on_uploadSkinBtn_clicked()
+{
+ QModelIndexList selection = ui->listView->selectionModel()->selectedIndexes();
+ if (selection.size() > 0)
+ {
+ QModelIndex selected = selection.first();
+ MojangAccountPtr account = selected.data(MojangAccountList::PointerRole).value<MojangAccountPtr>();
+ SkinUploadDialog dialog(account, this);
+ dialog.exec();
+ }
+}
diff --git a/application/pages/global/AccountListPage.h b/application/pages/global/AccountListPage.h
index 5701dfcb..ed518e92 100644
--- a/application/pages/global/AccountListPage.h
+++ b/application/pages/global/AccountListPage.h
@@ -69,6 +69,8 @@ slots:
void on_noDefaultBtn_clicked();
+ void on_uploadSkinBtn_clicked();
+
void listChanged();
//! Updates the states of the dialog's buttons.
diff --git a/application/pages/global/AccountListPage.ui b/application/pages/global/AccountListPage.ui
index fa2e5bf0..270d5b56 100644
--- a/application/pages/global/AccountListPage.ui
+++ b/application/pages/global/AccountListPage.ui
@@ -97,6 +97,16 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="uploadSkinBtn">
+ <property name="toolTip">
+ <string>Opens a dialog to select and upload a skin image to the selected account.</string>
+ </property>
+ <property name="text">
+ <string>&amp;Upload</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>