Added attribute home base for user, will be used to identify user's origin

This commit is contained in:
Klaus Basan
2014-05-08 13:54:16 +02:00
parent 41b89e928f
commit 36b5915511
2 changed files with 12 additions and 4 deletions

View File

@@ -27,11 +27,11 @@ namespace BlackMisc
*/
const QPixmap &CCallsign::convertToIcon(const CCallsign &callsign)
{
static const QPixmap app(QPixmap(":/blackmisc/icons/aircraft_arrival.png").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap app(QPixmap(":/blackmisc/icons/aircraft_arrival.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap gnd(QPixmap(":/blackmisc/icons/tower.png").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap del(QPixmap(":/blackmisc/icons/aircraft_departure.png").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap del(QPixmap(":/blackmisc/icons/aircraft_departure.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap twr(QPixmap(":/blackmisc/icons/tower.png").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap ctr(QPixmap(":/blackmisc/icons/sky.png").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap ctr(QPixmap(":/blackmisc/icons/sky.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap pilot(QPixmap(":/blackmisc/icons/aeropuerto.png").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap sup(":/blackmisc/icons/SUP.png");
static const QPixmap unknown(QPixmap(":/blackmisc/icons/question.png").scaledToWidth(16, Qt::SmoothTransformation));

View File

@@ -7,6 +7,7 @@
#define BLACKMISC_USER_H
#include "avcallsign.h"
#include "avairporticao.h"
namespace BlackMisc
{
@@ -98,6 +99,12 @@ namespace BlackMisc
//! \brief Set id
void setId(const QString &id) { m_id = id.trimmed(); }
//! Homebase
const BlackMisc::Aviation::CAirportIcao &getHomebase() const { return this->m_homebase; }
//! Set homebase
void setHomebase(const BlackMisc::Aviation::CAirportIcao &homebase) { this->m_homebase = homebase; }
//! \brief Get associated callsign.
const BlackMisc::Aviation::CCallsign &getCallsign() const { return m_callsign; }
@@ -167,13 +174,14 @@ namespace BlackMisc
QString m_email;
QString m_password;
BlackMisc::Aviation::CCallsign m_callsign;
BlackMisc::Aviation::CAirportIcao m_homebase;
};
} // namespace
} // namespace
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Network::CUser, (o.m_id, o.m_realname, o.m_email, o.m_password, o.m_callsign))
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Network::CUser, (o.m_id, o.m_realname, o.m_email, o.m_password, o.m_callsign, o.m_homebase))
Q_DECLARE_METATYPE(BlackMisc::Network::CUser)
#endif // guard