This commit is contained in:
shenmo 2020-09-17 16:49:23 +08:00
parent efc6c50f88
commit 2c205bf5db
6 changed files with 38 additions and 5 deletions

View File

@ -2,6 +2,7 @@
#include <DWidgetUtil> //Dtk::Widget::moveToCenter(&w); 要调用它就得引用DWidgetUtil #include <DWidgetUtil> //Dtk::Widget::moveToCenter(&w); 要调用它就得引用DWidgetUtil
#include <QDesktopWidget> #include <QDesktopWidget>
#include <widget.h> #include <widget.h>
#include <QTranslator>
DWIDGET_USE_NAMESPACE DWIDGET_USE_NAMESPACE
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
@ -15,9 +16,9 @@ int main(int argc, char *argv[])
a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store"); a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store");
a.setProductIcon(QIcon::fromTheme("spark-store")); //设置Logo a.setProductIcon(QIcon::fromTheme("spark-store")); //设置Logo
a.setProductName("Spark应用商店"); a.setProductName(QLabel::tr("Spark应用商店"));
a.setApplicationDescription("社区驱动的一款为第三方应用商店,为改变而生\n本程序按GPL第三版开源"); a.setApplicationDescription(QLabel::tr("社区驱动的一款为第三方应用商店,为改变而生\n本程序按GPL第三版开源"));
a.setApplicationName("Spark应用商店"); //只有在这儿修改窗口标题才有效 a.setApplicationName(QLabel::tr("Spark应用商店")); //只有在这儿修改窗口标题才有效
Widget w; Widget w;
QDesktopWidget *s=DApplication::desktop(); QDesktopWidget *s=DApplication::desktop();
int d_w=s->width(); int d_w=s->width();

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.8.2, 2020-09-12T13:36:12. --> <!-- Written by QtCreator 4.8.2, 2020-09-17T16:48:42. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

View File

@ -1,6 +1,21 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.1" language="zh_CN"> <TS version="2.1" language="zh_CN">
<context>
<name>QLabel</name>
<message>
<location filename="../main.cpp" line="19"/>
<location filename="../main.cpp" line="21"/>
<source>Spark应用商店</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="20"/>
<source>
GPL第三版开源</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>Widget</name> <name>Widget</name>
<message> <message>

Binary file not shown.

View File

@ -1,6 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.1" language="en"> <TS version="2.1" language="en">
<context>
<name>QLabel</name>
<message>
<location filename="../main.cpp" line="19"/>
<location filename="../main.cpp" line="21"/>
<source>Spark应用商店</source>
<translation>Spark Store</translation>
</message>
<message>
<location filename="../main.cpp" line="20"/>
<source>
GPL第三版开源</source>
<translation>A 3-rd party app store powered by deepin community
Spark Store is published under GPL V3
We born for change.</translation>
</message>
</context>
<context> <context>
<name>Widget</name> <name>Widget</name>
<message> <message>

View File

@ -474,7 +474,7 @@ void Widget::loadappinfo(QUrl arg1)
ui->label_show->show(); ui->label_show->show();
// 软件信息加载 // 软件信息加载
QString info; QString info;
info="包名: "+json["Pkgname"].toString()+"\n"; info= "包名: "+json["Pkgname"].toString()+"\n";
info+="版本号: "+json["Version"].toString()+"\n"; info+="版本号: "+json["Version"].toString()+"\n";
if(json["Author"].toString()!="" && json["Author"].toString()!=" "){ if(json["Author"].toString()!="" && json["Author"].toString()!=" "){
info+="作者: "+json["Author"].toString()+"\n"; info+="作者: "+json["Author"].toString()+"\n";