mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 07:15:34 +08:00
refs #799, own component for view update times
* utility function in CTime * settings class for update times
This commit is contained in:
@@ -131,6 +131,12 @@ namespace BlackMisc
|
||||
return static_cast<int>(ms);
|
||||
}
|
||||
|
||||
int CTime::toSeconds() const
|
||||
{
|
||||
double ms = this->valueRounded(CTimeUnit::s(), 0);
|
||||
return static_cast<int>(ms);
|
||||
}
|
||||
|
||||
QString CTime::formattedHrsMin() const
|
||||
{
|
||||
QList<int> parts = getHrsMinSecParts();
|
||||
@@ -146,5 +152,5 @@ namespace BlackMisc
|
||||
return fs;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -73,12 +73,14 @@ namespace BlackMisc
|
||||
//! Convenience functions when used with timers etc.
|
||||
int toMs() const;
|
||||
|
||||
//! Convenience functions when used with timers etc.
|
||||
int toSeconds() const;
|
||||
|
||||
//! Formatted as hh:mm
|
||||
QString formattedHrsMin() const;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CTime)
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@ namespace BlackMisc
|
||||
GlobalIndexCDockWidgetSettings = 14200,
|
||||
GlobalIndexCNavigatorSettings = 14300,
|
||||
GlobalIndexCSettingsReaders = 14400,
|
||||
GlobalIndexCViewUpdateSettings = 14500,
|
||||
GloablIndexInterpolatorSetup = 15000,
|
||||
GlobalIndexLineNumber = 20000, //!< pseudo index for line numbers
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user