File indexing completed on 2024-04-28 03:59:49
0001 /* 0002 SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef MODEMMANAGERQT_FAKE_MODEM_MODEM_TIME_H 0008 #define MODEMMANAGERQT_FAKE_MODEM_MODEM_TIME_H 0009 0010 #include "generictypes.h" 0011 0012 #include <QDBusAbstractAdaptor> 0013 0014 class ModemTime : public QDBusAbstractAdaptor 0015 { 0016 Q_OBJECT 0017 Q_CLASSINFO("D-Bus Interface", "org.kde.fakemodem.Modem.Time") 0018 public: 0019 explicit ModemTime(QObject *parent = nullptr); 0020 ~ModemTime() override; 0021 0022 Q_PROPERTY(QVariantMap NetworkTimezone READ networkTimezone) 0023 0024 QVariantMap networkTimezone() const; 0025 0026 /* Not part of dbus interface */ 0027 void setModemPath(const QString &path); 0028 void setEnableNotifications(bool enable); 0029 void setNetworkTimezone(const QVariantMap &timezone); 0030 0031 QVariantMap toMap() const; 0032 0033 public Q_SLOTS: 0034 Q_SCRIPTABLE QString GetNetworkTime(); 0035 0036 Q_SIGNALS: // SIGNALS 0037 Q_SCRIPTABLE void NetworkTimeChanged(const QString &time); 0038 0039 private: 0040 QString m_modemPath; 0041 bool m_enabledNotifications; 0042 QVariantMap m_timezone; 0043 }; 0044 0045 #endif