Enroute Flight Navigation
A navigation app for VFR pilots
VACCollection.h
1/***************************************************************************
2 * Copyright (C) 2026 by Stefan Kebekus *
3 * stefan.kebekus@gmail.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 3 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20
21#pragma once
22
23#include <QFile>
24#include <QSharedPointer>
25
26#include "fileFormats/DataFileAbstract.h"
27#include "geomaps/VAC.h"
28
29
30namespace FileFormats
31{
32
51
52class VACCollection : public DataFileAbstract
53{
54
55public:
64 VACCollection(const QString& fileName);
65
68
77 [[nodiscard]] QList<GeoMaps::VAC> charts() const { return m_charts; }
78
89 [[nodiscard]] QString attribution() const { return m_attribution; }
90
96 [[nodiscard]] QString name() const { return m_name; }
97
105 [[nodiscard]] QByteArray imageData(const QString& chartName);
106
107private:
108 Q_DISABLE_COPY_MOVE(VACCollection)
109
110 // Name of the VAC collection file
111 QString m_fileName;
112 QSharedPointer<QFile> m_file;
113
114 // Name of the data base connection. This name is unique to each instance of
115 // this class, and should therefore not be copied.
116 QString m_databaseConnectionName;
117
118 QString m_name;
119 QString m_attribution;
120 QList<GeoMaps::VAC> m_charts;
121};
122
123} // namespace FileFormats
QString attribution() const
Attribution for the charts of this collection.
VACCollection(const QString &fileName)
Standard constructor.
QString name() const
Name of the collection.
QByteArray imageData(const QString &chartName)
Retrieve raster data for a single chart.
QList< GeoMaps::VAC > charts() const
Charts contained in the collection.
~VACCollection()
Standard destructor.