File indexing completed on 2024-04-28 05:35:31
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 2007-2009 David Jarvie <djarvie@kde.org> 0004 SPDX-FileCopyrightText: 2009 Till Adam <adam@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #pragma once 0010 0011 #include <kdedmodule.h> 0012 0013 class KTimeZonedBase : public KDEDModule 0014 { 0015 Q_OBJECT 0016 Q_CLASSINFO("D-Bus Interface", "org.kde.KTimeZoned") 0017 0018 public: 0019 KTimeZonedBase(QObject *parent, const QList<QVariant> &) 0020 : KDEDModule(parent) 0021 { 0022 } 0023 ~KTimeZonedBase() override{}; 0024 0025 public Q_SLOTS: 0026 /** D-Bus call to initialize the module. 0027 * @param reinit determines whether to reinitialize if the module has already 0028 * initialized itself 0029 */ 0030 Q_SCRIPTABLE void initialize(bool reinit) 0031 { 0032 // If we reach here, the module has already been constructed and therefore 0033 // initialized. So only do anything if reinit is true. 0034 if (reinit) 0035 init(true); 0036 } 0037 0038 Q_SIGNALS: 0039 /** D-Bus signal emitted when the time zone configuration has changed. */ 0040 void timeZoneChanged(); 0041 0042 /** D-Bus signal emitted when the definition (not the identity) of the local 0043 * system time zone has changed. 0044 */ 0045 void timeZoneDatabaseUpdated(); 0046 0047 protected: 0048 virtual void init(bool) = 0; 0049 0050 QString m_localZone; // local system time zone name 0051 };