mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
40 lines
895 B
C++
40 lines
895 B
C++
/*
|
|
* SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz@gmx.at>
|
|
*
|
|
* 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
|