Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Commit c3fd466

Browse files
authored
Merge pull request #12 from Ne0W0r1d/master
UI优化,调试相关优化,MAC地址后面将显示接口名,自述更新
2 parents 46a0a97 + aa8300a commit c3fd466

File tree

12 files changed

+97
-71
lines changed

12 files changed

+97
-71
lines changed

About.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "About.h"
1111
#include "ui_About.h"
12-
12+
#include "version.h"
1313

1414
about::about(QWidget *parent)
1515
: QDialog(parent)
@@ -21,11 +21,8 @@ about::about(QWidget *parent)
2121
QString systemname = QSysInfo::kernelType();// 获取内核信息
2222
QString distro = QSysInfo::prettyProductName();// 获取发行版名称
2323
QString systemver = QSysInfo::productVersion();// 获取系统版本
24-
ui->softver_info->setText("0.4.rana.alpha.251016");//版本信息
24+
ui->softver_info->setText(AK_VERSION);//版本信息
2525
ui->env->setText(systemname.toUpper() + " (" + distro + ")");// 显示系统环境
26-
qInfo()<<"内核:"<< systemname;
27-
qInfo()<<"发行版名称:"<< distro;
28-
qInfo()<<"系统版本:"<< systemver;
2926
}
3027

3128
about::~about()

About.ui

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@
6868
</rect>
6969
</property>
7070
<property name="text">
71-
<string>本软件采用LGPL 2.1开源许可</string>
71+
<string>本软件采用LGPL 3开源许可</string>
72+
</property>
73+
<property name="alignment">
74+
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
7275
</property>
7376
</widget>
7477
<widget class="QLabel" name="qticon">

Army_Knife.pro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ SOURCES += \
1313
Home.cpp \
1414
main.cpp \
1515
tools/deviceinfo.cpp \
16-
tools/wakenow.cpp
16+
tools/wakenow.cpp \
17+
version.cpp
1718

1819
HEADERS += \
1920
About.h \
2021
Home.h \
2122
tools/deviceinfo.h \
22-
tools/wakenow.h
23+
tools/wakenow.h \
24+
version.h
2325

2426
FORMS += \
2527
About.ui \

Home.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@
1010
#include "Home.h"
1111
#include "About.h"
1212
#include "ui_Home.h"
13+
#include "version.h"
1314
home::home(QWidget *parent)
1415
: QMainWindow(parent)
1516
, ui(new Ui::home)
1617
{
1718
ui->setupUi(this);//启动UI
1819
action_homeinfo_refresh();
1920
setFixedSize(this->width(),this->height()); //固定大小
21+
QString systemname = QSysInfo::kernelType();// 获取内核信息
22+
QString distro = QSysInfo::prettyProductName();// 获取发行版名称
23+
QString systemver = QSysInfo::productVersion();// 获取系统版本
24+
ui -> Version ->setText(AK_VERSION);
25+
ui -> test_waring -> setText("Alpha 版本 || 请勿用于生产环境 || 请及时汇报BUG || 请勿滥用接口");
26+
qInfo()<<"系统环境:"<<systemname<<";发行版:"<<distro<<";系统版本:"<<systemver<<";软件版本"<<AK_VERSION;
2027
// 菜单栏:帮助
2128
connect(ui -> about, &QAction::triggered, this, &home::action_help_about_triggered); // UI:关于
2229
connect(ui -> wiki, &QAction::triggered, this, &home::action_help_wiki_triggered); // UI:WIKI

Home.ui

Lines changed: 62 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,21 @@
77
<x>0</x>
88
<y>0</y>
99
<width>800</width>
10-
<height>600</height>
10+
<height>463</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>瑞士军刀</string>
1515
</property>
1616
<widget class="QWidget" name="Home">
17-
<widget class="QPushButton" name="pushButton">
18-
<property name="enabled">
19-
<bool>false</bool>
20-
</property>
21-
<property name="geometry">
22-
<rect>
23-
<x>110</x>
24-
<y>480</y>
25-
<width>86</width>
26-
<height>27</height>
27-
</rect>
28-
</property>
29-
<property name="text">
30-
<string>查询记录次数</string>
31-
</property>
32-
</widget>
33-
<widget class="QPushButton" name="recordip">
34-
<property name="enabled">
35-
<bool>false</bool>
36-
</property>
37-
<property name="geometry">
38-
<rect>
39-
<x>20</x>
40-
<y>480</y>
41-
<width>86</width>
42-
<height>27</height>
43-
</rect>
44-
</property>
45-
<property name="text">
46-
<string>记录IP</string>
47-
</property>
48-
</widget>
4917
<widget class="QPushButton" name="hidemode">
5018
<property name="enabled">
5119
<bool>false</bool>
5220
</property>
5321
<property name="geometry">
5422
<rect>
55-
<x>200</x>
56-
<y>480</y>
23+
<x>20</x>
24+
<y>340</y>
5725
<width>86</width>
5826
<height>27</height>
5927
</rect>
@@ -68,8 +36,8 @@
6836
</property>
6937
<property name="geometry">
7038
<rect>
71-
<x>290</x>
72-
<y>480</y>
39+
<x>120</x>
40+
<y>340</y>
7341
<width>86</width>
7442
<height>27</height>
7543
</rect>
@@ -82,7 +50,7 @@
8250
<property name="geometry">
8351
<rect>
8452
<x>20</x>
85-
<y>510</y>
53+
<y>370</y>
8654
<width>231</width>
8755
<height>21</height>
8856
</rect>
@@ -180,7 +148,7 @@
180148
<x>20</x>
181149
<y>190</y>
182150
<width>351</width>
183-
<height>271</height>
151+
<height>121</height>
184152
</rect>
185153
</property>
186154
<layout class="QFormLayout" name="formLayout_4">
@@ -221,7 +189,7 @@
221189
<rect>
222190
<x>400</x>
223191
<y>30</y>
224-
<width>135</width>
192+
<width>351</width>
225193
<height>58</height>
226194
</rect>
227195
</property>
@@ -294,7 +262,7 @@
294262
<x>400</x>
295263
<y>190</y>
296264
<width>351</width>
297-
<height>58</height>
265+
<height>121</height>
298266
</rect>
299267
</property>
300268
<layout class="QFormLayout" name="formLayout_6">
@@ -324,43 +292,69 @@
324292
</item>
325293
</layout>
326294
</widget>
327-
<widget class="QToolButton" name="toolButton">
295+
<widget class="QPushButton" name="refresh">
328296
<property name="enabled">
329-
<bool>false</bool>
297+
<bool>true</bool>
330298
</property>
331299
<property name="geometry">
332300
<rect>
333-
<x>470</x>
334-
<y>480</y>
335-
<width>25</width>
336-
<height>26</height>
301+
<x>220</x>
302+
<y>340</y>
303+
<width>86</width>
304+
<height>27</height>
337305
</rect>
338306
</property>
339307
<property name="text">
340-
<string>...</string>
308+
<string>刷新</string>
341309
</property>
342310
</widget>
343-
<widget class="QPushButton" name="refresh">
344-
<property name="enabled">
345-
<bool>true</bool>
346-
</property>
311+
<widget class="QLabel" name="priority">
347312
<property name="geometry">
348313
<rect>
349-
<x>380</x>
350-
<y>480</y>
351-
<width>86</width>
352-
<height>27</height>
314+
<x>20</x>
315+
<y>390</y>
316+
<width>231</width>
317+
<height>20</height>
353318
</rect>
354319
</property>
320+
<property name="font">
321+
<font>
322+
<pointsize>10</pointsize>
323+
</font>
324+
</property>
355325
<property name="text">
356-
<string>刷新</string>
326+
<string>Loading……</string>
357327
</property>
358328
</widget>
359-
<widget class="QLabel" name="priority">
329+
<widget class="QLabel" name="test_waring">
360330
<property name="geometry">
361331
<rect>
362332
<x>20</x>
363-
<y>530</y>
333+
<y>410</y>
334+
<width>521</width>
335+
<height>20</height>
336+
</rect>
337+
</property>
338+
<property name="font">
339+
<font>
340+
<pointsize>10</pointsize>
341+
</font>
342+
</property>
343+
<property name="text">
344+
<string>Loading……</string>
345+
</property>
346+
<property name="textFormat">
347+
<enum>Qt::TextFormat::PlainText</enum>
348+
</property>
349+
<property name="wordWrap">
350+
<bool>false</bool>
351+
</property>
352+
</widget>
353+
<widget class="QLabel" name="Version">
354+
<property name="geometry">
355+
<rect>
356+
<x>560</x>
357+
<y>410</y>
364358
<width>231</width>
365359
<height>20</height>
366360
</rect>
@@ -373,6 +367,15 @@
373367
<property name="text">
374368
<string>Loading……</string>
375369
</property>
370+
<property name="textFormat">
371+
<enum>Qt::TextFormat::PlainText</enum>
372+
</property>
373+
<property name="alignment">
374+
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
375+
</property>
376+
<property name="wordWrap">
377+
<bool>false</bool>
378+
</property>
376379
</widget>
377380
</widget>
378381
<widget class="QMenuBar" name="menubar">

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@
88
<br>
99
1010
## Qt版本截图
11-
![Home](git_img/mainsc.png)<br>
11+
![Home](git_img/sc.png)<br>
1212
<center>主页</center>
1313

14-
![About](git_img/aboutsc.png)<br>
15-
<center>关于</center>
16-
1714
# 重构Timeline
1815
## 重构原因
1916
- e语言容易被杀毒软件、反作弊等安全类型软件一秒六棍

git_img/aboutsc.png

-43.8 KB
Binary file not shown.

git_img/mainsc.png

-52.8 KB
Binary file not shown.

git_img/sc.png

5.7 MB
Loading

main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
#include <QTextStream>
55
#include <QDebug>
66
#include <QDateTime>
7+
#include "version.h"
78

89

10+
QString AK_VERSION = "0.4.rana.alpha.251027";
11+
912
void customMessageHandler(QtMsgType type, const QMessageLogContext &, const QString &msg)
1013
{
1114
static QFile logFile("ArmyKnife.log");
@@ -55,6 +58,7 @@ int main(int argc, char *argv[])
5558
{
5659
QApplication a(argc, argv);
5760
qInstallMessageHandler(customMessageHandler);
61+
QString Version = "Test";
5862
home w;
5963
w.show();
6064
return a.exec();

0 commit comments

Comments
 (0)