diff options
| author | Peter Penz <[email protected]> | 2007-01-26 00:55:49 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-01-26 00:55:49 +0000 |
| commit | 5840fcede7178c80d137f589110d09ee20a99483 (patch) | |
| tree | 5c746f68645608d051dce82f7bdf77d6d7427d17 /src/dolphinnewmenu.h | |
| parent | d52282f8a2a727ad332d4cceeeaa6b79af9267c1 (diff) | |
Do a custom error handling in for the 'Create New...' submenu. Thanks to David for adjusting KNewMenu :-)
svn path=/trunk/playground/utils/dolphin/; revision=627220
Diffstat (limited to 'src/dolphinnewmenu.h')
| -rw-r--r-- | src/dolphinnewmenu.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/dolphinnewmenu.h b/src/dolphinnewmenu.h new file mode 100644 index 000000000..cca7b8e37 --- /dev/null +++ b/src/dolphinnewmenu.h @@ -0,0 +1,55 @@ +/*************************************************************************** + * Copyright (C) 2006 by Peter Penz * + * [email protected] * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef DOLPHINNEWMENU_H +#define DOLPHINNEWMENU_H + +//class KActionCollection; // TODO: only required temporary because of + // missing forward declaration in knewmenu.h +#include <knewmenu.h> + +class DolphinMainWindow; +class KJob; + +/** + * @brief Represents the 'Create New...' sub menu for the File menu + * and the context menu. + * + * The only difference to KNewMenu 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 DolphinNewMenu : public KNewMenu +{ +Q_OBJECT + +public: + DolphinNewMenu(DolphinMainWindow* mainWin); + virtual ~DolphinNewMenu(); + +protected slots: + /** @see KNewMenu::slotResult() */ + virtual void slotResult(KJob* job); + +private: + DolphinMainWindow* m_mainWin; +}; + +#endif |
