2020-08-25 17:07:38 +00:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2018 Kai Uwe Broulik <kde@privat.broulik.de>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2018-03-19 08:57:24 +00:00
|
|
|
|
|
|
|
#ifndef DOLPHINPLACESMODELSINGLETON_H
|
|
|
|
#define DOLPHINPLACESMODELSINGLETON_H
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QScopedPointer>
|
|
|
|
|
|
|
|
class KFilePlacesModel;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Provides a global KFilePlacesModel instance.
|
|
|
|
*/
|
|
|
|
class DolphinPlacesModelSingleton
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
static DolphinPlacesModelSingleton& instance();
|
|
|
|
|
|
|
|
KFilePlacesModel *placesModel() const;
|
|
|
|
/** A suffix to the application-name of the stored bookmarks is
|
|
|
|
added, which is only read by PlacesItemModel. */
|
|
|
|
static QString applicationNameSuffix();
|
|
|
|
|
|
|
|
DolphinPlacesModelSingleton(const DolphinPlacesModelSingleton&) = delete;
|
|
|
|
DolphinPlacesModelSingleton& operator=(const DolphinPlacesModelSingleton&) = delete;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DolphinPlacesModelSingleton();
|
|
|
|
|
|
|
|
QScopedPointer<KFilePlacesModel> m_placesModel;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DOLPHINPLACESMODELSINGLETON_H
|