Skip to content

Commit 2ed165b

Browse files
committed
LP-559 Update tinyFish HW page with vector picture
1 parent 740e9fa commit 2ed165b

2 files changed

Lines changed: 136 additions & 98 deletions

File tree

ground/gcs/src/plugins/config/configtinyfishhwwidget.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ ConfigTinyFISHHWWidget::ConfigTinyFISHHWWidget(QWidget *parent) : ConfigTaskWidg
3838
m_ui = new Ui_TinyFISHHWWidget();
3939
m_ui->setupUi(this);
4040

41+
m_ui->boardImg->load(QString(":/configgadget/images/tinyfish.svg"));
42+
QSize picSize = m_ui->boardImg->sizeHint();
43+
picSize.scale(360, 360, Qt::KeepAspectRatio);
44+
m_ui->boardImg->setFixedSize(picSize);
45+
4146
// must be done before auto binding !
4247
setWikiURL("TinyFISH+Configuration");
4348

ground/gcs/src/plugins/config/configtinyfishhwwidget.ui

Lines changed: 131 additions & 98 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>969</width>
10-
<height>886</height>
9+
<width>1130</width>
10+
<height>738</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -122,8 +122,8 @@
122122
<rect>
123123
<x>0</x>
124124
<y>0</y>
125-
<width>939</width>
126-
<height>786</height>
125+
<width>1108</width>
126+
<height>650</height>
127127
</rect>
128128
</property>
129129
<layout class="QGridLayout" name="gridLayout_3">
@@ -139,48 +139,6 @@
139139
<property name="bottomMargin">
140140
<number>12</number>
141141
</property>
142-
<item row="3" column="2">
143-
<spacer name="verticalSpacer">
144-
<property name="orientation">
145-
<enum>Qt::Vertical</enum>
146-
</property>
147-
<property name="sizeHint" stdset="0">
148-
<size>
149-
<width>20</width>
150-
<height>40</height>
151-
</size>
152-
</property>
153-
</spacer>
154-
</item>
155-
<item row="2" column="3">
156-
<spacer name="horizontalSpacer_5">
157-
<property name="orientation">
158-
<enum>Qt::Horizontal</enum>
159-
</property>
160-
<property name="sizeHint" stdset="0">
161-
<size>
162-
<width>40</width>
163-
<height>20</height>
164-
</size>
165-
</property>
166-
</spacer>
167-
</item>
168-
<item row="1" column="2">
169-
<spacer name="verticalSpacer_2">
170-
<property name="orientation">
171-
<enum>Qt::Vertical</enum>
172-
</property>
173-
<property name="sizeType">
174-
<enum>QSizePolicy::Fixed</enum>
175-
</property>
176-
<property name="sizeHint" stdset="0">
177-
<size>
178-
<width>20</width>
179-
<height>10</height>
180-
</size>
181-
</property>
182-
</spacer>
183-
</item>
184142
<item row="0" column="2">
185143
<widget class="QLabel" name="label_6">
186144
<property name="sizePolicy">
@@ -225,21 +183,100 @@
225183
</property>
226184
<property name="sizeHint" stdset="0">
227185
<size>
228-
<width>40</width>
186+
<width>0</width>
187+
<height>20</height>
188+
</size>
189+
</property>
190+
</spacer>
191+
</item>
192+
<item row="1" column="2">
193+
<spacer name="verticalSpacer_2">
194+
<property name="orientation">
195+
<enum>Qt::Vertical</enum>
196+
</property>
197+
<property name="sizeType">
198+
<enum>QSizePolicy::Fixed</enum>
199+
</property>
200+
<property name="sizeHint" stdset="0">
201+
<size>
202+
<width>20</width>
203+
<height>10</height>
204+
</size>
205+
</property>
206+
</spacer>
207+
</item>
208+
<item row="2" column="3">
209+
<spacer name="horizontalSpacer_5">
210+
<property name="orientation">
211+
<enum>Qt::Horizontal</enum>
212+
</property>
213+
<property name="sizeHint" stdset="0">
214+
<size>
215+
<width>0</width>
229216
<height>20</height>
230217
</size>
231218
</property>
232219
</spacer>
233220
</item>
234221
<item row="2" column="2">
235222
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0">
236-
<item row="0" column="3">
223+
<item row="0" column="4">
237224
<layout class="QGridLayout" name="gridLayout_4">
238225
<item row="1" column="0">
239226
<widget class="QComboBox" name="cbLEDPort"/>
240227
</item>
228+
<item row="3" column="0">
229+
<spacer name="verticalSpacer_6">
230+
<property name="orientation">
231+
<enum>Qt::Vertical</enum>
232+
</property>
233+
<property name="sizeType">
234+
<enum>QSizePolicy::Fixed</enum>
235+
</property>
236+
<property name="sizeHint" stdset="0">
237+
<size>
238+
<width>20</width>
239+
<height>100</height>
240+
</size>
241+
</property>
242+
</spacer>
243+
</item>
244+
<item row="1" column="1">
245+
<widget class="QLabel" name="lbLEDPort">
246+
<property name="sizePolicy">
247+
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
248+
<horstretch>0</horstretch>
249+
<verstretch>0</verstretch>
250+
</sizepolicy>
251+
</property>
252+
<property name="minimumSize">
253+
<size>
254+
<width>80</width>
255+
<height>0</height>
256+
</size>
257+
</property>
258+
<property name="text">
259+
<string>IR/LED</string>
260+
</property>
261+
</widget>
262+
</item>
263+
<item row="2" column="0">
264+
<widget class="QComboBox" name="cbUART3"/>
265+
</item>
241266
<item row="2" column="1">
242267
<widget class="QLabel" name="lbUART3">
268+
<property name="sizePolicy">
269+
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
270+
<horstretch>0</horstretch>
271+
<verstretch>0</verstretch>
272+
</sizepolicy>
273+
</property>
274+
<property name="minimumSize">
275+
<size>
276+
<width>80</width>
277+
<height>0</height>
278+
</size>
279+
</property>
243280
<property name="text">
244281
<string>UART3</string>
245282
</property>
@@ -254,7 +291,7 @@
254291
<enum>Qt::Vertical</enum>
255292
</property>
256293
<property name="sizeType">
257-
<enum>QSizePolicy::Expanding</enum>
294+
<enum>QSizePolicy::MinimumExpanding</enum>
258295
</property>
259296
<property name="sizeHint" stdset="0">
260297
<size>
@@ -264,80 +301,71 @@
264301
</property>
265302
</spacer>
266303
</item>
267-
<item row="3" column="0">
268-
<spacer name="verticalSpacer_6">
269-
<property name="orientation">
270-
<enum>Qt::Vertical</enum>
271-
</property>
272-
<property name="sizeType">
273-
<enum>QSizePolicy::Fixed</enum>
274-
</property>
275-
<property name="sizeHint" stdset="0">
276-
<size>
277-
<width>20</width>
278-
<height>80</height>
279-
</size>
280-
</property>
281-
</spacer>
282-
</item>
283-
<item row="2" column="0">
284-
<widget class="QComboBox" name="cbUART3"/>
285-
</item>
286-
<item row="1" column="1">
287-
<widget class="QLabel" name="lbLEDPort">
288-
<property name="text">
289-
<string>IR/LED</string>
290-
</property>
291-
</widget>
292-
</item>
293304
</layout>
294305
</item>
295-
<item row="0" column="1" colspan="2" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
296-
<widget class="QLabel" name="lbBoardImage">
306+
<item row="0" column="1" colspan="3">
307+
<widget class="QSvgWidget" name="boardImg" native="true">
297308
<property name="sizePolicy">
298309
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
299310
<horstretch>0</horstretch>
300311
<verstretch>0</verstretch>
301312
</sizepolicy>
302313
</property>
303-
<property name="maximumSize">
314+
<property name="minimumSize">
304315
<size>
305316
<width>350</width>
306317
<height>350</height>
307318
</size>
308319
</property>
309-
<property name="text">
310-
<string/>
311-
</property>
312-
<property name="pixmap">
313-
<pixmap resource="configgadget.qrc">:/configgadget/images/tinyfish_top.png</pixmap>
314-
</property>
315-
<property name="scaledContents">
316-
<bool>false</bool>
317-
</property>
318-
<property name="alignment">
319-
<set>Qt::AlignCenter</set>
320-
</property>
321-
<property name="textInteractionFlags">
322-
<set>Qt::NoTextInteraction</set>
320+
<property name="maximumSize">
321+
<size>
322+
<width>160000</width>
323+
<height>160000</height>
324+
</size>
323325
</property>
324326
</widget>
325327
</item>
326-
<item row="0" column="0">
327-
<layout class="QGridLayout" name="gridLayout_2"/>
328-
</item>
329-
<item row="1" column="0" colspan="4">
328+
<item row="1" column="0" colspan="5">
330329
<widget class="CommonHWSettingsWidget" name="commonHWSettings" native="true">
331330
<property name="minimumSize">
332331
<size>
333-
<width>20</width>
334-
<height>80</height>
332+
<width>600</width>
333+
<height>20</height>
335334
</size>
336335
</property>
337336
</widget>
338337
</item>
338+
<item row="0" column="0">
339+
<spacer name="horizontalSpacer_2">
340+
<property name="orientation">
341+
<enum>Qt::Horizontal</enum>
342+
</property>
343+
<property name="sizeType">
344+
<enum>QSizePolicy::MinimumExpanding</enum>
345+
</property>
346+
<property name="sizeHint" stdset="0">
347+
<size>
348+
<width>5</width>
349+
<height>20</height>
350+
</size>
351+
</property>
352+
</spacer>
353+
</item>
339354
</layout>
340355
</item>
356+
<item row="3" column="2">
357+
<spacer name="verticalSpacer">
358+
<property name="orientation">
359+
<enum>Qt::Vertical</enum>
360+
</property>
361+
<property name="sizeHint" stdset="0">
362+
<size>
363+
<width>20</width>
364+
<height>0</height>
365+
</size>
366+
</property>
367+
</spacer>
368+
</item>
341369
</layout>
342370
</widget>
343371
</widget>
@@ -550,6 +578,11 @@ Beware of not locking yourself out!</string>
550578
</layout>
551579
</widget>
552580
<customwidgets>
581+
<customwidget>
582+
<class>QSvgWidget</class>
583+
<extends>QWidget</extends>
584+
<header>qsvgwidget.h</header>
585+
</customwidget>
553586
<customwidget>
554587
<class>CommonHWSettingsWidget</class>
555588
<extends>QWidget</extends>

0 commit comments

Comments
 (0)