Ref T270, log display can trigger display in sim and further improvements

* log display can trigger displayed log in simulator
* check prerequisites for log and display overlay
* made component identifiable
* pre-load parts
This commit is contained in:
Klaus Basan
2018-06-02 02:03:33 +02:00
parent c750ad1dfc
commit 84428b1284
4 changed files with 82 additions and 27 deletions

View File

@@ -16,6 +16,7 @@
#include "blackgui/blackguiexport.h"
#include "blackcore/simulatorcommon.h"
#include "blackmisc/aviation/callsign.h"
#include "blackmisc/identifiable.h"
#include <QFrame>
#include <QTimer>
#include <QScopedPointer>
@@ -30,7 +31,9 @@ namespace BlackGui
/**
* Display live data of interpolation
*/
class BLACKGUI_EXPORT CInterpolationLogDisplay : public COverlayMessagesFrame
class BLACKGUI_EXPORT CInterpolationLogDisplay :
public COverlayMessagesFrame,
public BlackMisc::CIdentifiable
{
Q_OBJECT
@@ -74,6 +77,9 @@ namespace BlackGui
//! Toggle start/stop
void toggleStartStop();
//! Display log in simulator
void showLogInSimulator();
//! Start displaying
void start();
@@ -110,6 +116,9 @@ namespace BlackGui
//! Clear
void clear();
//! Check if can do logging, otherwise stop and display message
bool checkLogPrerequisites();
QScopedPointer<Ui::CInterpolationLogDisplay> ui;
QTimer m_updateTimer;
QPointer<BlackCore::CSimulatorCommon> m_simulatorCommon; //!< related simulator