Marble

TimeControlWidget.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Harshit Jain <hjain.itbhu@gmail.com>
4//
5
6#ifndef MARBLE_TIMECONTROLWIDGET_H
7#define MARBLE_TIMECONTROLWIDGET_H
8
9// Qt
10#include <QDateTime>
11#include <QDialog>
12
13// Marble
14#include "marble_export.h"
15
16namespace Ui
17{
18class TimeControlWidget;
19}
20
21namespace Marble
22{
23
24class MarbleClock;
25
26class MARBLE_EXPORT TimeControlWidget : public QDialog
27{
28 Q_OBJECT
29
30public:
31 explicit TimeControlWidget(MarbleClock *clock, QWidget *parent = nullptr);
32 ~TimeControlWidget() override;
33
34private Q_SLOTS:
35 /**
36 * @brief apply the settings to internal clock
37 */
38 void apply();
39
40 /**
41 * @brief set the newDateTimeEdit to current system time
42 */
43 void nowClicked();
44
45 /**
46 * @brief Set the refreshIntervalSpinBox value to @p seconds.
47 */
48 void updateRefreshRate(int seconds);
49
50 /**
51 * @brief set the text of speedLabel to @p speed
52 */
53 void updateSpeedLabel(int speed);
54
55 /**
56 * @brief update the currentDateTimeEdit to current internal time
57 */
58 void updateDateTime();
59
60protected:
61 Q_DISABLE_COPY(TimeControlWidget)
62
63 void showEvent(QShowEvent *event) override;
64
65 Ui::TimeControlWidget *const m_uiWidget;
66
67 MarbleClock *const m_clock;
68 QDateTime m_lastDateTime;
69};
70
71}
72
73#endif // MARBLE_TIMECONTROLWIDGET_H
KGuiItem apply()
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.