Skip to content

Commit f5abb36

Browse files
authored
Merge pull request #11 from vmomenv/momen-dev
Momen dev
2 parents 85aeb51 + 6ab5a81 commit f5abb36

25 files changed

+65
-68
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
cmake_minimum_required(VERSION 3.5.1)
33

4-
project(sakura-assistant LANGUAGES CXX VERSION 2.2.2)
4+
project(sakura-assistant LANGUAGES CXX VERSION 2.2.5)
55

66
include(cmake/SparkEnvConfig.cmake)
77
include(cmake/SparkMacrosConfig.cmake)

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
6. qtbase5-dev
1818
7. qttools5-dev-tools
1919

20-
#### 1.3从源码上构建星火小助手
20+
#### 1.3从源码上构建樱花助手
2121
```bash
2222
cd SparkAssistant
2323
mkdir build
2424
cd build
2525
qmake qmake ../src/sparkassistant/sparkassistant.pro
2626
make
2727
```
28-
### 二、开发星火小助手
28+
### 二、开发樱花助手
2929
#### 1.1开发之前,你可以先运行一个dtk demo来[熟悉dtk开发](http://www.momen.world:8880/post/63)
3030
#### 1.2查看dtk相关文档
3131
deepin官方提供了三份dtk文档
@@ -269,8 +269,7 @@ void TodoClassManager::delJsonFile()
269269
file.write(doc.toJson());
270270
}
271271
```
272-
273-
274-
275-
272+
###### 密码本
273+
274+
![image.png](http://www.momen.world:8880/static/img/3721aed02ba178f625093328e51721d2.image.png)
276275

cmake/SparkDesktopMacros.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ spark_desktop_macros(
4040
# 应用名称: Name=
4141
${PROJECT_NAME}
4242
# 应用名称: Name[zh_CN]=
43-
星火小助手
43+
樱花助手
4444
# 应用说明: Comment=
45-
星火小助手
45+
樱花助手
4646
# 应用类型: Type=
4747
Application
4848
# 执行程序: Exec=

cmake/package-deb.descript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ Homepage: https://github.com:vmomenv/SparkAssistant.git
4040
# 软件包建议
4141
Recommends:
4242
# 软件包描述信息
43-
Descrition: 星火小助手
43+
Descrition: 樱花助手
4444
本软件主要功能有,系统中软件更新,天气预报,todo清单
4545

src/sakuraassistant/aesencrypt.cpp

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/sakuraassistant/aesencrypt.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/sakuraassistant/mainwindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void MainWindow::setToDo()
157157

158158
TodoClassManager *todo =new TodoClassManager(this);
159159
todo->resize(220,238);
160-
todo->move(0,80);
160+
todo->move(5,80);
161161

162162
}
163163

src/sakuraassistant/passbook.cpp

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "passbook.h"
2-
#include"aesencrypt.h"
2+
#include"qaesencryption.h"
33
#include<DWidget>
44
#include<DTitlebar>
55
#include<DMainWindow>
@@ -56,7 +56,14 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
5656
this->isUpdating=false;
5757
}
5858
});
59-
59+
//创建下方装饰条
60+
QWidget *bottomWidget=new QWidget(this);
61+
bottomWidget->setFixedSize(861,50);
62+
bottomWidget->move(0,440);
63+
pal = bottomWidget->palette();//设置widget背景色
64+
pal.setColor(QPalette::Background, QColor(49,53,62, 255));
65+
bottomWidget->setPalette(pal);
66+
bottomWidget->setAutoFillBackground(true);
6067

6168
//创建搜索框widget并且将控件放入该widget
6269
QWidget *searchWidget = new QWidget(this);
@@ -71,12 +78,13 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
7178
searchLayout->addWidget(searchEdit);
7279
searchWidget->setFixedSize(816, 53);
7380
searchWidget->setStyleSheet("background-color: #C3C9D3;border-radius: 12px;");//设置圆角
81+
searchEdit->setPlaceholderText("搜索");
7482
searchWidget->move(22, 69);
7583

7684
//密码详情
7785
QWidget *passWidget=new QWidget(this);
7886
passWidget->move(22,142);
79-
passWidget->resize(830,330);
87+
passWidget->resize(830,350);
8088

8189

8290

@@ -86,22 +94,22 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
8694
addPassButton->setIcon(addPixmap);
8795
addPassButton->setIconSize(QSize(31,31));
8896
addPassButton->setStyleSheet("border:none; background-color:transparent;");
89-
addPassButton->move(0,301);
97+
addPassButton->move(0,307);
9098
//创建导入导出按钮
9199
QPushButton *importButton =new QPushButton(passWidget);
92100
QPixmap importPixmap(":/res/passbook/import.png");
93101
importButton->setIcon(importPixmap);
94102
importButton->setIconSize(QSize(31,31));
95103
importButton->setStyleSheet("border:none; background-color:transparent;");
96-
importButton->move(739,301);
104+
importButton->move(739,307);
97105
importButton->setToolTip("导入数据");
98106

99107
QPushButton *exportButton =new QPushButton(passWidget);
100108
QPixmap exportPixmap(":/res/passbook/export.png");
101109
exportButton->setIcon(exportPixmap);
102110
exportButton->setIconSize(QSize(31,31));
103111
exportButton->setStyleSheet("border:none; background-color:transparent;");
104-
exportButton->move(787,301);
112+
exportButton->move(787,307);
105113
exportButton->setToolTip("复制数据到桌面");
106114

107115

@@ -268,6 +276,8 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
268276
copyButton->move(738, 5);
269277
copyButton->setIcon(QIcon(":/res/passbook/copy.png"));
270278
copyButton->setIconSize(QSize(30, 30));
279+
copyButton->setToolTip("复制密码");
280+
copyButton->setMouseTracking(true);
271281
copyButton->setStyleSheet("border:none; background-color:transparent;");
272282
//创建删除按钮
273283
QPushButton *delButton=new QPushButton(credentialWidget);
@@ -372,6 +382,8 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
372382
copyButton->move(738, 5);
373383
copyButton->setIcon(QIcon(":/res/passbook/copy.png"));
374384
copyButton->setIconSize(QSize(30, 30));
385+
copyButton->setToolTip("复制密码");
386+
copyButton->setMouseTracking(true);
375387
copyButton->setStyleSheet("border:none; background-color:transparent;");
376388
//创建删除按钮
377389
QPushButton *delButton=new QPushButton(credentialWidget);
@@ -532,6 +544,8 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
532544
copyButton->move(738, 5);
533545
copyButton->setIcon(QIcon(":/res/passbook/copy.png"));
534546
copyButton->setIconSize(QSize(30, 30));
547+
copyButton->setToolTip("复制密码");
548+
copyButton->setMouseTracking(true);
535549
copyButton->setStyleSheet("border:none; background-color:transparent;");
536550
//创建删除按钮
537551
QPushButton *delButton=new QPushButton(credentialWidget);
@@ -637,6 +651,8 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
637651
copyButton->move(738, 5);
638652
copyButton->setIcon(QIcon(":/res/passbook/copy.png"));
639653
copyButton->setIconSize(QSize(30, 30));
654+
copyButton->setToolTip("复制密码");
655+
copyButton->setMouseTracking(true);
640656
copyButton->setStyleSheet("border:none; background-color:transparent;");
641657
//创建删除按钮
642658
QPushButton *delButton=new QPushButton(credentialWidget);

src/sakuraassistant/passbook.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include<QSpacerItem>
2121
#include<QDir>
2222
#include<QVBoxLayout>
23-
#include "aesencrypt.h"
23+
#include "qaesencryption.h"
2424
#include <QCoreApplication>
2525
#include <QCryptographicHash>
2626
#include <QVector>

src/sakuraassistant/passbookpassword.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ bool passbookPassword::verifyEncryption()
109109
}
110110
}
111111

112-
void passbookPassword::login()
113-
{
112+
void passbookPassword::login(){
114113
QDialog *enterPassDialog=new QDialog;
115114
enterPassDialog->setWindowTitle("密码本");
116115
enterPassDialog->setFixedSize(861,490);
@@ -177,9 +176,17 @@ void passbookPassword::login()
177176
confirmButton->setFixedSize(127, 53);
178177
confirmButton->move(558,384);
179178
QLabel *warning=new QLabel(changePasswordWidget);
180-
warning->setText("密码用于验证进入密码本并加解密数据,若忘记密码无法找回");
179+
warning->setText("密码用于验证进入密码本并加解密数据,若忘记密码无法找回");
181180
warning->setFixedSize(400,28);
182181
warning->move(196,332);
182+
QPushButton *delButton=new QPushButton(changePasswordWidget);
183+
delButton->setText("销毁密码");
184+
delButton->setFixedSize(127, 53);
185+
delButton->move(177,384);
186+
QObject::connect(delButton,&QPushButton::clicked,[=]{
187+
QMessageBox::warning(enterPassDialog, "警告", "三思而后行,请自行进入~/.config/sakuraassistant目录删除data.json文件!");
188+
});
189+
183190
changePasswordWidget->show();
184191
QObject::connect(confirmButton, &QPushButton::clicked, [=]{
185192
QString tmppassword=oldPassword->text();

0 commit comments

Comments
 (0)