Skip to content

Commit fc2253d

Browse files
author
zzy
committed
release v1.0.1
1 parent 1c3c19b commit fc2253d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+707
-387
lines changed

MqttClient.pro

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
QT += core gui network
88

9+
VERSION = 1.0.1
10+
911
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
1012

1113
TARGET = MqttClient
@@ -35,8 +37,7 @@ SOURCES += \
3537
messageviewer.cpp \
3638
mqttexception.cpp \
3739
license.cpp \
38-
qmqtt.cpp \
39-
qtmqtt.cpp
40+
logger.cpp
4041

4142
HEADERS += \
4243
mainwindow.h \
@@ -49,9 +50,7 @@ HEADERS += \
4950
messageviewer.h \
5051
mqttexception.h \
5152
license.h \
52-
abstractmqtt.h \
53-
qmqtt.h \
54-
qtmqtt.h
53+
logger.h
5554

5655
FORMS += \
5756
mainwindow.ui \
@@ -67,23 +66,13 @@ RESOURCES += \
6766
TRANSLATIONS += zh_cn.ts\
6867
en_us.ts
6968

70-
#win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lQt5Mqtt
71-
#else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lQt5Mqttd
72-
#else:unix: LIBS += -L$$PWD/lib/ -lQt5Mqtt
73-
74-
#INCLUDEPATH += $$PWD/include
75-
#DEPENDPATH += $$PWD/include
76-
77-
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lQt5Mqtt -lqmqtt
78-
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lQt5Mqttd -lqmqttd
79-
else:unix: LIBS += -L$$PWD/lib/ -lQt5Mqtt -lqmqtt
80-
81-
#INCLUDEPATH += E:/SoftWare/Qt/Qt5.12.2/5.12.2/mingw73_64/include
82-
#DEPENDPATH += E:/SoftWare/Qt/Qt5.12.2/5.12.2/mingw73_64/include
69+
win32:CONFIG(release, debug|release): LIBS += -lQt5Mqtt
70+
else:win32:CONFIG(debug, debug|release): LIBS += -lQt5Mqttd
71+
else:unix: LIBS += -lQt5Mqtt
8372

8473
#win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lqmqtt
8574
#else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lqmqttd
8675
#else:unix: LIBS += -L$$PWD/lib/ -lqmqtt
8776

88-
#INCLUDEPATH += $$PWD/.
89-
#DEPENDPATH += $$PWD/.
77+
#INCLUDEPATH += $$PWD/include
78+
#DEPENDPATH += $$PWD/include

MqttClient.pro.user

Lines changed: 47 additions & 47 deletions
Large diffs are not rendered by default.

about.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ About::About(QWidget *parent) :
1111
ui->setupUi(this);
1212
setWindowFlags(windowFlags() | Qt::WindowContextHelpButtonHint);
1313
connect(ui->okButton, &QPushButton::clicked, this, &About::close);
14-
connect(ui->license, &QPushButton::clicked, this, [this](){
14+
connect(ui->license, &QLabel::linkActivated, this, [this](){
1515
License l(this);
1616
l.exec();
1717
});

about.ui

Lines changed: 101 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,30 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>400</width>
10-
<height>252</height>
9+
<width>399</width>
10+
<height>261</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>About MQTT Utility</string>
1515
</property>
1616
<layout class="QVBoxLayout" name="verticalLayout">
1717
<item>
18-
<widget class="QWidget" name="widget_2" native="true">
18+
<widget class="QWidget" name="logo" native="true">
1919
<layout class="QGridLayout" name="gridLayout_2">
20+
<item row="1" column="6">
21+
<spacer name="nameRightSpacer">
22+
<property name="orientation">
23+
<enum>Qt::Horizontal</enum>
24+
</property>
25+
<property name="sizeHint" stdset="0">
26+
<size>
27+
<width>40</width>
28+
<height>20</height>
29+
</size>
30+
</property>
31+
</spacer>
32+
</item>
2033
<item row="0" column="1" rowspan="3">
2134
<widget class="QLabel" name="label">
2235
<property name="maximumSize">
@@ -42,8 +55,31 @@
4255
</property>
4356
</widget>
4457
</item>
45-
<item row="0" column="2" rowspan="3" colspan="2">
46-
<spacer name="horizontalSpacer_4">
58+
<item row="2" column="5">
59+
<widget class="QLabel" name="version">
60+
<property name="text">
61+
<string>Beta v1.0.1</string>
62+
</property>
63+
<property name="alignment">
64+
<set>Qt::AlignCenter</set>
65+
</property>
66+
</widget>
67+
</item>
68+
<item row="1" column="5">
69+
<widget class="QLabel" name="name">
70+
<property name="styleSheet">
71+
<string notr="true">font-family:Microsoft YaHei;font-size:30px;</string>
72+
</property>
73+
<property name="text">
74+
<string>MqttClient</string>
75+
</property>
76+
<property name="alignment">
77+
<set>Qt::AlignCenter</set>
78+
</property>
79+
</widget>
80+
</item>
81+
<item row="0" column="0" rowspan="3">
82+
<spacer name="logoLeftSpacer">
4783
<property name="orientation">
4884
<enum>Qt::Horizontal</enum>
4985
</property>
@@ -55,8 +91,8 @@
5591
</property>
5692
</spacer>
5793
</item>
58-
<item row="0" column="0" rowspan="3">
59-
<spacer name="horizontalSpacer_2">
94+
<item row="2" column="6">
95+
<spacer name="versionRightSpacer">
6096
<property name="orientation">
6197
<enum>Qt::Horizontal</enum>
6298
</property>
@@ -68,21 +104,8 @@
68104
</property>
69105
</spacer>
70106
</item>
71-
<item row="1" column="5">
72-
<widget class="QLabel" name="label_3">
73-
<property name="styleSheet">
74-
<string notr="true">font-family:Microsoft YaHei;font-size:30px;</string>
75-
</property>
76-
<property name="text">
77-
<string>MqttClient</string>
78-
</property>
79-
<property name="alignment">
80-
<set>Qt::AlignCenter</set>
81-
</property>
82-
</widget>
83-
</item>
84-
<item row="1" column="6">
85-
<spacer name="horizontalSpacer_3">
107+
<item row="1" column="2" colspan="3">
108+
<spacer name="logoRightSpacer">
86109
<property name="orientation">
87110
<enum>Qt::Horizontal</enum>
88111
</property>
@@ -94,67 +117,91 @@
94117
</property>
95118
</spacer>
96119
</item>
97-
<item row="2" column="3" colspan="4">
98-
<widget class="QLabel" name="label_2">
99-
<property name="text">
100-
<string>Beta v1.0.1</string>
120+
<item row="2" column="2" colspan="3">
121+
<spacer name="versionLeftSpacer">
122+
<property name="orientation">
123+
<enum>Qt::Horizontal</enum>
101124
</property>
102-
<property name="alignment">
103-
<set>Qt::AlignCenter</set>
125+
<property name="sizeHint" stdset="0">
126+
<size>
127+
<width>40</width>
128+
<height>20</height>
129+
</size>
104130
</property>
105-
</widget>
131+
</spacer>
106132
</item>
107133
</layout>
108134
</widget>
109135
</item>
110136
<item>
111-
<widget class="QWidget" name="widget" native="true">
137+
<widget class="QWidget" name="link" native="true">
112138
<property name="maximumSize">
113139
<size>
114140
<width>16777215</width>
115-
<height>100</height>
141+
<height>130</height>
116142
</size>
117143
</property>
118144
<property name="styleSheet">
119145
<string notr="true">QWidget#widget{border-top:1px solid}</string>
120146
</property>
121147
<layout class="QGridLayout" name="gridLayout">
122-
<item row="3" column="1">
123-
<widget class="QPushButton" name="license">
148+
<item row="2" column="1" colspan="3">
149+
<widget class="QLabel" name="license">
124150
<property name="text">
125-
<string>License</string>
151+
<string>&lt;a href = GNU General Public License v3.0 &gt;GNU General Public License v3.0&lt;/a&gt;</string>
126152
</property>
127153
</widget>
128154
</item>
129-
<item row="3" column="2">
130-
<spacer name="horizontalSpacer">
155+
<item row="1" column="1" colspan="3">
156+
<widget class="QLabel" name="github">
157+
<property name="text">
158+
<string>&lt;a href = https://github.com/yuaners/mqtt-client &gt;https://github.com/yuaners/mqtt-client&lt;/a&gt;</string>
159+
</property>
160+
</widget>
161+
</item>
162+
<item row="1" column="0">
163+
<widget class="QLabel" name="githubTitle">
164+
<property name="text">
165+
<string>github:</string>
166+
</property>
167+
</widget>
168+
</item>
169+
<item row="0" column="4">
170+
<spacer name="emailSpacer">
131171
<property name="orientation">
132172
<enum>Qt::Horizontal</enum>
133173
</property>
134174
<property name="sizeHint" stdset="0">
135175
<size>
136-
<width>164</width>
176+
<width>40</width>
137177
<height>20</height>
138178
</size>
139179
</property>
140180
</spacer>
141181
</item>
142-
<item row="0" column="1" colspan="4">
143-
<widget class="QLabel" name="github">
182+
<item row="4" column="4">
183+
<widget class="QPushButton" name="okButton">
144184
<property name="text">
145-
<string>&lt;a href = https://github.com/yuaners/mqtt-client &gt;https://github.com/yuaners/mqtt-client&lt;/a&gt;</string>
185+
<string>OK</string>
146186
</property>
147187
</widget>
148188
</item>
149-
<item row="3" column="3">
150-
<widget class="QPushButton" name="okButton">
189+
<item row="2" column="0">
190+
<widget class="QLabel" name="licenseTitle">
151191
<property name="text">
152-
<string>OK</string>
192+
<string>license:</string>
153193
</property>
154194
</widget>
155195
</item>
156-
<item row="3" column="4">
157-
<spacer name="horizontalSpacer_6">
196+
<item row="0" column="1" colspan="2">
197+
<widget class="QLabel" name="email">
198+
<property name="text">
199+
<string>&lt;a href = zhangzhongyuan132@163.com &gt;zhangzhongyuan132@163.com&lt;/a&gt;</string>
200+
</property>
201+
</widget>
202+
</item>
203+
<item row="2" column="4">
204+
<spacer name="licenseSpacer">
158205
<property name="orientation">
159206
<enum>Qt::Horizontal</enum>
160207
</property>
@@ -166,28 +213,28 @@
166213
</property>
167214
</spacer>
168215
</item>
169-
<item row="2" column="2">
170-
<spacer name="verticalSpacer">
216+
<item row="4" column="0" colspan="4">
217+
<spacer name="okLeftSpacer">
171218
<property name="orientation">
172-
<enum>Qt::Vertical</enum>
219+
<enum>Qt::Horizontal</enum>
173220
</property>
174221
<property name="sizeHint" stdset="0">
175222
<size>
176-
<width>20</width>
177-
<height>50</height>
223+
<width>164</width>
224+
<height>20</height>
178225
</size>
179226
</property>
180227
</spacer>
181228
</item>
182229
<item row="0" column="0">
183-
<widget class="QLabel" name="label_4">
230+
<widget class="QLabel" name="emailTitle">
184231
<property name="text">
185-
<string>github:</string>
232+
<string>email:</string>
186233
</property>
187234
</widget>
188235
</item>
189-
<item row="3" column="0">
190-
<spacer name="horizontalSpacer_5">
236+
<item row="1" column="4">
237+
<spacer name="githubSpacer">
191238
<property name="orientation">
192239
<enum>Qt::Horizontal</enum>
193240
</property>
@@ -199,20 +246,6 @@
199246
</property>
200247
</spacer>
201248
</item>
202-
<item row="1" column="0">
203-
<widget class="QLabel" name="label_6">
204-
<property name="text">
205-
<string>license:</string>
206-
</property>
207-
</widget>
208-
</item>
209-
<item row="1" column="1" colspan="3">
210-
<widget class="QLabel" name="label_7">
211-
<property name="text">
212-
<string>GNU General Public License v3.0</string>
213-
</property>
214-
</widget>
215-
</item>
216249
</layout>
217250
</widget>
218251
</item>

connectionbutton.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ void ConnectionButton::mouseReleaseEvent(QMouseEvent *e)
8888
qDebug() << "the release button is right.";
8989
m_menu->move(e->globalPos());
9090
m_menu->show();
91+
return;
9192
}
9293

9394
QPushButton::mouseReleaseEvent(e);

0 commit comments

Comments
 (0)