blob: 10682e8bfda3768b6532fedf85726b8f8b0e01b1 (
plain)
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
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef WORLDTIMECLOCK_H
#define WORLDTIMECLOCK_H
#include <QTime>
#include <QWidget>
#include <QtUiPlugin/QDesignerExportWidget>
//! [0] //! [1]
class QDESIGNER_WIDGET_EXPORT WorldTimeClock : public QWidget
{
Q_OBJECT
//! [0]
public:
explicit WorldTimeClock(QWidget *parent = nullptr);
public slots:
void setTimeZone(int hourOffset);
signals:
void updated(QTime currentTime);
protected:
void paintEvent(QPaintEvent *event) override;
private:
int timeZoneOffset = 0;
//! [2]
};
//! [1] //! [2]
#endif
|