Ref T201, info component

* removed private signal, no longer needed as a newer signature does not require an input signal
* timestamp format
* fixed !entities.testFlag
This commit is contained in:
Klaus Basan
2017-12-09 19:18:51 +01:00
parent 12b2bc4181
commit 0dc6b63ba5
2 changed files with 3 additions and 9 deletions

View File

@@ -61,7 +61,6 @@ namespace BlackGui
connect(ui->pb_LoadAllFromDB, &QPushButton::pressed, this, &CDbLoadOverviewComponent::loadAllFromDb); connect(ui->pb_LoadAllFromDB, &QPushButton::pressed, this, &CDbLoadOverviewComponent::loadAllFromDb);
connect(ui->pb_LoadAllFromShared, &QPushButton::pressed, this, &CDbLoadOverviewComponent::loadAllFromShared); connect(ui->pb_LoadAllFromShared, &QPushButton::pressed, this, &CDbLoadOverviewComponent::loadAllFromShared);
connect(this, &CDbLoadOverviewComponent::ps_triggerDigestGuiUpdate, this, &CDbLoadOverviewComponent::setGuiValues);
if (sGui->hasWebDataServices()) if (sGui->hasWebDataServices())
{ {
connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbLoadOverviewComponent::dataLoaded); connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CDbLoadOverviewComponent::dataLoaded);
@@ -231,7 +230,7 @@ namespace BlackGui
QString CDbLoadOverviewComponent::formattedTimestamp(const QDateTime &dateTime) QString CDbLoadOverviewComponent::formattedTimestamp(const QDateTime &dateTime)
{ {
if (!dateTime.isValid()) { return "-"; } if (!dateTime.isValid()) { return "-"; }
return dateTime.toUTC().toString("MM-dd hh:mm:ss"); return dateTime.toUTC().toString("yy-MM-dd hh:mm:ss");
} }
QString CDbLoadOverviewComponent::cacheTimestampForEntity(CEntityFlags::Entity entity) QString CDbLoadOverviewComponent::cacheTimestampForEntity(CEntityFlags::Entity entity)
@@ -327,7 +326,7 @@ namespace BlackGui
{ {
Q_UNUSED(number); Q_UNUSED(number);
if (!CEntityFlags::isFinishedReadState(state)) return; if (!CEntityFlags::isFinishedReadState(state)) return;
if (!entities.testFlag(CEntityFlags::SharedInfoObjectEntity) && entities.testFlag(CEntityFlags::DbInfoObjectEntity) && !CEntityFlags::anySwiftDbEntity(entities)) { return; } if (!entities.testFlag(CEntityFlags::SharedInfoObjectEntity) && !entities.testFlag(CEntityFlags::DbInfoObjectEntity) && !CEntityFlags::anySwiftDbEntity(entities)) { return; }
m_loadInProgress = false; m_loadInProgress = false;
m_dsTriggerGuiUpdate.inputSignal(); m_dsTriggerGuiUpdate.inputSignal();
} }

View File

@@ -57,18 +57,13 @@ namespace BlackGui
//! Load all from shared //! Load all from shared
void loadAllFromShared(); void loadAllFromShared();
signals:
//! Trigger GUI update
//! \private
void ps_triggerDigestGuiUpdate();
protected: protected:
//! \copydoc QWidget::resizeEvent //! \copydoc QWidget::resizeEvent
virtual void resizeEvent(QResizeEvent *event) override; virtual void resizeEvent(QResizeEvent *event) override;
private: private:
QScopedPointer<Ui::CDbLoadOverviewComponent> ui; QScopedPointer<Ui::CDbLoadOverviewComponent> ui;
BlackMisc::CDigestSignal m_dsTriggerGuiUpdate { this, &CDbLoadOverviewComponent::ps_triggerDigestGuiUpdate, &CDbLoadOverviewComponent::setGuiValues, 2500, 5 }; BlackMisc::CDigestSignal m_dsTriggerGuiUpdate { this, &CDbLoadOverviewComponent::setGuiValues, 2500, 5 };
bool m_loadInProgress = false; //!< data loading in progress bool m_loadInProgress = false; //!< data loading in progress
bool m_setValuesInProgress = false; //!< setting values in progress, needed because of CNetworkUtils::canConnect check (processing events) bool m_setValuesInProgress = false; //!< setting values in progress, needed because of CNetworkUtils::canConnect check (processing events)