Style and some view columns/UI renamings

This commit is contained in:
Klaus Basan
2018-07-31 21:40:37 +02:00
parent ce004be6ac
commit fe99eb0fed
7 changed files with 17 additions and 16 deletions

View File

@@ -56,7 +56,7 @@ using namespace BlackCore;
namespace BlackSample namespace BlackSample
{ {
void ServiceTool::dataTransferTestServer(BlackMisc::CDBusServer *dBusServer, bool verbose) void ServiceTool::dataTransferTestServer(CDBusServer *dBusServer, bool verbose)
{ {
QDBusConnection sessionBusConnection = QDBusConnection::sessionBus(); QDBusConnection sessionBusConnection = QDBusConnection::sessionBus();
if (sessionBusConnection.interface()->isServiceRegistered(CTestService::InterfaceName())) if (sessionBusConnection.interface()->isServiceRegistered(CTestService::InterfaceName()))

View File

@@ -97,7 +97,7 @@ namespace BlackCore
m_highlightedAircraft.removeByCallsign(cs); m_highlightedAircraft.removeByCallsign(cs);
if (enableHighlight) if (enableHighlight)
{ {
const qint64 deltaT = displayTime.valueRounded(CTimeUnit::ms(), 0); const qint64 deltaT = displayTime.valueInteger(CTimeUnit::ms());
m_highlightEndTimeMsEpoch = QDateTime::currentMSecsSinceEpoch() + deltaT; m_highlightEndTimeMsEpoch = QDateTime::currentMSecsSinceEpoch() + deltaT;
m_highlightedAircraft.push_back(aircraftToHighlight); m_highlightedAircraft.push_back(aircraftToHighlight);
} }
@@ -457,7 +457,7 @@ namespace BlackCore
this->clearAllRemoteAircraftData(); this->clearAllRemoteAircraftData();
if (!msgs.isEmpty()) { emit this->driverMessages(msgs); } if (!msgs.isEmpty()) { emit this->driverMessages(msgs); }
const CSimulatedAircraftList aircraft = this->getAircraftInRange(); const CSimulatedAircraftList aircraft = this->getAircraftInRange();
for (const CSimulatedAircraft a : aircraft) for (const CSimulatedAircraft &a : aircraft)
{ {
if (a.isEnabled()) { this->logicallyAddRemoteAircraft(a); } if (a.isEnabled()) { this->logicallyAddRemoteAircraft(a); }
} }
@@ -833,13 +833,13 @@ namespace BlackCore
return false; return false;
} }
int tokens = 0.1 * numberPerSecond; // 100ms int tokens = qRound(0.1 * numberPerSecond); // 100ms
do do
{ {
if (tokens >= 3) { m_limitUpdateAircraftBucket.setInterval(100); break; } if (tokens >= 3) { m_limitUpdateAircraftBucket.setInterval(100); break; }
tokens = 0.25 * numberPerSecond; // 250ms tokens = qRound(0.25 * numberPerSecond); // 250ms
if (tokens >= 3) { m_limitUpdateAircraftBucket.setInterval(250); break; } if (tokens >= 3) { m_limitUpdateAircraftBucket.setInterval(250); break; }
tokens = 0.5 * numberPerSecond; // 500ms tokens = qRound(0.5 * numberPerSecond); // 500ms
if (tokens >= 3) { m_limitUpdateAircraftBucket.setInterval(500); break; } if (tokens >= 3) { m_limitUpdateAircraftBucket.setInterval(500); break; }
tokens = numberPerSecond; tokens = numberPerSecond;
m_limitUpdateAircraftBucket.setInterval(1000); m_limitUpdateAircraftBucket.setInterval(1000);

View File

@@ -164,7 +164,7 @@ namespace BlackGui
QTimer m_updateTimer; QTimer m_updateTimer;
QPointer<BlackCore::ISimulator> m_simulator; //!< related simulator QPointer<BlackCore::ISimulator> m_simulator; //!< related simulator
QPointer<BlackCore::CAirspaceMonitor> m_airspaceMonitor; //!< related airspace monitor QPointer<BlackCore::CAirspaceMonitor> m_airspaceMonitor; //!< related airspace monitor
BlackMisc::Aviation::CAircraftSituationList m_lastInterpolations; BlackMisc::Aviation::CAircraftSituationList m_lastInterpolations; //!< list of last interpolations
BlackMisc::Aviation::CCallsign m_callsign; //!< current callsign BlackMisc::Aviation::CCallsign m_callsign; //!< current callsign
int m_elvRequested = 0; //!< counted via signal int m_elvRequested = 0; //!< counted via signal
int m_elvReceived = 0; //!< counted via signal int m_elvReceived = 0; //!< counted via signal

View File

@@ -241,7 +241,7 @@
<item> <item>
<widget class="QTabWidget" name="tw_LogTabs"> <widget class="QTabWidget" name="tw_LogTabs">
<property name="currentIndex"> <property name="currentIndex">
<number>5</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tb_DataFlow"> <widget class="QWidget" name="tb_DataFlow">
<attribute name="title"> <attribute name="title">
@@ -528,7 +528,7 @@
</property> </property>
<widget class="QGroupBox" name="gb_InboundSituations"> <widget class="QGroupBox" name="gb_InboundSituations">
<property name="title"> <property name="title">
<string>Inbound situations</string> <string>Inbound situations from network</string>
</property> </property>
<layout class="QVBoxLayout" name="vl_InboundSituations"> <layout class="QVBoxLayout" name="vl_InboundSituations">
<item> <item>
@@ -548,7 +548,7 @@
</widget> </widget>
<widget class="QGroupBox" name="gb_InboundParts"> <widget class="QGroupBox" name="gb_InboundParts">
<property name="title"> <property name="title">
<string>Inbound parts</string> <string>Inbound parts from network</string>
</property> </property>
<layout class="QVBoxLayout" name="vl_InboundParts"> <layout class="QVBoxLayout" name="vl_InboundParts">
<item> <item>
@@ -755,7 +755,7 @@
<item> <item>
<widget class="QGroupBox" name="gb_InterpolatedSituations"> <widget class="QGroupBox" name="gb_InterpolatedSituations">
<property name="title"> <property name="title">
<string>Interpolated</string> <string>Interpolated (from interpolation logger)</string>
</property> </property>
<layout class="QVBoxLayout" name="vl_InterpolatedGb"> <layout class="QVBoxLayout" name="vl_InterpolatedGb">
<item> <item>
@@ -777,7 +777,7 @@
<item> <item>
<widget class="QGroupBox" name="gb_LoopbackSituations"> <widget class="QGroupBox" name="gb_LoopbackSituations">
<property name="title"> <property name="title">
<string>Loopback</string> <string>Loopback from simulator</string>
</property> </property>
<layout class="QVBoxLayout" name="vl_LoopbackGb"> <layout class="QVBoxLayout" name="vl_LoopbackGb">
<item> <item>

View File

@@ -32,7 +32,7 @@ namespace BlackGui
m_columns.addColumn(CColumn("altitude", CAircraftSituation::IndexAltitude, new CAltitudeFormatter())); m_columns.addColumn(CColumn("altitude", CAircraftSituation::IndexAltitude, new CAltitudeFormatter()));
m_columns.addColumn(CColumn("CG", CAircraftSituation::IndexCG, new CPhysiqalQuantiyFormatter<CLengthUnit, CLength>(CLengthUnit::ft(), 1))); m_columns.addColumn(CColumn("CG", CAircraftSituation::IndexCG, new CPhysiqalQuantiyFormatter<CLengthUnit, CLength>(CLengthUnit::ft(), 1)));
m_columns.addColumn(CColumn("offset", CAircraftSituation::IndexSceneryOffset, new CPhysiqalQuantiyFormatter<CLengthUnit, CLength>(CLengthUnit::ft(), 1))); m_columns.addColumn(CColumn("sc.os.", "scenery offset", CAircraftSituation::IndexSceneryOffset, new CPhysiqalQuantiyFormatter<CLengthUnit, CLength>(CLengthUnit::ft(), 1)));
m_columns.addColumn(CColumn("latitude", CAircraftSituation::IndexLatitude, new CLatLonFormatter())); m_columns.addColumn(CColumn("latitude", CAircraftSituation::IndexLatitude, new CLatLonFormatter()));
m_columns.addColumn(CColumn("longitude", CAircraftSituation::IndexLongitude, new CLatLonFormatter())); m_columns.addColumn(CColumn("longitude", CAircraftSituation::IndexLongitude, new CLatLonFormatter()));
m_columns.addColumn(CColumn("gs.", CAircraftSituation::IndexGroundSpeed, new CSpeedKtsFormatter())); m_columns.addColumn(CColumn("gs.", CAircraftSituation::IndexGroundSpeed, new CSpeedKtsFormatter()));

View File

@@ -29,7 +29,7 @@ namespace BlackGui
void CListModelTimestampObjects<ObjectType, ContainerType, UseCompare>::addTimestampColumns() void CListModelTimestampObjects<ObjectType, ContainerType, UseCompare>::addTimestampColumns()
{ {
CListModelBaseNonTemplate::m_columns.addColumn(CColumn::standardString("timestamp", ObjectType::IndexUtcTimestampFormattedMdhmsz)); CListModelBaseNonTemplate::m_columns.addColumn(CColumn::standardString("timestamp", ObjectType::IndexUtcTimestampFormattedMdhmsz));
CListModelBaseNonTemplate::m_columns.addColumn(CColumn("ms", ObjectType::IndexMSecsSinceEpoch, new CIntegerFormatter())); CListModelBaseNonTemplate::m_columns.addColumn(CColumn("timestamp ms", "milliseconds since epoch", ObjectType::IndexMSecsSinceEpoch, new CIntegerFormatter()));
} }
template class CListModelTimestampObjects<BlackMisc::CStatusMessage, BlackMisc::CStatusMessageList, true>; template class CListModelTimestampObjects<BlackMisc::CStatusMessage, BlackMisc::CStatusMessageList, true>;
@@ -54,8 +54,8 @@ namespace BlackGui
void CListModelTimestampWithOffsetObjects<ObjectType, ContainerType, UseCompare>::addTimestampOffsetColumns() void CListModelTimestampWithOffsetObjects<ObjectType, ContainerType, UseCompare>::addTimestampOffsetColumns()
{ {
CListModelTimestampObjects<ObjectType, ContainerType, UseCompare>::addTimestampColumns(); CListModelTimestampObjects<ObjectType, ContainerType, UseCompare>::addTimestampColumns();
CListModelBaseNonTemplate::m_columns.addColumn(CColumn("ms adj.", ObjectType::IndexAdjustedMsWithOffset, new CIntegerFormatter())); CListModelBaseNonTemplate::m_columns.addColumn(CColumn("ms adj.", "milliseconds adjusted", ObjectType::IndexAdjustedMsWithOffset, new CIntegerFormatter()));
CListModelBaseNonTemplate::m_columns.addColumn(CColumn("offset", ObjectType::IndexOffsetMs, new CIntegerFormatter())); CListModelBaseNonTemplate::m_columns.addColumn(CColumn("t.os.", "time offset", ObjectType::IndexOffsetMs, new CIntegerFormatter()));
} }
template class CListModelTimestampWithOffsetObjects<BlackMisc::Aviation::CAircraftParts, BlackMisc::Aviation::CAircraftPartsList, true>; template class CListModelTimestampWithOffsetObjects<BlackMisc::Aviation::CAircraftParts, BlackMisc::Aviation::CAircraftPartsList, true>;

View File

@@ -57,4 +57,5 @@ namespace BlackGui
}; };
} // namespace } // namespace
} // namespace } // namespace
#endif // guard #endif // guard