Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
3a3085ad
Commit
3a3085ad
authored
Jun 17, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change of Text sizing in QuickView, to allow for smoother resizing
parent
da79b6ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
UASQuickViewItemSelect.cc
src/ui/uas/UASQuickViewItemSelect.cc
+2
-0
UASQuickViewTextItem.cc
src/ui/uas/UASQuickViewTextItem.cc
+5
-3
UASQuickViewTextItem.h
src/ui/uas/UASQuickViewTextItem.h
+2
-0
No files found.
src/ui/uas/UASQuickViewItemSelect.cc
View file @
3a3085ad
...
...
@@ -6,6 +6,8 @@ UASQuickViewItemSelect::UASQuickViewItemSelect(QWidget *parent) : QWidget(parent
ui
.
setupUi
(
this
);
currcol
=
0
;
currrow
=
0
;
ui
.
gridLayout
->
setSpacing
(
0
);
ui
.
gridLayout
->
setMargin
(
0
);
}
void
UASQuickViewItemSelect
::
addItem
(
QString
item
,
bool
enabled
)
{
...
...
src/ui/uas/UASQuickViewTextItem.cc
View file @
3a3085ad
...
...
@@ -9,14 +9,15 @@ UASQuickViewTextItem::UASQuickViewTextItem(QWidget *parent) : UASQuickViewItem(p
layout
->
setMargin
(
0
);
titleLabel
=
new
QLabel
(
this
);
titleLabel
->
setSizePolicy
(
QSizePolicy
::
Ignored
,
QSizePolicy
::
Ignored
);
titleLabel
->
setAlignment
(
Qt
::
AlignHCenter
);
titleLabel
->
setAlignment
(
Qt
::
AlignHCenter
|
Qt
::
AlignBottom
);
this
->
layout
()
->
addWidget
(
titleLabel
);
valueLabel
=
new
QLabel
(
this
);
valueLabel
->
setSizePolicy
(
QSizePolicy
::
Ignored
,
QSizePolicy
::
Ignored
);
valueLabel
->
setAlignment
(
Qt
::
AlignHCenter
);
valueLabel
->
setAlignment
(
Qt
::
AlignHCenter
|
Qt
::
AlignTop
);
valueLabel
->
setText
(
"0.00"
);
this
->
layout
()
->
addWidget
(
valueLabel
);
layout
->
addSpacerItem
(
new
QSpacerItem
(
20
,
40
,
QSizePolicy
::
Minimum
,
QSizePolicy
::
Ignored
));
//spacerItem = new QSpacerItem(20,40,QSizePolicy::Minimum,QSizePolicy::Ignored);
//layout->addSpacerItem(spacerItem);
QFont
valuefont
=
valueLabel
->
font
();
QFont
titlefont
=
titleLabel
->
font
();
valuefont
.
setPixelSize
(
this
->
height
()
/
2.0
);
...
...
@@ -39,6 +40,7 @@ void UASQuickViewTextItem::resizeEvent(QResizeEvent *event)
QFont
titlefont
=
titleLabel
->
font
();
valuefont
.
setPixelSize
(
this
->
height
());
titlefont
.
setPixelSize
(
valuefont
.
pixelSize
()
/
2.0
);
//spacerItem->setGeometry(QRect(0,0,20,this->height()/10.0));
QFontMetrics
metrics
(
valuefont
);
//valuefont.setPixelSize(this->height() / 2.0);
...
...
src/ui/uas/UASQuickViewTextItem.h
View file @
3a3085ad
...
...
@@ -3,6 +3,7 @@
#include "UASQuickViewItem.h"
#include <QLabel>
#include <QSpacerItem>
class
UASQuickViewTextItem
:
public
UASQuickViewItem
{
public:
...
...
@@ -14,6 +15,7 @@ protected:
private:
QLabel
*
titleLabel
;
QLabel
*
valueLabel
;
QSpacerItem
*
spacerItem
;
};
#endif // UASQUICKVIEWTEXTITEM_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment