Compare commits

..

62 Commits

Author SHA1 Message Date
ccdcf407cc 调整安装选项顺序
调整安装选项顺序;
更新服务器源优先级;
重新打包。
2020-12-15 00:30:26 +08:00
1a18a51d3c !15 修正搜索功能的几个BUG
Merge pull request !15 from 枯叶蚊/search
2020-12-12 14:48:02 +08:00
metanoia1989
ab88af006b 修正搜索列表应用重复点击进入失败的问题 2020-12-10 22:46:55 +08:00
metanoia1989
d02900cb10 Merge branch 'search' of gitee.com:deepin-community-store/spark-store into search
合并主分支的搜索图标
2020-12-10 21:32:15 +08:00
metanoia1989
3e473c091a 解决从详情页返回列表页的进度恢复问题 2020-12-10 21:31:53 +08:00
shenmo
84541d0c22 修改: translations/spark-store_zh_CN.ts 2020-12-10 16:41:25 +08:00
shenmo
51f84bed1b 修改: src/downloadlist.cpp
修改:     src/spark-store.pro
	删除:     trans/spark-store_en.qm
	删除:     trans/spark-store_fr.qm
	删除:     trans/spark-store_zh_CN.qm
	重命名:   trans/spark-store_en.ts -> translations/spark-store_en.ts
	重命名:   trans/spark-store_fr.ts -> translations/spark-store_fr.ts
	重命名:   trans/spark-store_zh_CN.ts -> translations/spark-store_zh_CN.ts
2020-12-10 16:40:42 +08:00
4a0acf0575 修改: assets/icons/category_active.svg
新文件:   assets/icons/category_active.svg.bak
	修改:     assets/icons/category_active_dark.svg
	新文件:   assets/icons/category_active_dark.svg.bak
2020-12-10 12:35:14 +08:00
metanoia1989
e28d1c39ac 返回列表不重新加载 2020-12-08 23:31:40 +08:00
metanoia1989
f58201a612 合并来自主干的分支 2020-12-08 22:48:27 +08:00
405d3b6986 Try to fix bugs
尝试修复多屏幕下截图全屏预览的偏移问题。
2020-12-06 12:32:09 +08:00
b619d3cc7b Fix Bugs
修复了搜索结果页存在页边距的问题;
修复了多次搜索同时触发导致的崩溃问题。
2020-12-05 18:45:47 +08:00
枯叶蚊
14e3e7f9a2 !14 星火商店搜索功能
* 更换搜索服务器域名为星火的域名
* 更新搜索服务器为线上服务器
* 完成搜索功能
* 解决搜索结果图标锯齿问题
* 更新appitem的样式
* 完成应用搜索列表的滚动问题
* 合并master分支
* 添加一些文件到忽略列表
* 更新项目结构
* 更新搜索列表UI
* 添加 QtNetworkService库
2020-12-05 16:06:52 +08:00
metanoia1989
1d0e0cc65c 更换搜索服务器域名为星火的域名 2020-12-05 13:53:13 +08:00
metanoia1989
7a5b982dea 更新搜索服务器为线上服务器 2020-12-02 22:22:59 +08:00
metanoia1989
91fcab56df 完成搜索功能 2020-12-01 22:10:52 +08:00
metanoia1989
4315f04023 解决搜索结果图标锯齿问题 2020-11-30 22:44:25 +08:00
metanoia1989
736ede0742 更新appitem的样式 2020-11-29 22:25:20 +08:00
metanoia1989
a73a4416fc 完成应用搜索列表的滚动问题 2020-11-29 20:28:59 +08:00
shenmo
62f0dd097c update README.md. 2020-11-29 12:11:42 +08:00
metanoia1989
6f3e4398df 合并master分支 2020-11-28 20:59:22 +08:00
metanoia1989
3cca0d87fe 添加一些文件到忽略列表 2020-11-21 11:18:20 +08:00
b7e038bd88 Fix Bugs
Fix a bug that dirname in ~/.local/share/spark-union/ is translated into
Chinese.
2020-11-19 14:16:16 +08:00
shenmo
4f0e00ad76 修改了一个图标的名字 2020-11-18 15:17:36 +08:00
shenmo
579008e8b2 !13 更新部分语言翻译
Merge pull request !13 from 枯叶蚊/master
2020-11-14 12:17:36 +08:00
metanoia1989
ccb405c983 更新部分语言翻译 2020-11-14 11:02:50 +08:00
metanoia1989
66ef37c1ca 更新项目结构 2020-11-13 22:57:37 +08:00
metanoia1989
8972425c7c 更新搜索列表UI 2020-11-08 22:35:31 +08:00
metanoia1989
2ae6e80785 添加 QtNetworkService库 2020-11-08 20:41:18 +08:00
f5788efb47 update README.md. 2020-10-27 17:26:56 +08:00
32bc272791 update README.md. 2020-10-27 17:26:12 +08:00
c5f04b5675 update README.md. 2020-10-27 17:24:50 +08:00
cf208d0736 Roll back to old version of DAboutDialog
Roll back to old version of DAboutDialog for compability with Ubuntu.
2020-10-27 17:15:08 +08:00
fdc7cb4cb6 修改: README.md 2020-10-27 16:55:56 +08:00
8e89ce3ae3 keep old version AboutDialog
Keep old version AboutDialog to be compatible with ubuntu.
2020-10-26 23:29:41 +08:00
ee51f59874 Bump version to 2.0.2.5
Bump version to 2.0.2.5.
2020-10-26 22:50:21 +08:00
3d09a28794 main.coo改回定制,2.0.2.5版本号,改了logo配色 2020-10-26 17:47:24 +08:00
4b05758479 main.coo改回定制,2.0.2.5版本号,改了logo配色 2020-10-26 17:47:14 +08:00
74d9d0b563 main.coo改回定制,2.0.2.5版本号,改了logo配色 2020-10-26 17:44:19 +08:00
123456
f1a4f7acb5 main.cpp改回spark定制 2020-10-26 17:41:46 +08:00
93be66e871 Improve menu list on the left
Set StyleSheet of menu list on the left to
"text-align:left;padding-left:15px;" when system locale is not "zh_CN";

Update part of names in menu list and corresponding translation.
2020-10-24 20:24:31 +08:00
7b46cca1d4 Fix Bugs
Fix a Bug in updateUI(), everytime calling this method will set fonts to
system default display font and delete custom font settings, have to set
custom fonts again here.
2020-10-23 15:15:53 +08:00
c529367998 !12 卸载安装包时,将pkg转换为小写,让dpkg能够识别
Merge pull request !12 from 枯叶蚊/master
2020-10-20 09:02:27 +08:00
metanoia1989
beae3e3efa 应用下载后面换行 2020-10-19 22:44:44 +08:00
metanoia1989
9706480931 添加.vscode和build为忽略目录 2020-10-19 22:17:22 +08:00
metanoia1989
ed64eb6f5b 卸载安装包时,将pkg-name转换为小写 2020-10-19 22:16:59 +08:00
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
96 changed files with 4336 additions and 1065 deletions

5
.gitignore vendored
View File

@@ -1 +1,4 @@
spark-store.pro.user*
*.pro.user*
build/
.vscode/
Lib/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 46 KiB

349
README.md
View File

@@ -1,9 +1,21 @@
# 星火商店
# 星火应用商店
众所周知国内的Linux应用比较少wine应用难以获取优质工具分散在民间各大论坛无法形成合力难以改善生态
生态构建需要的不是某一方的单打独斗,而是人人行动起来,汇聚星火,产生燎原之势
我们创建了这个应用商店广泛收录大家需要的软件包搜集优质小工具主动适配wine应用存放到储存库供大家获取
我们支持Deepin 20 ; Ubuntu 20.04 LTS ; 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分类
@@ -32,29 +43,23 @@ http://dcstore.spark-app.store/
| 社交沟通 | chat |
| 音乐欣赏 | music |
| 视频播放 | video |
| 图形图像 | image_graphics |
| 图形图像 | graphics |
| 游戏娱乐 | games |
| 办公学习 | office |
| 阅读翻译 | reading |
| 编程开发 | development |
| 系统工具 | tools |
| 主题美化 | themes |
| 主题美化 | beautify |
| 其他应用 | 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,316 @@ make -j
./build文件下的spark-store即为可执行文件
#### 参与贡献
# 星火应用商店文档
1. Fork 本仓库
# 目录结构
几个目录结构
```
/
/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 的
}
```
## Tags处理方式
**Tags处理方式**
```cpp
// widget.cpp
QString tags=json["Tags"].toString(); //Read the Tags
QStringList tagList=tags.split(";");
for (int i=0;i<tagList.size();i++) {
if(tagList[i]=="community")
ui->tag_community->show();//Tags icon shows like this
if(tagList[i]=="ubuntu")
ui->tag_ubuntu->show();
if(tagList[i]=="deepin")
ui->tag_deepin->show();
if(tagList[i]=="uos")
ui->tag_uos->show();
if(tagList[i]=="dtk5")
ui->tag_dtk5->show();
if(tagList[i]=="dwine2")
ui->tag_dwine2->show();
if(tagList[i]=="dwine5")
ui->tag_dwine5->show();
if(tagList[i]=="a2d")
ui->tag_a2d->show();
}
```
**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);
}
```

Binary file not shown.

View File

@@ -34,23 +34,23 @@
<file>icons/refresh-page.svg</file>
</qresource>
<qresource prefix="/">
<file>Logo-Spark.png</file>
<file>big_image.cpp</file>
<file>big_image.h</file>
<file>downloadlist.cpp</file>
<file>downloadlist.h</file>
<file>image_show.cpp</file>
<file>image_show.h</file>
<file>main.cpp</file>
<file>progressload.cpp</file>
<file>progressload.h</file>
<file>widget.cpp</file>
<file>widget.h</file>
<file>../Logo-Spark.png</file>
<file>../src/big_image.cpp</file>
<file>../src/big_image.h</file>
<file>../src/downloadlist.cpp</file>
<file>../src/downloadlist.h</file>
<file>../src/image_show.cpp</file>
<file>../src/image_show.h</file>
<file>../src/main.cpp</file>
<file>../src/progressload.cpp</file>
<file>../src/progressload.h</file>
<file>../src/widget.cpp</file>
<file>../src/widget.h</file>
<file>tags/a2d.png</file>
<file>tags/community.svg</file>
<file>tags/deepin.svg</file>
<file>tags/logo_icon.svg</file>
<file>tags/uos.svg</file>
<file>tags/uos-authorize.svg</file>
<file>tags/a2d-small.png</file>
<file>tags/community-small.png</file>
<file>tags/deepin-small.png</file>
@@ -63,4 +63,7 @@
<file>tags/dwine5.svg</file>
<file>tags/dwine2-small.png</file>
</qresource>
<qresource prefix="/fonts">
<file>fonts/华康少女字体.ttf</file>
</qresource>
</RCC>

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="#536076" d="M10.138807,3.52000025 L10.138,12.5230002 L14.6066017,8.05523757 L15.3137085,8.76234435 L9.65685425,14.4191986 L4,8.76234435 L4.70710678,8.05523757 L9.138,12.4870002 L9.138807,3.52000025 L10.138807,3.52000025 Z" transform="rotate(90 9.657 11.518)"/>
</svg>

After

Width:  |  Height:  |  Size: 366 B

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="#536076" d="M10.138807,3.52000025 L10.138,12.5230002 L14.6066017,8.05523757 L15.3137085,8.76234435 L9.65685425,14.4191986 L4,8.76234435 L4.70710678,8.05523757 L9.138,12.4870002 L9.138807,3.52000025 L10.138807,3.52000025 Z" transform="rotate(90 9.657 11.518)"/>
</svg>

After

Width:  |  Height:  |  Size: 366 B

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 523 B

View File

Before

Width:  |  Height:  |  Size: 553 B

After

Width:  |  Height:  |  Size: 553 B

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 865 B

After

Width:  |  Height:  |  Size: 865 B

View File

Before

Width:  |  Height:  |  Size: 895 B

After

Width:  |  Height:  |  Size: 895 B

View File

Before

Width:  |  Height:  |  Size: 929 B

After

Width:  |  Height:  |  Size: 929 B

View File

Before

Width:  |  Height:  |  Size: 959 B

After

Width:  |  Height:  |  Size: 959 B

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 810 B

After

Width:  |  Height:  |  Size: 810 B

View File

Before

Width:  |  Height:  |  Size: 828 B

After

Width:  |  Height:  |  Size: 828 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 494 B

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 248 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 954 B

After

Width:  |  Height:  |  Size: 954 B

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

Before

Width:  |  Height:  |  Size: 873 B

After

Width:  |  Height:  |  Size: 873 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

13
assets/tags/uos.svg Normal file
View File

@@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<defs>
<linearGradient id="uos-托盘1-a" x1="15.968%" x2="100%" y1="14.224%" y2="60.554%">
<stop offset="0%" stop-color="#0071FF"/>
<stop offset="48.72%" stop-color="#00E8FC"/>
<stop offset="100%" stop-color="#00A2FF"/>
</linearGradient>
</defs>
<g fill="none" transform="translate(1 1)">
<circle cx="9" cy="9" r="9" fill="url(#uos-托盘1-a)"/>
<path fill="#FFF" d="M13,4.5 C13.5128358,4.5 13.9355072,4.88604019 13.9932723,5.38337887 L14,5.5 L14,9.5 C14,12.5 12,14.5 9,14.5 C6,14.5 4,12.5 4.0043492,9.70016408 L4,9.5 L4,5.5 C4,4.94771525 4.44771525,4.5 5,4.5 C5.51283584,4.5 5.93550716,4.88604019 5.99327227,5.38337887 L6,5.5 L6,9.5 C6,11.5 7.5,12.5 9,12.5 C10.5,12.5 12,11.5 12,9.5 L12,5.5 C12,4.94771525 12.4477153,4.5 13,4.5 Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 873 B

View File

@@ -1,70 +0,0 @@
#include <DApplication>
#include <DWidgetUtil> //Dtk::Widget::moveToCenter(&w); 要调用它就得引用DWidgetUtil
#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;
a.setAttribute(Qt::AA_UseHighDpiPixmaps);
a.loadTranslator();//载入翻译
a.setAboutDialog(&dialog);
dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
dialog.setVersion(DApplication::buildVersion("Version 2.0+2"));
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(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>"
)
);
dialog.setProductName(QLabel::tr("Spark Store"));
dialog.setCompanyLogo(QPixmap(":/Logo-Spark.png"));
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_h=s->height();
if(d_w<=1366){
w.setMinimumWidth(925);
w.resize(925,650);
}else if(d_w<=1920){
w.setMinimumWidth(1180);
w.resize(1180,760);
}else {
w.setMinimumWidth(1180);
w.resize(1180,760);
}
if(d_h<=768){
w.setMinimumHeight(650);
w.resize(925,650);
}else if(d_h<=1080){
w.setMinimumHeight(760);
w.resize(1180,760);
}else {
w.setMinimumHeight(760);
w.resize(1180,760);
}
// w.resize(925,650);
w.show();
QString arg1=argv[1];
if(arg1.left(6)=="spk://"){
w.openUrl(QUrl(argv[1]));
}
//让打开时界面显示在正中
Dtk::Widget::moveToCenter(&w);
return a.exec();
}

7
spark-store-project.pro Normal file
View File

@@ -0,0 +1,7 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = third-party/QtNetworkService \
src/spark-store.pro
spark-store.depends = third-party/QtNetworkService

97
src/appitem.cpp Normal file
View File

@@ -0,0 +1,97 @@
#include "appitem.h"
#include "ui_appitem.h"
#include <QtConcurrent>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QEventLoop>
#include <QPainter>
#include <QGraphicsDropShadowEffect>
AppItem::AppItem(QWidget *parent) :
QWidget(parent),
ui(new Ui::AppItem)
{
ui->setupUi(this);
// auto shadow = new QGraphicsDropShadowEffect();
// shadow->setXOffset(0);
// shadow->setYOffset(1);
// shadow->setBlurRadius(2);
// shadow->setColor(QColor::fromRgba(qRgba(0, 0, 0, 180)));
// ui->container->setGraphicsEffect(shadow);
}
AppItem::~AppItem()
{
delete ui;
}
void AppItem::setTitle(QString title)
{
m_title = title;
ui->lbl_title->setText(title);
}
void AppItem::setDescription(QString description)
{
m_description = description;
QString elidedText = ui->lbl_desc->fontMetrics().elidedText(
description, Qt::ElideRight,
ui->lbl_desc->width(), Qt::TextShowMnemonic);
ui->lbl_desc->setText(elidedText);
ui->lbl_desc->setAlignment(Qt::AlignTop);
}
void AppItem::setIcon(QString icon)
{
m_icon = icon;
if (!icon.isEmpty()) {
downloadIcon(icon);
}
}
void AppItem::setUrl(QString url)
{
m_url = url;
}
void AppItem::mousePressEvent(QMouseEvent *event)
{
Q_UNUSED(event);
emit clicked(QUrl(m_url));
}
/**
* @brief 下载图标
* @param icon
*/
void AppItem::downloadIcon(QString icon)
{
QtConcurrent::run([=](){
auto reqManager = new QNetworkAccessManager();
QUrl url(icon);
QNetworkReply *reply = reqManager->get(QNetworkRequest(url));
QEventLoop loop;
connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit);
connect(reply, &QNetworkReply::finished, this, [=] () { emit finished(); });
loop.exec();
reqManager->deleteLater();
QPixmap pixmap;
pixmap.loadFromData(reply->readAll());
pixmap = pixmap.scaled(78, 78, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
if (reply->error() == QNetworkReply::NoError) {
QMetaObject::invokeMethod(this, "loadIcon", Qt::QueuedConnection,
Q_ARG(QPixmap, pixmap));
} else {
qDebug() << reply->errorString();
}
});
}
void AppItem::loadIcon(QPixmap pic)
{
ui->lbl_icon->setPixmap(pic);
}

44
src/appitem.h Normal file
View File

@@ -0,0 +1,44 @@
#ifndef APPITEM_H
#define APPITEM_H
#include <QWidget>
#include <QUrl>
namespace Ui {
class AppItem;
}
class AppItem : public QWidget
{
Q_OBJECT
public:
explicit AppItem(QWidget *parent = nullptr);
~AppItem();
void setTitle(QString title);
void setDescription(QString description);
void setIcon(QString icon);
void setUrl(QString url);
protected:
void mousePressEvent(QMouseEvent *event) override;
signals:
void clicked(QUrl url);
void finished();
public slots:
void downloadIcon(QString icon);
void loadIcon(QPixmap pic);
private:
Ui::AppItem *ui;
QString m_title;
QString m_description;
QString m_icon;
QString m_url;
};
#endif // APPITEM_H

160
src/appitem.ui Normal file
View File

@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AppItem</class>
<widget class="QWidget" name="AppItem">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>333</width>
<height>133</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true">QWidget#AppItem {
width: 300px;
height: 100px;
margin: 15px;
color: #6d6d6d;
border-radius: 18px;
background-color: width: 300px;
height: 100px;
margin: 15px;
color: #6d6d6d;
border-radius: 18px;
background-color: #F4F4F6;
}
QWidget#container {
background-color: #F4F4F6;
}
QLabel#lbl_icon {
background: transparent;
border-radius: 10px;
}
QLabel#lbl_title {
text-align: left;
white-space: nowrap;
padding-right: 10px;
font-size: 19px;
}
QLabel#lbl_desc {
text-align: left;
font-weight: lighter;
white-space: nowrap;
font-size: 12px;
color: grey;
}</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="container" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lbl_icon">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">width: 78px;
height: 70px;
padding: 10px;</string>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="lbl_title">
<property name="minimumSize">
<size>
<width>200</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>50</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_desc">
<property name="minimumSize">
<size>
<width>200</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>50</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -21,25 +21,27 @@ downloadlist::downloadlist(QWidget *parent) :
ui->pushButton_3->hide();
ui->widget_spinner->start();
ui->widget_spinner->hide();
action_dpkg->setText(tr("dpkg"));
action_dpkg->setText(tr("Spark Store App Installer"));
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);});
menu_install->addAction(action_gdebi);
connect(action_dpkg,&QAction::triggered,[=](){downloadlist::install(0);});
connect(action_deepin,&QAction::triggered,[=](){downloadlist::install(1);});
connect(action_gdebi,&QAction::triggered,[=](){downloadlist::install(2);});
//ssinstall命令存在时再加入该选项
QFile ssinstall("/bin/ssinstall");
ssinstall.open(QIODevice::ReadOnly);
if(ssinstall.isOpen()){
menu_install->addAction(action_dpkg);
}
QFile deepin("/bin/deepin-deb-installer");
deepin.open(QIODevice::ReadOnly);
if(deepin.isOpen()){
menu_install->addAction(action_deepin);
}
menu_install->addAction(action_gdebi);
}
downloadlist::~downloadlist()
@@ -122,32 +124,32 @@ 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(tr("Installing..."));
ui->label_2->setText(tr("Installing"));
QtConcurrent::run([=](){
QProcess installer;
if(!reinstall){
switch (t) {
case 0:
installer.start("pkexec gdebi -n /tmp/spark-store/"+ui->label_filename->text().toUtf8());
break;
case 1:
installer.start("pkexec ssinstall /tmp/spark-store/"+ui->label_filename->text().toUtf8());
break;
case 2:
case 1:
installer.start("deepin-deb-installer /tmp/spark-store/"+ui->label_filename->text().toUtf8());
break;
case 2:
installer.start("pkexec gdebi -n /tmp/spark-store/"+ui->label_filename->text().toUtf8());
break;
}
}else {
switch (t) {
case 0:
installer.start("pkexec gdebi -n /tmp/spark-store/"+ui->label_filename->text().toUtf8());
break;
case 1:
installer.start("pkexec ssinstall /tmp/spark-store/"+ui->label_filename->text().toUtf8());
break;
case 2:
case 1:
installer.start("deepin-deb-installer /tmp/spark-store/"+ui->label_filename->text().toUtf8());
break;
case 2:
installer.start("pkexec gdebi -n /tmp/spark-store/"+ui->label_filename->text().toUtf8());
break;
}
}
bool haveError=false;

223
src/flowlayout.cpp Normal file
View File

@@ -0,0 +1,223 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtWidgets>
#include "flowlayout.h"
//! [1]
FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing)
: QLayout(parent), m_hSpace(hSpacing), m_vSpace(vSpacing)
{
setContentsMargins(margin, margin, margin, margin);
}
FlowLayout::FlowLayout(int margin, int hSpacing, int vSpacing)
: m_hSpace(hSpacing), m_vSpace(vSpacing)
{
setContentsMargins(margin, margin, margin, margin);
}
//! [1]
//! [2]
FlowLayout::~FlowLayout()
{
QLayoutItem *item;
while ((item = takeAt(0)))
delete item;
}
//! [2]
//! [3]
void FlowLayout::addItem(QLayoutItem *item)
{
itemList.append(item);
}
//! [3]
//! [4]
int FlowLayout::horizontalSpacing() const
{
if (m_hSpace >= 0) {
return m_hSpace;
} else {
return smartSpacing(QStyle::PM_LayoutHorizontalSpacing);
}
}
int FlowLayout::verticalSpacing() const
{
if (m_vSpace >= 0) {
return m_vSpace;
} else {
return smartSpacing(QStyle::PM_LayoutVerticalSpacing);
}
}
//! [4]
//! [5]
int FlowLayout::count() const
{
return itemList.size();
}
QLayoutItem *FlowLayout::itemAt(int index) const
{
return itemList.value(index);
}
QLayoutItem *FlowLayout::takeAt(int index)
{
if (index >= 0 && index < itemList.size())
return itemList.takeAt(index);
else
return 0;
}
//! [5]
//! [6]
Qt::Orientations FlowLayout::expandingDirections() const
{
return 0;
}
//! [6]
//! [7]
bool FlowLayout::hasHeightForWidth() const
{
return true;
}
int FlowLayout::heightForWidth(int width) const
{
int height = doLayout(QRect(0, 0, width, 0), true);
return height;
}
//! [7]
//! [8]
void FlowLayout::setGeometry(const QRect &rect)
{
QLayout::setGeometry(rect);
doLayout(rect, false);
}
QSize FlowLayout::sizeHint() const
{
return minimumSize();
}
QSize FlowLayout::minimumSize() const
{
QSize size;
QLayoutItem *item;
foreach (item, itemList)
size = size.expandedTo(item->minimumSize());
size += QSize(2*margin(), 2*margin());
return size;
}
//! [8]
//! [9]
int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
{
int left, top, right, bottom;
getContentsMargins(&left, &top, &right, &bottom);
QRect effectiveRect = rect.adjusted(+left, +top, -right, -bottom);
int x = effectiveRect.x();
int y = effectiveRect.y();
int lineHeight = 0;
//! [9]
//! [10]
QLayoutItem *item;
foreach (item, itemList) {
QWidget *wid = item->widget();
int spaceX = horizontalSpacing();
if (spaceX == -1)
spaceX = wid->style()->layoutSpacing(
QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Horizontal);
int spaceY = verticalSpacing();
if (spaceY == -1)
spaceY = wid->style()->layoutSpacing(
QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Vertical);
//! [10]
//! [11]
int nextX = x + item->sizeHint().width() + spaceX;
if (nextX - spaceX > effectiveRect.right() && lineHeight > 0) {
x = effectiveRect.x();
y = y + lineHeight + spaceY;
nextX = x + item->sizeHint().width() + spaceX;
lineHeight = 0;
}
if (!testOnly)
item->setGeometry(QRect(QPoint(x, y), item->sizeHint()));
x = nextX;
lineHeight = qMax(lineHeight, item->sizeHint().height());
}
return y + lineHeight - rect.y() + bottom;
}
//! [11]
//! [12]
int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const
{
QObject *parent = this->parent();
if (!parent) {
return -1;
} else if (parent->isWidgetType()) {
QWidget *pw = static_cast<QWidget *>(parent);
return pw->style()->pixelMetric(pm, 0, pw);
} else {
return static_cast<QLayout *>(parent)->spacing();
}
}
//! [12]

88
src/flowlayout.h Normal file
View File

@@ -0,0 +1,88 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef FLOWLAYOUT_H
#define FLOWLAYOUT_H
#include <QLayout>
#include <QRect>
#include <QStyle>
//! [0]
class FlowLayout : public QLayout
{
public:
explicit FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1);
explicit FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1);
~FlowLayout();
void addItem(QLayoutItem *item) override;
int horizontalSpacing() const;
int verticalSpacing() const;
Qt::Orientations expandingDirections() const override;
bool hasHeightForWidth() const override;
int heightForWidth(int) const override;
int count() const override;
QLayoutItem *itemAt(int index) const override;
QSize minimumSize() const override;
void setGeometry(const QRect &rect) override;
QSize sizeHint() const override;
QLayoutItem *takeAt(int index) override;
private:
int doLayout(const QRect &rect, bool testOnly) const;
int smartSpacing(QStyle::PixelMetric pm) const;
QList<QLayoutItem *> itemList;
int m_hSpace;
int m_vSpace;
};
//! [0]
#endif // FLOWLAYOUT_H

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);

90
src/main.cpp Normal file
View File

@@ -0,0 +1,90 @@
#include <DApplication>
#include <DWidgetUtil> //Dtk::Widget::moveToCenter(&w); 要调用它就得引用DWidgetUtil
#include <QDesktopWidget>
#include <widget.h>
#include <QTranslator>
#include <DAboutDialog>
#include "appitem.h"
DWIDGET_USE_NAMESPACE
int main(int argc, char *argv[])
{
DApplication::loadDXcbPlugin(); //让bar处在标题栏中
DApplication a(argc, argv);
a.setAttribute(Qt::AA_UseHighDpiPixmaps);
a.loadTranslator();//载入翻译
/* Customized DAboutDialog (Can't work on other distro like Ubuntu...)
*
* DAboutDialog dialog;
* a.setAboutDialog(&dialog);
* dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
* dialog.setVersion(DApplication::buildVersion("Version 2.0.2.5"));
* dialog.setProductIcon(QIcon::fromTheme("spark-store")); //设置Logo
* dialog.setProductName(QLabel::tr("Spark Store"));
* 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>"
* )
* );
* dialog.setProductName(QLabel::tr("Spark Store"));
* dialog.setCompanyLogo(QPixmap(":/Logo-Spark.png"));
* dialog.setWebsiteName(QObject::tr("The Spark Project"));
* dialog.setWebsiteLink("https://gitee.com/deepin-community-store");
*/
a.setProductName(QLabel::tr("Spark Store"));
a.setProductIcon(QIcon::fromTheme("spark-store")); //设置Logo
a.setOrganizationName("spark-union");
a.setOrganizationDomain("https://www.deepinos.org/");
a.setApplicationName("Spark Store"); //不需要翻译,否则 ~/.local/share/ 下文件夹名称也被翻译为中文
a.setApplicationVersion(DApplication::buildVersion("3.0~alpha2"));
a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/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/><br/>"
"Published under GPL V3"
)
);
Widget w;
QDesktopWidget *s=DApplication::desktop();
int d_w=s->width();
int d_h=s->height();
if(d_w<=1366){
w.setMinimumWidth(925);
w.resize(925,650);
}else if(d_w<=1920){
w.setMinimumWidth(1180);
w.resize(1180,760);
}else {
w.setMinimumWidth(1180);
w.resize(1180,760);
}
if(d_h<=768){
w.setMinimumHeight(650);
w.resize(925,650);
}else if(d_h<=1080){
w.setMinimumHeight(760);
w.resize(1180,760);
}else {
w.setMinimumHeight(760);
w.resize(1180,760);
}
QString arg1=argv[1];
if(arg1.left(6)=="spk://"){
w.openUrl(QUrl(argv[1]));
}
//让打开时界面显示在正中
Dtk::Widget::moveToCenter(&w);
w.show();
return a.exec();
}

View File

@@ -7,11 +7,9 @@
QT += core gui network concurrent webenginewidgets
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TRANSLATIONS = ./trans/spark-store_en.ts \
./trans/spark-store_zh_CN.ts
CONFIG += link_pkgconfig
PKGCONFIG += dtkwidget
CONFIG += c++11 link_pkgconfig
PKGCONFIG += dtkwidget glib-2.0 gdk-pixbuf-2.0 libnotify
TARGET = spark-store
TEMPLATE = app
@@ -27,43 +25,53 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += main.cpp\
appitem.cpp \
widget.cpp \
downloadlist.cpp \
image_show.cpp \
big_image.cpp \
progressload.cpp
progressload.cpp \
flowlayout.cpp \
workerthreads.cpp
HEADERS += \
appitem.h \
widget.h \
downloadlist.h \
image_show.h \
big_image.h \
progressload.h
CONFIG += c++11
progressload.h \
flowlayout.h \
workerthreads.h
FORMS += \
appitem.ui \
widget.ui \
downloadlist.ui
RESOURCES += \
icons.qrc
../assets/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
../assets/tags/a2d-small.png \
../assets/tags/a2d.png \
../assets/tags/community-small.png \
../assets/tags/community.png \
../assets/tags/deepin-small.png \
../assets/tags/dtk-small.png \
../assets/tags/ubuntu-small.png \
../assets/tags/ubuntu.png \
../assets/tags/uos-small.png \
../assets/tags/community.svg \
../assets/tags/deepin.svg \
../assets/tags/logo_icon.svg \
../assets/tags/uos.svg
TRANSLATIONS = ../translations/spark-store_en.ts \
../translations/spark-store_zh_CN.ts
../translations/spark-store_fr.ts\
DEFINES += QT_APP_DEBUG
include(../third-party/QtNetworkService/QtNetworkService.pri)

View File

@@ -1,3 +1,4 @@
#include <libnotify/notify.h>
#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
@@ -8,8 +9,8 @@
#include <fstream>
#include <QDir>
#include <QProcess>
#include <QJsonDocument>
#include <QFile>
#include <QJsonDocument>
#include <QJsonObject>
#include <QByteArray>
#include <QPixmap>
@@ -27,9 +28,14 @@
#include <QClipboard>
#include <DApplication>
#include <DGuiApplicationHelper>
#include <DPushButton>
#include <QPushButton>
#include "HttpClient.h"
#include "appitem.h"
#include "flowlayout.h"
DWIDGET_USE_NAMESPACE
Widget::Widget(DBlurEffectWidget *parent) :
DBlurEffectWidget(parent),
ui(new Ui::Widget)
@@ -41,31 +47,40 @@ Widget::Widget(DBlurEffectWidget *parent) :
m_loadweb=ui->progressload;
m_loadweb->show();
connect(ui->menu_main,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(0);});
connect(ui->menu_network,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(1);});
connect(ui->menu_chat,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(2);});
connect(ui->menu_music,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(3);});
connect(ui->menu_video,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(4);});
connect(ui->menu_photo,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(5);});
connect(ui->menu_game,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(6);});
connect(ui->menu_office,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(7);});
connect(ui->menu_read,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(8);});
connect(ui->menu_dev,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(9);});
connect(ui->menu_system,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(10);});
connect(ui->menu_theme,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(11);});
connect(ui->menu_other,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(12);});
connect(ui->menu_download,&DPushButton::clicked,[=](){Widget::chooseLeftMenu(13);});
httpClient = new AeaQt::HttpClient;
connect(ui->menu_main,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(0);});
connect(ui->menu_network,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(1);});
connect(ui->menu_chat,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(2);});
connect(ui->menu_music,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(3);});
connect(ui->menu_video,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(4);});
connect(ui->menu_photo,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(5);});
connect(ui->menu_game,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(6);});
connect(ui->menu_office,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(7);});
connect(ui->menu_read,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(8);});
connect(ui->menu_dev,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(9);});
connect(ui->menu_system,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(10);});
connect(ui->menu_theme,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(11);});
connect(ui->menu_other,&QPushButton::clicked,[=](){Widget::chooseLeftMenu(12);});
connect(ui->menu_download,&QPushButton::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,[=](){
connect(searchEdit,&DSearchEdit::returnPressed ,this,[=](){
qDebug() << "触发了搜索,呜啦啦啦!";
QString searchtext=searchEdit->text();
if(searchtext!=""){
qDebug()<<searchEdit->text();
searchApp(searchtext);
}
searchEdit->clearEdit();
this->setFocus();
});
connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [=](DGuiApplicationHelper::ColorType themeType) {
@@ -103,11 +118,13 @@ Widget::Widget(DBlurEffectWidget *parent) :
}
});
notify_init(tr("Spark\\ Store").toLocal8Bit());
}
Widget::~Widget()
{
notify_uninit();
delete ui;
qDebug()<<"exit";
DApplication::quit();
@@ -126,6 +143,8 @@ 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);
@@ -158,9 +177,19 @@ void Widget::initUI()
menu->addAction(setting);
menu->addAction(actionSubmission);
titlebar->setMenu(menu);
connect(actionSubmission, &QAction::triggered, this,
[=](){QDesktopServices::openUrl(QUrl("https://upload.spark-app.store/"));});
connect(setting,&QAction::triggered,this,&Widget::opensetting);
connect(actionSubmission, &QAction::triggered, this, [ = ] () {
QDesktopServices::openUrl(QUrl("https://upload.spark-app.store/"));
});
connect(setting, &QAction::triggered, this, &Widget::opensetting);
// 载入自定义字体
int loadedFontID = QFontDatabase::addApplicationFont(":/fonts/fonts/华康少女字体.ttf");
QStringList loadedFontFamilies = QFontDatabase::applicationFontFamilies(loadedFontID);
if(!loadedFontFamilies.isEmpty())
font = loadedFontFamilies.at(0);
/* 全局字体设置
* DApplication::setFont(font);
*/
// 初始化菜单数组
left_list[0]=ui->menu_main;
@@ -178,9 +207,10 @@ void Widget::initUI()
left_list[12]=ui->menu_other;
left_list[13]=ui->menu_download;
ui->label_show->hide();
// 搜索列表页
applist_grid = new FlowLayout;
}
void Widget::initConfig()
@@ -201,9 +231,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 +253,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++){
@@ -261,7 +291,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 +302,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"));
@@ -283,28 +313,39 @@ void Widget::setTheme(bool isDark,QColor color)
if(ui->stackedWidget->currentIndex()==0){
chooseLeftMenu(nowMenu);
}
}
DTitlebar* Widget::getTitlebar()
{
return ui->titlebar;
return ui->titlebar;
}
static NotifyNotification *_notify = nullptr;
void Widget::sendNotification(const QString &message, const int msTimeout, const QString &icon)
{
system((QString("notify-send --icon=%1 --expire-time=%2 --app-name=").arg(icon).arg(msTimeout) +
tr("Spark\\ Store") +
" '" + message + "'"
).toUtf8());
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)
{
system((QString("notify-send --icon=%1 --expire-time=%2 --app-name=").arg(icon).arg(msTimeout) +
tr("Spark\\ Store") +
" '" + message + "'"
).toUtf8());
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()
@@ -341,16 +382,32 @@ void Widget::updateUI()
left_list[13]->setIcon(QIcon(":/icons/icons/downloads-symbolic.svg"));
}
for (int i=0;i<14;i++) {
left_list[i]->setFont(QFont("",11));
/* 设置左侧菜单字体
* QFont temp = font;
* temp.setPixelSize(15);
* left_list[i]->setFont(temp);
*/
left_list[i]->setFixedHeight(38);
if(themeIsDark){
left_list[i]->setStyleSheet("color:#FFFFFF;border:0px");
// 中文环境菜单文字居中,其他则左对齐
if(QLocale::system().name() == "zh_CN")
left_list[i]->setStyleSheet("color:#FFFFFF;border:0px;");
else
left_list[i]->setStyleSheet("color:#FFFFFF;border:0px;text-align:left;padding-left:15px;");
}else {
left_list[i]->setStyleSheet("color:#252525;border:0px");
if(QLocale::system().name() == "zh_CN")
left_list[i]->setStyleSheet("color:#252525;border:0px;");
else
left_list[i]->setStyleSheet("color:#252525;border:0px;text-align:left;padding-left:15px;");
}
}
left_list[nowMenu]->setStyleSheet("color:#FFFFFF;background-color:"+main_color.name()+";border-radius:8;border:0px");
if(QLocale::system().name() == "zh_CN")
left_list[nowMenu]->setStyleSheet("color:#FFFFFF;background-color:"+main_color.name()+";border-radius:8;border:0px;");
else
left_list[nowMenu]->setStyleSheet("color:#FFFFFF;background-color:"+main_color.name()+";border-radius:8;border:0px;text-align:left;padding-left:15px;");
switch (nowMenu) {
case 0:
left_list[0]->setIcon(QIcon(":/icons/icons/homepage_dark.svg"));
@@ -402,8 +459,16 @@ void Widget::chooseLeftMenu(int index)
{
nowMenu=index;
// 菜单切换时,清除搜索栏的内容
if (!searchEdit->text().isEmpty()) {
searchEdit->clear();
}
updateUI();
left_list[index]->setStyleSheet("color:#FFFFFF;background-color:"+main_color.name()+";border-radius:8;border:0px");
if(QLocale::system().name() == "zh_CN")
left_list[index]->setStyleSheet("color:#FFFFFF;background-color:"+main_color.name()+";border-radius:8;border:0px;");
else
left_list[index]->setStyleSheet("color:#FFFFFF;background-color:"+main_color.name()+";border-radius:8;border:0px;text-align:left;padding-left:15px;");
if(index<=12){
if(themeIsDark){
QString darkurl=menuUrl[index].toString();
@@ -425,6 +490,7 @@ void Widget::chooseLeftMenu(int index)
}else if (index==13) {
ui->stackedWidget->setCurrentIndex(1);
}
}
void Widget::setfoot(int h)
@@ -477,7 +543,7 @@ int Widget::loadappinfo(QUrl arg1)
get_json.waitForFinished();
if(get_json.exitCode())
{
sendNotification(tr("Failed to download app info. Please check internet connection."));
sendNotification(tr("Failed to download app info. Please check internet connection."));
}
QFile app_json("app.json");
@@ -560,25 +626,21 @@ 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);
ui->pushButton->setEnabled(true);
ui->pushButton_translate->setEnabled(true);
ui->pushButton_website->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
sendNotification(tr("Failed to load application icon."));
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++) {
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);
@@ -587,6 +649,7 @@ int Widget::loadappinfo(QUrl arg1)
if(s){
label_screen[i]->setImage(screen[i]);
label_screen[i]->show();
/*
switch(i){ // 故意为之,为了清除多余截图
case 0:
label_screen[1]->hide();
@@ -596,7 +659,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;
@@ -664,13 +728,90 @@ void Widget::searchApp(QString text)
{
if(text.left(6)=="spk://"){
openUrl(text);
searchEdit->clearEdit();
}else {
sendNotification(tr("Spark store could only process spk:// links for now. The search feature is coming soon!"));
// 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);
// 禁止同时进行多次搜索
if(!mutex.tryLock())
return;
// 关键字搜索处理
httpClient->get("https://search.deepinos.org.cn/appinfo/search")
.header("content-type", "application/json")
.queryParam("keyword", text)
.onResponse([this](QByteArray result) {
auto json = QJsonDocument::fromJson(result).array();
if (json.empty()) {
qDebug() << "相关应用未找到!";
sendNotification(tr("Relative apps Not Found!"));
mutex.unlock();
return;
}
displaySearchApp(json);
})
.onError([this](QString errorStr) {
qDebug() << "请求出错:" << errorStr;
sendNotification(QString(tr("Request Error: %1")).arg(errorStr));
mutex.unlock();
return;
})
.timeout(10 * 1000)
.exec();
}
}
/**
* @brief APP信息
*/
void Widget::displaySearchApp(QJsonArray array)
{
ui->stackedWidget->setCurrentIndex(4);
// 清除原有的搜索结果
QLayoutItem *item;
while ((item = applist_grid->takeAt(0)) != nullptr) {
item->widget()->disconnect();
delete item->widget();
delete item;
}
item = nullptr;
for(int i = 0; i < array.size(); i++)
{
QJsonObject appInfo = array.at(i).toObject();
AppItem *appItem = new AppItem(this);
QString url = QString("spk://store/%1/%2")
.arg(appInfo["category_slug"].toString())
.arg(appInfo["pkgname"].toString());
appItem->setTitle(appInfo["name"].toString());
appItem->setDescription(appInfo["more"].toString());
appItem->setIcon(appInfo["icon"].toString());
appItem->setUrl(url);
applist_grid->addWidget(appItem);
qDebug() << "应用链接为:" << url;
connect(appItem, &AppItem::clicked, this, &Widget::openUrl);
connect(appItem, &AppItem::finished, this, [=](){
count++;
downloadIconsFinished(array.size());
});
}
ui->applist_scrollarea->widget()->setLayout(applist_grid);
}
void Widget::downloadIconsFinished(int arraysize)
{
// 当前搜索列表图标全部加载完成后才允许下一次搜索
if(count == arraysize)
{
count = 0;
mutex.unlock();
}
ui->applist_scrollarea->widget()->setLayout(applist_grid);
}
void Widget::httpReadyRead()
{
if(file)
@@ -691,6 +832,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();
@@ -727,7 +973,18 @@ void Widget::on_pushButton_return_clicked()
// chooseLeftMenu(13);
// return;
// }
chooseLeftMenu(nowMenu);
appinfoLoadThread.requestInterruption();
// 检测是否是从搜索页面进入到应用详情页的,根据搜索栏是否有关键词判断
if (searchEdit->text().isEmpty()) {
ui->webEngineView->back();
ui->stackedWidget->setCurrentIndex(0);
} else {
ui->stackedWidget->setCurrentIndex(4);
}
// chooseLeftMenu(nowMenu);
// if(themeIsDark){
// QString darkurl=menuUrl[nowMenu].toString();
// QStringList tmp=darkurl.split("/");
@@ -746,13 +1003,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);
@@ -785,70 +1043,70 @@ void Widget::on_pushButton_updateServer_clicked()
void Widget::on_pushButton_updateApt_clicked()
{
QtConcurrent::run([=](){
ui->pushButton_updateApt->setEnabled(false);
ui->label_aptserver->setText(tr("Updating, please wait..."));
ui->pushButton_updateApt->setEnabled(false);
ui->label_aptserver->setText(tr("Updating, please wait..."));
std::fstream sourcesList, policy, update;
QDir tmpdir("/tmp");
auto tmpPath = QString::fromUtf8(TMP_PATH).toStdString();
bool unknownError = 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弃用
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();
if(sourcesList /*&& policy*/) {
auto serverAddr = ui->comboBox_server->currentText();
sourcesList << "deb [by-hash=force] ";
sourcesList << serverAddr.toUtf8().toStdString();
sourcesList << " /";
sourcesList.close();
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();
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();
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;
}
}
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(!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!"));
}
if(unknownError) {
ui->label_aptserver->setText(tr("Unknown error!"));
}
ui->pushButton_updateApt->setEnabled(true);
ui->pushButton_updateApt->setEnabled(true);
});
}
@@ -858,7 +1116,7 @@ void Widget::on_pushButton_uninstall_clicked()
ui->pushButton_download->setEnabled(false);
ui->pushButton_uninstall->setEnabled(false);
QProcess uninstall;
uninstall.start("pkexec apt purge -y "+pkgName);
uninstall.start("pkexec apt purge -y "+pkgName.toLower());
uninstall.waitForFinished();
ui->pushButton_download->setEnabled(true);
ui->pushButton_download->setText("Install");
@@ -931,7 +1189,8 @@ void Widget::opensetting()
void Widget::openUrl(QUrl u)
{
QString app=serverUrl + "store"+u.path()+"/app.json";
ui->webEngineView->setUrl(app);
// ui->webEngineView->setUrl(app);
emit ui->webEngineView->urlChanged(app);
}
void Widget::on_pushButton_website_clicked()
@@ -983,10 +1242,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);
});
*/
appinfoLoadThread.requestInterruption();
appinfoLoadThread.wait(100);
appinfoLoadThread.setUrl(arg1);
appinfoLoadThread.start();
}
}
@@ -1009,7 +1274,7 @@ 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();

View File

@@ -13,6 +13,10 @@
#include <QFutureWatcher>
#include <QToolButton>
#include <QTimer>
#include <QJsonArray>
#include <QFontDatabase>
#include <QMutex>
#include <DSettings>
#include <DBlurEffectWidget>
#include <DSpinner>
@@ -21,6 +25,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"
@@ -30,6 +37,11 @@ class Widget;
}
class FlowLayout;
namespace AeaQt {
class HttpClient;
}
class Widget : public DBlurEffectWidget
{
@@ -56,6 +68,20 @@ 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 displaySearchApp(QJsonArray array); // 展示搜索的APP信息
void downloadIconsFinished(int arraysize); // 当前搜索列表图标是否下载完成
void on_pushButton_download_clicked();
void on_pushButton_return_clicked();
void on_comboBox_server_currentIndexChanged(const QString &arg1);
@@ -90,7 +116,7 @@ public:
QString appweb;
bool themeIsDark;
QFont font;
private:
void initUI();
@@ -125,6 +151,14 @@ private:
DSearchEdit *searchEdit=new DSearchEdit;
DTitlebar *titlebar;
int count = 0; // 记录当前搜索列表下载图标完成的个数
QMutex mutex; // 禁止多次搜索事件同时发生
QList<image_show*> label_screen;
SpkAppInfoLoaderThread appinfoLoadThread;
AeaQt::HttpClient *httpClient;
FlowLayout *applist_grid;
};
#endif // WIDGET_H

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1053</width>
<height>674</height>
<height>711</height>
</rect>
</property>
<property name="windowTitle">
@@ -29,6 +29,38 @@
<property name="spacing">
<number>0</number>
</property>
<item row="1" column="1">
<widget class="ProgressLoad" name="progressload" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>3</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>3</height>
</size>
</property>
<property name="toolTipDuration">
<number>-1</number>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="DTitlebar" name="titlebar" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="4">
<widget class="QWidget" name="widget_menuList" native="true">
<property name="minimumSize">
@@ -61,33 +93,21 @@
<property name="rightMargin">
<number>5</number>
</property>
<item row="6" column="0" colspan="6">
<widget class="QPushButton" name="menu_video">
<property name="text">
<string>Videos</string>
<item row="1" column="0">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="16" column="0" colspan="6">
<widget class="QPushButton" name="menu_download">
<property name="text">
<string>Download List</string>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
</widget>
</item>
<item row="12" column="0" colspan="6">
<widget class="QPushButton" name="menu_system">
<property name="text">
<string>Tools</string>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item row="13" column="0" colspan="6">
<widget class="QPushButton" name="menu_theme">
<property name="text">
<string>Beautify</string>
</property>
</widget>
</spacer>
</item>
<item row="5" column="0" colspan="6">
<widget class="QPushButton" name="menu_music">
@@ -96,6 +116,20 @@
</property>
</widget>
</item>
<item row="7" column="0" colspan="6">
<widget class="QPushButton" name="menu_photo">
<property name="text">
<string>Graphics</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="6">
<widget class="QPushButton" name="menu_dev">
<property name="text">
<string>Development</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="icon">
<property name="minimumSize">
@@ -115,22 +149,6 @@
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="5">
<spacer name="horizontalSpacer_8">
<property name="orientation">
@@ -147,10 +165,30 @@
</property>
</spacer>
</item>
<item row="11" column="0" colspan="6">
<widget class="QPushButton" name="menu_dev">
<item row="0" column="2">
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="12" column="0" colspan="6">
<widget class="QPushButton" name="menu_system">
<property name="text">
<string>Development</string>
<string>Tools</string>
</property>
</widget>
</item>
<item row="10" column="0" colspan="6">
<widget class="QPushButton" name="menu_read">
<property name="text">
<string>Reading</string>
</property>
</widget>
</item>
@@ -161,6 +199,33 @@
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="pushButton_refresh">
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Reload</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../assets/icons.qrc">
<normaloff>:/icons/icons/refresh-page.svg</normaloff>:/icons/icons/refresh-page.svg</iconset>
</property>
</widget>
</item>
<item row="4" column="0" colspan="6">
<widget class="QPushButton" name="menu_chat">
<property name="text">
<string>Chat</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QPushButton" name="pushButton_return">
<property name="maximumSize">
@@ -176,7 +241,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<iconset resource="../assets/icons.qrc">
<normaloff>:/icons/icons/category_active.svg</normaloff>:/icons/icons/category_active.svg</iconset>
</property>
</widget>
@@ -194,10 +259,24 @@
</property>
</spacer>
</item>
<item row="10" column="0" colspan="6">
<widget class="QPushButton" name="menu_read">
<item row="13" column="0" colspan="6">
<widget class="QPushButton" name="menu_theme">
<property name="text">
<string>Translate</string>
<string>Beautify</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="6">
<widget class="QPushButton" name="menu_network">
<property name="text">
<string>Network</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="6">
<widget class="QPushButton" name="menu_game">
<property name="text">
<string>Games</string>
</property>
</widget>
</item>
@@ -211,41 +290,27 @@
<item row="2" column="0" colspan="6">
<widget class="QPushButton" name="menu_main">
<property name="styleSheet">
<string notr="true"/>
<string notr="true">font: 11pt &quot;Zeniq&quot;;</string>
</property>
<property name="text">
<string>Home </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">
<item row="16" column="0" colspan="6">
<widget class="QPushButton" name="menu_download">
<property name="text">
<string>Graphics</string>
<string>Download</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="6">
<widget class="QPushButton" name="menu_game">
<item row="6" column="0" colspan="6">
<widget class="QPushButton" name="menu_video">
<property name="text">
<string>Games</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="6">
<widget class="QPushButton" name="menu_chat">
<property name="text">
<string>Communication</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="6">
<widget class="QPushButton" name="menu_network">
<property name="text">
<string>Network</string>
<string>Video</string>
</property>
</widget>
</item>
@@ -268,39 +333,6 @@
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="pushButton_refresh">
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Reload</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/icons/refresh-page.svg</normaloff>:/icons/icons/refresh-page.svg</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -313,7 +345,7 @@
<number>0</number>
</property>
<property name="currentIndex">
<number>2</number>
<number>4</number>
</property>
<widget class="QWidget" name="page">
<layout class="QVBoxLayout" name="verticalLayout_4">
@@ -333,11 +365,11 @@
<number>0</number>
</property>
<item>
<widget class="QWebEngineView" name="webEngineView">
<widget class="QWebEngineView" name="webEngineView" native="true">
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="url">
<property name="url" stdset="0">
<url>
<string>about:blank</string>
</url>
@@ -457,8 +489,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>903</width>
<height>849</height>
<width>889</width>
<height>854</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_17">
@@ -952,8 +984,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>869</width>
<height>325</height>
<width>851</width>
<height>323</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
@@ -1082,8 +1114,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>738</width>
<height>896</height>
<width>889</width>
<height>858</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_23">
@@ -1150,7 +1182,7 @@
</size>
</property>
<property name="text">
<string>Take effect when restart </string>
<string>Take effect when restart</string>
</property>
</widget>
</item>
@@ -1354,38 +1386,48 @@
</item>
</layout>
</widget>
</widget>
</item>
<item row="0" column="1">
<widget class="DTitlebar" name="titlebar" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="ProgressLoad" name="progressload" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>3</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>3</height>
</size>
</property>
<property name="toolTipDuration">
<number>-1</number>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<widget class="QWidget" name="applist_page">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="applist_scrollarea">
<property name="enabled">
<bool>true</bool>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="applist_scrollAreaWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>903</width>
<height>681</height>
</rect>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
@@ -1416,7 +1458,7 @@
</customwidget>
</customwidgets>
<resources>
<include location="icons.qrc"/>
<include location="../assets/icons.qrc"/>
</resources>
<connections/>
</ui>

152
src/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
src/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

View File

@@ -1,2 +1,3 @@
#!/bin/sh
dpkg -i $1 || apt install -yf || dpkg -P $1

View File

@@ -0,0 +1,42 @@
/**********************************************************
Author: Qt君
微信公众号: Qt君(文章首发)
Website: qtbig.com(后续更新)
Email: 2088201923@qq.com
QQ交流群: 732271126
LISCENSE: MIT
**********************************************************/
#include "HttpClient.h"
#include <QJsonObject>
#include <QJsonDocument>
#include <QBuffer>
using namespace AeaQt;
HttpClient::HttpClient()
{
}
HttpClient::~HttpClient()
{
}
HttpRequest HttpClient::get(const QString &url)
{
return HttpRequest(QNetworkAccessManager::GetOperation, this).url(url);
}
HttpRequest HttpClient::post(const QString &url)
{
return HttpRequest(QNetworkAccessManager::PostOperation, this).url(url);
}
HttpRequest HttpClient::put(const QString &url)
{
return HttpRequest(QNetworkAccessManager::PutOperation, this).url(url);
}
HttpRequest HttpClient::send(const QString &url, QNetworkAccessManager::Operation op)
{
return HttpRequest(op, this).url(url);
}

View File

@@ -0,0 +1,36 @@
/**********************************************************
Author: Qt君
微信公众号: Qt君(文章首发)
Website: qtbig.com(后续更新)
Email: 2088201923@qq.com
QQ交流群: 732271126
LISCENSE: MIT
**********************************************************/
#ifndef HTTP_CLIENT_H
#define HTTP_CLIENT_H
#include "HttpRequest.h"
#include "HttpResponse.h"
#include <QNetworkRequest>
#include <QNetworkReply>
namespace AeaQt {
class HttpClient : public QNetworkAccessManager
{
Q_OBJECT
public:
friend class HttpRequest;
HttpClient();
~HttpClient();
HttpRequest get(const QString &url);
HttpRequest post(const QString &url);
HttpRequest put(const QString &url);
HttpRequest send(const QString &url, Operation op = GetOperation);
};
}
#endif

View File

@@ -0,0 +1,268 @@
/**********************************************************
Author: Qt君
微信公众号: Qt君(文章首发)
Website: qtbig.com(后续更新)
Email: 2088201923@qq.com
QQ交流群: 732271126
LISCENSE: MIT
**********************************************************/
#include "HttpRequest.h"
#include "HttpClient.h"
#include <QJsonDocument>
#include <QUrlQuery>
#include <QBuffer>
#include <QMetaEnum>
using namespace AeaQt;
static const char *s_httpOperation[] = {
"UnknownOperation",
"HeadOperation",
"GetOperation",
"PutOperation",
"PostOperation",
"DeleteOperation",
"CustomOperation"
};
HttpRequest::HttpRequest()
{
}
HttpRequest::~HttpRequest()
{
}
HttpRequest::HttpRequest(QNetworkAccessManager::Operation op, HttpClient *jsonHttpClient) :
m_body(QByteArray()),
m_op(op),
m_httpService(jsonHttpClient),
m_timeout(-1)
{
}
HttpRequest &HttpRequest::url(const QString &url)
{
m_networkRequest.setUrl(QUrl(url));
return *this;
}
HttpRequest &HttpRequest::header(const QString &key, const QVariant &value)
{
m_networkRequest.setRawHeader(QByteArray(key.toStdString().data()), QByteArray(value.toString().toStdString().data()));
return *this;
}
HttpRequest &HttpRequest::headers(const QMap<QString, QVariant> &headers)
{
QMapIterator<QString, QVariant> iter(headers);
while (iter.hasNext()) {
iter.next();
header(iter.key(), iter.value());
}
return *this;
}
HttpRequest &HttpRequest::body(const QVariantMap &content)
{
m_body = QJsonDocument(QJsonObject::fromVariantMap(content)).toJson();
return *this;
}
HttpRequest &HttpRequest::body(const QJsonObject &content)
{
m_body = QJsonDocument(QJsonObject::fromVariantMap(content.toVariantMap())).toJson();
return *this;
}
HttpRequest &HttpRequest::body(const QByteArray &content)
{
m_body = content;
return *this;
}
#if 0
HttpRequest &HttpRequest::body(const QVariant &body)
{
/// clear m_jsonBody
m_jsonBody = QJsonObject();
if (type == X_Www_Form_Urlencoded) {
QUrl url;
QUrlQuery urlQuery(url);
if (body.type() == QVariant::Map
|| body.typeName() == QMetaType::typeName(QMetaType::QJsonObject)) {
QMapIterator<QString, QVariant> i(body.toMap());
while (i.hasNext()) {
i.next();
urlQuery.addQueryItem(i.key(), i.value().toString());
}
url.setQuery(urlQuery);
m_body = url.toString(QUrl::FullyEncoded).toUtf8().remove(0, 1);
}
else {
m_body = body.toByteArray();
}
}
else if (type == Raw_Text_Json) {
if (body.type() == QVariant::Map
|| body.typeName() == QMetaType::typeName(QMetaType::QJsonObject)) {
m_body = QJsonDocument(QJsonObject::fromVariantMap(body.toMap())).toJson();
}
else {
log_warning << "This is not data in JSON format(QVariantMap or QJsonObject).";
m_body = QByteArray();
// warning output
}
}
else {
m_body = QByteArray();
log_warning << "Disable body.";
}
log_debugger << "Body Content:" << m_body;
return *this;
}
#endif
HttpRequest &HttpRequest::onResponse(const QObject *receiver, const char *slot, HttpResponse::SupportMethod type)
{
m_slotsMap.insert(type, {slot, QVariant::fromValue((QObject *)receiver)});
return *this;
}
HttpRequest &HttpRequest::onResponse(std::function<void (QNetworkReply *)> lambda)
{
return onResponse(QVariant::fromValue(lambda));
}
HttpRequest &HttpRequest::onResponse(std::function<void (QVariantMap)> lambda)
{
return onResponse(QVariant::fromValue(lambda));
}
HttpRequest &HttpRequest::onResponse(std::function<void (QByteArray)> lambda)
{
return onResponse(QVariant::fromValue(lambda));
}
HttpRequest &HttpRequest::onResponse(std::function<void (qint64, qint64)> lambda)
{
return onResponse(QVariant::fromValue(lambda));
}
HttpRequest &HttpRequest::onError(const QObject *receiver, const char *slot)
{
return onResponse(receiver, slot, HttpResponse::AutoInfer);
}
HttpRequest &HttpRequest::onError(std::function<void (QNetworkReply::NetworkError)> lambda)
{
return onResponse(QVariant::fromValue(lambda));
}
HttpRequest &HttpRequest::onError(std::function<void (QString)> lambda)
{
return onResponse(QVariant::fromValue(lambda));
}
HttpRequest &HttpRequest::onError(std::function<void (QNetworkReply::NetworkError, QNetworkReply *)> lambda)
{
return onResponse(QVariant::fromValue(lambda));
}
HttpRequest &HttpRequest::onError(std::function<void (QString, QNetworkReply *)> lambda)
{
return onResponse(QVariant::fromValue(lambda));
}
HttpRequest &HttpRequest::timeout(const int &msec)
{
m_timeout = msec;
return *this;
}
HttpRequest &HttpRequest::block()
{
m_isBlock = true;
return *this;
}
HttpRequest &HttpRequest::onResponse(QVariant lambda)
{
m_slotsMap.insert(HttpResponse::AutoInfer, {lambda.typeName(), lambda});
return *this;
}
HttpResponse *HttpRequest::exec()
{
QNetworkReply* reply = NULL;
QBuffer* sendBuffer = new QBuffer();
if (! m_body.isEmpty()) {
sendBuffer->setData(m_body);
}
log_debugger << "Http Client info: ";
log_debugger << "Type: " << s_httpOperation[m_op];
log_debugger << "Url: " << m_networkRequest.url().toString();
QString headers;
for (int i = 0; i < m_networkRequest.rawHeaderList().count(); i++) {
QString each = m_networkRequest.rawHeaderList().at(i);
QString header = m_networkRequest.rawHeader(each.toUtf8());
headers += QString("%1: %2;").arg(each)
.arg(header);
}
log_debugger << "Header: " << headers;
log_debugger << "Send buffer(Body):\r\n" << m_body;
reply = m_httpService->createRequest(m_op, m_networkRequest, sendBuffer);
if (reply == NULL) {
sendBuffer->deleteLater();
return NULL;
}
else {
sendBuffer->setParent(reply);
}
return new HttpResponse(reply, m_slotsMap, m_timeout, m_isBlock);
}
HttpRequest &HttpRequest::queryParam(const QString &key, const QVariant &value)
{
QUrl url(m_networkRequest.url());
QUrlQuery urlQuery(url);
urlQuery.addQueryItem(key, value.toString());
url.setQuery(urlQuery);
m_networkRequest.setUrl(url);
return *this;
}
HttpRequest &HttpRequest::queryParams(const QMap<QString, QVariant> &params)
{
QMapIterator<QString, QVariant> iter(params);
while (iter.hasNext()) {
iter.next();
queryParam(iter.key(), iter.value());
}
return *this;
}
HttpRequest &HttpRequest::userAttribute(const QVariant &value)
{
m_networkRequest.setAttribute(QNetworkRequest::User, value);
return *this;
}

View File

@@ -0,0 +1,115 @@
/**********************************************************
Author: Qt君
微信公众号: Qt君(文章首发)
Website: qtbig.com(后续更新)
Email: 2088201923@qq.com
QQ交流群: 732271126
LISCENSE: MIT
**********************************************************/
#ifndef HTTP_REQUEST_H
#define HTTP_REQUEST_H
#include "HttpResponse.h"
#include <QNetworkRequest>
#include <QNetworkAccessManager>
#include <QJsonObject>
#include <QDebug>
namespace AeaQt {
#ifdef QT_APP_DEBUG
#define log_debugger qDebug().noquote().nospace() \
<< "[AeaQt::Network] Debug: -> " \
<< "function: " << __func__ << "; " \
<< "line: " << __LINE__ << "; "
#else
#define log_debugger QString()
#endif
#define log_warning qWarning().noquote().nospace() \
<< "[AeaQt::Network] Warning: -> " \
<< "function: " << __func__ << "; " \
<< "line: " << __LINE__ << "; "
class HttpClient;
class HttpRequest
{
public:
enum BodyType {
None = 0, // This request does not have a body.
X_Www_Form_Urlencoded, // x-www-form-urlencoded
Raw_Text_Json, // application/json
};
explicit HttpRequest(QNetworkAccessManager::Operation op, HttpClient *jsonHttpClient);
virtual ~HttpRequest();
HttpRequest &url(const QString &url);
HttpRequest &header(const QString &key, const QVariant &value);
HttpRequest &headers(const QMap<QString, QVariant> &headers);
HttpRequest &queryParam(const QString &key, const QVariant &value);
HttpRequest &queryParams(const QMap<QString, QVariant> &params);
/* Mainly used for identification */
HttpRequest &userAttribute(const QVariant &value);
HttpRequest &body(const QVariantMap &content);
HttpRequest &body(const QJsonObject &content);
HttpRequest &body(const QByteArray &content);
/*
* @onRespone slot support type: void function(QVariantMap resultMap) OR
* void function(QByteArray resultData) OR
* void function(QNetworkReply* reply)
* note: The same type is only triggered once
*/
HttpRequest &onResponse(const QObject *receiver, const char *slot, HttpResponse::SupportMethod type = HttpResponse::AutoInfer);
HttpRequest &onResponse(std::function<void (QNetworkReply*)> lambda);
HttpRequest &onResponse(std::function<void (QVariantMap)> lambda);
HttpRequest &onResponse(std::function<void (QByteArray)> lambda);
HttpRequest &onResponse(std::function<void (qint64, qint64)> lambda);
/*
* @onError slot support type: void function(QNetworkReply::NetworkError error)
* void function(QString errorString);
* void function(QNetworkReply::NetworkError error, QNetworkReply* reply);
* void function(QString errorString, QNetworkReply* reply);
* note: The same type is only triggered once
*/
HttpRequest &onError(const QObject *receiver, const char *slot);
HttpRequest &onError(std::function<void (QNetworkReply::NetworkError)> lambda);
HttpRequest &onError(std::function<void (QString)> lambda);
HttpRequest &onError(std::function<void (QNetworkReply::NetworkError, QNetworkReply*)> lambda);
HttpRequest &onError(std::function<void (QString, QNetworkReply*)> lambda);
/**
* @brief msec <= 0, disable timeout
* msec > 0, enable timeout
*/
HttpRequest &timeout(const int &msec = -1);
/**
* @brief Block current thread, entering an event loop.
*/
HttpRequest &block();
HttpResponse *exec();
private:
HttpRequest();
HttpRequest &onResponse(QVariant lambda);
private:
QNetworkRequest m_networkRequest;
QByteArray m_body;
QNetworkAccessManager::Operation m_op;
HttpClient *m_httpService;
int m_timeout;
bool m_isBlock;
QMultiMap<HttpResponse::SupportMethod, QPair<QString, QVariant>> m_slotsMap;
};
}
#endif // HTTP_REQUEST_H

View File

@@ -0,0 +1,331 @@
/**********************************************************
Author: Qt君
微信公众号: Qt君(文章首发)
Website: qtbig.com(后续更新)
Email: 2088201923@qq.com
QQ交流群: 732271126
LISCENSE: MIT
**********************************************************/
#include "HttpResponse.h"
#include <QRegExp>
#include <QStringList>
#include <QByteArray>
#include <QNetworkConfigurationManager>
#include <QMetaEnum>
#include <QEventLoop>
#include <QJsonDocument>
#include <QJsonObject>
#define T2S(t) (QString(#t).remove(QRegExp("\\s"))) //type to string
#define _exec(target, type, arg) \
if (target.canConvert<std::function<void (type)> >()) { \
std::function<void (type)> func = target.value<std::function<void (type)> >(); func(arg); \
} \
else
#define _exec2(target, type1, type2, arg1, arg2) \
if (target.canConvert<std::function<void (type1, type2)> >()) { \
std::function<void (type1, type2)> func = target.value<std::function<void (type1, type2)> >(); func(arg1, arg2); \
} else
using namespace AeaQt;
static const QMap<HttpResponse::SupportMethod, QMap<QString, QVariant>> methodParams =
{
{
HttpResponse::onResponse_QNetworkReply_A_Pointer,
{
{"types", QStringList({T2S(QNetworkReply*)})},
{"lambda", T2S(std::function<void (QNetworkReply*)>)},
{"signal", SIGNAL(finished(QNetworkReply*))},
{"isAutoInfer", true}
}
},
{
HttpResponse::onResponse_QByteArray,
{
{"types", QStringList({T2S(QByteArray)})},
{"lambda", T2S(std::function<void (QByteArray)>)},
{"signal", SIGNAL(finished(QByteArray))},
{"isAutoInfer", true}
}
},
{
HttpResponse::onResponse_QVariantMap,
{
{"types", QStringList({T2S(QVariantMap)})},
{"lambda", T2S(std::function<void (QVariantMap)>)},
{"signal", SIGNAL(finished(QVariantMap))},
{"isAutoInfer", true}
}
},
{
HttpResponse::onDownloadProgress_qint64_qint64,
{
{"types", QStringList({T2S(qint64), T2S(qint64)})},
{"lambda", T2S(std::function<void (qint64, qint64)>)},
{"signal", SIGNAL(downloadProgress(qint64, qint64))},
{"isAutoInfer", true}
}
},
{
HttpResponse::onError_QNetworkReply_To_NetworkError,
{
{"types", QStringList({T2S(QNetworkReply::NetworkError)})},
{"lambda", T2S(std::function<void (QNetworkReply::NetworkError)>)},
{"signal", SIGNAL(error(QNetworkReply::NetworkError))},
{"isAutoInfer", true}
}
},
{
HttpResponse::onError_QString,
{
{"types", QStringList({T2S(QString)})},
{"lambda", T2S(std::function<void (QString)>)},
{"signal", SIGNAL(error(QString))},
{"isAutoInfer", true}
}
},
{
HttpResponse::onError_QNetworkReply_To_NetworkError_QNetworkReply_A_Pointer,
{
{"types", QStringList({T2S(QNetworkReply::NetworkError), T2S(QNetworkReply*)})},
{"lambda", T2S(std::function<void (QNetworkReply::NetworkError, QNetworkReply*)>)},
{"signal", SIGNAL(error(QNetworkReply::NetworkError, QNetworkReply*))},
{"isAutoInfer", true}
}
},
{
HttpResponse::onError_QString_QNetworkReply_A_Poniter,
{
{"types", QStringList({T2S(QString), T2S(QNetworkReply*)})},
{"lambda", T2S(std::function<void (QString, QNetworkReply*)>)},
{"signal", SIGNAL(error(QString, QNetworkReply*))},
{"isAutoInfer", true}
}
},
};
static int extractCode(const char *member)
{
/* extract code, ensure QMETHOD_CODE <= code <= QSIGNAL_CODE */
return (((int)(*member) - '0') & 0x3);
}
HttpResponse::HttpResponse(QNetworkReply *networkReply,
const QMultiMap<SupportMethod, QPair<QString, QVariant> > &slotsMap,
const int &timeout,
bool isBlock)
: m_networkReply(networkReply),
m_slotsMap(slotsMap),
QObject(networkReply)
{
slotsMapOperation(m_slotsMap);
new HttpResponseTimeout(networkReply, timeout);
connect(m_networkReply, SIGNAL(finished()), this, SLOT(onFinished()));
connect(m_networkReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onError(QNetworkReply::NetworkError)));
connect(m_networkReply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(onDownloadProgress(qint64, qint64)));
if (isBlock) {
QEventLoop loop;
QObject::connect(m_networkReply, SIGNAL(finished()), &loop, SLOT(quit()));
loop.exec();
}
}
HttpResponse::~HttpResponse()
{
}
QNetworkReply *HttpResponse::networkReply()
{
return m_networkReply;
}
void HttpResponse::onFinished()
{
QNetworkReply *reply = m_networkReply;
if (reply->error() != QNetworkReply::NoError)
return;
if (m_slotsMap.contains(onResponse_QNetworkReply_A_Pointer)) {
_exec(m_slotsMap.value(onResponse_QNetworkReply_A_Pointer).second, QNetworkReply*, reply) {
emit finished(reply);
}
}
else if (m_slotsMap.contains((onResponse_QByteArray))) {
QByteArray result = reply->readAll();
_exec(m_slotsMap.value((onResponse_QByteArray)).second, QByteArray, result) {
emit finished(result);
}
reply->deleteLater();
}
else if (m_slotsMap.contains((onResponse_QVariantMap))) {
QByteArray result = reply->readAll();
QVariantMap resultMap = QJsonDocument::fromJson(result).object().toVariantMap();
_exec(m_slotsMap.value((onResponse_QVariantMap)).second, QVariantMap, resultMap){
emit finished(resultMap);
}
reply->deleteLater();
}
}
void HttpResponse::onError(QNetworkReply::NetworkError error)
{
QNetworkReply *reply = m_networkReply;
const QMetaObject & metaObject = QNetworkReply::staticMetaObject;
QMetaEnum metaEnum = metaObject.enumerator(metaObject.indexOfEnumerator("NetworkError"));
QString errorString = reply->errorString().isEmpty() ? metaEnum.valueToKey(error) : reply->errorString();
if (m_slotsMap.contains((onError_QString_QNetworkReply_A_Poniter))) {
_exec2(m_slotsMap.value((onError_QString_QNetworkReply_A_Poniter)).second, QString, QNetworkReply*, errorString, reply) {
emit this->error(errorString, reply);
}
}
else if (m_slotsMap.contains((onError_QNetworkReply_To_NetworkError_QNetworkReply_A_Pointer))) {
_exec2(m_slotsMap.value((onError_QNetworkReply_To_NetworkError_QNetworkReply_A_Pointer)).second,
QNetworkReply::NetworkError, QNetworkReply*,
error, reply) {
emit this->error(error, reply);
}
}
else if (m_slotsMap.contains((onError_QString))) {
_exec(m_slotsMap.value((onError_QString)).second, QString, errorString) {
emit this->error(errorString);
}
reply->deleteLater();
}
else if (m_slotsMap.contains((onError_QNetworkReply_To_NetworkError))) {
_exec(m_slotsMap.value((onError_QNetworkReply_To_NetworkError)).second, QNetworkReply::NetworkError, error) {
emit this->error(error);
}
reply->deleteLater();
}
}
void HttpResponse::onDownloadProgress(qint64 bytesReceived, qint64 bytesTotal)
{
if (m_slotsMap.contains((onDownloadProgress_qint64_qint64))) {
_exec2(m_slotsMap.value((onDownloadProgress_qint64_qint64)).second, qint64, qint64, bytesReceived, bytesTotal) {
emit downloadProgress(bytesReceived, bytesTotal);
}
}
}
static void extractSlot(const QString &respReceiverSlot, QString &extractSlot, QStringList &extractSlotTypes)
{
QString slot(respReceiverSlot);
if (extractCode(respReceiverSlot.toStdString().data()) == QSLOT_CODE && !slot.isEmpty()) {
slot.remove(0, 1);
QString unconvertedSlotType = slot;
int startIndex = slot.indexOf('(');
int endIndex = slot.indexOf(')');
Q_ASSERT(startIndex != -1 && endIndex != -1);
extractSlot = slot.remove(startIndex, endIndex-startIndex+1);
extractSlotTypes = unconvertedSlotType.mid(startIndex+1, endIndex-startIndex-1)
.remove(QRegExp("\\s"))
.split(',');
}
}
/* from slotMap get [SupportMethod] */
static HttpResponse::SupportMethod getSupportMethod(const QPair<QString, QVariant> &slotMap) {
QMapIterator<HttpResponse::SupportMethod, QMap<QString, QVariant>> iter(methodParams);
QString receiverSlot = slotMap.first;
QString slot;
QStringList slotTypes;
extractSlot(receiverSlot, slot, slotTypes);
while (iter.hasNext()) {
iter.next();
HttpResponse::SupportMethod supportMethod = iter.key();
QMap<QString, QVariant> value = iter.value();
if (slotTypes == value.value("types").toStringList()) {
return supportMethod;
}
else if (receiverSlot == value.value("lambda").toString()) {
return supportMethod;
}
}
return HttpResponse::Invalid;
}
static void autoInfterConvertedSupportMethod(QMultiMap<HttpResponse::SupportMethod, QPair<QString, QVariant> > &unconvertedSlotsMap)
{
QMultiMap<HttpResponse::SupportMethod, QPair<QString, QVariant> > convertedSlotsMap;
QMapIterator<HttpResponse::SupportMethod, QPair<QString, QVariant> > iter(unconvertedSlotsMap);
while (iter.hasNext()) {
iter.next();
const HttpResponse::SupportMethod supportMethod = iter.key();
const QPair<QString, QVariant> slotMap = iter.value();
if (supportMethod == HttpResponse::AutoInfer) {
HttpResponse::SupportMethod supportMethod = getSupportMethod(slotMap);
if (supportMethod == HttpResponse::Invalid) {
qDebug()<<"Not find support Method!"<<slotMap.first;
}
else {
if (methodParams[supportMethod].value("isAutoInfer").toBool())
convertedSlotsMap.insert(supportMethod, slotMap);
else
qDebug()<<"This type["<<methodParams[supportMethod].value("types").toString()<<"] does not support automatic derivation";
}
}
else {
if (methodParams[supportMethod].value("isAutoInfer").toBool())
convertedSlotsMap.insert(supportMethod, slotMap);
else
qDebug()<<"This type["<<methodParams[supportMethod].value("types").toString()<<"] does not support automatic derivation";
}
}
unconvertedSlotsMap = convertedSlotsMap;
}
void HttpResponse::slotsMapOperation(QMultiMap<SupportMethod, QPair<QString, QVariant> > &slotsMap)
{
autoInfterConvertedSupportMethod(slotsMap);
QMapIterator<SupportMethod, QPair<QString, QVariant> > iter(slotsMap);
while (iter.hasNext()) {
iter.next();
SupportMethod supportMethod = iter.key();
const QPair<QString, QVariant> &slotMap = iter.value();
const QString &receiverSlot = slotMap.first;
QVariant target = slotMap.second;
const QObject *receiver = target.value<QObject*>();
if (receiver) {
if (methodParams.contains(supportMethod)) {
connect(this,
methodParams[supportMethod].value("signal").toString().toStdString().data(),
receiver,
receiverSlot.toStdString().data(),
Qt::QueuedConnection);
}
}
}
}
HttpResponse::HttpResponse()
{
}

View File

@@ -0,0 +1,107 @@
/**********************************************************
Author: Qt君
微信公众号: Qt君(文章首发)
Website: qtbig.com(后续更新)
Email: 2088201923@qq.com
QQ交流群: 732271126
LISCENSE: MIT
**********************************************************/
#ifndef HTTP_RESPONSE_H
#define HTTP_RESPONSE_H
#include <QNetworkReply>
#include <QMultiMap>
#include <functional>
#include <QTimer>
namespace AeaQt {
class HttpResponseTimeout : public QObject {
Q_OBJECT
public:
HttpResponseTimeout(QNetworkReply *parent = NULL, const int timeout = -1) : QObject(parent) {
if (timeout > 0)
QTimer::singleShot(timeout, this, SLOT(onTimeout()));
}
private slots:
void onTimeout() {
QNetworkReply *reply = static_cast<QNetworkReply*>(parent());
if (reply->isRunning()) {
reply->abort();
reply->deleteLater();
}
}
};
class HttpResponse : public QObject
{
Q_OBJECT
public:
/*
* Support Reflex Method
* default: AutoInfer
* AutoInfer: Automatic derivation based on type
*/
enum SupportMethod {
Invalid = 0,
AutoInfer,
onResponse_QNetworkReply_A_Pointer, /* method: void function(QNetworkReply* reply); Is_AutoInfer: true */
onResponse_QByteArray, /* method: void function(QByteArray data); Is_AutoInfer: true */
onResponse_QVariantMap, /* method: void function(QVariantMap map); Is_AutoInfer: true */
onDownloadProgress_qint64_qint64, /* method: void function(qint64 bytesReceived, qint64 bytesTotal); Is_AutoInfer: true */
onError_QNetworkReply_To_NetworkError, /* method: void function(QNetworkReply::NetworkError error); Is_AutoInfer: true */
onError_QString, /* method: void function(QString errorString); Is_AutoInfer: true */
onError_QNetworkReply_To_NetworkError_QNetworkReply_A_Pointer, /* method: void function(QNetworkReply::NetworkError error, QNetworkReply* reply); Is_AutoInfer: true */
onError_QString_QNetworkReply_A_Poniter/* method: void function(QString errorString, QNetworkReply* reply); Is_AutoInfer: true */
};
explicit HttpResponse(QNetworkReply *networkReply,
const QMultiMap<SupportMethod, QPair<QString, QVariant> > &slotsMap,
const int &timeout,
bool isBlock);
virtual ~HttpResponse();
QNetworkReply *networkReply();
protected:
void slotsMapOperation(QMultiMap<SupportMethod, QPair<QString, QVariant> > &slotsMap);
signals:
void finished(QNetworkReply *reply);
void finished(QByteArray data);
void finished(QVariantMap map);
void error(QString errorString);
void error(QNetworkReply::NetworkError error);
void error(QString errorString, QNetworkReply *reply);
void error(QNetworkReply::NetworkError error, QNetworkReply *reply);
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
private slots:
void onFinished();
void onError(QNetworkReply::NetworkError error);
void onDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
private:
HttpResponse();
private:
QMultiMap<SupportMethod, QPair<QString, QVariant> > m_slotsMap;
QNetworkReply *m_networkReply;
};
}
Q_DECLARE_METATYPE(std::function<void (QNetworkReply*)>)
Q_DECLARE_METATYPE(std::function<void (QByteArray)>)
Q_DECLARE_METATYPE(std::function<void (QVariantMap)>)
Q_DECLARE_METATYPE(std::function<void (QString)>)
Q_DECLARE_METATYPE(std::function<void (QNetworkReply::NetworkError)>)
Q_DECLARE_METATYPE(std::function<void (QNetworkReply::NetworkError, QNetworkReply *)>)
Q_DECLARE_METATYPE(std::function<void (QString, QNetworkReply *)>)
Q_DECLARE_METATYPE(std::function<void (qint64, qint64)>)
#endif // HTTP_RESPONSE_H

21
third-party/QtNetworkService/LICENSE vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Qt君
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,15 @@
#**********************************************************
#Author: Qt君
#微信公众号: Qt君(文章首发)
#Website: qtbig.com(后续更新)
#Email: 2088201923@qq.com
#QQ交流群: 732271126
#LISCENSE: MIT
#**********************************************************
INCLUDEPATH += $$PWD/
QT += network
!CONFIG(QT_APP_MODE) {
LIBS += -L$$OUT_PWD/../third-party/QtNetworkService/Lib -lQtNetworkService
}

View File

@@ -0,0 +1,37 @@
#**********************************************************
#Author: Qt君
#微信公众号: Qt君(文章首发)
#Website: qtbig.com(后续更新)
#Email: 2088201923@qq.com
#QQ交流群: 732271126
#LISCENSE: MIT
#**********************************************************
CONFIG += c++11
#CONFIG += QT_APP_MODE
DEFINES += QT_APP_DEBUG
QT += network
TEMPLATE = lib
CONFIG += staticlib
unix:TARGET = $$OUT_PWD/Lib/QtNetworkService
win32: {
DESTDIR = $$OUT_PWD/Lib/
TARGET = QtNetworkService
}
message(" ================ QtNetworkService Library ================ ")
SOURCES += \
$$PWD/HttpResponse.cpp \
$$PWD/HttpRequest.cpp \
$$PWD/HttpClient.cpp
HEADERS += \
$$PWD/HttpResponse.h \
$$PWD/HttpRequest.h \
$$PWD/HttpClient.h
include(QtNetworkService.pri)

83
third-party/QtNetworkService/README.md vendored Normal file
View File

@@ -0,0 +1,83 @@
# 示例
(1) 简单示例
* 使用lambda特性
```cpp
static HttpClient http;
http.post("https://example.com")
.header("content-type", "application/json")
.queryParam("key", "Hello world!")
.body(R"({"user": "test"})")
.onResponse([](QByteArray result) { /* 接收数据 */
qDebug() << "Result: " << result;
})
.onResponse([](qint64 recv, qint64 total) { /* 接收进度 */
qDebug() << "Total: " << total << "; Received: " << recv;
})
.onError([](QString errorStr) { /* 错误处理 */
qDebug()<<"Error: "<<errorStr;
})
.timeout(30 * 1000) /* 超时操作(30s) */
.block() /* 阻塞操作 */
.exec();
```
* 使用Qt信号与槽特性
```cpp
http.post("https://example.com")
.header("content-type", "application/json")
.queryParam("key", "Hello world!")
.body(R"({"user": "test"})")
.onResponse(this, SLOT(finish(QByteArray)))
.onResponse(this, SLOT(downloadProgress(qint64, qint64)))
.onError(this, SLOT(error(QString)))
.timeout(30 * 1000) /* 超时操作(30s) */
.block() /* 阻塞操作 */
.exec();
```
(2) 复杂示例
```cpp
/* 获取音乐url功能请求嵌套请求 */
static HttpService http;
http.get("http://mobilecdn.kugou.com/api/v3/search/song")
.queryParam("format", "json")
.queryParam("keyword", "稻香")
.queryParam("page", 1)
.queryParam("pagesize", 3)
.queryParam("showtype", 1)
.onResopnse([](QVariantMap result){
QVariantMap data;
QList<QVariant> infos;
if (!result.isEmpty())
data = result.value("data").toMap();
if (!data.isEmpty())
infos = data.value("info").toList();
static HttpService http;
foreach (QVariant each, infos) {
http.get("http://m.kugou.com/app/i/getSongInfo.php")
.queryParam("cmd", "playInfo")
.queryParam("hash", each.toMap()["hash"])
.onResopnse([](QVariantMap result){
qDebug()<<"mp3: "<<result["url"].toString();
})
.onError([](QString errorStr){ qDebug()<<"Error: "<<errorStr; })
.exec();
}
})
.onError([](QString errorStr){ qDebug()<<"Error: "<<errorStr; })
.exec();
```
## 1.如何使用?
* 以Qt子工程使用再在其他子工程包含pri文件即可使用;
* 通过引用库的方式使用.
## 2.如何启用demo测试
* 在QtNetworkService.pro文件中将"#CONFIG += QT_APP_MODE"这一行的#去除即可转为可执行文件形式在Demo目录的main.cpp为主执行文件如需要测试接口编辑便可。
## 3.扫码关注,第一时间获取推送
<p align="center">
<img src="http://www.qtbig.com/about/index/my_qrcode.jpg" alt="微信公众号:Qt君">
<p align="center"><em>Qt君</em></p>
</p>

View File

@@ -1,312 +0,0 @@
<?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éveloppé 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;QQ群872690351&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>

Binary file not shown.

Binary file not shown.

View File

@@ -1,11 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en">
<context>
<name>AppItem</name>
<message>
<location filename="../src/appitem.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QLabel</name>
<message>
<location filename="../main.cpp" line="22"/>
<location filename="../main.cpp" line="30"/>
<location filename="../src/main.cpp" line="39"/>
<source>Spark Store</source>
<translation type="unfinished"></translation>
</message>
@@ -13,487 +20,519 @@
<context>
<name>QObject</name>
<message>
<location filename="../main.cpp" line="16"/>
<source>We publish this program under GPL V3</source>
<location filename="../src/main.cpp" line="47"/>
<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;&lt;br/&gt;&lt;br/&gt;Published under GPL V3</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SpkAppInfoLoaderThread</name>
<message>
<location filename="../src/workerthreads.cpp" line="25"/>
<source>Failed to download app info. Please check internet connection.</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>
<location filename="../src/workerthreads.cpp" line="53"/>
<source>PkgName: </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>
<location filename="../src/workerthreads.cpp" line="54"/>
<source>Version: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="32"/>
<source>The Spark Project</source>
<location filename="../src/workerthreads.cpp" line="56"/>
<source>Author: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="60"/>
<source>Official Site: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="64"/>
<source>Contributor: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="65"/>
<source>Update Time: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="66"/>
<source>Installed Size: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="95"/>
<source>Failed to load application icon.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Widget</name>
<message>
<location filename="../widget.ui" line="14"/>
<location filename="../src/widget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="52"/>
<location filename="../src/widget.ui" line="84"/>
<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"/>
<location filename="../src/widget.ui" line="184"/>
<source>Tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="88"/>
<location filename="../src/widget.ui" line="265"/>
<source>Beautify</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="95"/>
<location filename="../src/widget.ui" line="115"/>
<source>Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="160"/>
<location filename="../src/widget.ui" line="198"/>
<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"/>
<location filename="../src/widget.ui" line="286"/>
<source>Others</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="234"/>
<location filename="../src/widget.ui" line="279"/>
<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"/>
<location filename="../src/widget.ui" line="560"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="568"/>
<location filename="../src/widget.ui" line="600"/>
<source>ICON</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="515"/>
<location filename="../widget.cpp" line="536"/>
<location filename="../src/widget.ui" line="547"/>
<location filename="../src/widget.cpp" line="602"/>
<location filename="../src/widget.cpp" line="901"/>
<source>Install</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="623"/>
<location filename="../src/widget.ui" line="655"/>
<source>Uninstall</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="639"/>
<location filename="../src/widget.ui" line="671"/>
<source>Site</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="712"/>
<location filename="../widget.ui" line="715"/>
<location filename="../src/widget.ui" line="744"/>
<location filename="../src/widget.ui" line="747"/>
<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"/>
<location filename="../src/widget.ui" line="750"/>
<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"/>
<location filename="../src/widget.ui" line="763"/>
<location filename="../src/widget.ui" line="766"/>
<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"/>
<location filename="../src/widget.ui" line="769"/>
<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"/>
<location filename="../src/widget.ui" line="807"/>
<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"/>
<location filename="../src/widget.ui" line="782"/>
<location filename="../src/widget.ui" line="785"/>
<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"/>
<location filename="../src/widget.ui" line="313"/>
<source>Video</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.ui" line="306"/>
<source>Download</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.ui" line="238"/>
<source>Back to category</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="293"/>
<location filename="../src/widget.ui" line="191"/>
<source>Reading</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.ui" line="225"/>
<source>Chat</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.ui" line="211"/>
<source>Reload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="383"/>
<location filename="../src/widget.ui" line="415"/>
<source>The list is currently empty. Go and download some softwares!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="415"/>
<location filename="../src/widget.ui" line="447"/>
<source>Open download directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="756"/>
<location filename="../src/widget.ui" line="788"/>
<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"/>
<location filename="../src/widget.ui" line="801"/>
<location filename="../src/widget.ui" line="804"/>
<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"/>
<location filename="../src/widget.ui" line="820"/>
<location filename="../src/widget.ui" line="823"/>
<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"/>
<location filename="../src/widget.ui" line="826"/>
<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"/>
<location filename="../src/widget.ui" line="858"/>
<location filename="../src/widget.ui" line="861"/>
<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"/>
<location filename="../src/widget.ui" line="877"/>
<location filename="../src/widget.ui" line="880"/>
<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"/>
<location filename="../src/widget.ui" line="883"/>
<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"/>
<location filename="../src/widget.ui" line="710"/>
<source>Share</source>
<translation type="unfinished"></translation>
<translation type="unfinished">Spk share link</translation>
</message>
<message>
<location filename="../widget.ui" line="153"/>
<location filename="../src/widget.ui" line="129"/>
<source>Development</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="217"/>
<source>Home </source>
<location filename="../src/widget.ui" line="296"/>
<source>Home</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="227"/>
<location filename="../src/widget.ui" line="122"/>
<source>Graphics</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="241"/>
<source>Communication</source>
<location filename="../src/widget.ui" line="272"/>
<source>Network</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="807"/>
<location filename="../widget.ui" line="810"/>
<location filename="../src/widget.ui" line="839"/>
<location filename="../src/widget.ui" line="842"/>
<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"/>
<location filename="../src/widget.ui" line="845"/>
<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"/>
<location filename="../src/widget.ui" line="864"/>
<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"/>
<location filename="../src/widget.ui" line="906"/>
<source>Contribute translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="892"/>
<location filename="../src/widget.ui" line="924"/>
<source>Info</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="899"/>
<location filename="../src/widget.ui" line="931"/>
<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"/>
<location filename="../src/widget.ui" line="970"/>
<source>Screenshots</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1101"/>
<location filename="../src/widget.ui" line="1133"/>
<source>Line Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1117"/>
<location filename="../src/widget.ui" line="1149"/>
<source>Choose Line:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1140"/>
<location filename="../src/widget.ui" line="1172"/>
<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"/>
<location filename="../src/widget.ui" line="1214"/>
<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"/>
<location filename="../src/widget.ui" line="1224"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1199"/>
<location filename="../src/widget.ui" line="1231"/>
<source>Source Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1219"/>
<location filename="../src/widget.ui" line="1251"/>
<source>Server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1240"/>
<location filename="../src/widget.ui" line="1272"/>
<source>Temp</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1263"/>
<location filename="../src/widget.ui" line="1295"/>
<source>Clean</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1273"/>
<location filename="../src/widget.ui" line="1305"/>
<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"/>
<location filename="../src/widget.ui" line="1318"/>
<source>Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1300"/>
<location filename="../src/widget.ui" line="1332"/>
<source>Location/tmp/spark-store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1321"/>
<location filename="../src/widget.ui" line="1353"/>
<source>About us</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1328"/>
<location filename="../src/widget.ui" line="1360"/>
<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"/>
<location filename="../src/widget.ui" line="148"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="342"/>
<location filename="../src/widget.ui" line="374"/>
<source>about:blank</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="540"/>
<location filename="../src/widget.ui" line="572"/>
<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"/>
<location filename="../src/widget.ui" line="1185"/>
<source>Take effect when restart</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.ui" line="1325"/>
<source>0B</source>
<translation type="unfinished">0B</translation>
</message>
<message>
<location filename="../widget.cpp" line="146"/>
<location filename="../src/widget.cpp" line="165"/>
<source>Spark Store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="147"/>
<location filename="../src/widget.cpp" line="166"/>
<source>Search or enter spk://</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="153"/>
<location filename="../src/widget.cpp" line="172"/>
<source>Submit App</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="154"/>
<location filename="../src/widget.cpp" line="173"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="245"/>
<location filename="../src/widget.cpp" line="275"/>
<source>Not Exist</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="297"/>
<location filename="../widget.cpp" line="305"/>
<location filename="../src/widget.cpp" line="121"/>
<location filename="../src/widget.cpp" line="329"/>
<location filename="../src/widget.cpp" line="333"/>
<location filename="../src/widget.cpp" line="342"/>
<location filename="../src/widget.cpp" line="346"/>
<source>Spark\ Store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="480"/>
<location filename="../src/widget.cpp" line="546"/>
<source>Failed to download app info. Please check internet connection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="510"/>
<location filename="../src/widget.cpp" line="576"/>
<source>PkgName: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="511"/>
<location filename="../src/widget.cpp" line="577"/>
<source>Version: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="513"/>
<location filename="../src/widget.cpp" line="579"/>
<source>Author: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="517"/>
<location filename="../src/widget.cpp" line="583"/>
<source>Official Site: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="521"/>
<location filename="../src/widget.cpp" line="587"/>
<source>Contributor: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="522"/>
<location filename="../src/widget.cpp" line="588"/>
<source>Update Time: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="523"/>
<location filename="../src/widget.cpp" line="589"/>
<source>Installed Size: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="532"/>
<location filename="../widget.cpp" line="645"/>
<location filename="../src/widget.cpp" line="598"/>
<location filename="../src/widget.cpp" line="709"/>
<location filename="../src/widget.cpp" line="898"/>
<source>Reinstall</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="571"/>
<location filename="../src/widget.cpp" line="637"/>
<source>Failed to load application icon.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="620"/>
<location filename="../src/widget.cpp" line="684"/>
<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"/>
<location filename="../src/widget.cpp" line="1047"/>
<source>Updating, please wait...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="842"/>
<location filename="../src/widget.cpp" line="1100"/>
<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"/>
<location filename="../src/widget.cpp" line="1106"/>
<source>Unknown error!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1024"/>
<location filename="../src/widget.cpp" line="1289"/>
<source>Yes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1024"/>
<location filename="../src/widget.cpp" line="1289"/>
<source>No</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1025"/>
<location filename="../src/widget.cpp" line="1290"/>
<source>Information for Contributors</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1026"/>
<location filename="../src/widget.cpp" line="1291"/>
<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
@@ -504,17 +543,27 @@ Click yes to continue.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="868"/>
<location filename="../src/widget.cpp" line="1126"/>
<source>Uninstall succeeded</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="882"/>
<location filename="../src/widget.cpp" line="749"/>
<source>Relative apps Not Found!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.cpp" line="757"/>
<source>Request Error: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/widget.cpp" line="1140"/>
<source>Temporary cache was cleaned</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="949"/>
<location filename="../src/widget.cpp" line="1208"/>
<source>The URL has been copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
@@ -522,107 +571,107 @@ Click yes to continue.</source>
<context>
<name>downloadlist</name>
<message>
<location filename="../downloadlist.ui" line="20"/>
<location filename="../src/downloadlist.ui" line="20"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="50"/>
<location filename="../src/downloadlist.ui" line="50"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="82"/>
<location filename="../src/downloadlist.ui" line="82"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="106"/>
<location filename="../src/downloadlist.ui" line="106"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="189"/>
<location filename="../src/downloadlist.ui" line="189"/>
<source>Waiting to download</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="240"/>
<location filename="../src/downloadlist.ui" line="240"/>
<source>Install</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="259"/>
<location filename="../src/downloadlist.ui" line="259"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="278"/>
<location filename="../src/downloadlist.ui" line="278"/>
<source>Info</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="24"/>
<source>dpkg</source>
<location filename="../src/downloadlist.cpp" line="24"/>
<source>Spark Store App Installer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="25"/>
<location filename="../src/downloadlist.cpp" line="25"/>
<source>gdebi</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="26"/>
<location filename="../src/downloadlist.cpp" line="26"/>
<source>deepin deb installer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="55"/>
<location filename="../src/downloadlist.cpp" line="57"/>
<source>Downloaded, waiting to install</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="80"/>
<location filename="../src/downloadlist.cpp" line="82"/>
<source>Failed to download %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="82"/>
<location filename="../src/downloadlist.cpp" line="84"/>
<source>Download FailedCheck Your Connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="92"/>
<location filename="../src/downloadlist.cpp" line="94"/>
<source>Finished downloading %1, awaiting to install</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="125"/>
<source>Installing...</source>
<location filename="../src/downloadlist.cpp" line="127"/>
<source>Installing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="172"/>
<location filename="../src/downloadlist.cpp" line="174"/>
<source>Finish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="176"/>
<location filename="../src/downloadlist.cpp" line="178"/>
<source>Retry</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="177"/>
<location filename="../src/downloadlist.cpp" line="179"/>
<source>Error happened in dpkg progress , you can try it again</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="181"/>
<location filename="../src/downloadlist.cpp" line="183"/>
<source>dpkg progress had been abortedyou can retry installation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="203"/>
<location filename="../src/downloadlist.cpp" line="205"/>
<source>Download canceled</source>
<translation type="unfinished"></translation>
</message>

View File

@@ -0,0 +1,860 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="fr">
<context>
<name>QLabel</name>
<message>
<source>Spark应用商店</source>
<translation type="vanished">Spark Store</translation>
</message>
<message>
<source>
GPL第三版开源</source>
<translation type="vanished">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>
<message>
<location filename="../main.cpp" line="37"/>
<source>Spark Store</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../main.cpp" line="45"/>
<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;&lt;br/&gt;&lt;br/&gt;Published under GPL V3</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SpkAppInfoLoaderThread</name>
<message>
<location filename="../workerthreads.cpp" line="25"/>
<source>Failed to download app info. Please check internet connection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../workerthreads.cpp" line="53"/>
<source>PkgName: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../workerthreads.cpp" line="54"/>
<source>Version: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../workerthreads.cpp" line="56"/>
<source>Author: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../workerthreads.cpp" line="60"/>
<source>Official Site: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../workerthreads.cpp" line="64"/>
<source>Contributor: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../workerthreads.cpp" line="65"/>
<source>Update Time: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../workerthreads.cpp" line="66"/>
<source>Installed Size: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../workerthreads.cpp" line="95"/>
<source>Failed to load application icon.</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>Video</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="74"/>
<source>Download</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="153"/>
<source>Development</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="173"/>
<source>Back to category</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="200"/>
<source>Reading</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="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="234"/>
<source>Games</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.ui" line="241"/>
<source>Chat</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="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="515"/>
<location filename="../widget.cpp" line="586"/>
<location filename="../widget.cpp" line="808"/>
<source>Install</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="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="678"/>
<source>Share</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="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="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="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="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="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="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="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="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="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>
<source></source>
<translatorcomment>Lecteurs vidéo et créateurs vidéo</translatorcomment>
<translation type="vanished">Vidéo</translation>
</message>
<message>
<source></source>
<translation type="vanished">Liste de téléchargement</translation>
</message>
<message>
<source></source>
<translation type="vanished">Outils</translation>
</message>
<message>
<source></source>
<translatorcomment>Thème des icônes et autres </translatorcomment>
<translation type="vanished">Thèmes</translation>
</message>
<message>
<source></source>
<translation type="vanished">Musique</translation>
</message>
<message>
<location filename="../widget.ui" line="114"/>
<source>icon</source>
<translation type="unfinished"></translation>
</message>
<message>
<source></source>
<translation type="vanished">Développement</translation>
</message>
<message>
<source></source>
<translation type="vanished">Bureau</translation>
</message>
<message>
<source></source>
<translation type="vanished">Traduire</translation>
</message>
<message>
<source></source>
<translation type="vanished">Autres</translation>
</message>
<message>
<source></source>
<translation type="vanished">Accueil</translation>
</message>
<message>
<source></source>
<translation type="vanished">Images</translation>
</message>
<message>
<source></source>
<translation type="vanished">Jeux</translation>
</message>
<message>
<source></source>
<translation type="vanished">Chat</translation>
</message>
<message>
<source></source>
<translation type="vanished">Réseau</translation>
</message>
<message>
<location filename="../widget.ui" line="342"/>
<source>about:blank</source>
<translation type="unfinished"></translation>
</message>
<message>
<source></source>
<translation type="vanished">La liste de téléchargement est vide</translation>
</message>
<message>
<source></source>
<translation type="vanished">Ouvrir dans le gestionnaire de fichiers</translation>
</message>
<message>
<source></source>
<translation type="vanished">Installer</translation>
</message>
<message>
<source></source>
<translation type="vanished">Supprimer</translation>
</message>
<message>
<source></source>
<translation type="vanished">Site</translation>
</message>
<message>
<source></source>
<translation type="vanished">Nom</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>
<source></source>
<translation type="vanished">Icon</translation>
</message>
<message>
<source></source>
<translation type="vanished">Partager</translation>
</message>
<message>
<source></source>
<translation type="vanished">Détails</translation>
</message>
<message>
<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="vanished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;magasin de logiciels développé par des passionnés de la communauté&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source></source>
<translation type="vanished">Captures d&apos;écran</translation>
</message>
<message>
<source>线</source>
<translation type="vanished">Line Settings</translation>
</message>
<message>
<source>线</source>
<translation type="vanished">Choisissez: </translation>
</message>
<message>
<source></source>
<translation type="vanished">Mise à jour</translation>
</message>
<message>
<source> </source>
<translation type="vanished">Redémarrez pour prendre effet</translation>
</message>
<message>
<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="vanished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Le rôle du serveur source est de s&apos;assurer que le logiciel est mis à jour et prend en charge l&apos;utilisation de l&apos;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>
<source></source>
<translation type="vanished">Mettre à jour la source APT</translation>
</message>
<message>
<source></source>
<translation type="vanished">Source APT: </translation>
</message>
<message>
<source></source>
<translation type="vanished">serveur</translation>
</message>
<message>
<source></source>
<translation type="vanished">Temp</translation>
</message>
<message>
<source></source>
<translation type="vanished">Nettoyer</translation>
</message>
<message>
<source>/tmp下使</source>
<translation type="vanished">Étant donné que ce répertoire se trouve sous /tmp, même si vous ne l&apos;effacez pas manuellement, il sera effacé automatiquement au redémarrage du système.</translation>
</message>
<message>
<source></source>
<translation type="vanished">Taille: </translation>
</message>
<message>
<location filename="../widget.ui" line="1293"/>
<source>0B</source>
<translation type="unfinished">0B</translation>
</message>
<message>
<source>/tmp/spark-store</source>
<translation type="vanished">Emplacement:/tmp/spark-store</translation>
</message>
<message>
<source></source>
<translation type="vanished">À propos de nous</translation>
</message>
<message>
<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="vanished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Nous ne sommes pas l&apos;équipe officielle, tout comme vous, nous ne sommes qu&apos;un des nombreux passionnés et utilisateurs de systèmes Linux / deepin, nous développons et gérons le &quot;Spark Store&quot;! &quot;, 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&apos;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&apos;é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&apos;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>
<message>
<location filename="../widget.cpp" line="113"/>
<location filename="../widget.cpp" line="319"/>
<location filename="../widget.cpp" line="323"/>
<location filename="../widget.cpp" line="332"/>
<location filename="../widget.cpp" line="336"/>
<source>Spark\ Store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="157"/>
<source>Spark Store</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="158"/>
<source>Search or enter spk://</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="164"/>
<source>Submit App</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="165"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="264"/>
<source>Not Exist</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="530"/>
<source>Failed to download app info. Please check internet connection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="560"/>
<source>PkgName: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="561"/>
<source>Version: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="563"/>
<source>Author: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="567"/>
<source>Official Site: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="571"/>
<source>Contributor: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="572"/>
<source>Update Time: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="573"/>
<source>Installed Size: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="582"/>
<location filename="../widget.cpp" line="693"/>
<location filename="../widget.cpp" line="805"/>
<source>Reinstall</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="621"/>
<source>Failed to load application icon.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="668"/>
<source>Failed to get the name to the file to be downloaded.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="716"/>
<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="944"/>
<source>Updating, please wait...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="997"/>
<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="1003"/>
<source>Unknown error!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1023"/>
<source>Uninstall succeeded</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1037"/>
<source>Temporary cache was cleaned</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1104"/>
<source>The URL has been copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1185"/>
<source>Yes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1185"/>
<source>No</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1186"/>
<source>Information for Contributors</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="1187"/>
<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>
</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>
<source></source>
<translation type="vanished">Nom</translation>
</message>
<message>
<source></source>
<translatorcomment>Attendez pour téléchargerd</translatorcomment>
<translation type="vanished">Attendez pour télécharger</translation>
</message>
<message>
<source></source>
<translation type="vanished">Installer</translation>
</message>
<message>
<source></source>
<translation type="vanished">Annuler</translation>
</message>
<message>
<source></source>
<translation type="vanished">Détail</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>

View File

@@ -1,11 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>AppItem</name>
<message>
<location filename="../src/appitem.ui" line="14"/>
<source>Form</source>
<translation></translation>
</message>
</context>
<context>
<name>QLabel</name>
<message>
<location filename="../main.cpp" line="22"/>
<location filename="../main.cpp" line="30"/>
<location filename="../src/main.cpp" line="39"/>
<source>Spark Store</source>
<translation>Spark </translation>
</message>
@@ -13,65 +20,111 @@
<context>
<name>QObject</name>
<message>
<location filename="../main.cpp" line="16"/>
<source>We publish this program under GPL V3</source>
<translation>GPL V3开源</translation>
<translation type="vanished">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>
<translation type="vanished">&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>
<translation type="vanished"></translation>
</message>
<message>
<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;&lt;br/&gt;We publish this program under GPL V3</source>
<translation type="vanished">&lt;span style=&apos; font-size:10pt;font-weight:60;&apos;&gt; &lt;/span&gt;&lt;br/&gt;&quot;&quot;&lt;a href=&apos;https://www.spark-app.store/&apos;&gt;https://www.spark-app.store&lt;/a&gt;&lt;br/&gt;&quot;&quot;&lt;span style=&apos; font-size:12pt;&apos;&gt;星火开发者联盟&lt;/span&gt;&lt;br/&gt;本程序遵循 GPL V3 协议发布</translation>
</message>
<message>
<location filename="../src/main.cpp" line="47"/>
<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;&lt;br/&gt;&lt;br/&gt;Published under GPL V3</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;星火商店开发组&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;遵循 GPL V3 协议发布</translation>
</message>
</context>
<context>
<name>SpkAppInfoLoaderThread</name>
<message>
<location filename="../src/workerthreads.cpp" line="25"/>
<source>Failed to download app info. Please check internet connection.</source>
<translation></translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="53"/>
<source>PkgName: </source>
<translation> </translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="54"/>
<source>Version: </source>
<translation> </translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="56"/>
<source>Author: </source>
<translation> </translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="60"/>
<source>Official Site: </source>
<translation> </translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="64"/>
<source>Contributor: </source>
<translation>稿 </translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="65"/>
<source>Update Time: </source>
<translation> </translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="66"/>
<source>Installed Size: </source>
<translation> </translation>
</message>
<message>
<location filename="../src/workerthreads.cpp" line="95"/>
<source>Failed to load application icon.</source>
<translation></translation>
</message>
</context>
<context>
<name>Widget</name>
<message>
<location filename="../widget.ui" line="14"/>
<location filename="../src/widget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="52"/>
<location filename="../src/widget.ui" line="84"/>
<source>background-color:#FFFFFF</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="67"/>
<source>Videos</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="74"/>
<source>Download List</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="81"/>
<location filename="../src/widget.ui" line="184"/>
<source>Tools</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="88"/>
<location filename="../src/widget.ui" line="265"/>
<source>Beautify</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="95"/>
<location filename="../src/widget.ui" line="115"/>
<source>Music</source>
<translation></translation>
</message>
@@ -80,17 +133,16 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="160"/>
<location filename="../src/widget.ui" line="198"/>
<source>Office</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="200"/>
<source>Translate</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="207"/>
<location filename="../src/widget.ui" line="286"/>
<source>Others</source>
<translation></translation>
</message>
@@ -103,7 +155,7 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="234"/>
<location filename="../src/widget.ui" line="279"/>
<source>Games</source>
<translation></translation>
</message>
@@ -112,408 +164,449 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="248"/>
<location filename="../src/widget.ui" line="272"/>
<source>Network</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="383"/>
<location filename="../src/widget.ui" line="415"/>
<source>The list is currently empty. Go and download some softwares!</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="415"/>
<location filename="../src/widget.ui" line="447"/>
<source>Open download directory</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="528"/>
<location filename="../src/widget.ui" line="560"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="568"/>
<location filename="../src/widget.ui" line="600"/>
<source>ICON</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="515"/>
<location filename="../widget.cpp" line="536"/>
<location filename="../src/widget.ui" line="547"/>
<location filename="../src/widget.cpp" line="602"/>
<location filename="../src/widget.cpp" line="901"/>
<source>Install</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="623"/>
<location filename="../src/widget.ui" line="313"/>
<source>Video</source>
<translation></translation>
</message>
<message>
<location filename="../src/widget.ui" line="306"/>
<source>Download</source>
<translation></translation>
</message>
<message>
<location filename="../src/widget.ui" line="191"/>
<source>Reading</source>
<translation></translation>
</message>
<message>
<location filename="../src/widget.ui" line="225"/>
<source>Chat</source>
<translation></translation>
</message>
<message>
<location filename="../src/widget.ui" line="655"/>
<source>Uninstall</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="639"/>
<location filename="../src/widget.ui" line="671"/>
<source>Site</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="712"/>
<location filename="../widget.ui" line="715"/>
<location filename="../src/widget.ui" line="744"/>
<location filename="../src/widget.ui" line="747"/>
<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"/>
<location filename="../src/widget.ui" line="750"/>
<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>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="731"/>
<location filename="../widget.ui" line="734"/>
<location filename="../src/widget.ui" line="763"/>
<location filename="../src/widget.ui" line="766"/>
<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"/>
<location filename="../src/widget.ui" line="782"/>
<location filename="../src/widget.ui" line="785"/>
<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"/>
<location filename="../src/widget.ui" line="788"/>
<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>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="769"/>
<location filename="../widget.ui" line="772"/>
<location filename="../src/widget.ui" line="801"/>
<location filename="../src/widget.ui" line="804"/>
<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"/>
<location filename="../src/widget.ui" line="820"/>
<location filename="../src/widget.ui" line="823"/>
<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"/>
<location filename="../src/widget.ui" line="826"/>
<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>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="826"/>
<location filename="../widget.ui" line="829"/>
<location filename="../src/widget.ui" line="858"/>
<location filename="../src/widget.ui" line="861"/>
<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"/>
<location filename="../src/widget.ui" line="877"/>
<location filename="../src/widget.ui" line="880"/>
<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"/>
<location filename="../src/widget.ui" line="883"/>
<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>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="678"/>
<location filename="../src/widget.ui" line="710"/>
<source>Share</source>
<translation></translation>
<translation>Spk分享链接</translation>
</message>
<message>
<location filename="../widget.ui" line="153"/>
<location filename="../src/widget.ui" line="129"/>
<source>Development</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="217"/>
<source>Home </source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="227"/>
<location filename="../src/widget.ui" line="122"/>
<source>Graphics</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="241"/>
<source>Communication</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="807"/>
<location filename="../widget.ui" line="810"/>
<location filename="../src/widget.ui" line="839"/>
<location filename="../src/widget.ui" line="842"/>
<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>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt; deepin-wine2 使使ubuntu deepin-wine2 &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../widget.ui" line="813"/>
<location filename="../src/widget.ui" line="845"/>
<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>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="832"/>
<location filename="../src/widget.ui" line="864"/>
<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>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="874"/>
<location filename="../src/widget.ui" line="906"/>
<source>Contribute translation</source>
<translation type="unfinished"></translation>
<translation>/</translation>
</message>
<message>
<location filename="../widget.ui" line="892"/>
<location filename="../src/widget.ui" line="924"/>
<source>Info</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="899"/>
<location filename="../src/widget.ui" line="931"/>
<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>
<translation>&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"/>
<location filename="../src/widget.ui" line="970"/>
<source>Screenshots</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1101"/>
<location filename="../src/widget.ui" line="1133"/>
<source>Line Settings</source>
<translation>线</translation>
</message>
<message>
<location filename="../widget.ui" line="1117"/>
<location filename="../src/widget.ui" line="1149"/>
<source>Choose Line:</source>
<translation>线</translation>
</message>
<message>
<location filename="../widget.ui" line="1140"/>
<location filename="../src/widget.ui" line="1172"/>
<source>Refresh</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1153"/>
<source>Take effect when restart </source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.ui" line="1182"/>
<location filename="../src/widget.ui" line="1214"/>
<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"/>
<location filename="../src/widget.ui" line="1224"/>
<source>Update</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1199"/>
<location filename="../src/widget.ui" line="1231"/>
<source>Source Server</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1219"/>
<location filename="../src/widget.ui" line="1251"/>
<source>Server</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1240"/>
<location filename="../src/widget.ui" line="1272"/>
<source>Temp</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1263"/>
<location filename="../src/widget.ui" line="1295"/>
<source>Clean</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1273"/>
<location filename="../src/widget.ui" line="1305"/>
<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"/>
<location filename="../src/widget.ui" line="1318"/>
<source>Size:</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1300"/>
<location filename="../src/widget.ui" line="1332"/>
<source>Location/tmp/spark-store</source>
<translation>/tmp/spark-store</translation>
</message>
<message>
<location filename="../widget.ui" line="1321"/>
<location filename="../src/widget.ui" line="1353"/>
<source>About us</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1328"/>
<location filename="../src/widget.ui" line="1360"/>
<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"/>
<location filename="../src/widget.ui" line="148"/>
<source>icon</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="173"/>
<location filename="../src/widget.ui" line="238"/>
<source>Back to category</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="293"/>
<location filename="../src/widget.ui" line="296"/>
<source>Home</source>
<translation></translation>
</message>
<message>
<location filename="../src/widget.ui" line="211"/>
<source>Reload</source>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="342"/>
<location filename="../src/widget.ui" line="374"/>
<source>about:blank</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="540"/>
<location filename="../src/widget.ui" line="572"/>
<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>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="737"/>
<location filename="../src/widget.ui" line="769"/>
<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>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="775"/>
<location filename="../src/widget.ui" line="807"/>
<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>
<translation></translation>
</message>
<message>
<location filename="../widget.ui" line="1293"/>
<location filename="../src/widget.ui" line="1185"/>
<source>Take effect when restart</source>
<translation></translation>
</message>
<message>
<location filename="../src/widget.ui" line="1325"/>
<source>0B</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="146"/>
<location filename="../src/widget.cpp" line="165"/>
<source>Spark Store</source>
<translation>Spark </translation>
</message>
<message>
<location filename="../widget.cpp" line="147"/>
<location filename="../src/widget.cpp" line="166"/>
<source>Search or enter spk://</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="153"/>
<location filename="../src/widget.cpp" line="172"/>
<source>Submit App</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="154"/>
<location filename="../src/widget.cpp" line="173"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="245"/>
<location filename="../src/widget.cpp" line="275"/>
<source>Not Exist</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="297"/>
<location filename="../widget.cpp" line="305"/>
<location filename="../src/widget.cpp" line="121"/>
<location filename="../src/widget.cpp" line="329"/>
<location filename="../src/widget.cpp" line="333"/>
<location filename="../src/widget.cpp" line="342"/>
<location filename="../src/widget.cpp" line="346"/>
<source>Spark\ Store</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="480"/>
<location filename="../src/widget.cpp" line="546"/>
<source>Failed to download app info. Please check internet connection.</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="510"/>
<location filename="../src/widget.cpp" line="576"/>
<source>PkgName: </source>
<translation></translation>
<translation> </translation>
</message>
<message>
<location filename="../widget.cpp" line="511"/>
<location filename="../src/widget.cpp" line="577"/>
<source>Version: </source>
<translation></translation>
<translation> </translation>
</message>
<message>
<location filename="../widget.cpp" line="513"/>
<location filename="../src/widget.cpp" line="579"/>
<source>Author: </source>
<translation></translation>
<translation> </translation>
</message>
<message>
<location filename="../widget.cpp" line="517"/>
<location filename="../src/widget.cpp" line="583"/>
<source>Official Site: </source>
<translation></translation>
<translation> </translation>
</message>
<message>
<location filename="../widget.cpp" line="521"/>
<location filename="../src/widget.cpp" line="587"/>
<source>Contributor: </source>
<translation>稿</translation>
<translation>稿 </translation>
</message>
<message>
<location filename="../widget.cpp" line="522"/>
<location filename="../src/widget.cpp" line="588"/>
<source>Update Time: </source>
<translation></translation>
<translation> </translation>
</message>
<message>
<location filename="../widget.cpp" line="523"/>
<location filename="../src/widget.cpp" line="589"/>
<source>Installed Size: </source>
<translation></translation>
<translation> </translation>
</message>
<message>
<location filename="../widget.cpp" line="532"/>
<location filename="../widget.cpp" line="645"/>
<location filename="../src/widget.cpp" line="598"/>
<location filename="../src/widget.cpp" line="709"/>
<location filename="../src/widget.cpp" line="898"/>
<source>Reinstall</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="571"/>
<location filename="../src/widget.cpp" line="637"/>
<source>Failed to load application icon.</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="620"/>
<location filename="../src/widget.cpp" line="684"/>
<source>Failed to get the name to the file to be downloaded.</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="../src/widget.cpp" line="749"/>
<source>Relative apps Not Found!</source>
<translation></translation>
</message>
<message>
<location filename="../src/widget.cpp" line="757"/>
<source>Request Error: %1</source>
<translation>%1</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>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="789"/>
<location filename="../src/widget.cpp" line="1047"/>
<source>Updating, please wait...</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="842"/>
<location filename="../src/widget.cpp" line="1100"/>
<source>Apt has reported an error. Please use apt update in terminal to locate the problem.</source>
<translation>使apt update来查看错误原因</translation>
<translation>使apt update来查看错误原因</translation>
</message>
<message>
<location filename="../widget.cpp" line="848"/>
<location filename="../src/widget.cpp" line="1106"/>
<source>Unknown error!</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="1024"/>
<location filename="../src/widget.cpp" line="1289"/>
<source>Yes</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="1024"/>
<location filename="../src/widget.cpp" line="1289"/>
<source>No</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="1025"/>
<location filename="../src/widget.cpp" line="1290"/>
<source>Information for Contributors</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="1026"/>
<location filename="../src/widget.cpp" line="1291"/>
<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
@@ -521,13 +614,13 @@ 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>
Gitee
Pull Request
pr
使github账户直接登陆Gitee
.</translation>
</translation>
</message>
<message>
<source>Currently the translation contribution is limited to English,
@@ -549,17 +642,17 @@ Click yes to continue.</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../widget.cpp" line="868"/>
<location filename="../src/widget.cpp" line="1126"/>
<source>Uninstall succeeded</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="882"/>
<location filename="../src/widget.cpp" line="1140"/>
<source>Temporary cache was cleaned</source>
<translation></translation>
</message>
<message>
<location filename="../widget.cpp" line="949"/>
<location filename="../src/widget.cpp" line="1208"/>
<source>The URL has been copied to the clipboard</source>
<translation></translation>
</message>
@@ -567,107 +660,115 @@ Click yes to continue.</source>
<context>
<name>downloadlist</name>
<message>
<location filename="../downloadlist.ui" line="20"/>
<location filename="../src/downloadlist.ui" line="20"/>
<source>Form</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="50"/>
<location filename="../src/downloadlist.ui" line="50"/>
<source>icon</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="82"/>
<location filename="../src/downloadlist.ui" line="82"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="106"/>
<location filename="../src/downloadlist.ui" line="106"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="189"/>
<location filename="../src/downloadlist.ui" line="189"/>
<source>Waiting to download</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="240"/>
<location filename="../src/downloadlist.ui" line="240"/>
<source>Install</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="259"/>
<location filename="../src/downloadlist.ui" line="259"/>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.ui" line="278"/>
<location filename="../src/downloadlist.ui" line="278"/>
<source>Info</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="24"/>
<source>dpkg</source>
<translation>dpkg</translation>
<translation type="vanished">dpkg</translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="25"/>
<location filename="../src/downloadlist.cpp" line="24"/>
<source>Spark Store App Installer</source>
<translation></translation>
</message>
<message>
<location filename="../src/downloadlist.cpp" line="25"/>
<source>gdebi</source>
<translation>gdebi</translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="26"/>
<location filename="../src/downloadlist.cpp" line="26"/>
<source>deepin deb installer</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="55"/>
<location filename="../src/downloadlist.cpp" line="57"/>
<source>Downloaded, waiting to install</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="80"/>
<location filename="../src/downloadlist.cpp" line="82"/>
<source>Failed to download %1</source>
<translation> %1 </translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="82"/>
<location filename="../src/downloadlist.cpp" line="84"/>
<source>Download FailedCheck Your Connection</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="92"/>
<location filename="../src/downloadlist.cpp" line="94"/>
<source>Finished downloading %1, awaiting to install</source>
<translation>%1 </translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="125"/>
<source>Installing...</source>
<location filename="../src/downloadlist.cpp" line="127"/>
<source>Installing</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="172"/>
<source>Installing...</source>
<translation type="obsolete"></translation>
</message>
<message>
<location filename="../src/downloadlist.cpp" line="174"/>
<source>Finish</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="176"/>
<location filename="../src/downloadlist.cpp" line="178"/>
<source>Retry</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="177"/>
<location filename="../src/downloadlist.cpp" line="179"/>
<source>Error happened in dpkg progress , you can try it again</source>
<translation>dpkg出现错误</translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="181"/>
<location filename="../src/downloadlist.cpp" line="183"/>
<source>dpkg progress had been abortedyou can retry installation</source>
<translation></translation>
</message>
<message>
<location filename="../downloadlist.cpp" line="203"/>
<location filename="../src/downloadlist.cpp" line="205"/>
<source>Download canceled</source>
<translation></translation>
</message>