summaryrefslogtreecommitdiffstats
path: root/interfaces/terminal
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /interfaces/terminal
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'interfaces/terminal')
-rw-r--r--interfaces/terminal/kde_terminal_interface.h34
-rw-r--r--interfaces/terminal/test/main.cc24
2 files changed, 29 insertions, 29 deletions
diff --git a/interfaces/terminal/kde_terminal_interface.h b/interfaces/terminal/kde_terminal_interface.h
index a60c2d70c..c8d383205 100644
--- a/interfaces/terminal/kde_terminal_interface.h
+++ b/interfaces/terminal/kde_terminal_interface.h
@@ -32,11 +32,11 @@ class QStrList;
*
* Note that besides the functions below here, KonsolePart also has
* some signals you can connect to. They aren't in this class cause
- * we can't have signals without having a QObject, which
+ * we can't have signals without having a TQObject, which
* TerminalInterface is not.
* These are the signals you can connect to:
* void processExited( KProcess *process );
- * void receivedData( const QString& s );
+ * void receivedData( const TQString& s );
* See the example code below for how to connect to these..
*
* The process provided by processExited() is obviously exited,
@@ -54,7 +54,7 @@ class QStrList;
* };
* // fetch the part..
* KParts::Part* p = static_cast<KParts::Part*>(
- * factory->create( this, "tralala", "QObject",
+ * factory->create( this, "tralala", "TQObject",
* "KParts::ReadOnlyPart" ) );
* assert( p );
* setCentralWidget( p->widget() );
@@ -71,16 +71,16 @@ class QStrList;
* return;
* };
* // now use the interface in all sorts of ways, e.g.
- * // t->showShellInDir( QDir::home().path() );
+ * // t->showShellInDir( TQDir::home().path() );
* // or:
- * // QStrList l;
+ * // TQStrList l;
* // l.append( "python" );
- * // t->startProgram( QString::fromUtf8( "/usr/bin/python" ), l);
+ * // t->startProgram( TQString::fromUtf8( "/usr/bin/python" ), l);
* // or connect to one of the signals. Connect to the Part object,
- * // not to the TerminalInterface, since the latter is no QObject,
+ * // not to the TerminalInterface, since the latter is no TQObject,
* // and as such cannot have signals..:
- * // connect( p, SIGNAL( processExited( int ) ),
- * // this, SLOT( shellExited( int ) ) );
+ * // connect( p, TQT_SIGNAL( processExited( int ) ),
+ * // this, TQT_SLOT( shellExited( int ) ) );
* // etc.
*
* \endcode
@@ -95,20 +95,20 @@ public:
/**
* This starts @p program, with arguments @p args
*/
- virtual void startProgram( const QString& program,
- const QStrList& args ) = 0;
+ virtual void startProgram( const TQString& program,
+ const TQStrList& args ) = 0;
/**
* If a shell is currently shown, this sends it a cd
* command. Otherwise, this starts a shell, and sends it a cd
* command too...
*/
- virtual void showShellInDir( const QString& dir ) = 0;
+ virtual void showShellInDir( const TQString& dir ) = 0;
/**
* This sends @param text as input to the currently running
* program..
*/
- virtual void sendInput( const QString& text ) = 0;
+ virtual void sendInput( const TQString& text ) = 0;
};
@@ -132,20 +132,20 @@ public:
/**
* This starts @p program, with arguments @p args
*/
- virtual void startProgram( const QString& program,
- const QStrList& args ) = 0;
+ virtual void startProgram( const TQString& program,
+ const TQStrList& args ) = 0;
/**
* If a shell is currently shown, this sends it a cd
* command. Otherwise, this starts a shell, and sends it a cd
* command too...
*/
- virtual void showShellInDir( const QString& dir ) = 0;
+ virtual void showShellInDir( const TQString& dir ) = 0;
/**
* This sends @param text as input to the currently running
* program..
*/
- virtual void sendInput( const QString& text ) = 0;
+ virtual void sendInput( const TQString& text ) = 0;
/**
Call this to disable the automatic shell that
diff --git a/interfaces/terminal/test/main.cc b/interfaces/terminal/test/main.cc
index 7d5859e57..be3f4165e 100644
--- a/interfaces/terminal/test/main.cc
+++ b/interfaces/terminal/test/main.cc
@@ -6,7 +6,7 @@
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <assert.h>
#include <kmessagebox.h>
#include <cassert>
@@ -17,17 +17,17 @@ Win::Win()
{
KLibFactory* factory = KLibLoader::self()->factory( "libkonsolepart" );
assert( factory );
- KParts::Part* p = static_cast<KParts::Part*>( factory->create( this, "tralala", "QObject", "KParts::ReadOnlyPart" ) );
+ KParts::Part* p = static_cast<KParts::Part*>( factory->create( this, "tralala", "TQObject", "KParts::ReadOnlyPart" ) );
setCentralWidget( p->widget() );
TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) );
- t->showShellInDir( QDir::home().path() );
-// QStrList l;
+ t->showShellInDir( TQDir::home().path() );
+// TQStrList l;
// l.append( "python" );
-// t->startProgram( QString::fromUtf8( "/usr/bin/python" ), l );
+// t->startProgram( TQString::fromUtf8( "/usr/bin/python" ), l );
- connect( p, SIGNAL( processExited( int ) ),
- this, SLOT( pythonExited( int ) ) );
+ connect( p, TQT_SIGNAL( processExited( int ) ),
+ this, TQT_SLOT( pythonExited( int ) ) );
}
@@ -47,14 +47,14 @@ void Win::pythonExited()
{
std::cerr << "hee, " << p << std::endl;
std::cerr << ( p->qt_cast( "TerminalInterface" ) ) << std::endl;
- // KMessageBox::sorry( this, QString::fromUtf8( "Exited, status was %1" ).arg( status ) );
- disconnect(p, SIGNAL( processExited() ),
- this, SLOT( pythonExited() ));
+ // KMessageBox::sorry( this, TQString::fromUtf8( "Exited, status was %1" ).arg( status ) );
+ disconnect(p, TQT_SIGNAL( processExited() ),
+ this, TQT_SLOT( pythonExited() ));
TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) );
- QStrList l;
+ TQStrList l;
l.append( "echo" );
l.append( "hello world" );
- t->startProgram( QString::fromUtf8( "/bin/echo" ), l );
+ t->startProgram( TQString::fromUtf8( "/bin/echo" ), l );
}
void Win::forked()