• 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
27class TDEAction;
28class TDEActionCollection;
29class KScriptInterface;
30class KScriptActionManager;
31class TQTimer;
32
38class KScriptAction : public TQObject, public KScriptClientInterface {
39 TQ_OBJECT
40
41public:
42
43 KScriptAction( const TQString &scriptDesktopFile, TQObject *interface, TDEActionCollection *ac );
44
45 virtual ~KScriptAction();
46
50 TDEAction *action();
51
55 bool isValid() const;
56
57signals:
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
65signals:
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
72private slots:
73 void activate();
74 void cleanup();
75 void scriptFinished();
76
77private:
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
94class KScriptActionManager : public TQObject {
95TQ_OBJECT
96
97
98public:
102 KScriptActionManager( TQObject *parent, TDEActionCollection *ac );
103 ~KScriptActionManager();
104
113 TQPtrList<TDEAction> scripts( TQObject *interface, const TQStringList &dirs = TQStringList() ) const;
114
115signals:
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
137private:
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
KScriptActionManager::scriptError
void scriptError(const TQString &msg)
Returns an error message from a script.
KScriptActionManager::scriptWarning
void scriptWarning(const TQString &msg)
Returns a warning message from a script.
KScriptActionManager::scripts
TQPtrList< TDEAction > scripts(TQObject *interface, const TQStringList &dirs=TQStringList()) const
Return all currently loaded scripts in a direcotry and attaches them to a TQObject interface.
Definition tdescriptactionmanager.cpp:132
KScriptActionManager::scriptProgress
void scriptProgress(int percent)
Returns the percentage complete of an operation in the script.
KScriptActionManager::scriptDone
void scriptDone(KScriptClientInterface::Result result, const TQVariant &returned)
Notifies that the script has finished.
KScriptActionManager::scriptOutput
void scriptOutput(const TQString &msg)
Returns a standard out message from a script.
KScriptAction
Connects a TDEAction to a script runner.
Definition tdescriptactionmanager.h:38
KScriptAction::action
TDEAction * action()
TDEAction for the current script.
Definition tdescriptactionmanager.cpp:76
KScriptAction::isValid
bool isValid() const
Returns the validity of the current script.
Definition tdescriptactionmanager.cpp:172

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.9.8
This website is maintained by Timothy Pearson.