mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T264, application info list view
This commit is contained in:
31
src/blackgui/views/applicationinfoview.cpp
Normal file
31
src/blackgui/views/applicationinfoview.cpp
Normal 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
|
||||||
37
src/blackgui/views/applicationinfoview.h
Normal file
37
src/blackgui/views/applicationinfoview.h
Normal 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
|
||||||
@@ -1708,6 +1708,7 @@ namespace BlackGui
|
|||||||
template class CViewBase<BlackGui::Models::CAircraftModelListModel, BlackMisc::Simulation::CAircraftModelList, BlackMisc::Simulation::CAircraftModel>;
|
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::CAirlineIcaoCodeListModel, BlackMisc::Aviation::CAirlineIcaoCodeList, BlackMisc::Aviation::CAirlineIcaoCode>;
|
||||||
template class CViewBase<BlackGui::Models::CAirportListModel, BlackMisc::Aviation::CAirportList, BlackMisc::Aviation::CAirport>;
|
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::CAtcStationListModel, BlackMisc::Aviation::CAtcStationList, BlackMisc::Aviation::CAtcStation>;
|
||||||
template class CViewBase<BlackGui::Models::CClientListModel, BlackMisc::Network::CClientList, BlackMisc::Network::CClient>;
|
template class CViewBase<BlackGui::Models::CClientListModel, BlackMisc::Network::CClientList, BlackMisc::Network::CClient>;
|
||||||
template class CViewBase<BlackGui::Models::CCloudLayerListModel, BlackMisc::Weather::CCloudLayerList, BlackMisc::Weather::CCloudLayer>;
|
template class CViewBase<BlackGui::Models::CCloudLayerListModel, BlackMisc::Weather::CCloudLayerList, BlackMisc::Weather::CCloudLayer>;
|
||||||
|
|||||||
Reference in New Issue
Block a user