Kirigami-addons

androidintegration.h
1/*
2​ * SPDX-FileCopyrightText: 2020 Nicolas Fella <nicolas.fella@gmx.de>
3​ * SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
4​ *
5​ * SPDX-License-Identifier: LGPL-2.0-or-later
6​ */
7
8#ifndef KIRIGAMIADDONSDATEANDTIME_ANDROIDINTEGRATION_H
9#define KIRIGAMIADDONSDATEANDTIME_ANDROIDINTEGRATION_H
10
11#include "kirigamidateandtime_export.h"
12
13#include <QDateTime>
14#include <QObject>
15
16namespace KirigamiAddonsDateAndTime {
17
18/** Interface to native Android date/time pickers.
19 * @internal
20 */
21class KIRIGAMIDATEANDTIME_EXPORT AndroidIntegration : public QObject
22{
23 Q_OBJECT
24
25public:
26 Q_INVOKABLE void showDatePicker(qint64 initialDate);
27 Q_INVOKABLE void showTimePicker(qint64 initialTime);
28
29 void _timeSelected(int hours, int minutes);
30 void _timeCancelled();
31
32 static AndroidIntegration &instance();
33
34Q_SIGNALS:
35 void datePickerFinished(bool accepted, const QDateTime &date);
36 void timePickerFinished(bool accepted, const QDateTime &time);
37
38private:
39 static AndroidIntegration *s_instance;
40};
41
42}
43
44#endif // KIRIGAMIADDONSDATEANDTIME_ANDROIDINTEGRATION_H
Interface to native Android date/time pickers.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.