GH-767 Basic skin upload

This commit is contained in:
Alexia
2016-05-12 16:51:25 -04:00
committed by Petr Mrázek
parent f9791a5cc8
commit 377316999e
10 changed files with 324 additions and 3 deletions

View File

@ -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();
}
}

View File

@ -69,6 +69,8 @@ slots:
void on_noDefaultBtn_clicked();
void on_uploadSkinBtn_clicked();
void listChanged();
//! Updates the states of the dialog's buttons.

View File

@ -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>