diff options
author | Alexia <alexia@robotbrain.info> | 2016-05-12 16:51:25 -0400 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-05-15 16:01:05 +0200 |
commit | 377316999ea9ef6adbc75c52a858eb8e526616e7 (patch) | |
tree | 1ad7ba47c89c69d0e25f7e6e0f592782e75b81d1 /application/pages | |
parent | f9791a5cc80b8e99eebd68176c33fdc1c377af86 (diff) | |
download | MultiMC-377316999ea9ef6adbc75c52a858eb8e526616e7.tar MultiMC-377316999ea9ef6adbc75c52a858eb8e526616e7.tar.gz MultiMC-377316999ea9ef6adbc75c52a858eb8e526616e7.tar.lz MultiMC-377316999ea9ef6adbc75c52a858eb8e526616e7.tar.xz MultiMC-377316999ea9ef6adbc75c52a858eb8e526616e7.zip |
GH-767 Basic skin upload
Diffstat (limited to 'application/pages')
-rw-r--r-- | application/pages/global/AccountListPage.cpp | 13 | ||||
-rw-r--r-- | application/pages/global/AccountListPage.h | 2 | ||||
-rw-r--r-- | application/pages/global/AccountListPage.ui | 10 |
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>&Upload</string> + </property> + </widget> + </item> </layout> </item> </layout> |