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

@@ -27,9 +27,7 @@ namespace BlackGui
{
namespace Components
{
/*!
* ATC stations component
*/
//! ATC stations component
class BLACKGUI_EXPORT CAtcStationComponent :
public QTabWidget,
public CEnableForDockWidgetInfoArea,
@@ -42,10 +40,7 @@ namespace BlackGui
explicit CAtcStationComponent(QWidget *parent = nullptr);
//! Destructor
~CAtcStationComponent();
//! Timer for updating
CUpdateTimer *getTimerComponent() { return this->m_updateTimer; }
virtual ~CAtcStationComponent();
//! Number of booked stations
int countBookedStations() const;
@@ -64,9 +59,6 @@ namespace BlackGui
//! \copydoc CTimerBasedComponent::setUpdateIntervalSeconds
void setUpdateIntervalSeconds(int seconds) { Q_ASSERT(this->m_updateTimer); this->m_updateTimer->setUpdateIntervalSeconds(seconds); }
//! \copydoc CTimerBasedComponent::setUpdateInterval
void setUpdateInterval(int milliSeconds) { Q_ASSERT(this->m_updateTimer); this->m_updateTimer->setUpdateInterval(milliSeconds); }
//! \copydoc CTimerBasedComponent::stopTimer
void stopTimer() { Q_ASSERT(this->m_updateTimer); this->m_updateTimer->stopTimer(); }
@@ -122,7 +114,7 @@ namespace BlackGui
const QString &originator();
QScopedPointer<Ui::CAtcStationComponent> ui;
CUpdateTimer *m_updateTimer = nullptr;
QScopedPointer<CUpdateTimer> m_updateTimer;
QDateTime m_timestampLastReadOnlineStations = CUpdateTimer::epoch(); //!< stations read
QDateTime m_timestampOnlineStationsChanged = CUpdateTimer::epoch(); //!< stations marked as changed
QDateTime m_timestampLastReadBookedStations = CUpdateTimer::epoch(); //!< stations read