Ref T442, ATC station treeview

* store expand/collapsed state
* resize
* clear
This commit is contained in:
Klaus Basan
2018-12-06 03:21:29 +01:00
parent 6116797727
commit 82324cb512
5 changed files with 150 additions and 22 deletions

View File

@@ -21,10 +21,17 @@
#include <QList>
#include <QObject>
#include <QPoint>
#include <QMap>
#include <QModelIndex>
namespace BlackGui
{
namespace Models { class CAtcStationTreeModel; }
namespace Models
{
class CAtcStationTreeModel;
class CColumns;
}
namespace Views
{
//! ATC stations view
@@ -39,6 +46,18 @@ namespace BlackGui
//! \copydoc Models::CAtcStationListModel::changedAtcStationConnectionStatus
void changedAtcStationConnectionStatus(const BlackMisc::Aviation::CAtcStation &station, bool added);
//! Update container
void updateContainer(const BlackMisc::Aviation::CAtcStationList &stations);
//! Clear
void clear();
//! Set columns
void setColumns(const Models::CColumns &columns);
//! Resize all columns
void fullResizeToContents();
signals:
//! Request some dummy ATC stations
void testRequestDummyAtcOnlineStations(int number);
@@ -53,15 +72,34 @@ namespace BlackGui
//! Used model
const Models::CAtcStationTreeModel *stationModel() const;
//! Used model
Models::CAtcStationTreeModel *stationModel();
//! The selected object
BlackMisc::Aviation::CAtcStation selectedObject() const;
//! Suffix for index
QString suffixForIndex(const QModelIndex &index);
//! Expanded
void onExpanded(const QModelIndex &index);
//! Custom menu
void customMenu(const QPoint &point);
//! Store state
void storeState();
//! Restore state
void restoreState();
//! Tune in/invoke @{
void tuneInAtcCom1();
void tuneInAtcCom2();
void requestTextMessage();
//! @}
QMap<QString, bool> m_expanded; //!< suffix/expanded
};
} // ns
} // ns