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
24public:
25 Q_INVOKABLE void showDatePicker(qint64 initialDate);
26 Q_INVOKABLE void showTimePicker(qint64 initialTime);
27
28 void _timeSelected(int hours, int minutes);
29 void _timeCancelled();
30
31 static AndroidIntegration &instance();
32
33Q_SIGNALS:
34 void datePickerFinished(bool accepted, const QDateTime &date);
35 void timePickerFinished(bool accepted, const QDateTime &time);
36
37private:
38 static AndroidIntegration *s_instance;
39};
40
41}
42
43#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 Fri May 3 2024 11:46:57 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.