File indexing completed on 2024-05-12 05:35:39
0001 /* 0002 SPDX-FileCopyrightText: 1998 Luca Montecchiani <m.luca@usa.net> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #pragma once 0007 0008 #include <QObject> 0009 0010 #include <KAuth/ActionReply> 0011 #include <KAuth/HelperSupport> 0012 0013 using namespace KAuth; 0014 0015 class ClockHelper : public QObject 0016 { 0017 Q_OBJECT 0018 0019 public: 0020 enum { CallError = 1 << 0, TimezoneError = 1 << 1, NTPError = 1 << 2, DateError = 1 << 3 }; 0021 0022 public Q_SLOTS: 0023 ActionReply save(const QVariantMap &map); 0024 0025 private: 0026 int ntp(const QStringList &ntpServers, bool ntpEnabled); 0027 int date(const QString &newdate, const QString &olddate); 0028 int tz(const QString &selectedzone); 0029 int tzreset(); 0030 0031 void toHwclock(); 0032 };