┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinnewfilemenu.h
blob: 650863cb11179c0b6f191c40e8fc524790a37765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * SPDX-FileCopyrightText: 2006 Peter Penz <[email protected]>
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */
#ifndef DOLPHINNEWFILEMENU_H
#define DOLPHINNEWFILEMENU_H

#include "dolphin_export.h"

#include <KNewFileMenu>

class KJob;

/**
 * @brief Represents the 'Create New...' sub menu for the File menu
 *        and the context menu.
 *
 * The only difference to KNewFileMenu is the custom error handling.
 * All errors are shown in the status bar of Dolphin
 * instead as modal error dialog with an OK button.
 */
class DOLPHIN_EXPORT DolphinNewFileMenu : public KNewFileMenu
{
    Q_OBJECT

public:
    DolphinNewFileMenu(KActionCollection* collection, QObject* parent);
    ~DolphinNewFileMenu() override;

Q_SIGNALS:
    void errorMessage(const QString& error);

protected Q_SLOTS:
    /** @see KNewFileMenu::slotResult() */
    void slotResult(KJob* job) override;
};

#endif