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
cbb2f7ae
Commit
cbb2f7ae
authored
Jul 03, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[landauf] added button to clear the pattern and letter lists
parent
5cd0d543
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
8 deletions
+49
-8
ObjectDetectionView.cc
src/ui/ObjectDetectionView.cc
+9
-0
ObjectDetectionView.h
src/ui/ObjectDetectionView.h
+1
-0
ObjectDetectionView.ui
src/ui/ObjectDetectionView.ui
+39
-8
No files found.
src/ui/ObjectDetectionView.cc
View file @
cbb2f7ae
...
...
@@ -56,6 +56,7 @@ ObjectDetectionView::ObjectDetectionView(QString folder, QWidget *parent) :
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)),
this
,
SLOT
(
setUAS
(
UASInterface
*
)));
letterTimer
.
start
(
1000
);
connect
(
&
letterTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
decreaseLetterTime
()));
connect
(
m_ui
->
clearButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
clearLists
()));
}
ObjectDetectionView
::~
ObjectDetectionView
()
...
...
@@ -183,6 +184,14 @@ void ObjectDetectionView::updateLetterList()
m_ui
->
letterListWidget
->
addItem
(
pattern
.
name
+
separator
+
"("
+
QString
::
number
(
pattern
.
count
)
+
")"
+
separator
+
QString
::
number
(
pattern
.
confidence
));
}
void
ObjectDetectionView
::
clearLists
()
{
patternList
.
clear
();
letterList
.
clear
();
m_ui
->
listWidget
->
clear
();
m_ui
->
letterListWidget
->
clear
();
}
void
ObjectDetectionView
::
takeAction
()
{
QAction
*
act
=
dynamic_cast
<
QAction
*>
(
sender
());
...
...
src/ui/ObjectDetectionView.h
View file @
cbb2f7ae
...
...
@@ -76,6 +76,7 @@ public slots:
void
newLetter
(
int
uasId
,
QString
letter
,
float
confidence
,
bool
detected
);
void
decreaseLetterTime
();
void
updateLetterList
();
void
clearLists
();
/** @brief Accept an internal action, update name and preview image label */
void
takeAction
();
...
...
src/ui/ObjectDetectionView.ui
View file @
cbb2f7ae
...
...
@@ -13,25 +13,37 @@
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
columnstretch=
"10,10"
columnminimumwidth=
"0,0"
>
<item
row=
"0"
column=
"0"
colspan=
"
2
"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
colspan=
"
3
"
>
<widget
class=
"QListWidget"
name=
"listWidget"
/>
</item>
<item
row=
"1"
column=
"0"
colspan=
"
2
"
>
<item
row=
"1"
column=
"0"
colspan=
"
3
"
>
<widget
class=
"QListWidget"
name=
"letterListWidget"
/>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"imageLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
1
</horstretch>
<verstretch>
1
</verstretch>
<horstretch>
1
0
</horstretch>
<verstretch>
1
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
64
</width>
<height>
64
</height>
<width>
110
</width>
<height>
110
</height>
</size>
</property>
<property
name=
"sizeIncrement"
>
<size>
<width>
2
</width>
<height>
2
</height>
</size>
</property>
<property
name=
"baseSize"
>
<size>
<width>
10
</width>
<height>
10
</height>
</size>
</property>
<property
name=
"text"
>
...
...
@@ -39,7 +51,7 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<item
row=
"2"
column=
"1"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"letterLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
...
...
@@ -47,6 +59,12 @@
<verstretch>
10
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
110
</width>
<height>
110
</height>
</size>
</property>
<property
name=
"sizeIncrement"
>
<size>
<width>
2
</width>
...
...
@@ -78,6 +96,19 @@ color: white;</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"2"
>
<widget
class=
"QPushButton"
name=
"clearButton"
>
<property
name=
"maximumSize"
>
<size>
<width>
80
</width>
<height>
16777215
</height>
</size>
</property>
<property
name=
"text"
>
<string>
Clear
</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
...
...
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