]> cloud.milkyroute.net Git - dolphin.git/blob - src/views/dolphinnewfilemenuobserver.h
Add missing KF6::ColorScheme link
[dolphin.git] / src / views / dolphinnewfilemenuobserver.h
1 /*
2 * SPDX-FileCopyrightText: 2009 Peter Penz <peter.penz19@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #ifndef DOLPHINNEWFILEMENUOBSERVER_H
8 #define DOLPHINNEWFILEMENUOBSERVER_H
9
10 #include "dolphin_export.h"
11
12 #include <QObject>
13
14 class DolphinNewFileMenu;
15
16 /**
17 * @brief Allows to observe new file items that have been created
18 * by a DolphinNewFileMenu instance.
19 *
20 * As soon as a DolphinNewFileMenu instance created a new item,
21 * the observer will emit the signal itemCreated().
22 */
23 class DOLPHIN_EXPORT DolphinNewFileMenuObserver : public QObject
24 {
25 Q_OBJECT
26
27 public:
28 static DolphinNewFileMenuObserver &instance();
29 void attach(const DolphinNewFileMenu *menu);
30 void detach(const DolphinNewFileMenu *menu);
31
32 Q_SIGNALS:
33 void itemCreated(const QUrl &url);
34 void errorMessage(const QString &error);
35
36 private:
37 DolphinNewFileMenuObserver();
38 ~DolphinNewFileMenuObserver() override;
39
40 friend class DolphinNewFileMenuObserverSingleton;
41 };
42
43 #endif