Ref T264, application info list view

This commit is contained in:
Klaus Basan
2018-05-19 07:43:56 +02:00
parent 9fb7ba7592
commit ef3f312bc5
3 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
/* Copyright (C) 2013
* 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 "applicationinfoview.h"
using namespace BlackMisc;
using namespace BlackGui::Models;
namespace BlackGui
{
namespace Views
{
CApplicationInfoView::CApplicationInfoView(QWidget *parent) : CViewBase(parent)
{
this->standardInit(new CApplicationInfoListModel(this));
}
int CApplicationInfoView::otherSwiftVersionsFromDataDirectories()
{
const CApplicationInfoList others = CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories();
this->updateContainer(others);
return others.size();
}
} // namespace
} // namespace

View File

@@ -0,0 +1,37 @@
/* Copyright (C) 2013
* 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_VIEWS_APPLICATIONINFOVIEW_H
#define BLACKGUI_VIEWS_APPLICATIONINFOVIEW_H
#include "blackgui/views/viewbase.h"
#include "blackgui/models/applicationinfolistmodel.h"
#include "blackgui/blackguiexport.h"
class QWidget;
namespace BlackGui
{
namespace Views
{
//! Network servers
class BLACKGUI_EXPORT CApplicationInfoView : public CViewBase<Models::CApplicationInfoListModel, BlackMisc::CApplicationInfoList, BlackMisc::CApplicationInfo>
{
public:
//! Constructor
explicit CApplicationInfoView(QWidget *parent = nullptr);
//! BlackMisc::CApplicationInfoList::otherSwiftVersionsFromDataDirectories
int otherSwiftVersionsFromDataDirectories();
};
}
} // ns
#endif // guard

View File

@@ -1708,6 +1708,7 @@ namespace BlackGui
template class CViewBase<BlackGui::Models::CAircraftModelListModel, BlackMisc::Simulation::CAircraftModelList, BlackMisc::Simulation::CAircraftModel>;
template class CViewBase<BlackGui::Models::CAirlineIcaoCodeListModel, BlackMisc::Aviation::CAirlineIcaoCodeList, BlackMisc::Aviation::CAirlineIcaoCode>;
template class CViewBase<BlackGui::Models::CAirportListModel, BlackMisc::Aviation::CAirportList, BlackMisc::Aviation::CAirport>;
template class CViewBase<BlackGui::Models::CApplicationInfoListModel, BlackMisc::CApplicationInfoList, BlackMisc::CApplicationInfo>;
template class CViewBase<BlackGui::Models::CAtcStationListModel, BlackMisc::Aviation::CAtcStationList, BlackMisc::Aviation::CAtcStation>;
template class CViewBase<BlackGui::Models::CClientListModel, BlackMisc::Network::CClientList, BlackMisc::Network::CClient>;
template class CViewBase<BlackGui::Models::CCloudLayerListModel, BlackMisc::Weather::CCloudLayerList, BlackMisc::Weather::CCloudLayer>;