mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user