summaryrefslogtreecommitdiffstats
path: root/src/kile/kilejscript.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 19:59:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 19:59:21 +0000
commitb9c374725620ec064db7610132a8b8969fa405b9 (patch)
tree645c03144cac22f7b4fb5bd10985d389e8954290 /src/kile/kilejscript.h
parent71729070d61b36b96acd7fa9c34bba0cb8f58c3b (diff)
downloadkile-b9c374725620ec064db7610132a8b8969fa405b9.tar.gz
kile-b9c374725620ec064db7610132a8b8969fa405b9.zip
TQt4 port kile
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kile@1239285 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kile/kilejscript.h')
-rw-r--r--src/kile/kilejscript.h60
1 files changed, 31 insertions, 29 deletions
diff --git a/src/kile/kilejscript.h b/src/kile/kilejscript.h
index 6ac133a..f5082db 100644
--- a/src/kile/kilejscript.h
+++ b/src/kile/kilejscript.h
@@ -14,8 +14,8 @@
#ifndef KILEJSCRIPT_H
#define KILEJSCRIPT_H
-#include <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
#include <kjs/interpreter.h>
#include <kjs/object.h>
@@ -24,8 +24,8 @@
#include <kconfig.h>
#include <kdirwatch.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
class KileInfo;
@@ -40,23 +40,23 @@ class JScript {
* Constructs a new JavaScript script.
* @param file the file that contains the script
**/
- JScript(unsigned int id, const QString& file);
+ JScript(unsigned int id, const TQString& file);
/**
* Returns the code of this script, i.e. the file is read and its contents are
* returned.
**/
- QString getCode() const;
+ TQString getCode() const;
/**
* Returns the name of the script (the base name of the file).
**/
- QString getName() const;
+ TQString getName() const;
/**
* Returns the file of the script (the full path, including the base name).
**/
- QString getFileName() const;
+ TQString getFileName() const;
/**
* Returns the unique identifier of this script.
@@ -78,16 +78,16 @@ class JScript {
KAction* getActionObject();
- void setKeySequence(const QString& str);
- QString getKeySequence() const;
+ void setKeySequence(const TQString& str);
+ TQString getKeySequence() const;
protected:
unsigned int m_id;
- QString m_code;
- QString m_file;
- QString m_name;
+ TQString m_code;
+ TQString m_file;
+ TQString m_name;
KAction *m_action;
- QString m_keySequence;
+ TQString m_keySequence;
};
/**
@@ -106,7 +106,7 @@ class JScriptEnvironment {
* Executes JavaScript code in this environment.
* @param c the code that should be executed
**/
- void execute(const QString& c);
+ void execute(const TQString& c);
protected:
KJS::Interpreter *m_interpreter;
@@ -117,14 +117,15 @@ class JScriptEnvironment {
/**
* This class handles the scripting functionality in Kile.
**/
-class Manager : public QObject {
+class Manager : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a new Manager object.
**/
- Manager(KileInfo *info, KConfig *config, KActionCollection *actionCollection, QObject *parent = 0, const char *name = 0);
+ Manager(KileInfo *info, KConfig *config, KActionCollection *actionCollection, TQObject *tqparent = 0, const char *name = 0);
virtual ~Manager();
/**
@@ -142,7 +143,7 @@ class Manager : public QObject {
/**
* Retrieves a list of all the scripts that are currently available.
**/
- QValueList<JScript*> getJScripts();
+ TQValueList<JScript*> getJScripts();
/**
* Writes the key sequence-to-script bindings to the KConfig object that has
@@ -156,7 +157,7 @@ class Manager : public QObject {
* @param script the script that is considered
* @param keySequence the key sequence that is assigned
**/
- void setEditorKeySequence(JScript* script, const QString& keySequence);
+ void setEditorKeySequence(JScript* script, const TQString& keySequence);
/**
* Removes an assigned key sequence from a script.
@@ -168,7 +169,7 @@ class Manager : public QObject {
* Returns the directory that can be used by the used to store Kile's scripts.
* Usually $HOME/.kde/share/apps/kile/scripts
**/
- QString getLocalJScriptDirectory() const;
+ TQString getLocalJScriptDirectory() const;
/**
* Returns the script object that corresponds to a script id.
@@ -199,9 +200,9 @@ class Manager : public QObject {
void readConfig();
protected:
- QString m_localJScriptDir;
- QValueList<JScript*> m_jScriptList;
- QMap<unsigned int, JScript*> m_idScriptMap;
+ TQString m_localJScriptDir;
+ TQValueList<JScript*> m_jScriptList;
+ TQMap<unsigned int, JScript*> m_idScriptMap;
KDirWatch *m_jScriptDirWatch;
KileInfo *m_kileInfo;
@@ -212,7 +213,7 @@ class Manager : public QObject {
* Registers the script contained in a file.
* @param fileName the file that contains the script
**/
- void registerScript(const QString& fileName, QMap<QString, unsigned int>& pathIDMap, QMap<unsigned int, bool>& takenIDMap, unsigned int &maxID);
+ void registerScript(const TQString& fileName, TQMap<TQString, unsigned int>& pathIDMap, TQMap<unsigned int, bool>& takenIDMap, unsigned int &maxID);
/**
* (Re-)Creates and initialises the KDirWatch object.
@@ -229,7 +230,7 @@ class Manager : public QObject {
* object.
* @param key the considered entry key
**/
- QValueList<unsigned int> readUnsignedIntListEntry(const QString& key);
+ TQValueList<unsigned int> readUnsignedIntListEntry(const TQString& key);
/**
* Writes a key - value pair to the local KConfig object for the case that the
@@ -237,7 +238,7 @@ class Manager : public QObject {
* @param key the considered entry key
* @param l the 'unsigned int' list that is used as value
**/
- void writeEntry(const QString& key, const QValueList<unsigned int>& l);
+ void writeEntry(const TQString& key, const TQValueList<unsigned int>& l);
/**
* Finds the next free ID.
@@ -245,7 +246,7 @@ class Manager : public QObject {
* @param maxID the maximum ID that is currently in use (if there is no ID assigned, then
* any value can be passed here, but typically '0')
**/
- unsigned int findFreeID(const QMap<unsigned int, bool>& takenIDMap, unsigned int maxID);
+ unsigned int findFreeID(const TQMap<unsigned int, bool>& takenIDMap, unsigned int maxID);
/**
* Writes the ID to file name mappings that are currently in use to the local
@@ -258,14 +259,15 @@ class Manager : public QObject {
* Recursively adds a directory to a KDirWatch object.
* @param dir the directory that should be added
**/
- void addDirectoryToDirWatch(const QString& dir);
+ void addDirectoryToDirWatch(const TQString& dir);
};
class ScriptExecutionAction : public KAction {
Q_OBJECT
+ TQ_OBJECT
public:
- ScriptExecutionAction(unsigned int scriptID, Manager *manager, KActionCollection* parent = 0);
+ ScriptExecutionAction(unsigned int scriptID, Manager *manager, KActionCollection* tqparent = 0);
virtual ~ScriptExecutionAction();