forked from guido57/EBAZ4205_SDR_spectrum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JTDXDateTime.h
35 lines (29 loc) · 1 KB
/
JTDXDateTime.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef JTDXDATETIME_H__
#define JTDXDATETIME_H__
#include <QDateTime>
//
// JTDXDateTime to manipulate system clock time
//
//Created by Arvo, ES1JA 2020
class JTDXDateTime : public QDateTime
{
public:
explicit JTDXDateTime ();
explicit JTDXDateTime (QDateTime &&other);
explicit JTDXDateTime(const QDateTime &other);
explicit JTDXDateTime(const QDate &date, const QTime &time, const QTimeZone &timeZone);
explicit JTDXDateTime(const QDate &date, const QTime &time, Qt::TimeSpec spec, int offsetSeconds);
explicit JTDXDateTime(const QDate &date, const QTime &time, Qt::TimeSpec spec = Qt::LocalTime);
QDateTime currentDateTimeUtc2();
QDateTime currentDateTime2();
qint64 currentMSecsSinceEpoch2();
void SetOffset (float offset) { foffset_ = offset; offset_ = foffset_ * 1000;}
float GetOffset () { return foffset_; }
private:
float foffset_ =0;
qint64 offset_ = 0;
using QDateTime::currentDateTimeUtc;
using QDateTime::currentDateTime;
using QDateTime::currentMSecsSinceEpoch;
};
#endif