1
0
Fork 0
flightgear/src/GUI/FavouriteAircraftData.hxx
James Turner e596eb3716 Launcher: move favourites to its own storage class
This allows viewing/changing favourite-ness from the details view.
2020-04-04 09:20:23 +01:00

31 lines
518 B
C++

#ifndef FAVOURITEAIRCRAFTDATA_HXX
#define FAVOURITEAIRCRAFTDATA_HXX
#include <QObject>
#include <QUrl>
#include <QVector>
class FavouriteAircraftData : public QObject
{
Q_OBJECT
public:
static FavouriteAircraftData* instance();
bool isFavourite(QUrl u) const;
bool setFavourite(QUrl u, bool b);
signals:
void changed(QUrl u);
private:
FavouriteAircraftData();
void loadFavourites();
void saveFavourites();
QVector<QUrl> m_favourites;
};
#endif // FAVOURITEAIRCRAFTDATA_HXX