File indexing completed on 2022-10-04 17:31:39

0001 /**
0002  * SPDX-FileCopyrightText: 2019 Nicolas Fella <nicolas.fella@gmx.de>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 #pragma once
0007 
0008 #include <QObject>
0009 
0010 class AndroidUtils : public QObject
0011 {
0012     Q_OBJECT
0013 public:
0014     Q_INVOKABLE void showDatePicker();
0015     Q_INVOKABLE void showTimePicker();
0016 
0017     void _dateSelected(const QString &data);
0018     void _dateCancelled();
0019 
0020     void _timeSelected(const QString &data);
0021     void _timeCancelled();
0022 
0023     static AndroidUtils *instance();
0024 
0025 Q_SIGNALS:
0026     void datePickerFinished(bool accepted, const QDate &date);
0027     void timePickerFinished(bool accepted, const QTime &time);
0028 
0029 private:
0030     static AndroidUtils *s_instance;
0031 };