Allow to select COM frequencies from ATC view (context menu)

* added functions in component to select COM frequencies
* changed views to contain ObjectType in template
* function to obtain selected objects in view base class
This commit is contained in:
Klaus Basan
2014-12-22 21:17:13 +01:00
parent d0b5fc1249
commit b26fa651ed
25 changed files with 182 additions and 55 deletions

View File

@@ -15,9 +15,7 @@
#include "blackgui/components/enableforruntime.h"
#include "blackgui/components/enablefordockwidgetinfoarea.h"
#include "blackgui/components/updatetimer.h"
#include "blackmisc/avatcstation.h"
#include <QTabWidget>
#include <QModelIndex>
#include <QScopedPointer>
@@ -111,6 +109,9 @@ namespace BlackGui
//! Count has been changed
void ps_countChanged(int count);
//! Set COM frequency
void ps_setComFrequency(const BlackMisc::PhysicalQuantities::CFrequency &frequency, BlackMisc::Aviation::CComSystem::ComUnit unit);
private:
QScopedPointer<Ui::CAtcStationComponent> ui;
CUpdateTimer *m_updateTimer = nullptr;
@@ -118,7 +119,16 @@ namespace BlackGui
QDateTime m_timestampOnlineStationsChanged = CUpdateTimer::epoch(); //!< stations marked as changed
QDateTime m_timestampLastReadBookedStations = CUpdateTimer::epoch(); //!< stations read
QDateTime m_timestampBookedStationsChanged = CUpdateTimer::epoch(); //!< stations marked as changed
const QString &originator()
{
// string is generated once, the timestamp allows to use multiple
// components (as long as they are not generated at the same ms)
static const QString o = QString("ATCSTATIOCOMPONENT:").append(QString::number(QDateTime::currentMSecsSinceEpoch()));
return o;
}
};
}
}
} // namespace
} // namespace
#endif // guard