mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
As of workshop RW/KB
* Allow to "jump" to text message channel from ATC / aircraft * changed timer connections for components to new SLOT syntax * housekeeping: ** new function in network context for station by callsign ** refactored textmessage component, allow to select tab by slot ** wired up signal / slots in main GUI ** removed unused functions ** allow to select area and "myself" in infoarea
This commit is contained in:
@@ -25,8 +25,18 @@ namespace BlackGui
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
CUpdateTimer(const char *slot, QObject *parent);
|
||||
//! Construct a timer which forwards messages to the given slot of parent.
|
||||
template <typename F, typename P>
|
||||
CUpdateTimer(F slot, P *parent) : QObject(parent)
|
||||
{
|
||||
Q_ASSERT(parent);
|
||||
this->initTimers();
|
||||
bool c = this->connect(this->m_timer, &QTimer::timeout, parent, slot);
|
||||
Q_ASSERT(c);
|
||||
c = this->connect(this->m_timerSingleShot, &QTimer::timeout, parent, slot);
|
||||
Q_ASSERT(c);
|
||||
Q_UNUSED(c);
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
~CUpdateTimer();
|
||||
@@ -55,6 +65,7 @@ namespace BlackGui
|
||||
void fireTimer();
|
||||
|
||||
private:
|
||||
void initTimers(); //!< init timers
|
||||
QTimer *m_timer = nullptr; //!< periodically updating
|
||||
QTimer *m_timerSingleShot = nullptr; //!< single update
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user