summaryrefslogtreecommitdiffstats
path: root/kode/kwsdl/kung/binaryinputfield.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kode/kwsdl/kung/binaryinputfield.cpp')
-rw-r--r--kode/kwsdl/kung/binaryinputfield.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kode/kwsdl/kung/binaryinputfield.cpp b/kode/kwsdl/kung/binaryinputfield.cpp
index f83e55b1f..56643b3d2 100644
--- a/kode/kwsdl/kung/binaryinputfield.cpp
+++ b/kode/kwsdl/kung/binaryinputfield.cpp
@@ -29,23 +29,23 @@
#include <kparts/componentfactory.h>
#include <ktempfile.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwidget.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwidget.h>
#include <schema/simpletype.h>
#include "binaryinputfield.h"
-BinaryInputField::BinaryInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type )
+BinaryInputField::BinaryInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type )
: SimpleInputField( name, type ),
mValue( 0 ), mTypeName( typeName )
{
}
-void BinaryInputField::setXMLData( const QDomElement &element )
+void BinaryInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "BinaryInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -55,28 +55,28 @@ void BinaryInputField::setXMLData( const QDomElement &element )
setData( element.text() );
}
-void BinaryInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void BinaryInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( mName );
+ TQDomElement element = document.createElement( mName );
element.setAttribute( "xsi:type", "xsd:" + mTypeName );
- QDomText text = document.createTextNode( data() );
+ TQDomText text = document.createTextNode( data() );
element.appendChild( text );
parent.appendChild( element );
}
-void BinaryInputField::setData( const QString &data )
+void BinaryInputField::setData( const TQString &data )
{
KCodecs::base64Decode( data.utf8(), mValue );
}
-QString BinaryInputField::data() const
+TQString BinaryInputField::data() const
{
- QByteArray data = KCodecs::base64Encode( mValue, false );
- return QString::fromUtf8( data.data(), data.size() );
+ TQByteArray data = KCodecs::base64Encode( mValue, false );
+ return TQString::fromUtf8( data.data(), data.size() );
}
-QWidget *BinaryInputField::createWidget( QWidget *parent )
+TQWidget *BinaryInputField::createWidget( TQWidget *parent )
{
mInputWidget = new BinaryWidget( parent );
@@ -86,7 +86,7 @@ QWidget *BinaryInputField::createWidget( QWidget *parent )
return mInputWidget;
}
-void BinaryInputField::valueChanged( const QByteArray &value )
+void BinaryInputField::valueChanged( const TQByteArray &value )
{
mValue = value;
@@ -94,27 +94,27 @@ void BinaryInputField::valueChanged( const QByteArray &value )
}
-BinaryWidget::BinaryWidget( QWidget *parent )
- : QWidget( parent, "BinaryWidget" ),
+BinaryWidget::BinaryWidget( TQWidget *parent )
+ : TQWidget( parent, "BinaryWidget" ),
mMainWidget( 0 )
{
- mLayout = new QGridLayout( this, 3, 2, 11, 6 );
+ mLayout = new TQGridLayout( this, 3, 2, 11, 6 );
- mLoadButton = new QPushButton( i18n( "Load..." ), this );
- mSaveButton = new QPushButton( i18n( "Save..." ), this );
+ mLoadButton = new TQPushButton( i18n( "Load..." ), this );
+ mSaveButton = new TQPushButton( i18n( "Save..." ), this );
mSaveButton->setEnabled( false );
mLayout->addWidget( mLoadButton, 0, 1 );
mLayout->addWidget( mSaveButton, 1, 1 );
- connect( mLoadButton, SIGNAL( clicked() ), SLOT( load() ) );
- connect( mSaveButton, SIGNAL( clicked() ), SLOT( save() ) );
+ connect( mLoadButton, TQT_SIGNAL( clicked() ), TQT_SLOT( load() ) );
+ connect( mSaveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( save() ) );
}
-void BinaryWidget::setData( const QByteArray &data )
+void BinaryWidget::setData( const TQByteArray &data )
{
KMimeMagic magic;
- QString mimetype;
+ TQString mimetype;
delete mMainWidget;
@@ -123,7 +123,7 @@ void BinaryWidget::setData( const QByteArray &data )
mimetype = result->mimeType();
if ( !mimetype.isEmpty() ) {
- KParts::ReadOnlyPart *part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, QString::null, this, 0, this, 0 );
+ KParts::ReadOnlyPart *part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString::null, this, 0, this, 0 );
if ( part ) {
KTempFile file;
file.file()->writeBlock( data );
@@ -131,13 +131,13 @@ void BinaryWidget::setData( const QByteArray &data )
part->openURL( KURL( file.name() ) );
mMainWidget = part->widget();
} else {
- mMainWidget = new QLabel( i18n( "No part found for visualization of mimetype %1" ).arg( mimetype ), this );
+ mMainWidget = new TQLabel( i18n( "No part found for visualization of mimetype %1" ).arg( mimetype ), this );
}
mData = data;
mSaveButton->setEnabled( true );
} else {
- mMainWidget = new QLabel( i18n( "Got data of unknown mimetype" ), this );
+ mMainWidget = new TQLabel( i18n( "Got data of unknown mimetype" ), this );
}
mLayout->addMultiCellWidget( mMainWidget, 0, 2, 0, 0 );
@@ -146,19 +146,19 @@ void BinaryWidget::setData( const QByteArray &data )
void BinaryWidget::load()
{
- KURL url = KFileDialog::getOpenURL( QString(), QString(), this );
+ KURL url = KFileDialog::getOpenURL( TQString(), TQString(), this );
if ( url.isEmpty() )
return;
- QString tempFile;
+ TQString tempFile;
if ( KIO::NetAccess::download( url, tempFile, this ) ) {
- QFile file( tempFile );
+ TQFile file( tempFile );
if ( !file.open( IO_ReadOnly ) ) {
KMessageBox::error( this, i18n( "Unable to open file %1" ).arg( url.url() ) );
return;
}
- QByteArray data = file.readAll();
+ TQByteArray data = file.readAll();
setData( data );
file.close();
@@ -171,7 +171,7 @@ void BinaryWidget::load()
void BinaryWidget::save()
{
- KURL url = KFileDialog::getSaveURL( QString(), QString(), this );
+ KURL url = KFileDialog::getSaveURL( TQString(), TQString(), this );
if ( url.isEmpty() )
return;