mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
committed by
Mathew Sutcliffe
parent
c77951743e
commit
34774bd005
39
src/blackgui/atcstationlistmodel.cpp
Normal file
39
src/blackgui/atcstationlistmodel.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "atcstationlistmodel.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
|
||||
using namespace BlackMisc::Aviation;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
/*
|
||||
* Constructor
|
||||
*/
|
||||
CAtcListModel::CAtcListModel(QObject *parent) : CListModelBase("ViewAtcList", parent)
|
||||
{
|
||||
this->m_columns.addColumn(CAtcStation::IndexCallsignAsStringAsSet, "callsign");
|
||||
this->m_columns.addColumn(CAtcStation::IndexDistance, "distance", Qt::AlignRight | Qt::AlignVCenter);
|
||||
this->m_columns.addColumn(CAtcStation::IndexFrequency, "frequency", Qt::AlignRight | Qt::AlignVCenter);
|
||||
this->m_columns.addColumn(CAtcStation::IndexControllerRealname, "controllername");
|
||||
this->m_columns.addColumn(CAtcStation::IndexIsOnline, "online");
|
||||
this->m_columns.addColumn(CAtcStation::IndexBookedFrom, "bookedfrom");
|
||||
this->m_columns.addColumn(CAtcStation::IndexBookedUntil, "bookeduntil");
|
||||
|
||||
// default sort order
|
||||
this->setSortColumnByPropertyIndex(CAtcStation::IndexDistance);
|
||||
this->m_sortOrder = Qt::AscendingOrder;
|
||||
|
||||
// force strings for translation in resource files
|
||||
(void)QT_TRANSLATE_NOOP("ViewAtcList", "callsign");
|
||||
(void)QT_TRANSLATE_NOOP("ViewAtcList", "distance");
|
||||
(void)QT_TRANSLATE_NOOP("ViewAtcList", "frequency");
|
||||
(void)QT_TRANSLATE_NOOP("ViewAtcList", "controllername");
|
||||
(void)QT_TRANSLATE_NOOP("ViewAtcList", "online");
|
||||
(void)QT_TRANSLATE_NOOP("ViewAtcList", "bookedfrom");
|
||||
(void)QT_TRANSLATE_NOOP("ViewAtcList", "bookeduntil");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user