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
6a4204e2
Commit
6a4204e2
authored
Jan 05, 2016
by
Tomaz Canabrava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish converting the signals to the new system
Signed-off-by:
Tomaz Canabrava
<
tomaz.canabrava@intel.com
>
parent
7a78f296
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
19 deletions
+17
-19
MainToolBarController.cc
src/ui/toolbar/MainToolBarController.cc
+1
-4
UASInfoWidget.cc
src/ui/uas/UASInfoWidget.cc
+9
-9
UASQuickView.cc
src/ui/uas/UASQuickView.cc
+7
-6
No files found.
src/ui/toolbar/MainToolBarController.cc
View file @
6a4204e2
...
...
@@ -47,10 +47,7 @@ MainToolBarController::MainToolBarController(QObject* parent)
,
_telemetryLRSSI
(
0
)
{
_activeVehicleChanged
(
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
activeVehicle
());
// RSSI (didn't like standard connection)
connect
(
qgcApp
()
->
toolbox
()
->
mavlinkProtocol
(),
SIGNAL
(
radioStatusChanged
(
LinkInterface
*
,
unsigned
,
unsigned
,
int
,
int
,
unsigned
,
unsigned
,
unsigned
)),
this
,
SLOT
(
_telemetryChanged
(
LinkInterface
*
,
unsigned
,
unsigned
,
int
,
int
,
unsigned
,
unsigned
,
unsigned
)));
connect
(
qgcApp
()
->
toolbox
()
->
mavlinkProtocol
(),
&
MAVLinkProtocol
::
radioStatusChanged
,
this
,
&
MainToolBarController
::
_telemetryChanged
);
connect
(
qgcApp
()
->
toolbox
()
->
multiVehicleManager
(),
&
MultiVehicleManager
::
activeVehicleChanged
,
this
,
&
MainToolBarController
::
_activeVehicleChanged
);
}
...
...
src/ui/uas/UASInfoWidget.cc
View file @
6a4204e2
...
...
@@ -70,7 +70,7 @@ UASInfoWidget::UASInfoWidget(const QString& title, QAction* action, QWidget *par
errors
=
QMap
<
QString
,
int
>
();
updateTimer
=
new
QTimer
(
this
);
connect
(
updateTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
refresh
())
);
connect
(
updateTimer
,
&
QTimer
::
timeout
,
this
,
&
UASInfoWidget
::
refresh
);
updateTimer
->
start
(
updateInterval
);
this
->
setVisible
(
false
);
...
...
@@ -102,19 +102,19 @@ void UASInfoWidget::hideEvent(QHideEvent* event)
void
UASInfoWidget
::
_activeVehicleChanged
(
Vehicle
*
vehicle
)
{
if
(
activeUAS
)
{
disconnect
(
activeUAS
,
SIGNAL
(
batteryChanged
(
UASInterface
*
,
double
,
double
,
double
,
int
)),
this
,
SLOT
(
updateBattery
(
UASInterface
*
,
double
,
double
,
double
,
int
))
);
disconnect
(
activeUAS
,
SIGNAL
(
dropRateChanged
(
int
,
float
)),
this
,
SLOT
(
updateReceiveLoss
(
int
,
float
))
);
disconnect
(
activeUAS
,
SIGNAL
(
loadChanged
(
UASInterface
*
,
double
)),
this
,
SLOT
(
updateCPULoad
(
UASInterface
*
,
double
))
);
disconnect
(
activeUAS
,
SIGNAL
(
errCountChanged
(
int
,
QString
,
QString
,
int
)),
this
,
SLOT
(
updateErrorCount
(
int
,
QString
,
QString
,
int
))
);
disconnect
(
activeUAS
,
&
UASInterface
::
batteryChanged
,
this
,
&
UASInfoWidget
::
updateBattery
);
disconnect
(
activeUAS
,
&
UASInterface
::
dropRateChanged
,
this
,
&
UASInfoWidget
::
updateReceiveLoss
);
disconnect
(
static_cast
<
UAS
*>
(
activeUAS
),
&
UAS
::
loadChanged
,
this
,
&
UASInfoWidget
::
updateCPULoad
);
disconnect
(
activeUAS
,
&
UASInterface
::
errCountChanged
,
this
,
&
UASInfoWidget
::
updateErrorCount
);
activeUAS
=
NULL
;
}
if
(
vehicle
)
{
activeUAS
=
vehicle
->
uas
();
connect
(
activeUAS
,
SIGNAL
(
batteryChanged
(
UASInterface
*
,
double
,
double
,
double
,
int
)),
this
,
SLOT
(
updateBattery
(
UASInterface
*
,
double
,
double
,
double
,
int
))
);
connect
(
activeUAS
,
SIGNAL
(
dropRateChanged
(
int
,
float
)),
this
,
SLOT
(
updateReceiveLoss
(
int
,
float
))
);
connect
(
activeUAS
,
SIGNAL
(
loadChanged
(
UASInterface
*
,
double
)),
this
,
SLOT
(
updateCPULoad
(
UASInterface
*
,
double
))
);
connect
(
activeUAS
,
SIGNAL
(
errCountChanged
(
int
,
QString
,
QString
,
int
)),
this
,
SLOT
(
updateErrorCount
(
int
,
QString
,
QString
,
int
))
);
connect
(
activeUAS
,
&
UASInterface
::
batteryChanged
,
this
,
&
UASInfoWidget
::
updateBattery
);
connect
(
activeUAS
,
&
UASInterface
::
dropRateChanged
,
this
,
&
UASInfoWidget
::
updateReceiveLoss
);
connect
(
static_cast
<
UAS
*>
(
activeUAS
),
&
UAS
::
loadChanged
,
this
,
&
UASInfoWidget
::
updateCPULoad
);
connect
(
activeUAS
,
&
UASInterface
::
errCountChanged
,
this
,
&
UASInfoWidget
::
updateErrorCount
);
}
}
...
...
src/ui/uas/UASQuickView.cc
View file @
6a4204e2
...
...
@@ -41,16 +41,16 @@ UASQuickView::UASQuickView(QWidget *parent) : QWidget(parent),
QAction
*
action
=
new
QAction
(
"Add/Remove Items"
,
this
);
action
->
setCheckable
(
false
);
connect
(
action
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actionTriggered
()
));
connect
(
action
,
&
QAction
::
triggered
,
this
,
static_cast
<
void
(
UASQuickView
::*
)(
bool
)
>
(
&
UASQuickView
::
actionTriggered
));
this
->
addAction
(
action
);
QAction
*
columnaction
=
new
QAction
(
"Set Column Count"
,
this
);
columnaction
->
setCheckable
(
false
);
connect
(
columnaction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
columnActionTriggered
())
);
connect
(
columnaction
,
&
QAction
::
triggered
,
this
,
&
UASQuickView
::
columnActionTriggered
);
this
->
addAction
(
columnaction
);
updateTimer
=
new
QTimer
(
this
);
connect
(
updateTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
updateTimerTick
())
);
connect
(
updateTimer
,
&
QTimer
::
timeout
,
this
,
&
UASQuickView
::
updateTimerTick
);
updateTimer
->
start
(
1000
);
}
...
...
@@ -83,9 +83,10 @@ void UASQuickView::actionTriggered()
return
;
}
quickViewSelectDialog
=
new
UASQuickViewItemSelect
();
connect
(
quickViewSelectDialog
,
SIGNAL
(
destroyed
()),
this
,
SLOT
(
selectDialogClosed
()));
connect
(
quickViewSelectDialog
,
SIGNAL
(
valueDisabled
(
QString
)),
this
,
SLOT
(
valueDisabled
(
QString
)));
connect
(
quickViewSelectDialog
,
SIGNAL
(
valueEnabled
(
QString
)),
this
,
SLOT
(
valueEnabled
(
QString
)));
connect
(
quickViewSelectDialog
,
&
UASQuickViewItemSelect
::
destroyed
,
this
,
&
UASQuickView
::
selectDialogClosed
);
connect
(
quickViewSelectDialog
,
&
UASQuickViewItemSelect
::
valueDisabled
,
this
,
&
UASQuickView
::
valueDisabled
);
connect
(
quickViewSelectDialog
,
&
UASQuickViewItemSelect
::
valueEnabled
,
this
,
&
UASQuickView
::
valueEnabled
);
quickViewSelectDialog
->
setAttribute
(
Qt
::
WA_DeleteOnClose
,
true
);
for
(
QMap
<
QString
,
double
>::
const_iterator
i
=
uasPropertyValueMap
.
constBegin
();
i
!=
uasPropertyValueMap
.
constEnd
();
i
++
)
{
...
...
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