mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 20:40:29 +08:00
refs #358, GUI for installed / matched models
* model / view / component classes
This commit is contained in:
32
src/blackgui/views/aircraftmodelview.cpp
Normal file
32
src/blackgui/views/aircraftmodelview.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
/* 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 "aircraftmodelview.h"
|
||||
#include <QHeaderView>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackGui::Models;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Views
|
||||
{
|
||||
CAircraftModelView::CAircraftModelView(QWidget *parent) : CViewBase(parent)
|
||||
{
|
||||
this->m_withMenuItemClear = true;
|
||||
this->m_withMenuItemRefresh = true;
|
||||
this->standardInit(new CAircraftModelListModel(CAircraftModelListModel::ModelOnly, this));
|
||||
}
|
||||
|
||||
void CAircraftModelView::setAircraftModelMode(CAircraftModelListModel::AircraftModelMode mode)
|
||||
{
|
||||
this->m_model->setAircraftModelMode(mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
37
src/blackgui/views/aircraftmodelview.h
Normal file
37
src/blackgui/views/aircraftmodelview.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_AIRCRAFTMODELVIEW_H
|
||||
#define BLACKGUI_AIRCRAFTMODELVIEW_H
|
||||
|
||||
#include "viewbase.h"
|
||||
#include "../models/aircraftmodellistmodel.h"
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Views
|
||||
{
|
||||
//! Aircrafts view
|
||||
class CAircraftModelView : public CViewBase<Models::CAircraftModelListModel, BlackMisc::Network::CAircraftModelList>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
explicit CAircraftModelView(QWidget *parent = nullptr);
|
||||
|
||||
//! Set display mode
|
||||
void setAircraftModelMode(Models::CAircraftModelListModel::AircraftModelMode mode);
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif // guard
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "../models/namevariantpairlistmodel.h"
|
||||
#include "../models/atcstationlistmodel.h"
|
||||
#include "../models/aircraftlistmodel.h"
|
||||
#include "../models/aircraftmodellistmodel.h"
|
||||
#include "../models/airportlistmodel.h"
|
||||
#include "../models/airportlistmodel.h"
|
||||
#include "../models/serverlistmodel.h"
|
||||
#include "../models/userlistmodel.h"
|
||||
@@ -267,6 +269,7 @@ namespace BlackGui
|
||||
template class CViewBase<BlackGui::Models::CServerListModel, BlackMisc::Network::CServerList>;
|
||||
template class CViewBase<BlackGui::Models::CUserListModel, BlackMisc::Network::CUserList>;
|
||||
template class CViewBase<BlackGui::Models::CClientListModel, BlackMisc::Network::CClientList>;
|
||||
template class CViewBase<BlackGui::Models::CAircraftModelListModel, BlackMisc::Network::CAircraftModelList>;
|
||||
template class CViewBase<BlackGui::Models::CKeyboardKeyListModel, BlackMisc::Settings::CSettingKeyboardHotkeyList>;
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user