Skip to content

Commit 60478bb

Browse files
committed
软件界面添加相关链接
1 parent 3a32a28 commit 60478bb

File tree

3 files changed

+192
-77
lines changed

3 files changed

+192
-77
lines changed

project/widgets/funcwidget.ui

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,10 @@
231231
<item row="2" column="2">
232232
<widget class="QComboBox" name="comboBox_sckpin"/>
233233
</item>
234-
<item row="5" column="1">
234+
<item row="2" column="1">
235+
<widget class="QComboBox" name="comboBox_sckport"/>
236+
</item>
237+
<item row="6" column="0" colspan="3">
235238
<spacer name="verticalSpacer_2">
236239
<property name="orientation">
237240
<enum>Qt::Vertical</enum>
@@ -244,12 +247,8 @@
244247
</property>
245248
</spacer>
246249
</item>
247-
<item row="0" column="0">
248-
<widget class="QCheckBox" name="checkBox_spi">
249-
<property name="text">
250-
<string>启用</string>
251-
</property>
252-
</widget>
250+
<item row="3" column="2">
251+
<widget class="QComboBox" name="comboBox_misopin"/>
253252
</item>
254253
<item row="1" column="0">
255254
<widget class="QLabel" name="label_4">
@@ -264,57 +263,74 @@
264263
</property>
265264
</widget>
266265
</item>
267-
<item row="2" column="1">
268-
<widget class="QComboBox" name="comboBox_sckport"/>
269-
</item>
270-
<item row="4" column="2">
271-
<widget class="QComboBox" name="comboBox_mosipin"/>
272-
</item>
273-
<item row="3" column="1">
274-
<widget class="QComboBox" name="comboBox_misoport"/>
275-
</item>
276-
<item row="2" column="0">
277-
<widget class="QLabel" name="label">
266+
<item row="3" column="0">
267+
<widget class="QLabel" name="label_2">
278268
<property name="minimumSize">
279269
<size>
280270
<width>60</width>
281271
<height>0</height>
282272
</size>
283273
</property>
284274
<property name="text">
285-
<string>SCK</string>
275+
<string>MISO</string>
276+
</property>
277+
</widget>
278+
</item>
279+
<item row="0" column="0">
280+
<widget class="QCheckBox" name="checkBox_spi">
281+
<property name="text">
282+
<string>启用</string>
286283
</property>
287284
</widget>
288285
</item>
286+
<item row="3" column="1">
287+
<widget class="QComboBox" name="comboBox_misoport"/>
288+
</item>
289+
<item row="4" column="2">
290+
<widget class="QComboBox" name="comboBox_mosipin"/>
291+
</item>
289292
<item row="4" column="1">
290293
<widget class="QComboBox" name="comboBox_mosiport"/>
291294
</item>
292-
<item row="3" column="2">
293-
<widget class="QComboBox" name="comboBox_misopin"/>
295+
<item row="4" column="0">
296+
<widget class="QLabel" name="label_3">
297+
<property name="text">
298+
<string>MOSI</string>
299+
</property>
300+
</widget>
294301
</item>
295-
<item row="3" column="0">
296-
<widget class="QLabel" name="label_2">
302+
<item row="2" column="0">
303+
<widget class="QLabel" name="label">
297304
<property name="minimumSize">
298305
<size>
299306
<width>60</width>
300307
<height>0</height>
301308
</size>
302309
</property>
303310
<property name="text">
304-
<string>MISO</string>
311+
<string>SCK</string>
305312
</property>
306313
</widget>
307314
</item>
308-
<item row="4" column="0">
309-
<widget class="QLabel" name="label_3">
315+
<item row="1" column="1" colspan="2">
316+
<widget class="QComboBox" name="comboBox_spiname"/>
317+
</item>
318+
<item row="5" column="0" colspan="3">
319+
<widget class="QLabel" name="label_5">
310320
<property name="text">
311-
<string>MOSI</string>
321+
<string>注:此功能仅生成一个pwm转spi的框架模板,代码主体仍需用户自行补充。</string>
322+
</property>
323+
<property name="textFormat">
324+
<enum>Qt::AutoText</enum>
325+
</property>
326+
<property name="scaledContents">
327+
<bool>false</bool>
328+
</property>
329+
<property name="wordWrap">
330+
<bool>true</bool>
312331
</property>
313332
</widget>
314333
</item>
315-
<item row="1" column="1" colspan="2">
316-
<widget class="QComboBox" name="comboBox_spiname"/>
317-
</item>
318334
</layout>
319335
</widget>
320336
</item>

project/widgets/otherwidget.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,36 @@ OtherWidget::OtherWidget(QWidget *parent) :
5858
{
5959
ui->setupUi(this);
6060
rtduino = RTduinoConfig::getInstance();
61+
62+
ui->rtduino_git_url->setOpenExternalLinks(true);
63+
ui->rtduino_git_url->setText("<a style='color: green; text-decoration: none' "
64+
"href = https://github.com/RTduino/RTduino>"
65+
"https://github.com/RTduino/RTduino");
66+
67+
ui->rtduino_gitee_url->setOpenExternalLinks(true);
68+
ui->rtduino_gitee_url->setText("<a style='color: green; text-decoration: none' "
69+
"href = https://gitee.com/rtduino/RTduino>"
70+
"https://gitee.com/rtduino/RTduino");
71+
72+
ui->doc_git_url->setOpenExternalLinks(true);
73+
ui->doc_git_url->setText("<a style='color: green; text-decoration: none' "
74+
"href = https://rtduino.github.io/RTduino/#/zh/manual/adapt/bsp/stm32/stm32>"
75+
"https://rtduino.github.io/RTduino/#/zh/manual/adapt/bsp/stm32/stm32");
76+
77+
ui->doc_gitee_url->setOpenExternalLinks(true);
78+
ui->doc_gitee_url->setText("<a style='color: green; text-decoration: none' "
79+
"href = https://rtduino.gitee.io/#/zh/manual/adapt/bsp/stm32/stm32>"
80+
"https://rtduino.gitee.io/#/zh/manual/adapt/bsp/stm32/stm32");
81+
82+
ui->autor_liyony_url->setOpenExternalLinks(true);
83+
ui->autor_liyony_url->setText("<a style='color: green; text-decoration: none' "
84+
"href = https://github.com/liYony>"
85+
"https://github.com/liYony");
86+
87+
ui->autor_meco_url->setOpenExternalLinks(true);
88+
ui->autor_meco_url->setText("<a style='color: green; text-decoration: none' "
89+
"href = https://github.com/mysterywolf>"
90+
"https://github.com/mysterywolf");
6191
}
6292

6393
OtherWidget::~OtherWidget()

project/widgets/otherwidget.ui

Lines changed: 116 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>617</width>
10-
<height>354</height>
9+
<width>1358</width>
10+
<height>796</height>
1111
</rect>
1212
</property>
1313
<property name="font">
@@ -22,60 +22,25 @@
2222
<string>Form</string>
2323
</property>
2424
<layout class="QGridLayout" name="gridLayout_2">
25-
<property name="leftMargin">
26-
<number>0</number>
27-
</property>
28-
<property name="topMargin">
29-
<number>0</number>
30-
</property>
31-
<property name="rightMargin">
32-
<number>0</number>
33-
</property>
34-
<property name="bottomMargin">
35-
<number>0</number>
36-
</property>
37-
<property name="spacing">
38-
<number>0</number>
39-
</property>
40-
<item row="1" column="0">
41-
<spacer name="verticalSpacer">
42-
<property name="orientation">
43-
<enum>Qt::Vertical</enum>
44-
</property>
45-
<property name="sizeHint" stdset="0">
25+
<item row="0" column="0" colspan="2">
26+
<widget class="QGroupBox" name="groupBox">
27+
<property name="minimumSize">
4628
<size>
47-
<width>20</width>
48-
<height>40</height>
29+
<width>350</width>
30+
<height>0</height>
4931
</size>
5032
</property>
51-
</spacer>
52-
</item>
53-
<item row="0" column="0">
54-
<widget class="QGroupBox" name="groupBox">
5533
<property name="title">
5634
<string>快捷键</string>
5735
</property>
5836
<layout class="QGridLayout" name="gridLayout">
59-
<item row="1" column="1">
60-
<widget class="HotkeyLineEdit" name="lineEdit_insert"/>
61-
</item>
62-
<item row="3" column="1">
63-
<widget class="HotkeyLineEdit" name="lineEdit_delete"/>
64-
</item>
6537
<item row="0" column="0">
6638
<widget class="QCheckBox" name="checkBox_add">
6739
<property name="text">
6840
<string>添加引脚</string>
6941
</property>
7042
</widget>
7143
</item>
72-
<item row="3" column="0">
73-
<widget class="QCheckBox" name="checkBox_delete">
74-
<property name="text">
75-
<string>删除引脚</string>
76-
</property>
77-
</widget>
78-
</item>
7944
<item row="0" column="1">
8045
<widget class="HotkeyLineEdit" name="lineEdit_add"/>
8146
</item>
@@ -86,8 +51,8 @@
8651
</property>
8752
</widget>
8853
</item>
89-
<item row="2" column="1">
90-
<widget class="HotkeyLineEdit" name="lineEdit_change"/>
54+
<item row="1" column="1">
55+
<widget class="HotkeyLineEdit" name="lineEdit_insert"/>
9156
</item>
9257
<item row="2" column="0">
9358
<widget class="QCheckBox" name="checkBox_change">
@@ -96,22 +61,126 @@
9661
</property>
9762
</widget>
9863
</item>
64+
<item row="2" column="1">
65+
<widget class="HotkeyLineEdit" name="lineEdit_change"/>
66+
</item>
67+
<item row="3" column="0">
68+
<widget class="QCheckBox" name="checkBox_delete">
69+
<property name="text">
70+
<string>删除引脚</string>
71+
</property>
72+
</widget>
73+
</item>
74+
<item row="3" column="1">
75+
<widget class="HotkeyLineEdit" name="lineEdit_delete"/>
76+
</item>
9977
</layout>
10078
</widget>
10179
</item>
102-
<item row="0" column="1" rowspan="2">
80+
<item row="1" column="0" colspan="2">
81+
<spacer name="verticalSpacer">
82+
<property name="orientation">
83+
<enum>Qt::Vertical</enum>
84+
</property>
85+
<property name="sizeHint" stdset="0">
86+
<size>
87+
<width>20</width>
88+
<height>530</height>
89+
</size>
90+
</property>
91+
</spacer>
92+
</item>
93+
<item row="0" column="3" rowspan="2">
10394
<spacer name="horizontalSpacer">
10495
<property name="orientation">
10596
<enum>Qt::Horizontal</enum>
10697
</property>
10798
<property name="sizeHint" stdset="0">
10899
<size>
109-
<width>291</width>
110-
<height>20</height>
100+
<width>969</width>
101+
<height>363</height>
111102
</size>
112103
</property>
113104
</spacer>
114105
</item>
106+
<item row="2" column="0" colspan="4">
107+
<widget class="QGroupBox" name="groupBox_2">
108+
<property name="title">
109+
<string>相关链接</string>
110+
</property>
111+
<layout class="QGridLayout" name="gridLayout_6">
112+
<item row="0" column="0">
113+
<widget class="QGroupBox" name="groupBox_4">
114+
<property name="title">
115+
<string>RTduino仓库</string>
116+
</property>
117+
<layout class="QGridLayout" name="gridLayout_3">
118+
<item row="0" column="0">
119+
<widget class="QLabel" name="rtduino_git_url">
120+
<property name="text">
121+
<string>https://github.com/RTduino/RTduino</string>
122+
</property>
123+
</widget>
124+
</item>
125+
<item row="1" column="0">
126+
<widget class="QLabel" name="rtduino_gitee_url">
127+
<property name="text">
128+
<string>https://gitee.com/rtduino/RTduino</string>
129+
</property>
130+
</widget>
131+
</item>
132+
</layout>
133+
</widget>
134+
</item>
135+
<item row="2" column="0">
136+
<widget class="QGroupBox" name="groupBox_5">
137+
<property name="title">
138+
<string>软件帮助文档</string>
139+
</property>
140+
<layout class="QGridLayout" name="gridLayout_5">
141+
<item row="0" column="0">
142+
<widget class="QLabel" name="doc_git_url">
143+
<property name="text">
144+
<string>https://rtduino.github.io/RTduino/#/zh/manual/adapt/bsp/stm32/stm32</string>
145+
</property>
146+
</widget>
147+
</item>
148+
<item row="1" column="0">
149+
<widget class="QLabel" name="doc_gitee_url">
150+
<property name="text">
151+
<string>https://rtduino.gitee.io/#/zh/manual/adapt/bsp/stm32/stm32</string>
152+
</property>
153+
</widget>
154+
</item>
155+
</layout>
156+
</widget>
157+
</item>
158+
<item row="3" column="0">
159+
<widget class="QGroupBox" name="groupBox_3">
160+
<property name="title">
161+
<string>作者主页</string>
162+
</property>
163+
<layout class="QGridLayout" name="gridLayout_4">
164+
<item row="1" column="0">
165+
<widget class="QLabel" name="autor_meco_url">
166+
<property name="text">
167+
<string>https://github.com/mysterywolf</string>
168+
</property>
169+
</widget>
170+
</item>
171+
<item row="0" column="0">
172+
<widget class="QLabel" name="autor_liyony_url">
173+
<property name="text">
174+
<string>https://github.com/liYony</string>
175+
</property>
176+
</widget>
177+
</item>
178+
</layout>
179+
</widget>
180+
</item>
181+
</layout>
182+
</widget>
183+
</item>
115184
</layout>
116185
</widget>
117186
<customwidgets>

0 commit comments

Comments
 (0)