Kate
katescriptaction.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2010 Dominik Haumann <dhaumann kde org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef KATE_SCRIPT_ACTION_H 00020 #define KATE_SCRIPT_ACTION_H 00021 00022 #include "katecommandlinescript.h" 00023 00024 #include <kactionmenu.h> 00025 #include <kaction.h> 00026 00027 class KateView; 00028 00033 class KateScriptAction : public KAction 00034 { 00035 Q_OBJECT 00036 00037 public: 00038 KateScriptAction(const ScriptActionInfo& info, KateView* view); 00039 virtual ~KateScriptAction(); 00040 00041 public Q_SLOTS: 00042 void exec(); 00043 00044 private: 00045 KateView* m_view; 00046 QString m_command; 00047 bool m_interactive; 00048 }; 00049 00055 class KateScriptActionMenu : public KActionMenu 00056 { 00057 Q_OBJECT 00058 00059 public: 00060 KateScriptActionMenu(KateView* view, const QString& text); 00061 ~KateScriptActionMenu(); 00062 00063 void cleanup(); 00064 00065 public Q_SLOTS: 00066 void repopulate(); 00067 00068 private: 00069 KateView* m_view; 00070 QList<QMenu*> m_menus; 00071 QList<QAction*> m_actions; 00072 }; 00073 00074 #endif 00075 00076 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE 4.6 API Reference