File indexing completed on 2024-05-12 03:48:30

0001 #ifndef UTCDATETIMEEDIT_H
0002 #define UTCDATETIMEEDIT_H
0003 
0004 #include <QDateTimeEdit>
0005 
0006 class UTCDateTimeEdit : public QDateTimeEdit {
0007     Q_OBJECT
0008 public:
0009     UTCDateTimeEdit(QWidget* parent = nullptr);
0010     void setMSecsSinceEpochUTC(qint64);
0011 
0012 Q_SIGNALS:
0013     void mSecsSinceEpochUTCChanged(qint64);
0014 
0015 private:
0016     // so it is not visible from outside
0017     void setDateTime(const QDateTime&) {
0018     }
0019     // For testing purpose only
0020     QLineEdit* lineEdit() const {
0021         return QDateTimeEdit::lineEdit();
0022     }
0023 private Q_SLOTS:
0024     void dateTimeChanged(const QDateTime&);
0025 
0026     friend class WorksheetElementTest;
0027 };
0028 
0029 #endif // UTCDATETIMEEDIT_H