Commit 6a4204e2 authored by Tomaz Canabrava's avatar Tomaz Canabrava

Finish converting the signals to the new system

Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent 7a78f296
......@@ -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);
}
......
......@@ -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);
}
}
......
......@@ -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++)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment