]> cloud.milkyroute.net Git - dolphin.git/blob - src/dolphinplacesmodelsingleton.h
Merge branch 'release/20.08' into master
[dolphin.git] / src / dolphinplacesmodelsingleton.h
1 /*
2 * SPDX-FileCopyrightText: 2018 Kai Uwe Broulik <kde@privat.broulik.de>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #ifndef DOLPHINPLACESMODELSINGLETON_H
8 #define DOLPHINPLACESMODELSINGLETON_H
9
10 #include <QString>
11 #include <QScopedPointer>
12
13 class KFilePlacesModel;
14
15 /**
16 * @brief Provides a global KFilePlacesModel instance.
17 */
18 class DolphinPlacesModelSingleton
19 {
20
21 public:
22 static DolphinPlacesModelSingleton& instance();
23
24 KFilePlacesModel *placesModel() const;
25 /** A suffix to the application-name of the stored bookmarks is
26 added, which is only read by PlacesItemModel. */
27 static QString applicationNameSuffix();
28
29 DolphinPlacesModelSingleton(const DolphinPlacesModelSingleton&) = delete;
30 DolphinPlacesModelSingleton& operator=(const DolphinPlacesModelSingleton&) = delete;
31
32 private:
33 DolphinPlacesModelSingleton();
34
35 QScopedPointer<KFilePlacesModel> m_placesModel;
36 };
37
38 #endif // DOLPHINPLACESMODELSINGLETON_H