Warning, file /office/calligra/libs/kross/KoScriptingPart.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /*************************************************************************** 0002 * KoScriptingPart.h 0003 * This file is part of the KDE project 0004 * copyright (C) 2006-2007 Sebastian Sauer <mail@dipe.org> 0005 * 0006 * This program is free software; you can redistribute it and/or 0007 * modify it under the terms of the GNU Library General Public 0008 * License as published by the Free Software Foundation; either 0009 * version 2 of the License, or (at your option) any later version. 0010 * This program is distributed in the hope that it will be useful, 0011 * 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 * Library General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU Library General Public License 0017 * along with this program; see the file COPYING. If not, write to 0018 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 * Boston, MA 02110-1301, USA. 0020 ***************************************************************************/ 0021 0022 #ifndef KOKROSS_KOSCRIPTINGPART_H 0023 #define KOKROSS_KOSCRIPTINGPART_H 0024 0025 #include <QObject> 0026 0027 #include <kxmlguiclient.h> 0028 0029 class KoScriptingModule; 0030 namespace Kross { 0031 class Action; 0032 } 0033 0034 #include "kokross_export.h" 0035 0036 /** 0037 * The KoScriptingPart class implements the top-level guiclient 0038 * functionality to integrate scripting using Kross into a Calligra 0039 * application. 0040 */ 0041 class KOKROSS_EXPORT KoScriptingPart : public QObject, public KXMLGUIClient 0042 { 0043 Q_OBJECT 0044 public: 0045 0046 /** 0047 * Constructor. 0048 * 0049 * \param parent The parent QObject. 0050 * \param args the optional list of arguments. 0051 */ 0052 explicit KoScriptingPart(KoScriptingModule *const module); 0053 0054 /** 0055 * Destructor. 0056 */ 0057 ~KoScriptingPart() override; 0058 0059 /** 0060 * \return the \a KoScriptingModule instance that is the top-level module for 0061 * the scripting backends. 0062 */ 0063 KoScriptingModule *module() const; 0064 0065 /** 0066 * Show the "Execute Script File" filedialog that allows the user to pick 0067 * a scripting file and execute it. 0068 * \return true if the user did choose a file and the file got executed successful. 0069 */ 0070 bool showExecuteScriptFile(); 0071 0072 protected Q_SLOTS: 0073 0074 /** 0075 * Show the modal "Execute Script File" dialog. 0076 */ 0077 void slotShowExecuteScriptFile(); 0078 0079 /** 0080 * The scripts-menu is about to show, update the content. 0081 */ 0082 void slotMenuAboutToShow(); 0083 0084 /** 0085 * Show the modal "Script Manager" dialog. 0086 */ 0087 void slotShowScriptManager(); 0088 0089 /** 0090 * Called if a script got executed. 0091 */ 0092 void slotStarted(Kross::Action*); 0093 0094 /** 0095 * Called if execution of a script finished. 0096 */ 0097 void slotFinished(Kross::Action*); 0098 0099 /** 0100 * Called if the script finalized. 0101 */ 0102 void slotFinalized(Kross::Action*); 0103 0104 protected: 0105 virtual void myStarted(Kross::Action*) {} 0106 virtual void myFinished(Kross::Action*) {} 0107 virtual void myFinalized(Kross::Action*) {} 0108 0109 private: 0110 /// \internal d-pointer class. 0111 class Private; 0112 /// \internal d-pointer instance. 0113 Private* const d; 0114 }; 0115 0116 #endif