Compare commits

...

32 Commits

Author SHA1 Message Date
8f6e5408ae 修改: main.cpp,使用了旧式的DAboutDialog,放弃了定制,可以在ubuntu上运行了。仍然无法打开关于 2020-10-19 15:16:54 +08:00
d5783458fc update README.md. 2020-10-19 00:14:10 +08:00
6e05066dd9 update README.md. 2020-10-19 00:11:33 +08:00
58aa5a3787 update README.md. 2020-10-19 00:10:21 +08:00
6087c8a5c8 update README.md. 2020-10-18 10:13:06 +08:00
ff758946be update README.md. 2020-10-18 10:12:30 +08:00
d1cbf95447 update README.md. 2020-10-18 10:11:18 +08:00
Jerry
187ce7e277 编译说明增加一个组件 2020-10-16 15:07:18 +08:00
d3e4f75254 !11 修复中文环境无法显示通知的问题
Merge pull request !11 from lidanger/master
2020-10-15 15:12:53 +08:00
lidanger
949eb33511 修复中文环境通知,上次少加两行初始化代码 2020-10-14 22:20:55 +08:00
lidanger
3f65002dc9 修复中文环境无法显示通知的问题 2020-10-14 20:57:32 +08:00
RigoLigoRLC
cfd4c7689a RigoLigo合并随机崩溃的修复 2020-10-09 02:08:01 +08:00
RigoLigoRLC
367c8d857c 修复 加载应用程序信息时随机崩溃
这个问题就是因为在异步操作时直接修改GUI,导致事件发生时GUI与异步加载线程不同步导致程序崩溃。将所有加载操作已移至
SpkAppInfoLoaderThread,在其需要操作GUI时阻塞该工作线程并发射信号让主线程操作GUI,以解决该问题。
2020-10-09 02:06:28 +08:00
b41f846ea4 2.0.2.3,修复depend 2020-10-07 22:08:13 +08:00
1dcd7d1c5c fr 2020-10-06 19:48:14 +08:00
01ac388f50 更改qm名字适配dtk 2020-10-06 17:25:25 +08:00
cfbbd34695 !9 add trans/lang_French.ts.
Merge pull request !9 from App4Deepin/N/A
2020-10-06 09:33:16 +08:00
App4Deepin
b7afc5ec8a add trans/lang_French.ts. 2020-10-05 23:34:27 +08:00
b911158274 修改: trans/spark-store_en.ts
修改:     trans/spark-store_zh_CN.qm,支持了贡献翻译
	修改:     trans/spark-store_zh_CN.ts,支持贡献翻译
	修改:     widget.cpp,微调原文,天加两个tips
2020-10-05 22:11:38 +08:00
67c28d0224 删除构建文件 2020-10-05 22:04:13 +08:00
1d65bfc66d 版本号不再翻译,贡献翻译按钮翻译。to-do:翻译按界面翻译 2020-10-05 19:49:37 +08:00
0e595db328 logo 2020-10-05 10:44:20 +08:00
7a16028e38 logo 2020-10-05 10:44:08 +08:00
RigoLigoRLC
1b56d3ad52 更改贡献翻译按钮提示框为DDialog,并修复遗留翻译问题 2020-10-04 00:13:06 +08:00
431e7b555f dwine5-dwine2-tags 2020-10-03 11:26:21 +08:00
RigoLigoRLC
1cbabe7cc5 详情页面添加翻译按钮 2020-10-03 01:30:05 +08:00
d027d513a3 微调界面 2020-10-02 21:33:03 +08:00
RigoLigoRLC
eff8878e8b 修复下载软件失败导致的崩溃,更改APT源更新逻辑
下载失败会导致发射的progress信号已接受数和总数均为0,导致计算进度时被零除;
APT源更新逻辑代码重构,将需要复用的值单独创建变量,重新格式化代码,以及加入了已经废弃的星火源降低优先级代码
2020-10-02 12:03:40 +08:00
f0bf0e5aec 微调翻译,增添翻译 2020-10-01 10:12:13 +08:00
RigoLigoRLC
678a4229f7 将通知移至专用函数,并更新中文翻译ts文件 2020-10-01 02:53:10 +08:00
e89c14b5ca QObject::tr---update-ubuntu-tag 2020-09-30 15:39:30 +08:00
RigoLigoRLC
d4c734627a 添加了用户端QtCreator配置缓存的忽略 2020-09-30 01:07:42 +08:00
34 changed files with 2583 additions and 1162 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
spark-store.pro.user*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 52 KiB

323
README.md
View File

@@ -1,9 +1,21 @@
# 星火商店
# 星火应用商店
众所周知国内的Linux应用比较少wine应用难以获取优质工具分散在民间各大论坛无法形成合力难以改善生态
生态构建需要的不是某一方的单打独斗,而是人人行动起来,汇聚星火,产生燎原之势
我们创建了这个应用商店广泛收录大家需要的软件包搜集优质小工具主动适配wine应用存放到储存库供大家获取
我们支持deepin 20 ; ubuntu 20.04LTS ;UOS Home 20
希望看到这里的人也可以加入我们的队伍开发或者投递应用都很欢迎共同构建Linux应用生态
### [在这里投稿](http://upload.spark-app.store)
#### 介绍
星火商店商店,由深度社区爱好者维护
web页面部分正在开发当中详情请见[web仓库](https://gitee.com/deepin-community-store/DCSAPP_WEB)
#### 说明
当前服务器线路列表(项目中包含):
@@ -14,15 +26,14 @@ http://store.jerrywang.top/
http://dcstore.spark-app.store/
```
#### 参数
#### 调用参数(spk规则)
参数只有一个Url该url应当遵循这种格式`spk://<任意合法字符>/web分类/包名`
例如:
[spk://abcdefg/network/firefox-zh](spk://abcdefg/network/firefox-zh)
[spk://abcdefg/games/store.spark-app.hmcl](spk://abcdefg/games/store.spark-app.hmcl)
[spk://higklmn/network/firefox-zh](spk://higklmn/network/firefox-zh)
可选的web分类
@@ -41,20 +52,14 @@ http://dcstore.spark-app.store/
| 主题美化 | themes |
| 其他应用 | others |
#### 目录结构
安装软件过程中产生的包,图标,截图等被储存到`/tmp/deepin-community-store/`中。
配置文件被储存到`~/.config/deepin-community-store/`中。
线路文件:新版的线路文件被放置于源服务器中,可随时刷新更新源列表
#### 如何编译
Deepin V20/UOS 系统下, 安装依赖
```shell
sudo apt install qt5-default libdtkcore-dev libdtkwidget-dev qtwebengine5-dev
sudo apt install qt5-default libdtkcore-dev libdtkwidget-dev qtwebengine5-dev libnotify-dev
```
```shell
@@ -68,6 +73,294 @@ make -j
./build文件下的spark-store即为可执行文件
#### 参与贡献
# 星火应用商店文档
# 目录结构
几个目录结构
```
/
/icons 图标文件夹
/tags 首页图标
/tras 多语言翻译
```
主要的文件分析
```js
spark-store.pro Qt工程配置文件
ssinstall 调用包安装器的脚本
icons.qrc 图标资源文件
main.cpp 入口文件
widget.h widget.cpp widget.ui 主要窗口控件
downloadlist.h downloadlist.cpp downloadlist.ui 单个软件的下载安装展示控件
progressload.h progressload.cpp 网页加载显示 得在deepin上编译运行才能搞清楚
workerthreads.h workerthreads.cpp 应用信息加载线程
image_show.h image_show.cpp 应用页面截图预览控件
big_image.h big_image.cpp 大图查看控件
```
# 使用的开源库及第三方工具
* GDebi 一个 Ubuntu 软件中心的轻量级替代品 https://linux.cn/article-4982-1.html
* libnotify 系统通知 https://developer.gnome.org/libnotify/unstable/
# 源码分析
## 应用的组成部分
左侧应用分类菜单
主窗口的下拉菜单
应用列表页面
应用详情页面
应用首页,有几个链接跳转
商店设置页面
下载列表页面
## 应用初始化,及主控件加载
初始化 `DApplication` 进入事件循环。
设置关于我们弹窗 `DAboutDialog`
主控件 Widget 根据不同屏幕大小自适应。
首页打开webview页面如果传入了`spk://`参数,会打开应用详情页。
```cpp
// main.cpp
QString arg1=argv[1];
if(arg1.left(6)=="spk://"){
w.openUrl(QUrl(argv[1]));
}
// widget.cpp
void Widget::openUrl(QUrl u)
{
QString app=serverUrl + "store"+u.path()+"/app.json";
ui->webEngineView->setUrl(app); // 会触发 webEngineView 的
}
```
**Widget 初始化**
```cpp
void Widget::initConfig()
{
...
// 读取服务器URL并初始化菜单项的链接
QSettings readConfig(QDir::homePath()+"/.config/spark-store/config.ini",QSettings::IniFormat);
if(readConfig.value("server/choose").toString()!=""){
ui->comboBox_server->setCurrentText(readConfig.value("server/choose").toString());
appinfoLoadThread.setServer(serverUrl=readConfig.value("server/choose").toString());
}else {
appinfoLoadThread.setServer(serverUrl="http://sucdn.jerrywang.top/"); // 默认URL
}
configCanSave=true; // 防止触发保存配置信号
menuUrl[0]=serverUrl + "store/#/"; // 首页
// 下面是各个应用分类页面直接加载的webview的
// 每个连接对应一个左侧的菜单项,在构造函数用连接到 chooseLeftMenu 槽函数
menuUrl[1]=serverUrl + "store/#/network";
...
menuUrl[12]=serverUrl + "store/#/others";
...
ui->webfoot->hide();
//初始化首页
ui->webEngineView->setUrl(menuUrl[0]);
}
/**
* 菜单切换逻辑
*
*/
void Widget::chooseLeftMenu(int index)
{
nowMenu=index;
updateUI();
left_list[index]->setStyleSheet("color:#FFFFFF;background-color:"+main_color.name()+";border-radius:8;border:0px");
// index <=12 加载某个分类的应用列表的webviejw
// index == 13 加载下载列表页面
if(index<=12){
if(themeIsDark){
darkurl = URL
ui->webEngineView->setUrl(darkurl);
}else {
ui->webEngineView->setUrl(menuUrl[index]);
}
ui->stackedWidget->setCurrentIndex(0);
}else if (index==13) {
ui->stackedWidget->setCurrentIndex(1);
}
}
```
## 应用下载安装卸载分析
**应用详情页面加载**
```cpp
/**
* 加载单个应用的信息
*/
void Widget::on_webEngineView_urlChanged(const QUrl &arg1)
{
//分析出服务器中的分类名称
...
//如果是app.json就打开详情页
if(arg1.path().right(8)=="app.json"){
...
// 读取相应的应用信息
appinfoLoadThread.requestInterruption();
appinfoLoadThread.wait(100);
appinfoLoadThread.setUrl(arg1);
appinfoLoadThread.start();
}
}
// 设置详情页的APP信息
SpkAppInfoLoaderThread::requestSetAppInformation() -> Widget::sltAppinfoDetails()
// 设置详情页的APP图标
SpkAppInfoLoaderThread::finishedIconLoad() -> Widget::sltAppinfoIcon()
// 设置详情页的APP截图
SpkAppInfoLoaderThread::finishedScreenshotLoad() -> Widget::sltAppinfoScreenshot()
// 下载APP详情信息线程
void SpkAppInfoLoaderThread::run()
{
QProcess get_json;
get_json.start("curl -o app.json " + targetUrl.toString());
QFile app_json("app.json");
app.json
}
```
**应用下载**
Widget::on_pushButton_download_clicked() 是点击下载的安装方法。
最终使用的是 `QNetwrokAccessManager` 进行GET请求获取数据写入文件。
```cpp
void Widget::on_pushButton_download_clicked()
{
if(!isBusy){
file = new QFile(fileName);
...
nowDownload+=1;
startRequest(urList.at(nowDownload-1)); // 进行链接请求
}
}
void Widget::startRequest(QUrl url)
{
reply = manager->get(QNetworkRequest(url));
// 请求响应完成,关闭文件,清理下载队列
connect(reply,SIGNAL(finished()),this,SLOT(httpFinished()));
// 接收应用下载数据
connect(reply,SIGNAL(readyRead()),this,SLOT(httpReadyRead()));
// 更新应用下载进度
connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(updateDataReadProgress(qint64,qint64)));
}
```
使用 QSettings 来读取配置,更换服务源
```cpp
void Widget::on_comboBox_server_currentIndexChanged(const QString &arg1)
{
appinfoLoadThread.setServer(arg1); // 服务器信息更新
if(configCanSave){
ui->label_setting1->show();
QSettings *setConfig=new QSettings(QDir::homePath()+"/.config/spark-store/config.ini",QSettings::IniFormat);
setConfig->setValue("server/choose",arg1);
}
}
```
使用 `QProcess` 来调用各种小文件下载、包安装卸载的命令。
**应用安装**
```cpp
void Widget::httpFinished() // 完成下载
{
...
download_list[nowDownload-1].readyInstall();
download_list[nowDownload-1].free=true;
if(nowDownload<allDownload){ // 如果有排队则下载下一个
...
}
}
void downloadlist::readyInstall()
{
...
ui->pushButton_install->setEnabled(true);
ui->pushButton_install->show();
ui->pushButton_2->hide();
Widget::sendNotification(tr("Finished downloading %1, awaiting to install").arg(ui->label->text()), 5000,
"/tmp/spark-store/icon_"+QString::number(num).toUtf8()+".png");
}
void downloadlist::on_pushButton_install_clicked()
{
//弹出菜单
menu_install->exec(cursor().pos());
}
downloadlist menu_install
downloadlist::install()
gdebi, dpkg, deepin-deb-installer
void downloadlist::install(int t)
{
QtConcurrent::run([=](){
QProcess installer;
installer.start("pkexec gdebi -n /tmp/spark-store/"+ui->label_filename->text().toUtf8());
installer.start("pkexec ssinstall /tmp/spark-store/"+ui->label_filename->text().toUtf8());
installer.start("deepin-deb-installer /tmp/spark-store/"+ui->label_filename->text().toUtf8());
});
}
```
**应用卸载**
```cpp
void Widget::on_pushButton_uninstall_clicked()
{
QtConcurrent::run([=](){
uninstall.start("pkexec apt purge -y "+pkgName);
});
}
```
**仓库源更新**
```cpp
// 更新源列表
void Widget::on_pushButton_updateServer_clicked()
{
QtConcurrent::run([=](){
...
QFile::remove(QDir::homePath().toUtf8()+"/.config/spark-store/server.list");
system("curl -o "+QDir::homePath().toUtf8()+"/.config/spark-store/server.list http://dcstore.shenmo.tech/store/server.list");
server.open(QDir::homePath().toUtf8()+"/.config/spark-store/server.list",std::ios::in);
...
while (getline(server,lineTmp)) {
ui->comboBox_server->addItem(QString::fromStdString(lineTmp));
}
});
}
// 更新星火商店apt源
void Widget::on_pushButton_updateApt_clicked()
{
QtConcurrent::run([=](){
comboBox_server /tmp/spark-store/sparkstore.list
bash脚本 sparkstore.list /etc/apt/sources.list.d/
使QProcess pkexec update.sh
}):
}
```
## 发送系统通知
```cpp
#include <libnotify/notify.h>
static NotifyNotification *_notify = nullptr; // 初始化
notify_init(tr("Spark\\ Store").toLocal8Bit()); // 构造函数初始化
notify_uninit(); // 析构函数调用
void Widget::sendNotification(const QString &message, const int msTimeout, const QString &icon)
{
if(_notify == nullptr)
{
_notify = notify_notification_new(tr("Spark\\ Store").toLocal8Bit(), message.toLocal8Bit(), icon.toLocal8Bit());
notify_notification_set_timeout(_notify, msTimeout);
}
else
notify_notification_update(_notify, tr("Spark\\ Store").toLocal8Bit(), message.toLocal8Bit(), icon.toLocal8Bit());
notify_notification_show(_notify, nullptr);
}
```
1. Fork 本仓库

View File

@@ -1,5 +1,6 @@
#include "downloadlist.h"
#include "ui_downloadlist.h"
#include "widget.h"
#include <QDebug>
#include <QIcon>
#include <QPixmap>
@@ -20,9 +21,9 @@ downloadlist::downloadlist(QWidget *parent) :
ui->pushButton_3->hide();
ui->widget_spinner->start();
ui->widget_spinner->hide();
action_dpkg->setText("dpkg");
action_gdebi->setText("gdebi");
action_deepin->setText("deepin deb installer");
action_dpkg->setText(tr("dpkg"));
action_gdebi->setText(tr("gdebi"));
action_deepin->setText(tr("deepin deb installer"));
connect(action_dpkg,&QAction::triggered,[=](){downloadlist::install(1);});
connect(action_gdebi,&QAction::triggered,[=](){downloadlist::install(0);});
connect(action_deepin,&QAction::triggered,[=](){downloadlist::install(2);});
@@ -51,7 +52,7 @@ void downloadlist::setValue(long long value)
ui->progressBar->setValue(int(value));
ui->label_2->setText(QString::number(double(value)/100)+"% ("+speed+")");
if(ui->label_2->text().left(4)=="100%"){
ui->label_2->setText("Downloaded,waiting to Install");
ui->label_2->setText(tr("Downloaded, waiting to install"));
}
}
@@ -76,8 +77,9 @@ void downloadlist::readyInstall()
ui->progressBar->hide();
ui->pushButton_install->show();
ui->pushButton_2->hide();
system("notify-send \""+ui->label->text().toUtf8()+"Download Failed\"" +" --icon=/tmp/spark-store/icon_"+QString::number(num).toUtf8()+".png");
ui->label_2->setText("Download FailedCheck Your Connection");
Widget::sendNotification(tr("Failed to download %1").arg(ui->label->text()), 5000,
"/tmp/spark-store/icon_"+QString::number(num).toUtf8()+".png");
ui->label_2->setText(tr("Download FailedCheck Your Connection"));
ui->pushButton_install->setEnabled(false);
return;
@@ -87,7 +89,8 @@ void downloadlist::readyInstall()
ui->pushButton_install->setEnabled(true);
ui->pushButton_install->show();
ui->pushButton_2->hide();
system("notify-send \""+ui->label->text().toUtf8()+"Download Finished,waiting to Install\"" +" --icon=/tmp/spark-store/icon_"+QString::number(num).toUtf8()+".png");
Widget::sendNotification(tr("Finished downloading %1, awaiting to install").arg(ui->label->text()), 5000,
"/tmp/spark-store/icon_"+QString::number(num).toUtf8()+".png");
}
}
@@ -119,7 +122,7 @@ void downloadlist::install(int t)
ui->pushButton_install->hide();
ui->widget_spinner->show();
qDebug()<<"/tmp/spark-store/"+ui->label_filename->text().toUtf8();
ui->label_2->setText("Installing...");
ui->label_2->setText(tr("Installing..."));
QtConcurrent::run([=](){
QProcess installer;
if(!reinstall){
@@ -166,16 +169,16 @@ void downloadlist::install(int t)
int error=QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
if(error==0){
ui->pushButton_install->hide();
ui->label_2->setText("Finish");
ui->label_2->setText(tr("Finish"));
ui->pushButton_3->show();
}else {
ui->pushButton_install->show();
ui->pushButton_install->setText("Retry");
ui->label_2->setText("Error happened in dpkg progress , you can try it again");
ui->pushButton_install->setText(tr("Retry"));
ui->label_2->setText(tr("Error happened in dpkg progress , you can try it again"));
ui->pushButton_3->show();
}
if(notRoot){
ui->label_2->setText("dpkg progress had been abortedyou can retry installation");
ui->label_2->setText(tr("dpkg progress had been abortedyou can retry installation"));
ui->pushButton_install->show();
ui->pushButton_3->hide();
}
@@ -197,7 +200,7 @@ void downloadlist::on_pushButton_install_clicked()
void downloadlist::on_pushButton_2_clicked()
{
ui->label_2->setText("Download Canceled");
ui->label_2->setText(tr("Download canceled"));
ui->pushButton_2->setEnabled(false);
ui->progressBar->hide();
close=true;

View File

@@ -55,5 +55,12 @@
<file>tags/community-small.png</file>
<file>tags/deepin-small.png</file>
<file>tags/dtk-small.png</file>
<file>tags/uos-small.png</file>
<file>tags/community.png</file>
<file>tags/ubuntu-small.png</file>
<file>tags/ubuntu.png</file>
<file>tags/dwine5-small.png</file>
<file>tags/dwine5.svg</file>
<file>tags/dwine2-small.png</file>
</qresource>
</RCC>

View File

@@ -18,7 +18,6 @@ image_show::image_show(QWidget *parent) : QWidget(parent)
void image_show::setImage(QPixmap image)
{
QImage screen0;
screen0=image.toImage();
// QPainter painter(&screen0);

View File

@@ -3,35 +3,50 @@
#include <QDesktopWidget>
#include <widget.h>
#include <QTranslator>
#include <DAboutDialog>
DWIDGET_USE_NAMESPACE
int main(int argc, char *argv[])
{
DApplication::loadDXcbPlugin(); //让bar处在标题栏中
DApplication a(argc, argv);
DAboutDialog dialog;
//DAboutDialog dialog;
a.setAttribute(Qt::AA_UseHighDpiPixmaps);
a.loadTranslator();
a.setAboutDialog(&dialog);
dialog.setLicense("We publish this program under GPL V3");
dialog.setVersion(DApplication::buildVersion(" Version 2.0+1"));
dialog.setAcknowledgementVisible(true);
dialog.setAcknowledgementLink("https://gitee.com/deepin-community-store/spark-store");
a.loadTranslator();//载入翻译
a.setOrganizationName("spark-union");
a.setApplicationVersion(DApplication::buildVersion("2.0.2.4"));
a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store");
a.setProductIcon(QIcon::fromTheme("spark-store")); //设置Logo
a.setProductName(QLabel::tr("Spark Store"));
a.setApplicationDescription(QObject::tr("<span style=' font-size:10pt;font-weight:60;'>An appstore powered by deepin community</span><br/>""<a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/>""<span style=' font-size:12pt;'>Spark developers</span><br/>We publish this program under GPL V3"));
a.setApplicationName("Spark应用商店"); //只有在这儿修改窗口标题才有效
Widget w;
QDesktopWidget *s=DApplication::desktop();
/*
a.setAboutDialog(&dialog);
dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
dialog.setVersion(DApplication::buildVersion("Version 2.0.2.3"));
dialog.setAcknowledgementVisible(true);
dialog.setAcknowledgementLink(QObject::tr("https://gitee.com/deepin-community-store/spark-store"));
//a.setApplicationAcknowledgementPage(QObject::tr("https://gitee.com/deepin-community-store/spark-store"));
dialog.setProductIcon(QIcon::fromTheme("spark-store")); //设置Logo
dialog.setProductName(QLabel::tr("Spark Store"));
//dialog.setDescription(QLabel::tr("An appstore powered by deepin community\n We born for change"));
dialog.setDescription(
dialog.setDescription(QObject::tr(
"<span style=' font-size:10pt;font-weight:60;'>An appstore powered by deepin community</span><br/>"
"<a href='https://www.spark-app.store/'>https://www.spark-app.store</a><br/>"
"<span style=' font-size:12pt;'>Spark developers</span>");
"<span style=' font-size:12pt;'>Spark developers</span>"
)
);
dialog.setProductName(QLabel::tr("Spark Store"));
dialog.setCompanyLogo(QPixmap(":/Logo-Spark.png"));
dialog.setWebsiteName("The Spark Project");
dialog.setWebsiteName(QObject::tr("The Spark Project"));
dialog.setWebsiteLink("https://gitee.com/deepin-community-store");
Widget w;
QDesktopWidget *s=DApplication::desktop();
int d_w=s->width();
*/
int d_w=s->width();
int d_h=s->height();
if(d_w<=1366){
w.setMinimumWidth(925);

View File

@@ -7,11 +7,12 @@
QT += core gui network concurrent webenginewidgets
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TRANSLATIONS = ./trans/lang_English.ts \
./trans/lang_Chinses.ts
TRANSLATIONS = ./trans/spark-store_en.ts \
./trans/spark-store_zh_CN.ts
./trans/spark-store_fr.ts\
CONFIG += link_pkgconfig
PKGCONFIG += dtkwidget
PKGCONFIG += dtkwidget glib-2.0 gdk-pixbuf-2.0 libnotify
TARGET = spark-store
TEMPLATE = app
@@ -33,14 +34,16 @@ SOURCES += main.cpp\
downloadlist.cpp \
image_show.cpp \
big_image.cpp \
progressload.cpp
progressload.cpp \
workerthreads.cpp
HEADERS += \
widget.h \
downloadlist.h \
image_show.h \
big_image.h \
progressload.h
progressload.h \
workerthreads.h
@@ -52,3 +55,18 @@ FORMS += \
RESOURCES += \
icons.qrc
DISTFILES += \
tags/a2d-small.png \
tags/a2d.png \
tags/community-small.png \
tags/community.png \
tags/deepin-small.png \
tags/dtk-small.png \
tags/ubuntu-small.png \
tags/ubuntu.png \
tags/uos-small.png \
tags/community.svg \
tags/deepin.svg \
tags/logo_icon.svg \
tags/uos.svg

View File

@@ -1,326 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.8.2, 2020-09-29T19:48:57. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{fbec18d5-0eff-4f51-b839-fdf91314dc72}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap">
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">桌面</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">桌面</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{ccf49870-890c-4cd1-b393-ff8b20f60cce}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/sy120zx/Desktop/build-spark-store-unknown-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/sy120zx/Desktop/build-spark-store-unknown-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/sy120zx/Desktop/build-spark-store-unknown-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy Configuration</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">spark-store</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/sy120zx/Desktop/spark-store/spark-store.pro</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">spark-store.pro</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/sy120zx/Desktop/build-spark-store-unknown-Debug</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">20</value>
</data>
<data>
<variable>Version</variable>
<value type="int">20</value>
</data>
</qtcreator>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
tags/community.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 954 B

BIN
tags/dwine2-small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
tags/dwine5-small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

1
tags/dwine5.svg Normal file
View File

@@ -0,0 +1 @@
<svg width="305" height="304" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="hidden"><defs><clipPath id="clip0"><path d="M688 378 993 378 993 682 688 682Z" fill-rule="evenodd" clip-rule="evenodd"/></clipPath><clipPath id="clip1"><path d="M751.382 385.273 984.326 440.078 929.522 673.022 696.578 618.218Z" fill-rule="evenodd" clip-rule="evenodd"/></clipPath><clipPath id="clip2"><path d="M751.382 385.273 984.326 440.078 929.522 673.022 696.578 618.218Z" fill-rule="evenodd" clip-rule="evenodd"/></clipPath><clipPath id="clip3"><path d="M751.382 385.273 984.326 440.078 929.522 673.022 696.578 618.218Z" fill-rule="evenodd" clip-rule="evenodd"/></clipPath></defs><g clip-path="url(#clip0)" transform="translate(-688 -378)"><path d="M689 529.5C689 445.829 756.829 378 840.5 378 924.171 378 992 445.829 992 529.5 992 613.171 924.171 681 840.5 681 756.829 681 689 613.171 689 529.5Z" fill="#A20000" fill-rule="evenodd"/><g clip-path="url(#clip1)"><g clip-path="url(#clip2)"><g clip-path="url(#clip3)"><path d="M812.478 604.512 826.339 545.597C790.456 531.483 772.809 490.952 786.924 455.069 792.525 440.83 802.648 428.825 815.737 420.901L910.837 443.275C931.459 475.856 921.763 518.985 889.182 539.607 876.253 547.79 860.994 551.499 845.751 550.164L831.89 609.079 851.302 613.646C856.662 614.908 859.986 620.276 858.724 625.636 857.463 630.996 852.095 634.32 846.735 633.058L788.499 619.357C783.138 618.096 779.815 612.728 781.076 607.368 782.338 602.007 787.705 598.684 793.066 599.945L812.478 604.512ZM803.34 469.2 900.4 492.035C901.355 477.612 900.407 467.146 897.544 460.634L819.896 442.366C814.431 446.918 808.915 455.864 803.34 469.2Z" fill="#FFFFFF"/></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
tags/ubuntu-small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
tags/ubuntu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
tags/uos-small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1 +0,0 @@
<<3C>d<18><EFBFBD>!<1C>`<60><><EFBFBD>

View File

@@ -1,307 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>QLabel</name>
<message>
<location filename="../main.cpp" line="19"/>
<location filename="../main.cpp" line="21"/>
<source>Spark应用商店</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="20"/>
<source>
GPL第三版开源</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Widget</name>
<message>
<location filename="../widget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="52"/>
<source>background-color:#FFFFFF</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="67"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="74"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="81"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="88"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="95"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="114"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="153"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="177"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="197"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="204"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="214"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="221"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="228"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="235"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="242"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="313"/>
<source>about:blank</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="354"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="386"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="486"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="522"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="551"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="580"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="592"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="636"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="649"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="683"/>
<location filename="../widget.ui" line="696"/>
<location filename="../widget.ui" line="709"/>
<location filename="../widget.ui" line="722"/>
<location filename="../widget.ui" line="735"/>
<location filename="../widget.ui" line="748"/>
<location filename="../widget.ui" line="761"/>
<location filename="../widget.ui" line="774"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="808"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="815"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="854"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1017"/>
<source>线</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1033"/>
<source>线</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1056"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1069"/>
<source> </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1098"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;使apt工具获取软件使线&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1108"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1115"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1135"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1156"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1179"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1189"/>
<source>/tmp下使</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1202"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1209"/>
<source>0B</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1216"/>
<source>/tmp/spark-store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1237"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1244"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Linux/deepin系统爱好者和用户之中的一员Spark应用商店&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;使使&lt;/p&gt;&lt;p&gt;&amp;lt;jifengshenmo@outlook.com&amp;gt;&lt;/p&gt;&lt;p&gt;稿&lt;/p&gt;&lt;p&gt;QQ872690351&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>downloadlist</name>
<message>
<location filename="../downloadlist.ui" line="20"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="50"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="82"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="106"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="189"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="240"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="259"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="278"/>
<source></source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

Binary file not shown.

BIN
trans/spark-store_en.qm Normal file

Binary file not shown.

630
trans/spark-store_en.ts Normal file
View File

@@ -0,0 +1,630 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en">
<context>
<name>QLabel</name>
<message>
<location filename="../main.cpp" line="22"/>
<location filename="../main.cpp" line="30"/>
<source>Spark Store</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../main.cpp" line="16"/>
<source>We publish this program under GPL V3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="19"/>
<location filename="../main.cpp" line="20"/>
<source>https://gitee.com/deepin-community-store/spark-store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="24"/>
<source>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;An appstore powered by deepin community&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;Spark developers&lt;/span&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="32"/>
<source>The Spark Project</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Widget</name>
<message>
<location filename="../widget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="52"/>
<source>background-color:#FFFFFF</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="67"/>
<source>Videos</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="74"/>
<source>Download List</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="81"/>
<source>Tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="88"/>
<source>Beautify</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="95"/>
<source>Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="160"/>
<source>Office</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="200"/>
<source>Translate</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="207"/>
<source>Others</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="234"/>
<source>Games</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="248"/>
<source>Network</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="528"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="568"/>
<source>ICON</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="515"/>
<location filename="../widget.cpp" line="536"/>
<source>Install</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="623"/>
<source>Uninstall</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="639"/>
<source>Site</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="712"/>
<location filename="../widget.ui" line="715"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="718"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/community-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="731"/>
<location filename="../widget.ui" line="734"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="737"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/ubuntu-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="775"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/uos-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="750"/>
<location filename="../widget.ui" line="753"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="173"/>
<source>Back to category</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="293"/>
<source>Reload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="383"/>
<source>The list is currently empty. Go and download some softwares!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="415"/>
<source>Open download directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="756"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/deepin-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="769"/>
<location filename="../widget.ui" line="772"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to UOS home 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="788"/>
<location filename="../widget.ui" line="791"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="794"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dtk-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="826"/>
<location filename="../widget.ui" line="829"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine5 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine5 by your self.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="845"/>
<location filename="../widget.ui" line="848"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An Appimage to deb app.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="851"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/a2d-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="678"/>
<source>Share</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="153"/>
<source>Development</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="217"/>
<source>Home </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="227"/>
<source>Graphics</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="241"/>
<source>Communication</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="807"/>
<location filename="../widget.ui" line="810"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine2 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine2 by your self.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="813"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine2-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="832"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine5-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="874"/>
<source>Contribute translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="892"/>
<source>Info</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="899"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An app store developed by community enthusiasts&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="938"/>
<source>Screenshots</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1101"/>
<source>Line Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1117"/>
<source>Choose Line:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1140"/>
<source>Refresh</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1153"/>
<source>Take effect when restart </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1182"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1192"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1199"/>
<source>Source Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1219"/>
<source>Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1240"/>
<source>Temp</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1263"/>
<source>Clean</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1273"/>
<source>Since the dictionary is at /tmp,It would be cleaned automatically when system reboot.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1286"/>
<source>Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1300"/>
<source>Location/tmp/spark-store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1321"/>
<source>About us</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1328"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;We are &lt;span style=&quot; font-weight:600;&quot;&gt;NOT&lt;/span&gt; the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the &amp;quot;Spark Store&amp;quot;! &amp;quot;, is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. &lt;/p&gt;&lt;p&gt;We don&apos;t make a profit from this, all developers and maintainers don&apos;t get paid, and we rely on the community&apos;s donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. &lt;/p&gt;&lt;p&gt;Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. &lt;/p&gt;&lt;p&gt;If any part of the store infringes your rights, please tell us &amp;lt;jifengshenmo@outlook.com&amp;gt; we will remove the infringing content as soon as possible. &lt;/p&gt;&lt;p&gt;If you&apos;d like to get involved with us too, whether you&apos;re involved in development, design, pitching or submitting work, we welcome you to join us. &lt;/p&gt;&lt;p&gt;QQ group:872690351&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="114"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="342"/>
<source>about:blank</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="540"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1293"/>
<source>0B</source>
<translation type="unfinished">0B</translation>
</message>
<message>
<location filename="../widget.cpp" line="146"/>
<source>Spark Store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="147"/>
<source>Search or enter spk://</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="153"/>
<source>Submit App</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="154"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="245"/>
<source>Not Exist</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="297"/>
<location filename="../widget.cpp" line="305"/>
<source>Spark\ Store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="480"/>
<source>Failed to download app info. Please check internet connection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="510"/>
<source>PkgName: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="511"/>
<source>Version: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="513"/>
<source>Author: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="517"/>
<source>Official Site: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="521"/>
<source>Contributor: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="522"/>
<source>Update Time: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="523"/>
<source>Installed Size: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="532"/>
<location filename="../widget.cpp" line="645"/>
<source>Reinstall</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="571"/>
<source>Failed to load application icon.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="620"/>
<source>Failed to get the name to the file to be downloaded.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="668"/>
<source>Spark store could only process spk:// links for now. The search feature is coming soon!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="789"/>
<source>Updating, please wait...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="842"/>
<source>Apt has reported an error. Please use apt update in terminal to locate the problem.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="848"/>
<source>Unknown error!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1024"/>
<source>Yes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1024"/>
<source>No</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1025"/>
<source>Information for Contributors</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1026"/>
<source>Currently the translation contribution is limited to English,
and you will be redirected to our Gitee repository at which you are
supposed to be creating pull requests to contribute app info
translations.
Tips:You can simply click the file to edit to create a flat pull request without create a full pull request
Tips:You can use github account to login to Gitee
Click yes to continue.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="868"/>
<source>Uninstall succeeded</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="882"/>
<source>Temporary cache was cleaned</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="949"/>
<source>The URL has been copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>downloadlist</name>
<message>
<location filename="../downloadlist.ui" line="20"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="50"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="82"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="106"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="189"/>
<source>Waiting to download</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="240"/>
<source>Install</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="259"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="278"/>
<source>Info</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="24"/>
<source>dpkg</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="25"/>
<source>gdebi</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="26"/>
<source>deepin deb installer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="55"/>
<source>Downloaded, waiting to install</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="80"/>
<source>Failed to download %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="82"/>
<source>Download FailedCheck Your Connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="92"/>
<source>Finished downloading %1, awaiting to install</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="125"/>
<source>Installing...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="172"/>
<source>Finish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="176"/>
<source>Retry</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="177"/>
<source>Error happened in dpkg progress , you can try it again</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="181"/>
<source>dpkg progress had been abortedyou can retry installation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="203"/>
<source>Download canceled</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

BIN
trans/spark-store_fr.qm Normal file

Binary file not shown.

View File

@@ -1,312 +1,312 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en">
<context>
<name>QLabel</name>
<message>
<location filename="../main.cpp" line="19"/>
<location filename="../main.cpp" line="21"/>
<source>Spark应用商店</source>
<translation>Spark Store</translation>
</message>
<message>
<location filename="../main.cpp" line="20"/>
<source>
GPL第三版开源</source>
<translation>A 3-rd party app store powered by deepin community
Spark Store is published under GPL V3
We born for change.</translation>
</message>
</context>
<context>
<name>Widget</name>
<message>
<location filename="../widget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="52"/>
<source>background-color:#FFFFFF</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="67"/>
<source></source>
<translatorcomment>Video Players and Video Makers</translatorcomment>
<translation>Video</translation>
</message>
<message>
<location filename="../widget.ui" line="74"/>
<source></source>
<translation>Download list</translation>
</message>
<message>
<location filename="../widget.ui" line="81"/>
<source></source>
<translation>Tools</translation>
</message>
<message>
<location filename="../widget.ui" line="88"/>
<source></source>
<translatorcomment>Icon theme and other </translatorcomment>
<translation>Themes</translation>
</message>
<message>
<location filename="../widget.ui" line="95"/>
<source></source>
<translation>Music</translation>
</message>
<message>
<location filename="../widget.ui" line="114"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="153"/>
<source></source>
<translation>Development</translation>
</message>
<message>
<location filename="../widget.ui" line="177"/>
<source></source>
<translation>Office</translation>
</message>
<message>
<location filename="../widget.ui" line="197"/>
<source></source>
<translation>Translate</translation>
</message>
<message>
<location filename="../widget.ui" line="204"/>
<source></source>
<translation>Others</translation>
</message>
<message>
<location filename="../widget.ui" line="214"/>
<source></source>
<translation>Home</translation>
</message>
<message>
<location filename="../widget.ui" line="221"/>
<source></source>
<translation>Images</translation>
</message>
<message>
<location filename="../widget.ui" line="228"/>
<source></source>
<translation>Games</translation>
</message>
<message>
<location filename="../widget.ui" line="235"/>
<source></source>
<translation>Chat</translation>
</message>
<message>
<location filename="../widget.ui" line="242"/>
<source></source>
<translation type="unfinished">Network</translation>
</message>
<message>
<location filename="../widget.ui" line="313"/>
<source>about:blank</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="354"/>
<source></source>
<translation>The Download list is empty</translation>
</message>
<message>
<location filename="../widget.ui" line="386"/>
<source></source>
<translation>Open in File Manager</translation>
</message>
<message>
<location filename="../widget.ui" line="486"/>
<source></source>
<translation>Install</translation>
</message>
<message>
<location filename="../widget.ui" line="522"/>
<source></source>
<translation>Remove</translation>
</message>
<message>
<location filename="../widget.ui" line="551"/>
<source></source>
<translation>Site</translation>
</message>
<message>
<location filename="../widget.ui" line="580"/>
<source></source>
<translation>Name</translation>
</message>
<message>
<location filename="../widget.ui" line="592"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="636"/>
<source></source>
<translation>Icon</translation>
</message>
<message>
<location filename="../widget.ui" line="649"/>
<source></source>
<translation>Share</translation>
</message>
<message>
<location filename="../widget.ui" line="683"/>
<location filename="../widget.ui" line="696"/>
<location filename="../widget.ui" line="709"/>
<location filename="../widget.ui" line="722"/>
<location filename="../widget.ui" line="735"/>
<location filename="../widget.ui" line="748"/>
<location filename="../widget.ui" line="761"/>
<location filename="../widget.ui" line="774"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="808"/>
<source></source>
<translation type="unfinished">Details</translation>
</message>
<message>
<location filename="../widget.ui" line="815"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;software store developed by community enthusiasts&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="854"/>
<source></source>
<translation>Screen Shots</translation>
</message>
<message>
<location filename="../widget.ui" line="1017"/>
<source>线</source>
<translation>Line Settings</translation>
</message>
<message>
<location filename="../widget.ui" line="1033"/>
<source>线</source>
<translation type="unfinished">Choose</translation>
</message>
<message>
<location filename="../widget.ui" line="1056"/>
<source></source>
<translation>Update</translation>
</message>
<message>
<location filename="../widget.ui" line="1069"/>
<source> </source>
<translation>Restart to take effect</translation>
</message>
<message>
<location filename="../widget.ui" line="1098"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;使apt工具获取软件使线&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="1108"/>
<source></source>
<translation>Update APT Source</translation>
</message>
<message>
<location filename="../widget.ui" line="1115"/>
<source></source>
<translation type="unfinished">APT Source</translation>
</message>
<message>
<location filename="../widget.ui" line="1135"/>
<source></source>
<translation type="unfinished">server</translation>
</message>
<message>
<location filename="../widget.ui" line="1156"/>
<source></source>
<translation>Temp</translation>
</message>
<message>
<location filename="../widget.ui" line="1179"/>
<source></source>
<translation>Clean</translation>
</message>
<message>
<location filename="../widget.ui" line="1189"/>
<source>/tmp下使</source>
<translation>Since the dictionary is at /tmp,It would be cleaned automatically when system reboot.</translation>
</message>
<message>
<location filename="../widget.ui" line="1202"/>
<source></source>
<translation type="unfinished">Size: </translation>
</message>
<message>
<location filename="../widget.ui" line="1209"/>
<source>0B</source>
<translation type="unfinished">0B</translation>
</message>
<message>
<location filename="../widget.ui" line="1216"/>
<source>/tmp/spark-store</source>
<translation type="unfinished">Location:/tmp/spark-store</translation>
</message>
<message>
<location filename="../widget.ui" line="1237"/>
<source></source>
<translation type="unfinished">About us</translation>
</message>
<message>
<location filename="../widget.ui" line="1244"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Linux/deepin系统爱好者和用户之中的一员Spark应用商店&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;使使&lt;/p&gt;&lt;p&gt;&amp;lt;jifengshenmo@outlook.com&amp;gt;&lt;/p&gt;&lt;p&gt;稿&lt;/p&gt;&lt;p&gt;QQ872690351&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;We are not the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the "Spark Store"! ", is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. &lt;/p&gt;&lt;p&gt; We don't make a profit from this, all developers and maintainers don't get paid, and we rely on the community's donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. &lt;/p&gt;&lt;p&gt;Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. &lt;/p&gt;&lt;p&gt;If any part of the store infringes your rights, please tell us &amp;lt;jifengshenmo@outlook.com&amp;gt; we will remove the infringing content as soon as possible. &lt;/p&gt;&lt;p&gt;If you'd like to get involved with us too, whether you're involved in development, design, pitching or submitting work, we welcome you to join us. &lt;/p&gt;&lt;p&gt;QQ group:872690351&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
</context>
<context>
<name>downloadlist</name>
<message>
<location filename="../downloadlist.ui" line="20"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="50"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="82"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="106"/>
<source></source>
<translation>Name</translation>
</message>
<message>
<location filename="../downloadlist.ui" line="189"/>
<source></source>
<translatorcomment>Wait to download</translatorcomment>
<translation>Wait to download</translation>
</message>
<message>
<location filename="../downloadlist.ui" line="240"/>
<source></source>
<translation>Install</translation>
</message>
<message>
<location filename="../downloadlist.ui" line="259"/>
<source></source>
<translation>Cancel</translation>
</message>
<message>
<location filename="../downloadlist.ui" line="278"/>
<source></source>
<translation>Detail</translation>
</message>
</context>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="fr">
<context>
<name>QLabel</name>
<message>
<location filename="../main.cpp" line="19"/>
<location filename="../main.cpp" line="21"/>
<source>Spark应用商店</source>
<translation>Spark Store</translation>
</message>
<message>
<location filename="../main.cpp" line="20"/>
<source>
GPL第三版开源</source>
<translation>Un app store tier alimenté par la communauté Deepin
Spark Store est publié sous licence GPL V3
Nous sommes nés pour le changement.</translation>
</message>
</context>
<context>
<name>Widget</name>
<message>
<location filename="../widget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="52"/>
<source>background-color:#FFFFFF</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="67"/>
<source></source>
<translatorcomment>Lecteurs vidéo et créateurs vidéo</translatorcomment>
<translation>Vidéo</translation>
</message>
<message>
<location filename="../widget.ui" line="74"/>
<source></source>
<translation>Liste de téléchargement</translation>
</message>
<message>
<location filename="../widget.ui" line="81"/>
<source></source>
<translation>Outils</translation>
</message>
<message>
<location filename="../widget.ui" line="88"/>
<source></source>
<translatorcomment>Thème des icônes et autres </translatorcomment>
<translation>Thèmes</translation>
</message>
<message>
<location filename="../widget.ui" line="95"/>
<source></source>
<translation>Musique</translation>
</message>
<message>
<location filename="../widget.ui" line="114"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="153"/>
<source></source>
<translation>Développement</translation>
</message>
<message>
<location filename="../widget.ui" line="177"/>
<source></source>
<translation>Bureau</translation>
</message>
<message>
<location filename="../widget.ui" line="197"/>
<source></source>
<translation>Traduire</translation>
</message>
<message>
<location filename="../widget.ui" line="204"/>
<source></source>
<translation>Autres</translation>
</message>
<message>
<location filename="../widget.ui" line="214"/>
<source></source>
<translation>Accueil</translation>
</message>
<message>
<location filename="../widget.ui" line="221"/>
<source></source>
<translation>Images</translation>
</message>
<message>
<location filename="../widget.ui" line="228"/>
<source></source>
<translation>Jeux</translation>
</message>
<message>
<location filename="../widget.ui" line="235"/>
<source></source>
<translation>Chat</translation>
</message>
<message>
<location filename="../widget.ui" line="242"/>
<source></source>
<translation type="unfinished">Réseau</translation>
</message>
<message>
<location filename="../widget.ui" line="313"/>
<source>about:blank</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="354"/>
<source></source>
<translation>La liste de téléchargement est vide</translation>
</message>
<message>
<location filename="../widget.ui" line="386"/>
<source></source>
<translation>Ouvrir dans le gestionnaire de fichiers</translation>
</message>
<message>
<location filename="../widget.ui" line="486"/>
<source></source>
<translation>Installer</translation>
</message>
<message>
<location filename="../widget.ui" line="522"/>
<source></source>
<translation>Supprimer</translation>
</message>
<message>
<location filename="../widget.ui" line="551"/>
<source></source>
<translation>Site</translation>
</message>
<message>
<location filename="../widget.ui" line="580"/>
<source></source>
<translation>Nom</translation>
</message>
<message>
<location filename="../widget.ui" line="592"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="636"/>
<source></source>
<translation>Icon</translation>
</message>
<message>
<location filename="../widget.ui" line="649"/>
<source></source>
<translation>Partager</translation>
</message>
<message>
<location filename="../widget.ui" line="683"/>
<location filename="../widget.ui" line="696"/>
<location filename="../widget.ui" line="709"/>
<location filename="../widget.ui" line="722"/>
<location filename="../widget.ui" line="735"/>
<location filename="../widget.ui" line="748"/>
<location filename="../widget.ui" line="761"/>
<location filename="../widget.ui" line="774"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="808"/>
<source></source>
<translation type="unfinished">Détails</translation>
</message>
<message>
<location filename="../widget.ui" line="815"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;magasin de logiciels dévelop par des passionnés de la communauté&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="854"/>
<source></source>
<translation>Captures d'écran</translation>
</message>
<message>
<location filename="../widget.ui" line="1017"/>
<source>线</source>
<translation>Line Settings</translation>
</message>
<message>
<location filename="../widget.ui" line="1033"/>
<source>线</source>
<translation type="unfinished">Choisissez</translation>
</message>
<message>
<location filename="../widget.ui" line="1056"/>
<source></source>
<translation>Mise à jour</translation>
</message>
<message>
<location filename="../widget.ui" line="1069"/>
<source> </source>
<translation>Redémarrez pour prendre effet</translation>
</message>
<message>
<location filename="../widget.ui" line="1098"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;使apt工具获取软件使线&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Le rôle du serveur source est de s'assurer que le logiciel est mis à jour et prend en charge l'utilisation de l'outil apt pour obtenir le logiciel. Nous préférons généralement que vous utilisiez la première ligne comme source de mise à jour, qui est généralement la plus stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="1108"/>
<source></source>
<translation>Mettre à jour la source APT</translation>
</message>
<message>
<location filename="../widget.ui" line="1115"/>
<source></source>
<translation type="unfinished">Source APT</translation>
</message>
<message>
<location filename="../widget.ui" line="1135"/>
<source></source>
<translation type="unfinished">serveur</translation>
</message>
<message>
<location filename="../widget.ui" line="1156"/>
<source></source>
<translation>Temp</translation>
</message>
<message>
<location filename="../widget.ui" line="1179"/>
<source></source>
<translation>Nettoyer</translation>
</message>
<message>
<location filename="../widget.ui" line="1189"/>
<source>/tmp下使</source>
<translation>Étant donné que ce répertoire se trouve sous /tmp, même si vous ne l'effacez pas manuellement, il sera effacé automatiquement au redémarrage du système.</translation>
</message>
<message>
<location filename="../widget.ui" line="1202"/>
<source></source>
<translation type="unfinished">Taille: </translation>
</message>
<message>
<location filename="../widget.ui" line="1209"/>
<source>0B</source>
<translation type="unfinished">0B</translation>
</message>
<message>
<location filename="../widget.ui" line="1216"/>
<source>/tmp/spark-store</source>
<translation type="unfinished">Emplacement:/tmp/spark-store</translation>
</message>
<message>
<location filename="../widget.ui" line="1237"/>
<source></source>
<translation type="unfinished">À propos de nous</translation>
</message>
<message>
<location filename="../widget.ui" line="1244"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Linux/deepin系统爱好者和用户之中的一员Spark应用商店&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;使使&lt;/p&gt;&lt;p&gt;&amp;lt;jifengshenmo@outlook.com&amp;gt;&lt;/p&gt;&lt;p&gt;稿&lt;/p&gt;&lt;p&gt;QQ872690351&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Nous ne sommes pas l'équipe officielle, tout comme vous, nous ne sommes qu'un des nombreux passionnés et utilisateurs de systèmes Linux / deepin, nous développons et gérons le "Spark Store"! ", est de rassembler la communauté pour partager des logiciels utiles, ou pour participer au développement ensemble, afin que nous utilisions tous les derniers et meilleurs logiciels. &lt;/p&gt;&lt;p&gt; Nous n'en tirons aucun profit, tous les développeurs et mainteneurs ne sont pas payés, et nous comptons sur les dons de la communauté pour la plupart de nos dépenses, dont nous sommes reconnaissants et qui nous permettent de ne pas dépenser trop d'énergie se soucier du financement. &lt;/p&gt;&lt;p&gt;Notre service et nos logiciels sont gratuits pour tout le monde à utiliser, à communiquer et à apprendre, mais vous devez vous conformer aux lois et réglementations locales dans le processus de votre utilisation, sinon tout problème n'a rien à voir avec nous. &lt;/p&gt;&lt;p&gt;Si une partie du magasin enfreint vos droits, veuillez nous en informer &amp;lt;jifengshenmo@outlook.com&amp;gt; nous retirerons le contenu en infraction dès que possible. &lt;/p&gt;&lt;p&gt;Si vous souhaitez également vous impliquer avec nous, que vous soyez impliqué dans le développement, la conception, le pitching ou la soumission de travaux, nous vous invitons à nous rejoindre. &lt;/p&gt;&lt;p&gt;QQ group:872690351&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
</context>
<context>
<name>downloadlist</name>
<message>
<location filename="../downloadlist.ui" line="20"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="50"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="82"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="106"/>
<source></source>
<translation>Nom</translation>
</message>
<message>
<location filename="../downloadlist.ui" line="189"/>
<source></source>
<translatorcomment>Attendez pour téléchargerd</translatorcomment>
<translation>Attendez pour télécharger</translation>
</message>
<message>
<location filename="../downloadlist.ui" line="240"/>
<source></source>
<translation>Installer</translation>
</message>
<message>
<location filename="../downloadlist.ui" line="259"/>
<source></source>
<translation>Annuler</translation>
</message>
<message>
<location filename="../downloadlist.ui" line="278"/>
<source></source>
<translation>Détail</translation>
</message>
</context>
</TS>

BIN
trans/spark-store_zh_CN.qm Normal file

Binary file not shown.

675
trans/spark-store_zh_CN.ts Normal file
View File

@@ -0,0 +1,675 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>QLabel</name>
<message>
<location filename="../main.cpp" line="22"/>
<location filename="../main.cpp" line="30"/>
<source>Spark Store</source>
<translation>Spark </translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../main.cpp" line="16"/>
<source>We publish this program under GPL V3</source>
<translation>GPL V3开源</translation>
</message>
<message>
<source>Version 2.0+2</source>
<translation type="vanished"> 2.0+2</translation>
</message>
<message>
<location filename="../main.cpp" line="19"/>
<location filename="../main.cpp" line="20"/>
<source>https://gitee.com/deepin-community-store/spark-store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="24"/>
<source>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;An appstore powered by deepin community&lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;Spark developers&lt;/span&gt;</source>
<translation>&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt;deepin &lt;/span&gt;&lt;br/&gt;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&lt;span style=&apos; font-size:12pt;&apos;&gt;Spark developers&lt;/span&gt;</translation>
</message>
<message>
<location filename="../main.cpp" line="32"/>
<source>The Spark Project</source>
<translation></translation>
</message>
</context>
<context>
<name>Widget</name>
<message>
<location filename="../widget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="52"/>
<source>background-color:#FFFFFF</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="67"/>
<source>Videos</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="74"/>
<source>Download List</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="81"/>
<source>Tools</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="88"/>
<source>Beautify</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="95"/>
<source>Music</source>
<translation></translation>
</message>
<message>
<source>Coding</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="160"/>
<source>Office</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="200"/>
<source>Translate</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="207"/>
<source>Others</source>
<translation></translation>
</message>
<message>
<source>FrontPage</source>
<translation type="vanished"></translation>
</message>
<message>
<source>Images</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="234"/>
<source>Games</source>
<translation></translation>
</message>
<message>
<source>Chatting</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="248"/>
<source>Network</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="383"/>
<source>The list is currently empty. Go and download some softwares!</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="415"/>
<source>Open download directory</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="528"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="568"/>
<source>ICON</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="515"/>
<location filename="../widget.cpp" line="536"/>
<source>Install</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="623"/>
<source>Uninstall</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="639"/>
<source>Site</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="712"/>
<location filename="../widget.ui" line="715"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This app is developed by community user,we give this tag to honor those who contribute to the Linux Ecology&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Linux生态的贡献&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="718"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/community-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="731"/>
<location filename="../widget.ui" line="734"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="750"/>
<location filename="../widget.ui" line="753"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;deepin 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="756"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/deepin-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="769"/>
<location filename="../widget.ui" line="772"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to UOS home 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;UOS家庭版 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="788"/>
<location filename="../widget.ui" line="791"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This is a DTK5 app,which means it would have better effect on Deepin Desktop Environment&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DTK5应用使&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="794"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dtk-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="826"/>
<location filename="../widget.ui" line="829"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine5 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine5 by your self.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;deepin-wine5应用使使ubuntudeepin-wine5环境&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="845"/>
<location filename="../widget.ui" line="848"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An Appimage to deb app.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Appimage转制应用.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="851"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/a2d-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="678"/>
<source>Share</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="153"/>
<source>Development</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="217"/>
<source>Home </source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="227"/>
<source>Graphics</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="241"/>
<source>Communication</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="807"/>
<location filename="../widget.ui" line="810"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine2 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine2 by your self.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;deepin-wine5应用使使ubuntudeepin-wine5环境&lt;/p&gt;&lt;/body&gt;&lt;/html&gt; {2 ?} {2 ?}</translation>
</message>
<message>
<location filename="../widget.ui" line="813"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine2-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="832"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine5-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="874"/>
<source>Contribute translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="892"/>
<source>Info</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="899"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An app store developed by community enthusiasts&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="938"/>
<source>Screenshots</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1101"/>
<source>Line Settings</source>
<translation>线</translation>
</message>
<message>
<location filename="../widget.ui" line="1117"/>
<source>Choose Line:</source>
<translation>线</translation>
</message>
<message>
<location filename="../widget.ui" line="1140"/>
<source>Refresh</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1153"/>
<source>Take effect when restart </source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1182"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;使apt工具获取软件使线&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="1192"/>
<source>Update</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1199"/>
<source>Source Server</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1219"/>
<source>Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1240"/>
<source>Temp</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1263"/>
<source>Clean</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1273"/>
<source>Since the dictionary is at /tmp,It would be cleaned automatically when system reboot.</source>
<translation>/tmp下使</translation>
</message>
<message>
<location filename="../widget.ui" line="1286"/>
<source>Size:</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1300"/>
<source>Location/tmp/spark-store</source>
<translation>/tmp/spark-store</translation>
</message>
<message>
<location filename="../widget.ui" line="1321"/>
<source>About us</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1328"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;We are &lt;span style=&quot; font-weight:600;&quot;&gt;NOT&lt;/span&gt; the official team, just like you, we are just one of the many Linux/deepin system enthusiasts and users, we develop and run the &amp;quot;Spark Store&amp;quot;! &amp;quot;, is to bring the community together to share useful software, or to participate in development together, so that we all use the latest and greatest software. &lt;/p&gt;&lt;p&gt;We don&apos;t make a profit from this, all developers and maintainers don&apos;t get paid, and we rely on the community&apos;s donations to us for most of our expenses, which we are grateful for and which allow us not to spend too much energy worrying about funding. &lt;/p&gt;&lt;p&gt;Our service and software are free for everyone to use, communicate, and learn, but you must comply with local laws and regulations in the process of your use, otherwise any problems have nothing to do with us. &lt;/p&gt;&lt;p&gt;If any part of the store infringes your rights, please tell us &amp;lt;jifengshenmo@outlook.com&amp;gt; we will remove the infringing content as soon as possible. &lt;/p&gt;&lt;p&gt;If you&apos;d like to get involved with us too, whether you&apos;re involved in development, design, pitching or submitting work, we welcome you to join us. &lt;/p&gt;&lt;p&gt;QQ group:872690351&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;&lt;/span&gt;Linux/deepinSpark&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;使使&lt;/p&gt;&lt;p&gt; &amp;lt;jifengshenmo@outlook.com&amp;gt;&lt;/p&gt;&lt;p&gt;稿&lt;/p&gt;&lt;p&gt;QQ 872690351&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="114"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="173"/>
<source>Back to category</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="293"/>
<source>Reload</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="342"/>
<source>about:blank</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="540"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="737"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/ubuntu-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="775"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/uos-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1293"/>
<source>0B</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="146"/>
<source>Spark Store</source>
<translation>Spark </translation>
</message>
<message>
<location filename="../widget.cpp" line="147"/>
<source>Search or enter spk://</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="153"/>
<source>Submit App</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="154"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="245"/>
<source>Not Exist</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="297"/>
<location filename="../widget.cpp" line="305"/>
<source>Spark\ Store</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="480"/>
<source>Failed to download app info. Please check internet connection.</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="510"/>
<source>PkgName: </source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="511"/>
<source>Version: </source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="513"/>
<source>Author: </source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="517"/>
<source>Official Site: </source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="521"/>
<source>Contributor: </source>
<translation>稿</translation>
</message>
<message>
<location filename="../widget.cpp" line="522"/>
<source>Update Time: </source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="523"/>
<source>Installed Size: </source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="532"/>
<location filename="../widget.cpp" line="645"/>
<source>Reinstall</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="571"/>
<source>Failed to load application icon.</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="620"/>
<source>Failed to get the name to the file to be downloaded.</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="668"/>
<source>Spark store could only process spk:// links for now. The search feature is coming soon!</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="789"/>
<source>Updating, please wait...</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="842"/>
<source>Apt has reported an error. Please use apt update in terminal to locate the problem.</source>
<translation>使apt update来查看错误原因</translation>
</message>
<message>
<location filename="../widget.cpp" line="848"/>
<source>Unknown error!</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="1024"/>
<source>Yes</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="1024"/>
<source>No</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="1025"/>
<source>Information for Contributors</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="1026"/>
<source>Currently the translation contribution is limited to English,
and you will be redirected to our Gitee repository at which you are
supposed to be creating pull requests to contribute app info
translations.
Tips:You can simply click the file to edit to create a flat pull request without create a full pull request
Tips:You can use github account to login to Gitee
Click yes to continue.</source>
<translation type="unfinished">
Gitee
Pull Request
pr
使github账户直接登陆Gitee
.</translation>
</message>
<message>
<source>Currently the translation contribution is limited to English,
and you will be redirected to our Gitee repository at which you are
supposed to be creating pull requests to contribute app info
translations.
Click yes to continue.</source>
<translation type="obsolete">
Gitee
Pull Request
pr
使github账户直接登陆Gitee
.</translation>
</message>
<message>
<source>Unknown server error!</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="868"/>
<source>Uninstall succeeded</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="882"/>
<source>Temporary cache was cleaned</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="949"/>
<source>The URL has been copied to the clipboard</source>
<translation></translation>
</message>
</context>
<context>
<name>downloadlist</name>
<message>
<location filename="../downloadlist.ui" line="20"/>
<source>Form</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="50"/>
<source>icon</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="82"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="106"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="189"/>
<source>Waiting to download</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="240"/>
<source>Install</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="259"/>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="278"/>
<source>Info</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="24"/>
<source>dpkg</source>
<translation>dpkg</translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="25"/>
<source>gdebi</source>
<translation>gdebi</translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="26"/>
<source>deepin deb installer</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="55"/>
<source>Downloaded, waiting to install</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="80"/>
<source>Failed to download %1</source>
<translation> %1 </translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="82"/>
<source>Download FailedCheck Your Connection</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="92"/>
<source>Finished downloading %1, awaiting to install</source>
<translation>%1 </translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="125"/>
<source>Installing...</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="172"/>
<source>Finish</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="176"/>
<source>Retry</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="177"/>
<source>Error happened in dpkg progress , you can try it again</source>
<translation>dpkg出现错误</translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="181"/>
<source>dpkg progress had been abortedyou can retry installation</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="203"/>
<source>Download canceled</source>
<translation></translation>
</message>
</context>
</TS>

View File

@@ -1,3 +1,4 @@
#include <libnotify/notify.h>
#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
@@ -18,6 +19,7 @@
#include <QIcon>
#include <QGraphicsOpacityEffect>
#include <QDesktopServices>
#include <DDialog>
#include <DSettings>
#include <DSettingsOption>
#include <DSettingsDialog>
@@ -56,6 +58,13 @@ Widget::Widget(DBlurEffectWidget *parent) :
connect(ui->menu_download,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(13);});
// connect((ui->titlebar))
connect(&appinfoLoadThread, SIGNAL(requestResetUi()), this, SLOT(sltAppinfoResetUi()), Qt::ConnectionType::BlockingQueuedConnection);
connect(&appinfoLoadThread, &SpkAppInfoLoaderThread::requestSetTags, this, &Widget::sltAppinfoTags, Qt::ConnectionType::BlockingQueuedConnection);
connect(&appinfoLoadThread, &SpkAppInfoLoaderThread::requestSetAppInformation, this, &Widget::sltAppinfoDetails, Qt::ConnectionType::BlockingQueuedConnection);
connect(&appinfoLoadThread, &SpkAppInfoLoaderThread::finishedIconLoad, this, &Widget::sltAppinfoIcon, Qt::ConnectionType::BlockingQueuedConnection);
connect(&appinfoLoadThread, &SpkAppInfoLoaderThread::finishedScreenshotLoad, this, &Widget::sltAppinfoScreenshot, Qt::ConnectionType::BlockingQueuedConnection);
connect(&appinfoLoadThread, &SpkAppInfoLoaderThread::finishAllLoading, this, &Widget::sltAppinfoFinish, Qt::ConnectionType::BlockingQueuedConnection);
// 搜索事件
connect(searchEdit,&DSearchEdit::editingFinished,this,[=](){
QString searchtext=searchEdit->text();
@@ -74,7 +83,7 @@ Widget::Widget(DBlurEffectWidget *parent) :
qDebug()<<"Dark";
setTheme(true,main_color);
}else {
qDebug()<<"White";
qDebug()<<"Light";
setTheme(false,main_color);
}
});
@@ -102,11 +111,13 @@ Widget::Widget(DBlurEffectWidget *parent) :
}
});
notify_init(tr("Spark\\ Store").toLocal8Bit());
}
Widget::~Widget()
{
notify_uninit();
delete ui;
qDebug()<<"exit";
DApplication::quit();
@@ -125,6 +136,9 @@ void Widget::initUI()
ui->icon->setPixmap(QIcon::fromTheme("spark-store").pixmap(36,36));
ui->titlebar->setFixedHeight(50);
label_screen << ui->screen_0 << ui->screen_1 << ui->screen_2 << ui->screen_3 << ui->screen_4;
// 初始化分界线
QGraphicsOpacityEffect *opacityEffect_1=new QGraphicsOpacityEffect;
opacityEffect_1->setOpacity(0.1);
@@ -142,15 +156,15 @@ void Widget::initUI()
titlebar=ui->titlebar;
titlebar->setCustomWidget(w_titlebar);
// titlebar->setIcon(QIcon::fromTheme("spark-store"));
titlebar->setTitle("Spark Store");
searchEdit->setPlaceholderText("Search or enter spk://");
titlebar->setTitle(tr("Spark Store"));
searchEdit->setPlaceholderText(tr("Search or enter spk://"));
searchEdit->setFixedWidth(300);
titlebar->setSeparatorVisible(false);
// titlebar->setAutoHideOnFullscreen(true);
// 添加菜单项
QAction *actionSubmission = new QAction("Submit App", this);
QAction *setting=new QAction("Settings");
QAction *actionSubmission = new QAction(tr("Submit App"), this);
QAction *setting=new QAction(tr("Settings"));
QMenu *menu=new QMenu;
@@ -161,7 +175,6 @@ void Widget::initUI()
[=](){QDesktopServices::openUrl(QUrl("https://upload.spark-app.store/"));});
connect(setting,&QAction::triggered,this,&Widget::opensetting);
// 初始化菜单数组
left_list[0]=ui->menu_main;
left_list[1]=ui->menu_network;
@@ -201,9 +214,9 @@ void Widget::initConfig()
QSettings readConfig(QDir::homePath()+"/.config/spark-store/config.ini",QSettings::IniFormat);
if(readConfig.value("server/choose").toString()!=""){
ui->comboBox_server->setCurrentText(readConfig.value("server/choose").toString());
serverUrl=readConfig.value("server/choose").toString();
appinfoLoadThread.setServer(serverUrl=readConfig.value("server/choose").toString());
}else {
serverUrl="http://sucdn.jerrywang.top/"; // 默认URL
appinfoLoadThread.setServer(serverUrl="http://sucdn.jerrywang.top/"); // 默认URL
}
configCanSave=true; // 防止触发保存配置信号
menuUrl[0]=serverUrl + "store/#/";
@@ -223,13 +236,13 @@ void Widget::initConfig()
//web控件初始化
// ui->webView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); //用来激活接受linkClicked信号
// ui->webView->page()->settings()->setAttribute(QWebSettings::JavascriptEnabled,true);
// ui->webView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); //用来激活接受linkClicked信号
// ui->webView->page()->settings()->setAttribute(QWebSettings::JavascriptEnabled,true);
ui->webfoot->hide();
//初始化首页
ui->webEngineView->setUrl(menuUrl[0]);
// ui->webEngineView->setUrl(menuUrl[1]);
// ui->webEngineView->setUrl(menuUrl[1]);
//给下载列表赋值到数组,方便调用
for (int i =0; i<LIST_MAX;i++){
@@ -242,7 +255,7 @@ void Widget::initConfig()
if(aptserver.isOpen()){
ui->label_aptserver->setText(aptserver.readAll());
}else {
ui->label_aptserver->setText("不存在");
ui->label_aptserver->setText(tr("Not Exist"));
}
aptserver.close();
@@ -261,7 +274,7 @@ void Widget::setTheme(bool isDark,QColor color)
ui->btn_openDir->setStyleSheet("color:#8B91A1;background-color:#2E2F30;border:0px");
ui->webfoot->setStyleSheet("background-color:#252525");
ui->label->setStyleSheet("background-color:#252525");
// ui->scrollArea->setStyleSheet("background-color:#252525");
// ui->scrollArea->setStyleSheet("background-color:#252525");
ui->label_show->setStyleSheet("background-color:#252525");
ui->pushButton_return->setIcon(QIcon(":/icons/icons/category_active_dark.svg"));
ui->pushButton_refresh->setIcon(QIcon(":/icons/icons/refresh-page-dark.svg"));
@@ -272,7 +285,7 @@ void Widget::setTheme(bool isDark,QColor color)
ui->webfoot->setStyleSheet("background-color:#FFFFFF");
ui->btn_openDir->setStyleSheet("color:#505050;background-color:#FBFBFB;border:0px");
ui->label->setStyleSheet("background-color:#FFFFFF");
// ui->scrollArea->setStyleSheet("background-color:#F8F8F8");
// ui->scrollArea->setStyleSheet("background-color:#F8F8F8");
ui->label_show->setStyleSheet("background-color:#F8F8F8");
ui->pushButton_return->setIcon(QIcon(":/icons/icons/category_active.svg"));
ui->pushButton_refresh->setIcon(QIcon(":/icons/icons/refresh-page.svg"));
@@ -291,6 +304,34 @@ DTitlebar* Widget::getTitlebar()
return ui->titlebar;
}
static NotifyNotification *_notify = nullptr;
void Widget::sendNotification(const QString &message, const int msTimeout, const QString &icon)
{
if(_notify == nullptr)
{
_notify = notify_notification_new(tr("Spark\\ Store").toLocal8Bit(), message.toLocal8Bit(), icon.toLocal8Bit());
notify_notification_set_timeout(_notify, msTimeout);
}
else
notify_notification_update(_notify, tr("Spark\\ Store").toLocal8Bit(), message.toLocal8Bit(), icon.toLocal8Bit());
notify_notification_show(_notify, nullptr);
}
void Widget::sendNotification(const char *message, const int msTimeout, const QString &icon)
{
if(_notify == nullptr)
{
_notify = notify_notification_new(tr("Spark\\ Store").toLocal8Bit(), message, icon.toLocal8Bit());
notify_notification_set_timeout(_notify, msTimeout);
}
else
notify_notification_update(_notify, tr("Spark\\ Store").toLocal8Bit(), message, icon.toLocal8Bit());
notify_notification_show(_notify, nullptr);
}
void Widget::updateUI()
{
if(themeIsDark){
@@ -446,9 +487,11 @@ int Widget::loadappinfo(QUrl arg1)
// 重置UI状态
ui->pushButton_uninstall->hide();
ui->pushButton_website->setEnabled(false);
ui->pushButton->setEnabled(false);
ui->pushButton_translate->setEnabled(false);
ui->label_show->setText("Loading...");
ui->label_show->show();
ui->pushButton_website->hide();
QProcess get_json;
QDir dir("/tmp");
@@ -458,7 +501,9 @@ int Widget::loadappinfo(QUrl arg1)
get_json.start("curl -o app.json "+arg1.toString());
get_json.waitForFinished();
if(get_json.exitCode())
return 2;
{
sendNotification(tr("Failed to download app info. Please check internet connection."));
}
QFile app_json("app.json");
if(app_json.open(QIODevice::ReadOnly)){
@@ -487,20 +532,20 @@ int Widget::loadappinfo(QUrl arg1)
ui->label_show->show();
// 软件信息加载
QString info;
info= "PkgName "+json["Pkgname"].toString()+"\n";
info+="Version "+json["Version"].toString()+"\n";
info= tr("PkgName: ")+json["Pkgname"].toString()+"\n";
info+=tr("Version: ")+json["Version"].toString()+"\n";
if(json["Author"].toString()!="" && json["Author"].toString()!=" "){
info+="Author "+json["Author"].toString()+"\n";
info+=tr("Author: ")+json["Author"].toString()+"\n";
}
if(json["Website"].toString()!="" && json["Website"].toString()!=" "){
info+="Official Site "+json["Website"].toString()+"\n";
info+=tr("Official Site: ")+json["Website"].toString()+"\n";
ui->pushButton_website->show();
appweb=json["Website"].toString();
}
info+="Contributor "+json["Contributor"].toString()+"\n";
info+="Update Time "+json["Update"].toString()+"\n";
info+="Installed Size "+json["Size"].toString()+"\n";
info+=tr("Contributor: ")+json["Contributor"].toString()+"\n";
info+=tr("Update Time: ")+json["Update"].toString()+"\n";
info+=tr("Installed Size: ")+json["Size"].toString()+"\n";
ui->label_info->setText(info);
ui->label_more->setText(json["More"].toString());
QProcess isInstall;
@@ -509,11 +554,11 @@ int Widget::loadappinfo(QUrl arg1)
isInstall.waitForFinished();
int error=QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
if(error==0){
ui->pushButton_download->setText("Reinstall");
ui->pushButton_download->setText(tr("Reinstall"));
ui->pushButton_uninstall->show();
}else {
ui->pushButton_download->setText("Install");
ui->pushButton_download->setText(tr("Install"));
}
//tag加载
QString tags=json["Tags"].toString();
@@ -540,27 +585,30 @@ int Widget::loadappinfo(QUrl arg1)
get_json.start("curl -o icon.png "+urladdress+"icon.png");
get_json.waitForFinished();
if(!get_json.exitCode()) {
QPixmap appicon(QString::fromUtf8(TMP_PATH)+"/icon.png");
ui->label_appicon->setPixmap(appicon);
ui->pushButton_download->setEnabled(true);
QPixmap appicon(QString::fromUtf8(TMP_PATH)+"/icon.png");
ui->label_appicon->setPixmap(appicon);
ui->pushButton_download->setEnabled(true);
ui->pushButton->setEnabled(true);
ui->pushButton_translate->setEnabled(true);
ui->pushButton_website->setEnabled(true);
}
else
system("notify-send Failed to load App icon --icon=spark-store");
sendNotification(tr("Failed to load application icon."));
// 截图展示加载
image_show *label_screen[5];
label_screen[0]=ui->screen_0;
label_screen[1]=ui->screen_1;
label_screen[2]=ui->screen_2;
label_screen[3]=ui->screen_3;
label_screen[4]=ui->screen_4;
for (int i=0;i<5;i++) {
get_json.start("curl -o screen_"+QString::number(i+1)+".png "+urladdress+"screen_"+QString::number(i+1)+".png");
QList<image_show*> label_screen;
label_screen << ui->screen_0 << ui->screen_1 << ui->screen_2 << ui->screen_3 << ui->screen_4;
for (int i = 0; i < 5; i++) {
QString cmd = "curl -o screen_"+QString::number(i+1)+".png "+urladdress+"screen_"+QString::number(i+1)+".png";
get_json.terminate();
get_json.start(cmd);
get_json.waitForFinished();
if(screen[i].load("screen_"+QString::number(i+1)+".png")){
bool s = screen[i].load("screen_"+QString::number(i+1)+".png");
if(s){
label_screen[i]->setImage(screen[i]);
label_screen[i]->show();
/*
switch(i){ // 故意为之,为了清除多余截图
case 0:
label_screen[1]->hide();
@@ -570,7 +618,8 @@ int Widget::loadappinfo(QUrl arg1)
label_screen[3]->hide();
case 3:
label_screen[4]->hide();
}
}*/
}else{
QFile::remove("screen_"+QString::number(i+1)+".png");
break;
@@ -591,7 +640,7 @@ void Widget::on_pushButton_download_clicked()
download_list[allDownload-1].pkgName=pkgName;
if(fileName.isEmpty())
{
system("notify-send Failed to get file name --icon=spark-store");
sendNotification(tr("Failed to get the name to the file to be downloaded."));
return;
}
download_list[allDownload-1].setParent(ui->listWidget);
@@ -616,7 +665,7 @@ void Widget::on_pushButton_download_clicked()
nowDownload+=1;
startRequest(urList.at(nowDownload-1)); // 进行链接请求
}
if(ui->pushButton_download->text()=="Reinstall"){
if(ui->pushButton_download->text()==tr("Reinstall")){
download_list[allDownload-1].reinstall=true;
}
}
@@ -639,8 +688,8 @@ void Widget::searchApp(QString text)
if(text.left(6)=="spk://"){
openUrl(text);
}else {
system("notify-send The store can only process spk:// url now.Please look forward to later version! --icon=spark-store");
// ui->webView->setUrl(QUrl("http://www.baidu.com/s?wd="+text));
sendNotification(tr("Spark store could only process spk:// links for now. The search feature is coming soon!"));
// ui->webView->setUrl(QUrl("http://www.baidu.com/s?wd="+text));//这东西对接百度
// ui->stackedWidget->setCurrentIndex(0);
}
}
@@ -655,6 +704,7 @@ void Widget::httpReadyRead()
void Widget::updateDataReadProgress(qint64 bytesRead, qint64 totalBytes)
{
if(totalBytes <= 0) return;
download_list[nowDownload-1].setMax(10000); // 最大值
download_list[nowDownload-1].setValue((bytesRead*10000)/totalBytes); // 当前值
download_size=bytesRead;
@@ -664,6 +714,111 @@ void Widget::updateDataReadProgress(qint64 bytesRead, qint64 totalBytes)
}
}
void Widget::sltAppinfoResetUi()
{
// 先隐藏详情页负责显示截图的label
ui->screen_0->hide();
ui->screen_1->hide();
ui->screen_2->hide();
ui->screen_3->hide();
ui->screen_4->hide();
ui->label_appicon->clear();
ui->tag_community->hide();
ui->tag_ubuntu->hide();
ui->tag_deepin->hide();
ui->tag_uos->hide();
ui->tag_dtk5->hide();
ui->tag_dwine2->hide();
ui->tag_dwine5->hide();
ui->tag_a2d->hide();
// 重置UI状态
ui->pushButton_uninstall->hide();
ui->pushButton_website->setEnabled(false);
ui->pushButton->setEnabled(false);
ui->pushButton_translate->setEnabled(false);
ui->label_show->setText("Loading...");
ui->label_show->show();
}
void Widget::sltAppinfoTags(QStringList *tagList)
{
foreach (const QString &tag, *tagList) {
if(tag=="community")
ui->tag_community->show();
else if(tag=="ubuntu")
ui->tag_ubuntu->show();
else if(tag=="deepin")
ui->tag_deepin->show();
else if(tag=="uos")
ui->tag_uos->show();
else if(tag=="dtk5")
ui->tag_dtk5->show();
else if(tag=="dwine2")
ui->tag_dwine2->show();
else if(tag=="dwine5")
ui->tag_dwine5->show();
else if(tag=="a2d")
ui->tag_a2d->show();
}
}
void Widget::sltAppinfoDetails(QString *name, QString *details, QString *info,
QString *website, QString *packageName, QUrl *fileUrl,
bool isInstalled)
{
ui->label_appname->setText(appName = *name);
ui->label_appname->show();
ui->label_info->setText(*details);
ui->label_info->show();
ui->label_more->setText(*info);
ui->label_more->show();
pkgName = *packageName;
url = *fileUrl;
appweb = *website;
if(isInstalled){
ui->pushButton_download->setText(tr("Reinstall"));
ui->pushButton_uninstall->show();
}else {
ui->pushButton_download->setText(tr("Install"));
}
}
void Widget::sltAppinfoIcon(QPixmap *icon)
{
ui->label_appicon->setPixmap(*icon);
ui->label_appicon->show();
ui->pushButton_download->setEnabled(true);
ui->pushButton->setEnabled(true);
ui->pushButton_translate->setEnabled(true);
ui->pushButton_website->setEnabled(true);
}
void Widget::sltAppinfoScreenshot(QPixmap *picture, int index)
{
if(picture != nullptr) {
screen[index] = *picture;
label_screen[index]->setImage(*picture);
label_screen[index]->show();
switch(index) { // 故意为之,为了清除多余截图
case 0:
label_screen[1]->hide();
case 1:
label_screen[2]->hide();
case 2:
label_screen[3]->hide();
case 3:
label_screen[4]->hide();
}
}
}
void Widget::sltAppinfoFinish()
{
ui->label_show->setText("");
ui->label_show->hide();
}
void Widget::httpFinished() // 完成下载
{
file->flush();
@@ -700,6 +855,7 @@ void Widget::on_pushButton_return_clicked()
// chooseLeftMenu(13);
// return;
// }
appinfoLoadThread.requestInterruption();
chooseLeftMenu(nowMenu);
// if(themeIsDark){
// QString darkurl=menuUrl[nowMenu].toString();
@@ -719,13 +875,14 @@ void Widget::on_pushButton_return_clicked()
void Widget::on_pushButton_refresh_clicked()
{
if(ui->stackedWidget->currentIndex() == 2) //如果在详情页面要重新触发UrlChanged
emit ui->webEngineView->urlChanged(ui->webEngineView->url());
emit ui->webEngineView->urlChanged(ui->webEngineView->url());
else
ui->webEngineView->reload();
ui->webEngineView->reload();
}
void Widget::on_comboBox_server_currentIndexChanged(const QString &arg1)
{
appinfoLoadThread.setServer(arg1); // 服务器信息更新
if(configCanSave){
ui->label_setting1->show();
QSettings *setConfig=new QSettings(QDir::homePath()+"/.config/spark-store/config.ini",QSettings::IniFormat);
@@ -758,43 +915,70 @@ void Widget::on_pushButton_updateServer_clicked()
void Widget::on_pushButton_updateApt_clicked()
{
QtConcurrent::run([=](){
ui->pushButton_updateApt->setEnabled(false);
ui->label_aptserver->setText("Updating,PLease wait");
std::fstream sourcesList;
QDir tmpdir("/tmp");
tmpdir.mkpath("spark-store");
sourcesList.open(QString::fromUtf8(TMP_PATH).toStdString()+"/sparkstore.list",std::ios::out);
if(sourcesList){
sourcesList<<"deb [by-hash=force] ";
sourcesList<<QString::fromUtf8(ui->comboBox_server->currentText().toUtf8()).toStdString();
sourcesList<<" /";
std::fstream update;
update.open(QString::fromUtf8(TMP_PATH).toStdString()+"/update.sh",std::ios::out);
update<<"#!/bin/sh\n";
update<<"mv "+QString::fromUtf8(TMP_PATH).toStdString()+"/sparkstore.list /etc/apt/sources.list.d/sparkstore.list && apt update";
update.close();
system("chmod +x "+QString::fromUtf8(TMP_PATH).toUtf8()+"/update.sh");
QProcess runupdate;
runupdate.start("pkexec "+QString::fromUtf8(TMP_PATH)+"/update.sh");
runupdate.waitForFinished();
QString error=QString::fromStdString(runupdate.readAllStandardError().toStdString());
QStringList everyError=error.split("\n");
bool haveError=false;
for (int i=0;i<everyError.size();i++) {
if(everyError[i].left(2)=="E:"){
haveError=true;
}
}
if(!haveError){
ui->label_aptserver->setText("deb [by-hash=force] "+ui->comboBox_server->currentText().toUtf8()+" /");
}else {
ui->label_aptserver->setText("更新中发生错误请在终端使用apt update来查看错误原因");
}
}else {
ui->label_aptserver->setText("服务器错误");
}
ui->pushButton_updateApt->setEnabled(false);
ui->label_aptserver->setText(tr("Updating, please wait..."));
ui->pushButton_updateApt->setEnabled(true);
std::fstream sourcesList, policy, update;
QDir tmpdir("/tmp");
auto tmpPath = QString::fromUtf8(TMP_PATH).toStdString();
bool unknownError = true;
tmpdir.mkpath("spark-store");
sourcesList.open(tmpPath + "/sparkstore.list", std::ios::out);
//policy.open(tmpPath + "/sparkstore", std::ios::out);
// 商店已经下架会替换系统库的包优先级policy弃用
if(sourcesList /*&& policy*/) {
auto serverAddr = ui->comboBox_server->currentText();
sourcesList << "deb [by-hash=force] ";
sourcesList << serverAddr.toUtf8().toStdString();
sourcesList << " /";
sourcesList.close();
/*
policy << "Package: *\n"
"Pin: origin *" << serverAddr.mid(serverAddr.indexOf('.')).toUtf8().toStdString() << "\n"
"Pin-Priority: 90"; // 降低星火源的优先级,防止从星火安装已存在的系统包,破坏依赖
policy.close();
*/
update.open(tmpPath + "/update.sh",std::ios::out);
if(update) {
unknownError = false;
update << "#!/bin/sh\n"
"mv " + tmpPath + "/sparkstore.list /etc/apt/sources.list.d/sparkstore.list && "
// "mv " + tmpPath + "/sparkstore /etc/apt/preferences.d/sparkstore && "
"apt update";
update.close();
system(("chmod +x " + tmpPath + "/update.sh").c_str());
QProcess runupdate;
runupdate.start(QString::fromStdString("pkexec " + tmpPath + "/update.sh"));
runupdate.waitForFinished();
QString error = runupdate.readAllStandardError();
QStringList everyError = error.split("\n");
bool haveError = false;
for (int i=0; i < everyError.size(); i++) {
if(everyError[i].left(2) == "E:") {
haveError = true;
}
}
if(!haveError) {
ui->label_aptserver->setText("deb [by-hash=force] " + ui->comboBox_server->currentText().toUtf8() + " /");
} else {
ui->label_aptserver->setText(tr("Apt has reported an error. Please use apt update in terminal to locate the problem."));
}
}
}
if(unknownError) {
ui->label_aptserver->setText(tr("Unknown error!"));
}
ui->pushButton_updateApt->setEnabled(true);
});
}
@@ -807,11 +991,11 @@ void Widget::on_pushButton_uninstall_clicked()
uninstall.start("pkexec apt purge -y "+pkgName);
uninstall.waitForFinished();
ui->pushButton_download->setEnabled(true);
ui->pushButton_download->setText("安装");
ui->pushButton_download->setText("Install");
ui->pushButton_uninstall->hide();
ui->pushButton_uninstall->setEnabled(true);
updatesEnabled();
system("notify-send 卸载完成 --icon=spark-store");
sendNotification(tr("Uninstall succeeded"));
});
}
@@ -825,7 +1009,7 @@ void Widget::on_pushButton_clear_clicked() // 清空临时缓存目录
for (int i=0;i<quantity;i++) {
tmpdir.remove(tmpdir[i]);
}
system("notify-send 已清除所有临时缓存 --icon=spark-store");
sendNotification(tr("Temporary cache was cleaned"));
ui->pushButton_clear->setEnabled(true);
Widget::opensetting();
});
@@ -891,8 +1075,8 @@ void Widget::on_pushButton_clicked()
share_url="spk://store/"+type_name+"/"+pkgName;
qDebug()<<"Share"<<share_url;
QClipboard *clipboard=QApplication::clipboard();
system("notify-send 链接已经复制到剪贴板 --icon=spark-store");
clipboard->setText(share_url);
sendNotification(tr("The URL has been copied to the clipboard"));
}
void Widget::on_btn_openDir_clicked()
@@ -929,24 +1113,16 @@ void Widget::on_webEngineView_urlChanged(const QUrl &arg1)
ui->pushButton_download->setEnabled(false);
ui->stackedWidget->setCurrentIndex(2);
qDebug()<<"https://demo-one-vert.vercel.app/"+type_name+"/"+pname;
/*
load.cancel();//打开并发加载线程前关闭正在执行的线程
load = QtConcurrent::run([=](){
int loadresult = loadappinfo(arg1);
if(!loadresult)
return;
else {
switch(loadresult)
{
case 1: // 空的arg1
//此处不应通知用户
break;
case 2: // curl下载app.json失败
system("notify-send 应用程序详细信息下载失败,请检查网络连接 --icon=spark-store");
break;
}
}
});
*/
appinfoLoadThread.requestInterruption();
appinfoLoadThread.wait(100);
appinfoLoadThread.setUrl(arg1);
appinfoLoadThread.start();
}
}
@@ -969,10 +1145,28 @@ void Widget::on_webEngineView_loadProgress(int progress)
void Widget::on_webEngineView_loadFinished(bool arg1)
{
if(arg1){
m_loadweb->setValue(0);
m_loadweb->setValue(0);
}else {
m_loadweb->setValue(0);
m_loaderror->show();
}
}
void Widget::on_pushButton_translate_clicked()
{
DDialog tipDialog;
tipDialog.setWordWrapMessage(true);
tipDialog.addButtons({ tr("Yes"), tr("No") });
tipDialog.setTitle(tr("Information for Contributors"));
tipDialog.setMessage(tr("Currently the translation contribution is limited to English,\n"
"and you will be redirected to our Gitee repository at which you are\n"
"supposed to be creating pull requests to contribute app info\n"
"translations.\n"
"Tips:You can simply click the file to edit to create a flat pull request without create a full pull request\n"
"Tips:You can use github account to login to Gitee"
"\nClick yes to continue."));
if(!tipDialog.exec())
QDesktopServices::openUrl("https://gitee.com/deepin-community-store/json/tree/master/store/" +
type_name + '/' + pkgName);
}

View File

@@ -10,6 +10,7 @@
#include <QJsonObject>
#include <QProcess>
#include <QFuture>
#include <QFutureWatcher>
#include <QToolButton>
#include <QTimer>
#include <DSettings>
@@ -20,6 +21,9 @@
#include <DTitlebar>
#include <DSearchEdit>
#include <progressload.h>
#include "workerthreads.h"
#include "image_show.h"
#define LIST_MAX 99 //一次最多下载数量
#define TMP_PATH "/tmp/spark-store"
@@ -47,11 +51,25 @@ public:
void setTheme(bool,QColor);
DTitlebar* getTitlebar();
static void sendNotification(const QString &message, const int msTimeout = 5000, const QString &icon = "spark-store");
static void sendNotification(const char *message, const int msTimeout = 5000, const QString &icon = "spark-store");
private slots:
void httpFinished();
void httpReadyRead();
void updateDataReadProgress(qint64,qint64);
// SpkAppInfoLoaderThread的槽函数
void sltAppinfoResetUi();
void sltAppinfoTags(QStringList *tagList);
void sltAppinfoDetails(QString *name, QString *details, QString *info,
QString *website, QString *packageName,
QUrl *fileUrl, bool isInstalled);
void sltAppinfoIcon(QPixmap *icon);
void sltAppinfoScreenshot(QPixmap *picture, int index);
void sltAppinfoFinish();
void on_pushButton_download_clicked();
void on_pushButton_return_clicked();
void on_comboBox_server_currentIndexChanged(const QString &arg1);
@@ -60,24 +78,17 @@ private slots:
void on_pushButton_uninstall_clicked();
void on_pushButton_clear_clicked();
void on_pushButton_website_clicked();
void on_pushButton_clicked();
void on_btn_openDir_clicked();
void on_stackedWidget_currentChanged(int arg1);
void on_webEngineView_urlChanged(const QUrl &arg1);
void on_webEngineView_loadStarted();
void on_webEngineView_loadProgress(int progress);
void on_webEngineView_loadFinished(bool arg1);
void on_pushButton_refresh_clicked();
void on_pushButton_translate_clicked();
public:
public:
QUrl url;
@@ -120,6 +131,7 @@ private:
long size2=0;
QPixmap screen[5];
QFuture<void> load;
QFutureWatcher<void> watchScreenshotLoad;
QTimer download_speed;
QString type_name;
QColor main_color;
@@ -127,6 +139,9 @@ private:
DSearchEdit *searchEdit=new DSearchEdit;
DTitlebar *titlebar;
QList<image_show*> label_screen;
SpkAppInfoLoaderThread appinfoLoadThread;
};
#endif // WIDGET_H

138
widget.ui
View File

@@ -150,7 +150,7 @@
<item row="11" column="0" colspan="6">
<widget class="QPushButton" name="menu_dev">
<property name="text">
<string>Coding</string>
<string>Development</string>
</property>
</widget>
</item>
@@ -170,7 +170,7 @@
</size>
</property>
<property name="toolTip">
<string>回到分类</string>
<string>Back to category</string>
</property>
<property name="text">
<string/>
@@ -214,14 +214,17 @@
<string notr="true"/>
</property>
<property name="text">
<string>FrontPage</string>
<string>Home </string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="7" column="0" colspan="6">
<widget class="QPushButton" name="menu_photo">
<property name="text">
<string>Images</string>
<string>Graphics</string>
</property>
</widget>
</item>
@@ -235,7 +238,7 @@
<item row="4" column="0" colspan="6">
<widget class="QPushButton" name="menu_chat">
<property name="text">
<string>Chatting</string>
<string>Communication</string>
</property>
</widget>
</item>
@@ -287,7 +290,7 @@
</size>
</property>
<property name="toolTip">
<string>重新加载</string>
<string>Reload</string>
</property>
<property name="text">
<string/>
@@ -377,7 +380,7 @@
<number>0</number>
</property>
<property name="text">
<string>The List is empty now.Go and Download some software!</string>
<string>The list is currently empty. Go and download some softwares!</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -409,7 +412,7 @@
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>打开文件夹</string>
<string>Open download directory</string>
</property>
</widget>
</item>
@@ -474,6 +477,45 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>70</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>60</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="pushButton_download">
<property name="text">
<string>Install</string>
</property>
</widget>
</item>
<item row="0" column="3" colspan="2">
<widget class="QLabel" name="label_appname">
<property name="font">
@@ -487,7 +529,7 @@
</property>
</widget>
</item>
<item row="3" column="3" rowspan="5" colspan="7">
<item row="3" column="3" rowspan="5" colspan="8">
<widget class="QLabel" name="label_info">
<property name="font">
<font>
@@ -533,7 +575,7 @@
</property>
</widget>
</item>
<item row="0" column="9">
<item row="0" column="10">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -546,45 +588,6 @@
</property>
</spacer>
</item>
<item row="3" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>60</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>70</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="pushButton_download">
<property name="text">
<string>Install</string>
</property>
</widget>
</item>
<item row="7" column="1" rowspan="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
@@ -669,7 +672,14 @@
</property>
</spacer>
</item>
<item row="1" column="3" colspan="7">
<item row="0" column="8">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Share</string>
</property>
</widget>
</item>
<item row="1" column="3" colspan="8">
<widget class="QWidget" name="widget" native="true">
<property name="minimumSize">
<size>
@@ -724,7 +734,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to Ubuntu 20.04&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>UB</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/ubuntu-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@@ -762,7 +772,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Capable to UOS home 20&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/uos.svg&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/uos-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@@ -793,8 +803,14 @@
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine2 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine2 by your self.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine2 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine2 by your self.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>TextLabel</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine2-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@@ -813,7 +829,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;A deepin-wine5 app.If you are using ubuntu or other non-deepin distro,you should deploy deepin-wine5 by your self.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>wine</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/tags/dwine5-small.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@@ -852,10 +868,10 @@
</layout>
</widget>
</item>
<item row="0" column="8">
<widget class="QPushButton" name="pushButton">
<item row="0" column="9">
<widget class="QPushButton" name="pushButton_translate">
<property name="text">
<string>Share</string>
<string>Contribute translation</string>
</property>
</widget>
</item>
@@ -880,7 +896,7 @@
<item>
<widget class="QLabel" name="label_more">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;由社区爱好者开发的软件商店&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;An app store developed by community enthusiasts&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@@ -919,7 +935,7 @@
</font>
</property>
<property name="text">
<string>ScreenShots</string>
<string>Screenshots</string>
</property>
</widget>
</item>
@@ -1066,8 +1082,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>903</width>
<height>852</height>
<width>738</width>
<height>896</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_23">

152
workerthreads.cpp Normal file
View File

@@ -0,0 +1,152 @@
#include <QProcess>
#include <QDir>
#include <QFile>
#include <QJsonDocument>
#include "workerthreads.h"
#include "widget.h"
void SpkAppInfoLoaderThread::run()
{
emit requestResetUi();
QProcess get_json;
QString urladdress, deatils, more, packagename, appweb;
QDir dir("/tmp");
bool isInstalled;
dir.mkdir("spark-store");
QDir::setCurrent("/tmp/spark-store");
get_json.start("curl -o app.json " + targetUrl.toString());
if(waitDownload(get_json) == -1)
return;
if(get_json.exitCode())
{
Widget::sendNotification(tr("Failed to download app info. Please check internet connection."));
}
QFile app_json("app.json");
if(app_json.open(QIODevice::ReadOnly)){
// 成功得到json文件
QByteArray json_array = app_json.readAll();
// 将路径转化为相应源的下载路径
urladdress = targetUrl.toString().left(targetUrl.toString().length()-8);
QStringList downloadurl=urladdress.split("/");
QString deburl = serverUrl;
deburl = deburl.left(urladdress.length()-1);
urladdress = "https://cdn.jsdelivr.net/gh/Jerrywang959/jsonpng@master/"; // 使用图片专用服务器请保留这行,删除后将使用源服务器
urladdress = urladdress.left(urladdress.length()-1);
for (int i=3;i<downloadurl.size();i++) {
urladdress+="/"+downloadurl[i];
deburl+="/"+downloadurl[i];
}
// 路径转化完成
QJsonObject json= QJsonDocument::fromJson(json_array).object();
QString appName = json["Name"].toString();
QUrl fileUrl = deburl + json["Filename"].toString();
// 软件信息加载
QString details;
details = tr("PkgName: ") + json["Pkgname"].toString()+"\n";
details += tr("Version: ") + json["Version"].toString()+"\n";
if(json["Author"].toString() != "" && json["Author"].toString() != " "){
details += tr("Author: ") + json["Author"].toString() + "\n";
}
if(json["Website"].toString() != "" && json["Website"].toString() != " "){
details += tr("Official Site: ") + json["Website"].toString() + "\n";
//ui->pushButton_website->show(); move to setinfo slot
appweb=json["Website"].toString();
}
details+=tr("Contributor: ")+json["Contributor"].toString()+"\n";
details+=tr("Update Time: ")+json["Update"].toString()+"\n";
details+=tr("Installed Size: ")+json["Size"].toString()+"\n";
more = json["More"].toString();
QProcess isInstall;
packagename = json["Pkgname"].toString();
isInstall.start("dpkg -s "+json["Pkgname"].toString());
isInstall.waitForFinished();
int error=QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
if(error==0)
isInstalled = true;
else
isInstalled = false;
emit requestSetAppInformation(&appName, &details, &more, &appweb, &packagename, &fileUrl, isInstalled);
//tag加载
QString tags=json["Tags"].toString();
QStringList tagList=tags.split(";");
emit requestSetTags(&tagList);
// 图标加载
get_json.start("curl -o icon.png "+urladdress+"icon.png");
if(waitDownload(get_json) == -1)
return;
if(!get_json.exitCode()) {
QPixmap appicon("icon.png");
emit finishedIconLoad(&appicon);
}
else
Widget::sendNotification(tr("Failed to load application icon."));
// 截图展示加载
QPixmap screenshotCache[5];
for (int i = 0; i < 5; i++) {
QString cmd = "curl -o screen_"+QString::number(i+1)+".png "+urladdress+"screen_"+QString::number(i+1)+".png";
get_json.start(cmd);
if(waitDownload(get_json) == -1)
return;
bool s = screenshotCache[i].load(QString(TMP_PATH) + "/screen_"+QString::number(i+1)+".png");
if(s){
emit finishedScreenshotLoad(&screenshotCache[i], i);
}else{
emit finishedScreenshotLoad(nullptr, i);
QFile::remove("screen_"+QString::number(i+1)+".png");
break;
}
}
emit finishAllLoading();
}
}
void SpkAppInfoLoaderThread::setUrl(const QUrl &url)
{
targetUrl = url;
}
void SpkAppInfoLoaderThread::setServer(const QString &server)
{
serverUrl = server;
}
void SpkAppInfoLoaderThread::downloadFinished(int exitcode, QProcess::ExitStatus status)
{
Q_UNUSED(exitcode);
Q_UNUSED(status);
qDebug() << "Finish one download";
finishedDownload = true;
}
int SpkAppInfoLoaderThread::waitDownload(QProcess& downloader)
{
while(!downloader.waitForFinished(100))
{
if(downloader.state() == QProcess::NotRunning)
return -1;
if(this->isInterruptionRequested())
{
downloader.terminate();
downloader.waitForFinished(-1);
qDebug() << "Appinfo loader thread was forcefully terminated";
return -1;
}
}
return 0;
}

36
workerthreads.h Normal file
View File

@@ -0,0 +1,36 @@
#ifndef WORKERTHREADS_H
#define WORKERTHREADS_H
#include <QThread>
#include <QPixmap>
#include <QUrl>
#include <QProcess>
class SpkAppInfoLoaderThread Q_DECL_FINAL : public QThread
{
Q_OBJECT
public:
//explicit SpkAppInfoLoaderThread() = default;
void run() Q_DECL_OVERRIDE;
public slots:
void setUrl(const QUrl &url);
void setServer(const QString &server);
void downloadFinished(int exitcode, QProcess::ExitStatus status);
signals:
void requestResetUi();
void requestSetTags(QStringList *tagList);
void requestSetAppInformation(QString *name, QString *details, QString *info,
QString *website, QString *packageName,
QUrl *fileUrl, bool isInstalled);
void finishedIconLoad(QPixmap *icon);
void finishedScreenshotLoad(QPixmap *icon, int index); // 该信号必须以BlockingQueued方式连接
void finishAllLoading(); // 该信号必须以BlockingQueued方式连接
private:
int waitDownload(QProcess& downloader);
QUrl targetUrl;
QString serverUrl;
bool finishedDownload = false;
int downloaderRetval = 0;
};
#endif // WORKERTHREADS_H