mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
refs #441 Rename COriginator to CIdentifier and rename COriginatorAware to CIdentifiable.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "originatorlistmodel.h"
|
||||
#include "identifierlistmodel.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include <QMetaProperty>
|
||||
#include <QBrush>
|
||||
@@ -18,26 +18,26 @@ namespace BlackGui
|
||||
{
|
||||
namespace Models
|
||||
{
|
||||
COriginatorListModel::COriginatorListModel(QObject *parent) :
|
||||
CListModelBase("ModelOriginatorList", parent)
|
||||
CIdentifierListModel::CIdentifierListModel(QObject *parent) :
|
||||
CListModelBase("ModelIdentifierList", parent)
|
||||
{
|
||||
this->m_columns.addColumn(CColumn::standardString("name", COriginator::IndexName));
|
||||
this->m_columns.addColumn(CColumn::standardString("machine", COriginator::IndexMachineName));
|
||||
this->m_columns.addColumn(CColumn::standardString("process", COriginator::IndexProcessName));
|
||||
this->m_columns.addColumn(CColumn::standardString("p.id", "process id", COriginator::IndexProcessId));
|
||||
this->m_columns.addColumn(CColumn("time", "received", COriginator::IndexUtcTimestamp, new CDateTimeFormatter(CDateTimeFormatter::formatHms())));
|
||||
this->m_columns.addColumn(CColumn("lcl m.", "local machine", COriginator::IndexIsFromLocalMachine, new CBoolIconFormatter("local", "remote")));
|
||||
this->m_columns.addColumn(CColumn("same p.", "same process", COriginator::IndexIsFromSameProcess, new CBoolIconFormatter("same process", "other process")));
|
||||
this->m_columns.addColumn(CColumn::standardString("m.id", "machine id", COriginator::IndexMachineIdBase64));
|
||||
this->m_columns.addColumn(CColumn::standardString("name", CIdentifier::IndexName));
|
||||
this->m_columns.addColumn(CColumn::standardString("machine", CIdentifier::IndexMachineName));
|
||||
this->m_columns.addColumn(CColumn::standardString("process", CIdentifier::IndexProcessName));
|
||||
this->m_columns.addColumn(CColumn::standardString("p.id", "process id", CIdentifier::IndexProcessId));
|
||||
this->m_columns.addColumn(CColumn("time", "received", CIdentifier::IndexUtcTimestamp, new CDateTimeFormatter(CDateTimeFormatter::formatHms())));
|
||||
this->m_columns.addColumn(CColumn("lcl m.", "local machine", CIdentifier::IndexIsFromLocalMachine, new CBoolIconFormatter("local", "remote")));
|
||||
this->m_columns.addColumn(CColumn("same p.", "same process", CIdentifier::IndexIsFromSameProcess, new CBoolIconFormatter("same process", "other process")));
|
||||
this->m_columns.addColumn(CColumn::standardString("m.id", "machine id", CIdentifier::IndexMachineIdBase64));
|
||||
|
||||
// force strings for translation in resource files
|
||||
(void)QT_TRANSLATE_NOOP("ModelOriginatorList", "name");
|
||||
(void)QT_TRANSLATE_NOOP("ModelOriginatorList", "machine");
|
||||
(void)QT_TRANSLATE_NOOP("ModelOriginatorList", "process");
|
||||
(void)QT_TRANSLATE_NOOP("ModelOriginatorList", "p.id");
|
||||
(void)QT_TRANSLATE_NOOP("ModelOriginatorList", "m.id");
|
||||
(void)QT_TRANSLATE_NOOP("ModelOriginatorList", "lcl m.");
|
||||
(void)QT_TRANSLATE_NOOP("ModelOriginatorList", "same p.");
|
||||
(void)QT_TRANSLATE_NOOP("ModelIdentifierList", "name");
|
||||
(void)QT_TRANSLATE_NOOP("ModelIdentifierList", "machine");
|
||||
(void)QT_TRANSLATE_NOOP("ModelIdentifierList", "process");
|
||||
(void)QT_TRANSLATE_NOOP("ModelIdentifierList", "p.id");
|
||||
(void)QT_TRANSLATE_NOOP("ModelIdentifierList", "m.id");
|
||||
(void)QT_TRANSLATE_NOOP("ModelIdentifierList", "lcl m.");
|
||||
(void)QT_TRANSLATE_NOOP("ModelIdentifierList", "same p.");
|
||||
}
|
||||
|
||||
} // class
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_ORIGINATORLISTMODEL_H
|
||||
#define BLACKGUI_ORIGINATORLISTMODEL_H
|
||||
#ifndef BLACKGUI_IDENTIFIERLISTMODEL_H
|
||||
#define BLACKGUI_IDENTIFIERLISTMODEL_H
|
||||
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackmisc/originatorlist.h"
|
||||
#include "blackmisc/identifierlist.h"
|
||||
#include "blackgui/models/listmodelbase.h"
|
||||
#include <QAbstractItemModel>
|
||||
|
||||
@@ -22,15 +22,15 @@ namespace BlackGui
|
||||
namespace Models
|
||||
{
|
||||
//! Originator list model
|
||||
class BLACKGUI_EXPORT COriginatorListModel : public CListModelBase<BlackMisc::COriginator, BlackMisc::COriginatorList>
|
||||
class BLACKGUI_EXPORT CIdentifierListModel : public CListModelBase<BlackMisc::CIdentifier, BlackMisc::CIdentifierList>
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
explicit COriginatorListModel(QObject *parent = nullptr);
|
||||
explicit CIdentifierListModel(QObject *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~COriginatorListModel() {}
|
||||
virtual ~CIdentifierListModel() {}
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "blackmisc/simulation/aircraftmodellist.h"
|
||||
#include "blackmisc/namevariantpairlist.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include "blackmisc/originatorlist.h"
|
||||
#include "blackmisc/identifierlist.h"
|
||||
#include "blackmisc/variant.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
|
||||
@@ -459,7 +459,7 @@ namespace BlackGui
|
||||
|
||||
// see here for the reason of thess forward instantiations
|
||||
// http://www.parashift.com/c++-faq/separate-template-class-defn-from-decl.html
|
||||
template class CListModelBase<BlackMisc::COriginator, BlackMisc::COriginatorList>;
|
||||
template class CListModelBase<BlackMisc::CIdentifier, BlackMisc::CIdentifierList>;
|
||||
template class CListModelBase<BlackMisc::CStatusMessage, BlackMisc::CStatusMessageList>;
|
||||
template class CListModelBase<BlackMisc::CNameVariantPair, BlackMisc::CNameVariantPairList>;
|
||||
template class CListModelBase<BlackMisc::Aviation::CAtcStation, BlackMisc::Aviation::CAtcStationList>;
|
||||
|
||||
Reference in New Issue
Block a user