2 * SPDX-FileCopyrightText: 2009 Peter Penz <peter.penz19@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0-or-later
7 #ifndef DOLPHINNEWFILEMENUOBSERVER_H
8 #define DOLPHINNEWFILEMENUOBSERVER_H
10 #include "dolphin_export.h"
14 class DolphinNewFileMenu
;
17 * @brief Allows to observe new file items that have been created
18 * by a DolphinNewFileMenu instance.
20 * As soon as a DolphinNewFileMenu instance created a new item,
21 * the observer will emit the signal itemCreated().
23 class DOLPHIN_EXPORT DolphinNewFileMenuObserver
: public QObject
28 static DolphinNewFileMenuObserver
&instance();
29 void attach(const DolphinNewFileMenu
*menu
);
30 void detach(const DolphinNewFileMenu
*menu
);
33 void itemCreated(const QUrl
&url
);
34 void errorMessage(const QString
&error
);
37 DolphinNewFileMenuObserver();
38 ~DolphinNewFileMenuObserver() override
;
40 friend class DolphinNewFileMenuObserverSingleton
;