File indexing completed on 2024-04-28 09:40:55
0001 /* 0002 * SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz@gmx.at> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #ifndef DOLPHINNEWFILEMENU_H 0007 #define DOLPHINNEWFILEMENU_H 0008 0009 #include "dolphin_export.h" 0010 0011 #include <KNewFileMenu> 0012 0013 class KJob; 0014 0015 /** 0016 * @brief Represents the 'Create New...' sub menu for the File menu 0017 * and the context menu. 0018 * 0019 * The only difference to KNewFileMenu is the custom error handling. 0020 * All errors are shown in the status bar of Dolphin 0021 * instead as modal error dialog with an OK button. 0022 */ 0023 class DOLPHIN_EXPORT DolphinNewFileMenu : public KNewFileMenu 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 DolphinNewFileMenu(QAction *createDirAction, QObject *parent); 0029 ~DolphinNewFileMenu() override; 0030 0031 Q_SIGNALS: 0032 void errorMessage(const QString &error); 0033 0034 protected Q_SLOTS: 0035 /** @see KNewFileMenu::slotResult() */ 0036 void slotResult(KJob *job) override; 0037 }; 0038 0039 #endif