Skip to content

Commit fc77ba2

Browse files
committed
LP-559 Update PikoBLX HW page with vector picture
1 parent 18b7044 commit fc77ba2

2 files changed

Lines changed: 75 additions & 139 deletions

File tree

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

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

41+
m_ui->boardImg->load(QString(":/configgadget/images/pikoblx.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("PikoBLX+Configuration");
4348

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

Lines changed: 70 additions & 139 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>1680</width>
10-
<height>1050</height>
9+
<width>661</width>
10+
<height>716</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>1650</width>
126-
<height>950</height>
125+
<width>639</width>
126+
<height>628</height>
127127
</rect>
128128
</property>
129129
<layout class="QGridLayout" name="gridLayout_3">
@@ -147,7 +147,7 @@
147147
<property name="sizeHint" stdset="0">
148148
<size>
149149
<width>20</width>
150-
<height>40</height>
150+
<height>0</height>
151151
</size>
152152
</property>
153153
</spacer>
@@ -159,7 +159,7 @@
159159
</property>
160160
<property name="sizeHint" stdset="0">
161161
<size>
162-
<width>40</width>
162+
<width>0</width>
163163
<height>20</height>
164164
</size>
165165
</property>
@@ -225,66 +225,48 @@
225225
</property>
226226
<property name="sizeHint" stdset="0">
227227
<size>
228-
<width>40</width>
228+
<width>0</width>
229229
<height>20</height>
230230
</size>
231231
</property>
232232
</spacer>
233233
</item>
234234
<item row="2" column="2">
235-
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0">
236-
<item row="0" column="3">
237-
<spacer name="horizontalSpacer_2">
238-
<property name="orientation">
239-
<enum>Qt::Horizontal</enum>
240-
</property>
241-
<property name="sizeType">
242-
<enum>QSizePolicy::Minimum</enum>
243-
</property>
244-
<property name="sizeHint" stdset="0">
245-
<size>
246-
<width>10</width>
247-
<height>20</height>
248-
</size>
249-
</property>
250-
</spacer>
251-
</item>
252-
<item row="1" column="1" colspan="4" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
253-
<widget class="QLabel" name="lbBoardImage">
235+
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0">
236+
<item row="0" column="1" colspan="2">
237+
<widget class="QSvgWidget" name="boardImg" native="true">
254238
<property name="sizePolicy">
255239
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
256240
<horstretch>0</horstretch>
257241
<verstretch>0</verstretch>
258242
</sizepolicy>
259243
</property>
260-
<property name="maximumSize">
244+
<property name="minimumSize">
261245
<size>
262-
<width>350</width>
263-
<height>350</height>
246+
<width>0</width>
247+
<height>0</height>
264248
</size>
265249
</property>
266-
<property name="text">
267-
<string/>
268-
</property>
269-
<property name="pixmap">
270-
<pixmap resource="configgadget.qrc">:/configgadget/images/pikoblx_top.png</pixmap>
271-
</property>
272-
<property name="scaledContents">
273-
<bool>false</bool>
274-
</property>
275-
<property name="alignment">
276-
<set>Qt::AlignCenter</set>
250+
<property name="maximumSize">
251+
<size>
252+
<width>160000</width>
253+
<height>160000</height>
254+
</size>
277255
</property>
278-
<property name="textInteractionFlags">
279-
<set>Qt::NoTextInteraction</set>
256+
</widget>
257+
</item>
258+
<item row="1" column="0" colspan="3">
259+
<widget class="CommonHWSettingsWidget" name="commonHWSettings" native="true">
260+
<property name="minimumSize">
261+
<size>
262+
<width>600</width>
263+
<height>20</height>
264+
</size>
280265
</property>
281266
</widget>
282267
</item>
283-
<item row="1" column="0">
268+
<item row="0" column="0">
284269
<layout class="QGridLayout" name="gridLayout_2">
285-
<item row="1" column="1">
286-
<widget class="QComboBox" name="cbLEDPort"/>
287-
</item>
288270
<item row="3" column="0">
289271
<widget class="QLabel" name="lbUART2">
290272
<property name="text">
@@ -295,18 +277,21 @@
295277
</property>
296278
</widget>
297279
</item>
298-
<item row="2" column="0">
299-
<widget class="QLabel" name="lbUART1">
300-
<property name="text">
301-
<string>UART1</string>
280+
<item row="5" column="1">
281+
<widget class="QComboBox" name="cbPPMPort"/>
282+
</item>
283+
<item row="6" column="0">
284+
<spacer name="verticalSpacer_4">
285+
<property name="orientation">
286+
<enum>Qt::Vertical</enum>
302287
</property>
303-
<property name="alignment">
304-
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
288+
<property name="sizeHint" stdset="0">
289+
<size>
290+
<width>20</width>
291+
<height>40</height>
292+
</size>
305293
</property>
306-
</widget>
307-
</item>
308-
<item row="2" column="1">
309-
<widget class="QComboBox" name="cbUART1"/>
294+
</spacer>
310295
</item>
311296
<item row="3" column="1">
312297
<widget class="QComboBox" name="cbUART2">
@@ -318,24 +303,21 @@
318303
</property>
319304
</widget>
320305
</item>
321-
<item row="4" column="1">
322-
<widget class="QComboBox" name="cbUART3"/>
306+
<item row="2" column="1">
307+
<widget class="QComboBox" name="cbUART1"/>
323308
</item>
324-
<item row="0" column="0">
325-
<spacer name="verticalSpacer_3">
326-
<property name="orientation">
327-
<enum>Qt::Vertical</enum>
328-
</property>
329-
<property name="sizeType">
330-
<enum>QSizePolicy::Fixed</enum>
309+
<item row="5" column="0">
310+
<widget class="QLabel" name="lblPPM">
311+
<property name="text">
312+
<string>PPM Port (pad)</string>
331313
</property>
332-
<property name="sizeHint" stdset="0">
333-
<size>
334-
<width>20</width>
335-
<height>115</height>
336-
</size>
314+
<property name="alignment">
315+
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
337316
</property>
338-
</spacer>
317+
</widget>
318+
</item>
319+
<item row="4" column="1">
320+
<widget class="QComboBox" name="cbUART3"/>
339321
</item>
340322
<item row="4" column="0">
341323
<widget class="QLabel" name="lbUART3">
@@ -347,19 +329,6 @@
347329
</property>
348330
</widget>
349331
</item>
350-
<item row="6" column="0">
351-
<spacer name="verticalSpacer_4">
352-
<property name="orientation">
353-
<enum>Qt::Vertical</enum>
354-
</property>
355-
<property name="sizeHint" stdset="0">
356-
<size>
357-
<width>20</width>
358-
<height>40</height>
359-
</size>
360-
</property>
361-
</spacer>
362-
</item>
363332
<item row="1" column="0">
364333
<widget class="QLabel" name="lbLEDPort">
365334
<property name="text">
@@ -370,48 +339,8 @@
370339
</property>
371340
</widget>
372341
</item>
373-
<item row="5" column="0">
374-
<widget class="QLabel" name="lblPPM">
375-
<property name="text">
376-
<string>PPM Port (pad)</string>
377-
</property>
378-
</widget>
379-
</item>
380-
<item row="5" column="1">
381-
<widget class="QComboBox" name="cbPPMPort"/>
382-
</item>
383-
</layout>
384-
</item>
385-
<item row="3" column="0" colspan="6">
386-
<widget class="CommonHWSettingsWidget" name="commonHWSettings" native="true">
387-
<property name="minimumSize">
388-
<size>
389-
<width>20</width>
390-
<height>80</height>
391-
</size>
392-
</property>
393-
</widget>
394-
</item>
395-
<item row="2" column="0">
396-
<spacer name="verticalSpacer_7">
397-
<property name="orientation">
398-
<enum>Qt::Vertical</enum>
399-
</property>
400-
<property name="sizeType">
401-
<enum>QSizePolicy::Fixed</enum>
402-
</property>
403-
<property name="sizeHint" stdset="0">
404-
<size>
405-
<width>20</width>
406-
<height>20</height>
407-
</size>
408-
</property>
409-
</spacer>
410-
</item>
411-
<item row="1" column="5">
412-
<layout class="QGridLayout" name="gridLayout_4">
413342
<item row="0" column="0">
414-
<spacer name="verticalSpacer_5">
343+
<spacer name="verticalSpacer_3">
415344
<property name="orientation">
416345
<enum>Qt::Vertical</enum>
417346
</property>
@@ -421,26 +350,23 @@
421350
<property name="sizeHint" stdset="0">
422351
<size>
423352
<width>20</width>
424-
<height>75</height>
353+
<height>115</height>
425354
</size>
426355
</property>
427356
</spacer>
428357
</item>
429-
<item row="3" column="0">
430-
<spacer name="verticalSpacer_6">
431-
<property name="orientation">
432-
<enum>Qt::Vertical</enum>
433-
</property>
434-
<property name="sizeType">
435-
<enum>QSizePolicy::Expanding</enum>
358+
<item row="1" column="1">
359+
<widget class="QComboBox" name="cbLEDPort"/>
360+
</item>
361+
<item row="2" column="0">
362+
<widget class="QLabel" name="lbUART1">
363+
<property name="text">
364+
<string>UART1</string>
436365
</property>
437-
<property name="sizeHint" stdset="0">
438-
<size>
439-
<width>20</width>
440-
<height>60</height>
441-
</size>
366+
<property name="alignment">
367+
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
442368
</property>
443-
</spacer>
369+
</widget>
444370
</item>
445371
</layout>
446372
</item>
@@ -658,6 +584,11 @@ Beware of not locking yourself out!</string>
658584
</layout>
659585
</widget>
660586
<customwidgets>
587+
<customwidget>
588+
<class>QSvgWidget</class>
589+
<extends>QWidget</extends>
590+
<header>qsvgwidget.h</header>
591+
</customwidget>
661592
<customwidget>
662593
<class>CommonHWSettingsWidget</class>
663594
<extends>QWidget</extends>

0 commit comments

Comments
 (0)