refs #808, UI for CSimulatorInternals

* some functions renamed
* update function and view for internals
This commit is contained in:
Klaus Basan
2016-11-17 04:45:31 +01:00
parent 47b395f6b5
commit 3d314f8820
4 changed files with 90 additions and 36 deletions

View File

@@ -44,13 +44,7 @@ namespace BlackGui
explicit CSimulatorComponent(QWidget *parent = nullptr);
//! Destructor
~CSimulatorComponent();
//! Simple add or update name / value pair
void addOrUpdateByName(const QString &name, const QString &value, const BlackMisc::CIcon &icon);
//! Simple add or update name / value pair
void addOrUpdateByName(const QString &name, const QString &value, BlackMisc::CIcons::IconIndex iconIndex);
virtual ~CSimulatorComponent();
//! Number of entries
int rowCount() const;
@@ -66,14 +60,23 @@ namespace BlackGui
//! \copydoc ISimulator::simulatorStatusChanged
void ps_onSimulatorStatusChanged(int status);
//! Refresh the internals
void ps_refreshInternals();
private:
//! Update interval
int getUpdateIntervalMs() const;
//! Simple add or update name / value pair
void addOrUpdateLiveDataByName(const QString &name, const QString &value, const BlackMisc::CIcon &icon);
//! Simple add or update name / value pair
void addOrUpdateLiveDataByName(const QString &name, const QString &value, BlackMisc::CIcons::IconIndex iconIndex);
QScopedPointer<Ui::CSimulatorComponent> ui;
QTimer m_updateTimer;
};
}
}
} // ns
} // ns
#endif // guard