mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 09:15:34 +08:00
refs #219, load flight plan
* fixed issue with parsing, only default locale is used. Now user's local possible * allow to load FP for other callsigns as well (voice capabilities) * Improved handling of CTime, inclusive bug fixes and time formatting * Max. lengths for FP fields as const value (so we can change it if required) * Load FP from GUI component * Samples for PQ classes * Adjusted depending classes (e.g. client)
This commit is contained in:
@@ -19,12 +19,24 @@ namespace BlackMisc
|
||||
class CTime : public CPhysicalQuantity<CTimeUnit, CTime>
|
||||
{
|
||||
public:
|
||||
|
||||
//! Parts
|
||||
enum Parts
|
||||
{
|
||||
Hours = 0,
|
||||
Minutes,
|
||||
Seconds
|
||||
};
|
||||
|
||||
//! Default constructor
|
||||
CTime() : CPhysicalQuantity(0, CTimeUnit::defaultUnit()) {}
|
||||
|
||||
//! Init by double value
|
||||
CTime(double value, const CTimeUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
//! By hours, minutes, seconds
|
||||
CTime(int hours, int minutes, int seconds = 0);
|
||||
|
||||
//! By Qt time
|
||||
CTime(const QTime &time);
|
||||
|
||||
@@ -43,6 +55,9 @@ namespace BlackMisc
|
||||
//! To Qt time
|
||||
QTime toQTime() const;
|
||||
|
||||
//! Parts hh, mm, ss
|
||||
QList<int> getHrsMinSecParts() const;
|
||||
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user