2
0
mirror of https://github.com/Thracky/GlosSI.git synced 2024-11-05 06:00:55 +00:00
GlosSI-fork/GloSC/UWPSelectDialog.cpp

42 lines
664 B
C++
Raw Normal View History

2016-11-18 00:22:07 +00:00
#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());
}