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
a709b2f9
Commit
a709b2f9
authored
Dec 04, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1073 from DonLakeFlyer/activeUASSet
Remove multiple overrides of activeUASSet signal
parents
109d6f4e
5204aaba
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
7 additions
and
43 deletions
+7
-43
MockUASManager.cc
src/qgcunittest/MockUASManager.cc
+0
-1
MockUASManager.h
src/qgcunittest/MockUASManager.h
+0
-1
UASManager.cc
src/uas/UASManager.cc
+0
-1
UASManagerInterface.h
src/uas/UASManagerInterface.h
+0
-2
QGCWaypointListMulti.cc
src/ui/QGCWaypointListMulti.cc
+5
-5
QGCWaypointListMulti.h
src/ui/QGCWaypointListMulti.h
+1
-1
Linecharts.cc
src/ui/linechart/Linecharts.cc
+1
-30
Linecharts.h
src/ui/linechart/Linecharts.h
+0
-2
No files found.
src/qgcunittest/MockUASManager.cc
View file @
a709b2f9
...
@@ -50,7 +50,6 @@ void MockUASManager::setMockActiveUAS(MockUAS* mockUAS)
...
@@ -50,7 +50,6 @@ void MockUASManager::setMockActiveUAS(MockUAS* mockUAS)
{
{
// We don't support swiching between different UAS
// We don't support swiching between different UAS
//_mockUAS->setSelected();
//_mockUAS->setSelected();
emit
activeUASSet
(
_mockUAS
->
getUASID
());
emit
activeUASStatusChanged
(
_mockUAS
,
true
);
emit
activeUASStatusChanged
(
_mockUAS
,
true
);
emit
activeUASStatusChanged
(
_mockUAS
->
getUASID
(),
true
);
emit
activeUASStatusChanged
(
_mockUAS
->
getUASID
(),
true
);
}
}
...
...
src/qgcunittest/MockUASManager.h
View file @
a709b2f9
...
@@ -41,7 +41,6 @@ class MockUASManager : public UASManagerInterface
...
@@ -41,7 +41,6 @@ class MockUASManager : public UASManagerInterface
signals:
signals:
// The following signals from UASManager interface are supported:
// The following signals from UASManager interface are supported:
// void activeUASSet(UASInterface* UAS);
// void activeUASSet(UASInterface* UAS);
// void activeUASSet(int systemId);
// void activeUASStatusChanged(UASInterface* UAS, bool active);
// void activeUASStatusChanged(UASInterface* UAS, bool active);
// void activeUASStatusChanged(int systemId, bool active);
// void activeUASStatusChanged(int systemId, bool active);
...
...
src/uas/UASManager.cc
View file @
a709b2f9
...
@@ -473,7 +473,6 @@ void UASManager::setActiveUAS(UASInterface* uas)
...
@@ -473,7 +473,6 @@ void UASManager::setActiveUAS(UASInterface* uas)
if
(
activeUAS
)
if
(
activeUAS
)
{
{
activeUAS
->
setSelected
();
activeUAS
->
setSelected
();
emit
activeUASSet
(
activeUAS
->
getUASID
());
emit
activeUASSetListIndex
(
systems
.
indexOf
(
activeUAS
));
emit
activeUASSetListIndex
(
systems
.
indexOf
(
activeUAS
));
emit
activeUASStatusChanged
(
activeUAS
,
true
);
emit
activeUASStatusChanged
(
activeUAS
,
true
);
emit
activeUASStatusChanged
(
activeUAS
->
getUASID
(),
true
);
emit
activeUASStatusChanged
(
activeUAS
->
getUASID
(),
true
);
...
...
src/uas/UASManagerInterface.h
View file @
a709b2f9
...
@@ -105,8 +105,6 @@ signals:
...
@@ -105,8 +105,6 @@ signals:
/** @brief The UAS currently under main operator control changed */
/** @brief The UAS currently under main operator control changed */
void
activeUASSet
(
UASInterface
*
UAS
);
void
activeUASSet
(
UASInterface
*
UAS
);
/** @brief The UAS currently under main operator control changed */
/** @brief The UAS currently under main operator control changed */
void
activeUASSet
(
int
systemId
);
/** @brief The UAS currently under main operator control changed */
void
activeUASSetListIndex
(
int
listIndex
);
void
activeUASSetListIndex
(
int
listIndex
);
/** @brief The UAS currently under main operator control changed */
/** @brief The UAS currently under main operator control changed */
void
activeUASStatusChanged
(
UASInterface
*
UAS
,
bool
active
);
void
activeUASStatusChanged
(
UASInterface
*
UAS
,
bool
active
);
...
...
src/ui/QGCWaypointListMulti.cc
View file @
a709b2f9
...
@@ -9,8 +9,8 @@ QGCWaypointListMulti::QGCWaypointListMulti(QWidget *parent) :
...
@@ -9,8 +9,8 @@ QGCWaypointListMulti::QGCWaypointListMulti(QWidget *parent) :
{
{
ui
->
setupUi
(
this
);
ui
->
setupUi
(
this
);
setMinimumSize
(
600
,
80
);
setMinimumSize
(
600
,
80
);
connect
(
UASManager
::
instance
(),
SIGNAL
(
UASCreated
(
UASInterface
*
)),
this
,
SLOT
(
systemCreated
(
UASInterface
*
))
);
connect
(
UASManager
::
instance
(),
&
UASManager
::
UASCreated
,
this
,
&
QGCWaypointListMulti
::
systemCreated
);
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
int
)),
this
,
SLOT
(
systemSetActive
(
int
))
);
connect
(
UASManager
::
instance
(),
&
UASManager
::
activeUASSet
,
this
,
&
QGCWaypointListMulti
::
systemSetActive
);
WaypointList
*
list
=
new
WaypointList
(
ui
->
stackedWidget
,
UASManager
::
instance
()
->
getActiveUASWaypointManager
());
WaypointList
*
list
=
new
WaypointList
(
ui
->
stackedWidget
,
UASManager
::
instance
()
->
getActiveUASWaypointManager
());
lists
.
insert
(
offline_uas_id
,
list
);
lists
.
insert
(
offline_uas_id
,
list
);
...
@@ -18,7 +18,7 @@ QGCWaypointListMulti::QGCWaypointListMulti(QWidget *parent) :
...
@@ -18,7 +18,7 @@ QGCWaypointListMulti::QGCWaypointListMulti(QWidget *parent) :
if
(
UASManager
::
instance
()
->
getActiveUAS
())
{
if
(
UASManager
::
instance
()
->
getActiveUAS
())
{
systemCreated
(
UASManager
::
instance
()
->
getActiveUAS
());
systemCreated
(
UASManager
::
instance
()
->
getActiveUAS
());
systemSetActive
(
UASManager
::
instance
()
->
getActiveUAS
()
->
getUASID
()
);
systemSetActive
(
UASManager
::
instance
()
->
getActiveUAS
());
}
}
}
}
...
@@ -50,9 +50,9 @@ void QGCWaypointListMulti::systemCreated(UASInterface* uas)
...
@@ -50,9 +50,9 @@ void QGCWaypointListMulti::systemCreated(UASInterface* uas)
connect
(
uas
,
SIGNAL
(
destroyed
(
QObject
*
)),
this
,
SLOT
(
systemDeleted
(
QObject
*
)));
connect
(
uas
,
SIGNAL
(
destroyed
(
QObject
*
)),
this
,
SLOT
(
systemDeleted
(
QObject
*
)));
}
}
void
QGCWaypointListMulti
::
systemSetActive
(
int
uas
)
void
QGCWaypointListMulti
::
systemSetActive
(
UASInterface
*
uas
)
{
{
WaypointList
*
list
=
lists
.
value
(
uas
,
NULL
);
WaypointList
*
list
=
lists
.
value
(
uas
->
getUASID
()
,
NULL
);
if
(
list
)
{
if
(
list
)
{
ui
->
stackedWidget
->
setCurrentWidget
(
list
);
ui
->
stackedWidget
->
setCurrentWidget
(
list
);
}
}
...
...
src/ui/QGCWaypointListMulti.h
View file @
a709b2f9
...
@@ -23,7 +23,7 @@ public:
...
@@ -23,7 +23,7 @@ public:
public
slots
:
public
slots
:
void
systemDeleted
(
QObject
*
uas
);
void
systemDeleted
(
QObject
*
uas
);
void
systemCreated
(
UASInterface
*
uas
);
void
systemCreated
(
UASInterface
*
uas
);
void
systemSetActive
(
int
uas
);
void
systemSetActive
(
UASInterface
*
uas
);
protected:
protected:
quint16
offline_uas_id
;
quint16
offline_uas_id
;
...
...
src/ui/linechart/Linecharts.cc
View file @
a709b2f9
...
@@ -18,10 +18,7 @@ Linecharts::Linecharts(QWidget *parent) :
...
@@ -18,10 +18,7 @@ Linecharts::Linecharts(QWidget *parent) :
foreach
(
UASInterface
*
sys
,
systems
)
{
foreach
(
UASInterface
*
sys
,
systems
)
{
addSystem
(
sys
);
addSystem
(
sys
);
}
}
connect
(
UASManager
::
instance
(),
SIGNAL
(
UASCreated
(
UASInterface
*
)),
connect
(
UASManager
::
instance
(),
&
UASManager
::
UASCreated
,
this
,
&
Linecharts
::
addSystem
);
this
,
SLOT
(
addSystem
(
UASInterface
*
)));
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
int
)),
this
,
SLOT
(
selectSystem
(
int
)));
}
}
void
Linecharts
::
showEvent
(
QShowEvent
*
event
)
void
Linecharts
::
showEvent
(
QShowEvent
*
event
)
...
@@ -59,32 +56,6 @@ void Linecharts::hideEvent(QHideEvent* event)
...
@@ -59,32 +56,6 @@ void Linecharts::hideEvent(QHideEvent* event)
emit
visibilityChanged
(
false
);
emit
visibilityChanged
(
false
);
}
}
void
Linecharts
::
selectSystem
(
int
systemid
)
{
Q_UNUSED
(
systemid
);
// QWidget* prevWidget = currentWidget();
// if (prevWidget)
// {
// LinechartWidget* chart = dynamic_cast<LinechartWidget*>(prevWidget);
// if (chart)
// {
// chart->setActive(false);
// chart->setActiveSystem(systemid);
// }
// }
// QWidget* widget = plots.value(systemid, NULL);
// if (widget)
// {
// setCurrentWidget(widget);
// LinechartWidget* chart = dynamic_cast<LinechartWidget*>(widget);
// if (chart)
// {
// chart->setActive(true);
// chart->setActiveSystem(systemid);
// }
// }
}
void
Linecharts
::
addSystem
(
UASInterface
*
uas
)
void
Linecharts
::
addSystem
(
UASInterface
*
uas
)
{
{
// FIXME Add removeSystem() call
// FIXME Add removeSystem() call
...
...
src/ui/linechart/Linecharts.h
View file @
a709b2f9
...
@@ -20,8 +20,6 @@ signals:
...
@@ -20,8 +20,6 @@ signals:
void
visibilityChanged
(
bool
visible
);
void
visibilityChanged
(
bool
visible
);
public
slots
:
public
slots
:
/** @brief Select plot for one system */
void
selectSystem
(
int
systemid
);
/** @brief Add a new system to the list of plots */
/** @brief Add a new system to the list of plots */
void
addSystem
(
UASInterface
*
uas
);
void
addSystem
(
UASInterface
*
uas
);
/** @brief Add a new generic message source (not a system) */
/** @brief Add a new generic message source (not a system) */
...
...
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