Ref T442, moved tree model into own class

* columns can be used as with list model
* own class/file
This commit is contained in:
Klaus Basan
2018-12-04 19:38:18 +01:00
parent 4dae61c171
commit 45e34001a8
5 changed files with 179 additions and 60 deletions

View File

@@ -12,10 +12,10 @@
#ifndef BLACKGUI_MODELS_ATCLISTMODEL_H
#define BLACKGUI_MODELS_ATCLISTMODEL_H
#include "blackgui/blackguiexport.h"
#include "blackgui/models/listmodelcallsignobjects.h"
#include "blackmisc/aviation/atcstation.h"
#include "blackmisc/aviation/atcstationlist.h"
#include "blackgui/blackguiexport.h"
#include <QObject>
@@ -23,6 +23,8 @@ namespace BlackGui
{
namespace Models
{
class CAtcStationTreeModel;
//! ATC list model
class BLACKGUI_EXPORT CAtcStationListModel : public CListModelCallsignObjects<BlackMisc::Aviation::CAtcStation, BlackMisc::Aviation::CAtcStationList, true>
{
@@ -48,7 +50,7 @@ namespace BlackGui
AtcStationMode getStationMode() const { return this->m_stationMode; }
//! A group by type (TWR, APP, ...) model
QStandardItemModel *toAtcGroupModel() const;
CAtcStationTreeModel *toAtcTreeModel() const;
public slots:
//! Used to quickly update single station (better response for the user)