summaryrefslogtreecommitdiffstats
path: root/kjsembed/jsconsolewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/jsconsolewidget.cpp')
-rw-r--r--kjsembed/jsconsolewidget.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kjsembed/jsconsolewidget.cpp b/kjsembed/jsconsolewidget.cpp
index f3c61c6c..d2978a84 100644
--- a/kjsembed/jsconsolewidget.cpp
+++ b/kjsembed/jsconsolewidget.cpp
@@ -50,11 +50,11 @@ class JSConsoleWidgetPrivate
{
};
-JSConsoleWidget::JSConsoleWidget( KJSEmbedPart *jspart, TTQWidget *parent, const char *name )
- : TTQFrame( parent, name ? name : "jsconsole_widget" ),
+JSConsoleWidget::JSConsoleWidget( KJSEmbedPart *jspart, TQWidget *parent, const char *name )
+ : TQFrame( parent, name ? name : "jsconsole_widget" ),
js(jspart), proc(0), d(0)
{
- setFocusPolicy( TTQWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
createView();
}
@@ -64,8 +64,8 @@ JSConsoleWidget::~JSConsoleWidget()
void JSConsoleWidget::createView()
{
- TTQPixmap px( KGlobal::iconLoader()->loadIcon("konsole", KIcon::NoGroup, KIcon::SizeSmall) );
- TTQPixmap pxl( KGlobal::iconLoader()->loadIcon("konsole", KIcon::NoGroup, KIcon::SizeLarge) );
+ TQPixmap px( KGlobal::iconLoader()->loadIcon("konsole", KIcon::NoGroup, KIcon::SizeSmall) );
+ TQPixmap pxl( KGlobal::iconLoader()->loadIcon("konsole", KIcon::NoGroup, KIcon::SizeLarge) );
setIcon( px );
KWin::setIcons( winId(), pxl, px );
@@ -77,32 +77,32 @@ void JSConsoleWidget::createView()
log->setReadOnly( true );
log->setUndoRedoEnabled( false );
log->setTextFormat( TQt::RichText );
- log->setWrapPolicy( TTQTextEdit::Anywhere );
+ log->setWrapPolicy( TQTextEdit::Anywhere );
log->setText( "<qt><pre>" );
- log->setFocusPolicy( TTQWidget::NoFocus );
+ log->setFocusPolicy( TQWidget::NoFocus );
// Command entry section
- cmdBox = new TTQHBox( this, "cmd_box" );
+ cmdBox = new TQHBox( this, "cmd_box" );
cmdBox->setSpacing( KDialog::spacingHint() );
- TTQLabel *prompt = new TTQLabel( i18n("&KJS>"), cmdBox, "prompt" );
+ TQLabel *prompt = new TQLabel( i18n("&KJS>"), cmdBox, "prompt" );
cmd = new KLineEdit( cmdBox, "cmd_edit" );
- cmd->setFocusPolicy( TTQWidget::StrongFocus );
+ cmd->setFocusPolicy( TQWidget::StrongFocus );
cmd->setFocus();
prompt->setBuddy( cmd );
- go = new TTQPushButton( i18n("&Run"), cmdBox, "run_button" );
+ go = new TQPushButton( i18n("&Run"), cmdBox, "run_button" );
go->setFixedSize( go->sizeHint() );
- connect( cmd, TQT_SIGNAL(returnPressed(const TTQString&)), go, TQT_SLOT( animateClick() ) );
+ connect( cmd, TQT_SIGNAL(returnPressed(const TQString&)), go, TQT_SLOT( animateClick() ) );
connect( go, TQT_SIGNAL( clicked() ), TQT_SLOT( invoke() ) );
// Setup completion
KCompletion *comp = cmd->completionObject();
- connect( cmd, TQT_SIGNAL(returnPressed(const TTQString&)), comp, TQT_SLOT(addItem(const TTQString&)) );
+ connect( cmd, TQT_SIGNAL(returnPressed(const TQString&)), comp, TQT_SLOT(addItem(const TQString&)) );
// Layout
- TTQVBoxLayout *vert = new TTQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ TQVBoxLayout *vert = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
vert->addWidget( ttl );
vert->addWidget( log );
vert->addWidget( cmdBox );
@@ -110,17 +110,17 @@ void JSConsoleWidget::createView()
void JSConsoleWidget::invoke()
{
- TTQString code( cmd->text() );
- println( TTQString( "<b><font color=\"#888888\">KJS&gt;</font> %1</b>" ).arg( code ) );
+ TQString code( cmd->text() );
+ println( TQString( "<b><font color=\"#888888\">KJS&gt;</font> %1</b>" ).arg( code ) );
execute( code );
}
-bool JSConsoleWidget::execute( const TTQString &cmd )
+bool JSConsoleWidget::execute( const TQString &cmd )
{
return execute( cmd, KJS::Null() );
}
-bool JSConsoleWidget::execute( const TTQString &cmd, const KJS::Value &self )
+bool JSConsoleWidget::execute( const TQString &cmd, const KJS::Value &self )
{
KJS::Completion jsres;
bool ok = js->execute( jsres, cmd, self );
@@ -141,8 +141,8 @@ bool JSConsoleWidget::execute( const TTQString &cmd, const KJS::Value &self )
return ok;
}
- TTQString txt = s.qstring();
- txt = txt.replace( TTQChar('\n'), "<br>" );
+ TQString txt = s.qstring();
+ txt = txt.replace( TQChar('\n'), "<br>" );
println( txt );
return ok;
@@ -166,15 +166,15 @@ bool JSConsoleWidget::execute( const TTQString &cmd, const KJS::Value &self )
return ok;
}
-void JSConsoleWidget::println( const TTQString &msg )
+void JSConsoleWidget::println( const TQString &msg )
{
log->append( msg );
log->scrollToBottom();
}
-void JSConsoleWidget::warn( const TTQString &msg )
+void JSConsoleWidget::warn( const TQString &msg )
{
- TTQString err( "<font color=\"red\"><b>%1</b></font>" );
+ TQString err( "<font color=\"red\"><b>%1</b></font>" );
println( err.arg(msg) );
}
@@ -182,7 +182,7 @@ void JSConsoleWidget::warn( const TTQString &msg )
// Process Handling
//
-bool JSConsoleWidget::run( const TTQString &cmd )
+bool JSConsoleWidget::run( const TQString &cmd )
{
kdDebug(80001) << "JSConsoleWidget::run(" << cmd << ")" << endl;
@@ -205,7 +205,7 @@ bool JSConsoleWidget::run( const TTQString &cmd )
void JSConsoleWidget::childExited()
{
- TTQString s;
+ TQString s;
if ( proc->normalExit() ) {
if ( proc->exitStatus() )
s = i18n( "<b>[Exited with status %1]</b>\n" ).arg( proc->exitStatus() );
@@ -224,14 +224,14 @@ void JSConsoleWidget::childExited()
void JSConsoleWidget::receivedStdOutput( KProcess *, char *buffer, int buflen )
{
- TTQCString buf = TTQCString( buffer, buflen+1 );
- println( TTQString(buf) );
+ TQCString buf = TQCString( buffer, buflen+1 );
+ println( TQString(buf) );
}
void JSConsoleWidget::receivedStdError( KProcess *, char *buffer, int buflen )
{
- TTQCString buf = TTQCString( buffer, buflen+1 );
- warn( TTQString(buf) );
+ TQCString buf = TQCString( buffer, buflen+1 );
+ warn( TQString(buf) );
}