mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
提交
This commit is contained in:
56
downloadlist.cpp
Normal file
56
downloadlist.cpp
Normal file
@@ -0,0 +1,56 @@
|
||||
#include "downloadlist.h"
|
||||
#include "ui_downloadlist.h"
|
||||
|
||||
downloadlist::downloadlist(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::downloadlist)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->pushButton->setEnabled(false);
|
||||
ui->progressBar->setValue(0);
|
||||
}
|
||||
|
||||
downloadlist::~downloadlist()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void downloadlist::setValue(long long value)
|
||||
{
|
||||
ui->progressBar->setValue(value);
|
||||
}
|
||||
|
||||
void downloadlist::setMax(long long max)
|
||||
{
|
||||
ui->progressBar->setMaximum(max);
|
||||
}
|
||||
|
||||
void downloadlist::setName(QString name)
|
||||
{
|
||||
ui->label->setText(name);
|
||||
}
|
||||
|
||||
QString downloadlist::getName()
|
||||
{
|
||||
return ui->label->text();
|
||||
}
|
||||
|
||||
void downloadlist::readyInstall()
|
||||
{
|
||||
ui->progressBar->hide();
|
||||
ui->pushButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void downloadlist::choose(bool isChoosed)
|
||||
{
|
||||
if(isChoosed){
|
||||
ui->label->setStyleSheet("color:#FFFFFF");
|
||||
}else {
|
||||
ui->label->setStyleSheet("color:#000000");
|
||||
}
|
||||
}
|
||||
|
||||
void downloadlist::on_pushButton_clicked()
|
||||
{
|
||||
system("deepin-deb-installer "+ui->label->text().toUtf8()+"&");
|
||||
}
|
||||
Reference in New Issue
Block a user