summaryrefslogtreecommitdiffstats
path: root/kmyfirewall/kmfwidgets/kmfprocout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmyfirewall/kmfwidgets/kmfprocout.cpp')
-rw-r--r--kmyfirewall/kmfwidgets/kmfprocout.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kmyfirewall/kmfwidgets/kmfprocout.cpp b/kmyfirewall/kmfwidgets/kmfprocout.cpp
index 7112468..b282ef2 100644
--- a/kmyfirewall/kmfwidgets/kmfprocout.cpp
+++ b/kmyfirewall/kmfwidgets/kmfprocout.cpp
@@ -24,24 +24,24 @@
// QT includes
-#include <qtextbrowser.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qfont.h>
+#include <tqtextbrowser.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqfont.h>
// Project Includes
#include "../core/xmlnames.h"
namespace KMF {
-KMFProcOut::KMFProcOut( QWidget *parent, const char *name, WFlags fl ) : QWidget( parent, name, fl ) {
- stderrbuf = new QString( "" );
- stdoutbuf = new QString( "" );
+KMFProcOut::KMFProcOut( TQWidget *tqparent, const char *name, WFlags fl ) : TQWidget( tqparent, name, fl ) {
+ stderrbuf = new TQString( "" );
+ stdoutbuf = new TQString( "" );
m_job_name = XML::Undefined_Value;
childproc = new KProcess();
- connect( childproc, SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, SLOT( slotReceivedOutput( KProcess*, char*, int ) ) );
- connect( childproc, SIGNAL( receivedStderr( KProcess*, char*, int ) ), this, SLOT( slotReceivedError( KProcess*, char*, int ) ) );
- connect( childproc, SIGNAL( processExited( KProcess* ) ), this, SLOT( slotProcessExited( KProcess* ) ) ) ;
+ connect( childproc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( slotReceivedOutput( KProcess*, char*, int ) ) );
+ connect( childproc, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), this, TQT_SLOT( slotReceivedError( KProcess*, char*, int ) ) );
+ connect( childproc, TQT_SIGNAL( processExited( KProcess* ) ), this, TQT_SLOT( slotProcessExited( KProcess* ) ) ) ;
initGUI();
hide();
kdDebug() << "KMFProcOut: Finished initialisation." << endl;
@@ -53,7 +53,7 @@ KMFProcOut::~KMFProcOut() {
void KMFProcOut::initGUI() {
KIconLoader * loader = KGlobal:: iconLoader();
- QString icon_name;
+ TQString icon_name;
icon_name = "stop";
icon_stop = loader->loadIcon( icon_name, KIcon::Small );
@@ -61,25 +61,25 @@ void KMFProcOut::initGUI() {
icon_name = "quit";
icon_close = loader->loadIcon( icon_name, KIcon::Small );
- m_layout = new QGridLayout( this, 0, 0, 2, 2, "layout" );
+ m_layout = new TQGridLayout( this, 0, 0, 2, 2, "tqlayout" );
- m_lbview = new QTextBrowser( this, "m_lbview" );
+ m_lbview = new TQTextBrowser( this, "m_lbview" );
m_lbview->setTextFormat( RichText );
- m_lbview->setFont( QFont( "Nimbus Mono L", 9 ) );
+ m_lbview->setFont( TQFont( "Nimbus Mono L", 9 ) );
- m_ljob_name = new QLabel( this, "m_ljob_name" );
- QFont ljob_name_font( m_ljob_name->font() );
+ m_ljob_name = new TQLabel( this, "m_ljob_name" );
+ TQFont ljob_name_font( m_ljob_name->font() );
ljob_name_font.setBold( TRUE );
m_ljob_name->setFont( ljob_name_font );
- m_ljob_name->setFrameShape( QLabel::StyledPanel );
- m_ljob_name->setFrameShadow( QLabel::Sunken );
+ m_ljob_name->setFrameShape( TQLabel::StyledPanel );
+ m_ljob_name->setFrameShadow( TQLabel::Sunken );
m_ljob_name->setText( i18n( "Nothing to do yet..." ) );
m_bkill = new KPushButton( icon_stop, i18n( "Kill Process" ) , this, "m_bkill" );
m_bkill->setEnabled( false );
- connect( m_bkill, SIGNAL( clicked() ), this, SLOT( slotKillJob() ) );
+ connect( m_bkill, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotKillJob() ) );
m_layout->addMultiCellWidget( m_ljob_name, 0, 0, 0, 9 );
m_layout->addMultiCellWidget( m_bkill, 0, 0, 9, 10 );
@@ -87,8 +87,8 @@ void KMFProcOut::initGUI() {
}
-void KMFProcOut::runCmd( const QString& cmd, const QString& job_name, const QString& job_description, bool useKdeSu ) {
- kdDebug() << "KMFProcOut::runCmd(QString& cmd)"/* << cmd */<< endl;
+void KMFProcOut::runCmd( const TQString& cmd, const TQString& job_name, const TQString& job_description, bool useKdeSu ) {
+ kdDebug() << "KMFProcOut::runCmd(TQString& cmd)"/* << cmd */<< endl;
show();
m_lbview->clear();
m_lbview->setTextFormat( RichText );
@@ -97,7 +97,7 @@ void KMFProcOut::runCmd( const QString& cmd, const QString& job_name, const QStr
startJob( cmd, useKdeSu );
}
-void KMFProcOut::startJob( const QString &cmd, bool useKdeSu ) {
+void KMFProcOut::startJob( const TQString &cmd, bool useKdeSu ) {
m_bkill->setEnabled( true );
childproc->clearArguments();
@@ -123,13 +123,13 @@ void KMFProcOut::slotReceivedOutput( KProcess *, char *buffer, int buflen ) {
// Flush stderr buffer
if ( !stderrbuf->isEmpty() ) {
insertStderrLine( *stderrbuf );
- stderrbuf = new QString( "" );
+ stderrbuf = new TQString( "" );
}
- *stdoutbuf += QString::fromLatin1( buffer, buflen );
+ *stdoutbuf += TQString::tqfromLatin1( buffer, buflen );
int pos;
- while ( ( pos = stdoutbuf->find( '\n' ) ) != -1 ) {
- QString line = stdoutbuf->left( pos );
+ while ( ( pos = stdoutbuf->tqfind( '\n' ) ) != -1 ) {
+ TQString line = stdoutbuf->left( pos );
insertStdoutLine( line );
stdoutbuf->remove
( 0, pos + 1 );
@@ -140,13 +140,13 @@ void KMFProcOut::slotReceivedError( KProcess *, char *buffer, int buflen ) {
// Flush stdout buffer
if ( !stdoutbuf->isEmpty() ) {
insertStdoutLine( *stdoutbuf );
- stdoutbuf = new QString( "" );
+ stdoutbuf = new TQString( "" );
}
- *stderrbuf += QString::fromLatin1( buffer, buflen );
+ *stderrbuf += TQString::tqfromLatin1( buffer, buflen );
int pos;
- while ( ( pos = stderrbuf->find( '\n' ) ) != -1 ) {
- QString line = stderrbuf->left( pos );
+ while ( ( pos = stderrbuf->tqfind( '\n' ) ) != -1 ) {
+ TQString line = stderrbuf->left( pos );
insertStderrLine( line );
stderrbuf->remove
( 0, pos + 1 );
@@ -160,22 +160,22 @@ void KMFProcOut::slotProcessExited( KProcess * ) {
return ;
}
-void KMFProcOut::insertStdoutLine( const QString &line ) {
+void KMFProcOut::insertStdoutLine( const TQString &line ) {
m_lbview->append( line + "" );
}
-void KMFProcOut::insertStderrLine( const QString &line ) {
- const QString & line2 = i18n( "<b>Error:</b> %1" ).arg( line );
+void KMFProcOut::insertStderrLine( const TQString &line ) {
+ const TQString & line2 = i18n( "<b>Error:</b> %1" ).tqarg( line );
m_lbview->append( "<font color=\"red\">" + line2 + "</font>" );
}
void KMFProcOut::childFinished( bool , int status ) {
- QString stat;
+ TQString stat;
stat.setNum( status );
- const QString& job_name = m_job_name;
+ const TQString& job_name = m_job_name;
if ( status != 0 ) {
m_lbview->append( i18n( "<br><font color=\"red\"><b>Execution failed</b></font>" ) );
- m_lbview->append( i18n( "<font color=\"red\"><b>Exit(Code): %1</b></font>" ).arg( stat ) );
+ m_lbview->append( i18n( "<font color=\"red\"><b>Exit(Code): %1</b></font>" ).tqarg( stat ) );
emit sigJobFinished( false, job_name );
} else {
m_lbview->append( i18n( "<br><b>Finished successfully</b>" ) );
@@ -186,18 +186,18 @@ void KMFProcOut::childFinished( bool , int status ) {
return ;
}
-void KMFProcOut::setText( const QString& str, const QString& commandName ) {
- kdDebug() << "void KMFProcOut::setText(const QString& text)" << endl;
+void KMFProcOut::setText( const TQString& str, const TQString& commandName ) {
+ kdDebug() << "void KMFProcOut::setText(const TQString& text)" << endl;
// kdDebug() << "Text: " << str << endl;
m_ljob_name->setText( commandName );
m_lbview->clear();
m_lbview->setTextFormat( PlainText );
m_lbview->append( str );
/*
- QString *text = new QString( str );
+ TQString *text = new TQString( str );
int pos;
- while ( ( pos = text->find( '\n' ) ) != -1 && !text->isEmpty() ) {
- QString line = text->left( pos );
+ while ( ( pos = text->tqfind( '\n' ) ) != -1 && !text->isEmpty() ) {
+ TQString line = text->left( pos );
insertStdoutLine( line );
text->remove( 0, pos + 1 );
}*/