File indexing completed on 2024-05-19 05:57:23
0001 // SPDX-FileCopyrightText: 2022 Plata Hill <plata.hill@kdemail.net> 0002 // SPDX-License-Identifier: LGPL-2.1-or-later 0003 0004 #pragma once 0005 0006 #include <QObject> 0007 0008 #include "programdata.h" 0009 #include "types.h" 0010 0011 #include <QMap> 0012 #include <QVector> 0013 0014 class Program; 0015 0016 class ProgramFactory : public QObject 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 ProgramFactory(); 0022 ~ProgramFactory() = default; 0023 0024 size_t count(const ChannelId &channelId) const; 0025 Program *create(const ChannelId &channelId, int index) const; 0026 void load(const ChannelId &channelId) const; 0027 0028 private: 0029 mutable QMap<ChannelId, QVector<ProgramData>> m_programs; 0030 };