diff options
author | Timothy Pearson <[email protected]> | 2011-12-05 15:55:57 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-05 15:55:57 -0600 |
commit | 9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch) | |
tree | c81c34dae2b3b1ea73801bf18a960265dc4207f7 /kjsembed/kscript | |
parent | 1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff) | |
download | tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip |
Initial TQt conversion
Diffstat (limited to 'kjsembed/kscript')
-rw-r--r-- | kjsembed/kscript/javascript.cpp | 20 | ||||
-rw-r--r-- | kjsembed/kscript/javascript.h | 24 | ||||
-rw-r--r-- | kjsembed/kscript/swaptabs.js | 4 | ||||
-rw-r--r-- | kjsembed/kscript/swaptabs.ui | 22 |
4 files changed, 35 insertions, 35 deletions
diff --git a/kjsembed/kscript/javascript.cpp b/kjsembed/kscript/javascript.cpp index 22de1aef..51cc6b4d 100644 --- a/kjsembed/kscript/javascript.cpp +++ b/kjsembed/kscript/javascript.cpp @@ -31,7 +31,7 @@ typedef KGenericFactory<JavaScript, KScriptClientInterface> JavaScriptFactory; K_EXPORT_COMPONENT_FACTORY( libjavascript, JavaScriptFactory( "JavaScript" ) ) -JavaScript::JavaScript(KScriptClientInterface *parent, const char *name, const TQStringList &args ) +JavaScript::JavaScript(KScriptClientInterface *parent, const char *name, const TTQStringList &args ) { ScriptClientInterface = parent; m_jsembed = new KJSEmbed::KJSEmbedPart(this, "kjsembed_part"); @@ -45,25 +45,25 @@ JavaScript::~JavaScript() { } -TQString JavaScript::script() const +TTQString JavaScript::script() const { return m_scriptLoc; } -void JavaScript::setScript( const TQString &scriptFile ) +void JavaScript::setScript( const TTQString &scriptFile ) { m_scriptLoc = scriptFile; } -void JavaScript::setScript( const TQString &scriptFile, const TQString &method ) +void JavaScript::setScript( const TTQString &scriptFile, const TTQString &method ) { m_scriptLoc = scriptFile; m_method = method; } -void JavaScript::run(TQObject *context, const TQVariant &arg) +void JavaScript::run(TTQObject *context, const TTQVariant &arg) { - TQVariant retVal; + TTQVariant retVal; if( context ) m_jsembed->addObject(context); m_jsembed->runFile(m_scriptLoc, m_jsembed->globalObject() ); @@ -78,17 +78,17 @@ void JavaScript::run(TQObject *context, const TQVariant &arg) ScriptClientInterface->done(KScriptClientInterface::ResultSuccess, retVal); } -void JavaScript::writeLine( const TQString &msg ) +void JavaScript::writeLine( const TTQString &msg ) { ScriptClientInterface->output(msg); } -void JavaScript::writeWarning( const TQString &msg ) +void JavaScript::writeWarning( const TTQString &msg ) { ScriptClientInterface->warning(msg); } -void JavaScript::writeError( const TQString &msg ) +void JavaScript::writeError( const TTQString &msg ) { ScriptClientInterface->error(msg); } @@ -98,7 +98,7 @@ void JavaScript::setProgress( int percent ) ScriptClientInterface->progress(percent); } -TQString JavaScript::appID() const +TTQString JavaScript::appID() const { return kapp->dcopClient()->appId(); } diff --git a/kjsembed/kscript/javascript.h b/kjsembed/kscript/javascript.h index fa76a341..2fb07509 100644 --- a/kjsembed/kscript/javascript.h +++ b/kjsembed/kscript/javascript.h @@ -31,30 +31,30 @@ namespace KJSEmbed { class JavaScript : public KScriptInterface { Q_OBJECT - Q_PROPERTY( TQString appID READ appID ) + Q_PROPERTY( TTQString appID READ appID ) public: - JavaScript(KScriptClientInterface *parent, const char *name, const TQStringList &args); + JavaScript(KScriptClientInterface *parent, const char *name, const TTQStringList &args); virtual ~JavaScript(); - TQString script() const; - void setScript( const TQString &scriptFile ); - void setScript( const TQString &scriptLibFile, const TQString &method ); - void run(TQObject *context = 0, const TQVariant &arg = 0); + TTQString script() const; + void setScript( const TTQString &scriptFile ); + void setScript( const TTQString &scriptLibFile, const TTQString &method ); + void run(TTQObject *context = 0, const TTQVariant &arg = 0); void kill(); - TQString appID() const; + TTQString appID() const; public slots: - void writeLine( const TQString &msg ); - void writeWarning( const TQString &msg ); - void writeError( const TQString &msg ); + void writeLine( const TTQString &msg ); + void writeWarning( const TTQString &msg ); + void writeError( const TTQString &msg ); void setProgress( int percent ); private: KScriptClientInterface *ScriptClientInterface; KJSEmbed::KJSEmbedPart *m_jsembed; - TQString m_method; - TQString m_scriptLoc; + TTQString m_method; + TTQString m_scriptLoc; }; #endif diff --git a/kjsembed/kscript/swaptabs.js b/kjsembed/kscript/swaptabs.js index 6adbc2c3..20d19248 100644 --- a/kjsembed/kscript/swaptabs.js +++ b/kjsembed/kscript/swaptabs.js @@ -36,7 +36,7 @@ if( dlg.exec() == 1 ) var startCol = client.call(appID, "SelectionInterfaceExt#" + documentIndex, "selStartCol()"); client.call(appID, "SelectionInterface#" + documentIndex, "removeSelectedText()"); client.call(appID, "SelectionInterface#" + documentIndex, "clearSelection()"); - client.call(appID, "EditInterface#" + documentIndex, "insertText(uint,uint,QString)", startLine, startCol, destText); + client.call(appID, "EditInterface#" + documentIndex, "insertText(uint,uint,TQString)", startLine, startCol, destText); } else { @@ -45,7 +45,7 @@ if( dlg.exec() == 1 ) } } else - client.call(appID, "EditInterface#" + documentIndex, "setText(QString)", destText ); + client.call(appID, "EditInterface#" + documentIndex, "setText(TQString)", destText ); // save prefs config.writeNumEntry("Spaces", dlg.count.value ); diff --git a/kjsembed/kscript/swaptabs.ui b/kjsembed/kscript/swaptabs.ui index 8cb243f8..f7f5e973 100644 --- a/kjsembed/kscript/swaptabs.ui +++ b/kjsembed/kscript/swaptabs.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>MyDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>MyDialog</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout2</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -38,7 +38,7 @@ <string>Number of spaces for a tab:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>count</cstring> </property> @@ -48,7 +48,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>swap</cstring> </property> @@ -62,7 +62,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton1</cstring> </property> @@ -70,7 +70,7 @@ <string>Tabs for spaces</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton2</cstring> </property> @@ -80,7 +80,7 @@ </widget> </vbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>selection</cstring> </property> @@ -88,7 +88,7 @@ <string>Substitute only in current selection</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -119,7 +119,7 @@ </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -136,7 +136,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> |