Warning, file /office/calligra/libs/kross/KoScriptManager.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /*************************************************************************** 0002 * KoScriptManager.h 0003 * This file is part of the KDE project 0004 * copyright (c) 2005-2006 Cyrille Berger <cberger@cberger.net> 0005 * copyright (C) 2006-2007 Sebastian Sauer <mail@dipe.org> 0006 * 0007 * This program is free software; you can redistribute it and/or 0008 * modify it under the terms of the GNU Library General Public 0009 * License as published by the Free Software Foundation; either 0010 * version 2 of the License, or (at your option) any later version. 0011 * 0012 * This program is distributed in the hope that it will be useful, 0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0015 * Library General Public License for more details. 0016 * 0017 * You should have received a copy of the GNU Library General Public License 0018 * along with this program; see the file COPYING. If not, write to 0019 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0020 * Boston, MA 02110-1301, USA. 0021 ***************************************************************************/ 0022 0023 #ifndef KOKROSS_KOSCRIPTMANAGER_H 0024 #define KOKROSS_KOSCRIPTMANAGER_H 0025 0026 #include <QWidget> 0027 0028 #include <KoDialog.h> 0029 0030 class KoScriptManagerView; 0031 0032 /** 0033 * The KoScriptManagerCollection class shows a QListView where the content of a 0034 * \a ActionCollection is displayed and some buttons to run, stop, add, edit 0035 * and remove scripts. 0036 */ 0037 class KoScriptManagerCollection : public QWidget 0038 { 0039 Q_OBJECT 0040 public: 0041 0042 /** 0043 * Constructor. 0044 * \param parent The parent widget this widget is child of. 0045 */ 0046 explicit KoScriptManagerCollection(QWidget *parent); 0047 0048 /** 0049 * Destructor. 0050 */ 0051 ~KoScriptManagerCollection() override; 0052 0053 /** 0054 * \return true if the collection was modified. 0055 */ 0056 //bool isModified() const; 0057 0058 #if 0 0059 public Q_SLOTS: 0060 0061 /** 0062 * Run the selected script. 0063 */ 0064 void slotRun(); 0065 0066 /** 0067 * Stop the selected script if running. 0068 */ 0069 void slotStop(); 0070 0071 /** 0072 * Edit the select item. 0073 */ 0074 void slotEdit(); 0075 0076 /** 0077 * Add a new item. 0078 */ 0079 void slotAdd(); 0080 0081 /** 0082 * Remove the selected item. 0083 */ 0084 void slotRemove(); 0085 0086 private Q_SLOTS: 0087 /// The selected item changed. 0088 void slotSelectionChanged(); 0089 /// The data changed. 0090 void slotDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); 0091 #endif 0092 0093 private: 0094 bool m_modified; 0095 KoScriptManagerView *m_view; 0096 }; 0097 0098 class KoScriptManagerDialog : public KoDialog 0099 { 0100 Q_OBJECT 0101 public: 0102 explicit KoScriptManagerDialog(); 0103 ~KoScriptManagerDialog() override; 0104 0105 private Q_SLOTS: 0106 void slotAccepted(); 0107 0108 private: 0109 KoScriptManagerCollection *m_collection; 0110 }; 0111 0112 #endif