refs #420, refs #421 improved view update for simualted aircraft

* added update timer for simulated aircraft
* in same step streamlined handling of CUpdateTimer
This commit is contained in:
Klaus Basan
2015-05-18 01:57:35 +02:00
parent 25c0cea575
commit 1330bb8513
12 changed files with 59 additions and 52 deletions

View File

@@ -13,18 +13,20 @@ namespace BlackGui
{
namespace Components
{
void CUpdateTimer::initTimers()
void CUpdateTimer::initTimers(const QString &name)
{
this->m_timer = new QTimer(this);
this->m_timerSingleShot = new QTimer(this);
this->m_timerSingleShot->setSingleShot(true);
this->m_timer->setObjectName(name + ":periodically");
this->m_timerSingleShot->setObjectName(name + ":singleShot");
}
CUpdateTimer::~CUpdateTimer()
{
if (this->parent()) { this->disconnect(this->parent()); }
this->m_timer->stop();
this->m_timerSingleShot->stop();
if (this->parent()) this->disconnect(this->parent());
}
void CUpdateTimer::setUpdateInterval(int milliSeconds)