refs #239, aircraft component

This commit is contained in:
Klaus Basan
2014-05-15 00:03:44 +02:00
parent b0325128b7
commit 7658f72ecd
3 changed files with 134 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#include "aircraftcomponent.h"
#include "ui_aircraftcomponent.h"
namespace BlackGui
{
CAircraftComponent::CAircraftComponent(QWidget *parent) :
QTabWidget(parent), CRuntimeBasedComponent(nullptr, false), ui(new Ui::CAircraftComponent), m_timerComponent(nullptr)
{
ui->setupUi(this);
m_timerComponent = new CTimerBasedComponent(SLOT(update()), this);
}
CAircraftComponent::~CAircraftComponent()
{
delete ui;
}
void CAircraftComponent::update()
{
Q_ASSERT(this->ui->tvp_AircraftsInRange);
Q_ASSERT(this->getIContextNetwork());
if (this->getIContextNetwork()->isConnected())
{
this->ui->tvp_AircraftsInRange->update(this->getIContextNetwork()->getAircraftsInRange());
}
}
}