mirror of
https://github.com/Thracky/GlosSI.git
synced 2024-11-05 06:00:55 +00:00
42 lines
664 B
C++
42 lines
664 B
C++
#include "UWPSelectDialog.h"
|
|
|
|
|
|
|
|
UWPSelectDialog::UWPSelectDialog(QWidget *parent)
|
|
: QDialog(parent)
|
|
{
|
|
ui.setupUi(this);
|
|
}
|
|
|
|
|
|
UWPSelectDialog::~UWPSelectDialog()
|
|
{
|
|
|
|
}
|
|
|
|
void UWPSelectDialog::setUWPList(QList<UWPPair> uwpPairs)
|
|
{
|
|
this->uwpPairs = uwpPairs;
|
|
QStringList items;
|
|
for (auto uwp : uwpPairs)
|
|
{
|
|
QString space = " ";
|
|
for (int i = 0; i < 60 - uwp.AppName.size(); i++)
|
|
{
|
|
space += " ";
|
|
}
|
|
items << "Name: " + uwp.AppName + space + "AppId: " + uwp.AppUMId;
|
|
}
|
|
ui.listWidget->addItems(items);
|
|
}
|
|
|
|
void UWPSelectDialog::on_pushButton_2_clicked()
|
|
{
|
|
done(-1);
|
|
}
|
|
|
|
|
|
void UWPSelectDialog::on_pushButton_clicked()
|
|
{
|
|
done(ui.listWidget->currentRow());
|
|
} |