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:
Klaus Basan
2015-03-16 19:44:57 +01:00
parent 79b3cf3cd3
commit 3153c2012b
26 changed files with 191 additions and 122 deletions

View File

@@ -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
};