GH-767 Basic skin upload
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -69,6 +69,8 @@ slots:
|
||||
|
||||
void on_noDefaultBtn_clicked();
|
||||
|
||||
void on_uploadSkinBtn_clicked();
|
||||
|
||||
void listChanged();
|
||||
|
||||
//! Updates the states of the dialog's buttons.
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user