File indexing completed on 2024-04-28 05:35:31
0001 /* 0002 SPDX-FileCopyrightText: 2007, 2009 David Jarvie <djarvie@kde.org> 0003 SPDX-FileCopyrightText: 2013 Martin Klapetek <mklapetek@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include "ktimezonedbase.h" 0011 0012 #include <QObject> 0013 0014 class KDirWatch; 0015 0016 class KTimeZoned : public KTimeZonedBase 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit KTimeZoned(QObject *parent, const QList<QVariant> &); 0022 ~KTimeZoned() override; 0023 0024 private Q_SLOTS: 0025 void updateLocalZone(); 0026 void zonetabChanged(); 0027 0028 private: 0029 void init(bool restart) override; 0030 bool findZoneTab(const QString &pathFromConfig); 0031 0032 KDirWatch *m_dirWatch = nullptr; // watcher for timezone config changes 0033 KDirWatch *m_zoneTabWatch = nullptr; // watcher for zone.tab changes 0034 QString m_zoneinfoDir; // path to zoneinfo directory 0035 QString m_zoneTab; // path to zone.tab file 0036 };