File indexing completed on 2025-02-02 05:02:38
0001 /* 0002 SPDX-FileCopyrightText: 2018 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef TRIPGROUP_H 0008 #define TRIPGROUP_H 0009 0010 #include <QMetaType> 0011 #include <QString> 0012 #include <QVector> 0013 0014 class TripGroupManager; 0015 0016 class QDateTime; 0017 0018 /** Trip group object. */ 0019 class TripGroup 0020 { 0021 Q_GADGET 0022 Q_PROPERTY(QString name READ name) 0023 Q_PROPERTY(QDateTime beginDateTime READ beginDateTime) 0024 Q_PROPERTY(QDateTime endDateTime READ endDateTime) 0025 public: 0026 TripGroup(); 0027 TripGroup(TripGroupManager *mgr); 0028 ~TripGroup(); 0029 0030 QString name() const; 0031 void setName(const QString &name); 0032 0033 QVector<QString> elements() const; 0034 void setElements(const QVector<QString> &elems); 0035 0036 QDateTime beginDateTime() const; 0037 QDateTime endDateTime() const; 0038 0039 bool load(const QString &path); 0040 void store(const QString &path) const; 0041 0042 private: 0043 TripGroupManager *m_mgr = nullptr; 0044 QString m_name; 0045 QVector<QString> m_elements; 0046 }; 0047 0048 Q_DECLARE_METATYPE(TripGroup) 0049 0050 #endif // TRIPGROUP_H