• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Utility Library
 

KDevelop Utility Library

  • lib
  • util
tdescriptactionmanager.h
1 /***************************************************************************
2 * Copyright (C) 2004 by ian geiser *
3 * geiseri@sourcextreme.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
20 #ifndef TDEScriptAction_H
21 #define TDEScriptAction_H
22 
23 #include <scriptclientinterface.h>
24 #include <tqobject.h>
25 #include <tqptrlist.h>
26 
27 class TDEAction;
28 class TDEActionCollection;
29 class KScriptInterface;
30 class KScriptActionManager;
31 class TQTimer;
32 
38 class KScriptAction : public TQObject, public KScriptClientInterface {
39  Q_OBJECT
40 
41 public:
42 
43  KScriptAction( const TQString &scriptDesktopFile, TQObject *interface, TDEActionCollection *ac );
44 
45  virtual ~KScriptAction();
46 
50  TDEAction *action();
51 
55  bool isValid() const;
56 
57 signals:
58  // Reimplemented from KScript
59  void error ( const TQString &msg );
60  void warning ( const TQString &msg );
61  void output ( const TQString &msg );
62  void progress ( int percent );
63  void done ( KScriptClientInterface::Result result, const TQVariant &returned );
64 
65 signals:
66  void scriptError ( const TQString &msg );
67  void scriptWarning ( const TQString &msg );
68  void scriptOutput ( const TQString &msg );
69  void scriptProgress ( int percent );
70  void scriptDone ( KScriptClientInterface::Result result, const TQVariant &returned );
71 
72 private slots:
73  void activate();
74  void cleanup();
75  void scriptFinished();
76 
77 private:
78  TDEAction *m_action;
79  TQString m_scriptName;
80  TQString m_scriptType;
81  TQString m_scriptFile;
82  TQString m_scriptMethod;
83  KScriptInterface *m_interface;
84  bool m_isValid;
85  TQTimer *m_timeout;
86  uint m_refs;
87 };
88 
94 class KScriptActionManager : public TQObject {
95 Q_OBJECT
96 
97 
98 public:
102  KScriptActionManager( TQObject *parent, TDEActionCollection *ac );
103  ~KScriptActionManager();
104 
113  TQPtrList<TDEAction> scripts( TQObject *interface, const TQStringList &dirs = TQStringList() ) const;
114 
115 signals:
119  void scriptError ( const TQString &msg );
123  void scriptWarning ( const TQString &msg );
127  void scriptOutput ( const TQString &msg );
131  void scriptProgress ( int percent );
135  void scriptDone( KScriptClientInterface::Result result, const TQVariant &returned );
136 
137 private:
138  mutable TQPtrList<KScriptAction> m_actions;
139  TDEActionCollection *m_ac;
140 };
141 #endif
KScriptActionManager
Provides an actionlist of scripts that are currently available.
Definition: tdescriptactionmanager.h:94
KScriptAction::isValid
bool isValid() const
Returns the validity of the current script.
Definition: tdescriptactionmanager.cpp:172
KScriptAction::action
TDEAction * action()
TDEAction for the current script.
Definition: tdescriptactionmanager.cpp:76
KScriptAction
Connects a TDEAction to a script runner.
Definition: tdescriptactionmanager.h:38

KDevelop Utility Library

Skip menu "KDevelop Utility Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDevelop Utility Library

Skip menu "KDevelop Utility Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Utility Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.