19#include "scriptloader.h"
21#include <tdeapplication.h>
22#include <tdeparts/part.h>
23#include <tdeparts/componentfactory.h>
27#include <kdesktopfile.h>
28#include <kstandarsdirs.h>
29#include <tdestdaccel.h>
33#include <tqfileinfo.h>
44 m_parent->actionCollection(),
48ScriptLoader::~ScriptLoader()
57 TQStringList pluginList =
"";
59 TQString searchPath = kapp->name();
60 searchPath +=
"/scripts/";
61 TQDir d(
locate(
"data", searchPath));
63 const QFileInfoList *fileList = d.entryInfoList(
"*.desktop");
64 QFileInfoListIterator it ( *fileList );
67 while( (fi=it.current()))
77 m_scripts.append(tmpIface);
78 m_scripts.current()->setScript(desktop.
readURL());
81 pluginList.append(desktop.
readName());
89 m_theAction->setItems(pluginList);
95 TQString scriptName = m_theAction->currentText();
104#include "scriptloader.moc"
static bool isDesktopFile(const TQString &path)
TQString readType() const
TQString readName() const
This class is the base for all script engines.
void runAction()
Run the current action.
TDESelectAction * getScripts()
Return the a TDESelectAction with all of the scripts.
void stopAction()
Stop the currently running scripts operations.
ScriptLoader(TDEMainWindow *parent=0)
Default Constructor.
kndbgstream & endl(kndbgstream &s)
kdbgstream kdDebug(int area=0)
TQString locate(const char *type, const TQString &filename, const TDEInstance *instance=TDEGlobal::instance())
static T * createInstanceFromQuery(const TQString &serviceType, const TQString &constraint=TQString::null, TQObject *parent=0, const char *name=0, const TQStringList &args=TQStringList(), int *error=0)