refs #432, originator list model + view

This commit is contained in:
Klaus Basan
2015-05-27 03:59:27 +02:00
parent e695987fa2
commit 6e2830c130
6 changed files with 148 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
/* Copyright (C) 2015
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "originatorview.h"
#include <QHeaderView>
using namespace BlackMisc;
using namespace BlackGui::Models;
namespace BlackGui
{
namespace Views
{
COriginatorView::COriginatorView(QWidget *parent) : CViewBase(parent)
{
this->standardInit(new COriginatorListModel(this));
}
}
} // namespace

View File

@@ -0,0 +1,34 @@
/* Copyright (C) 2015
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKGUI_ORIGINATORVIEW_H
#define BLACKGUI_ORIGINATORVIEW_H
#include "blackgui/blackguiexport.h"
#include "viewbase.h"
#include "../models/originatorlistmodel.h"
namespace BlackGui
{
namespace Views
{
//! Originator servers
class BLACKGUI_EXPORT COriginatorView : public CViewBase<Models::COriginatorListModel, BlackMisc::COriginatorList, BlackMisc::COriginator>
{
public:
//! Constructor
explicit COriginatorView(QWidget *parent = nullptr);
};
}
}
#endif // guard

View File

@@ -9,6 +9,7 @@
#include "viewbase.h"
#include "../models/statusmessagelistmodel.h"
#include "../models/originatorlistmodel.h"
#include "../models/namevariantpairlistmodel.h"
#include "../models/atcstationlistmodel.h"
#include "../models/aircraftmodellistmodel.h"
@@ -402,6 +403,8 @@ namespace BlackGui
// http://www.parashift.com/c++-faq/separate-template-class-defn-from-decl.html
template class CViewBase<BlackGui::Models::CStatusMessageListModel, BlackMisc::CStatusMessageList, BlackMisc::CStatusMessage>;
template class CViewBase<BlackGui::Models::CNameVariantPairModel, BlackMisc::CNameVariantPairList, BlackMisc::CNameVariantPair>;
template class CViewBase<BlackGui::Models::COriginatorListModel, BlackMisc::COriginatorList, BlackMisc::COriginator>;
template class CViewBase<BlackGui::Models::CAtcStationListModel, BlackMisc::Aviation::CAtcStationList, BlackMisc::Aviation::CAtcStation>;
template class CViewBase<BlackGui::Models::CAirportListModel, BlackMisc::Aviation::CAirportList, BlackMisc::Aviation::CAirport>;
template class CViewBase<BlackGui::Models::CServerListModel, BlackMisc::Network::CServerList, BlackMisc::Network::CServer>;