summaryrefslogtreecommitdiffstats
path: root/ktnef/gui/attachpropertydialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ktnef/gui/attachpropertydialog.cpp')
-rw-r--r--ktnef/gui/attachpropertydialog.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/ktnef/gui/attachpropertydialog.cpp b/ktnef/gui/attachpropertydialog.cpp
index 8675b6baa..35cd65848 100644
--- a/ktnef/gui/attachpropertydialog.cpp
+++ b/ktnef/gui/attachpropertydialog.cpp
@@ -22,18 +22,18 @@
#include <ktnef/ktnefdefs.h>
#include "qwmf.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <kmimetype.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
-#include <qbuffer.h>
-#include <qdatastream.h>
-#include <qpicture.h>
+#include <tqbuffer.h>
+#include <tqdatastream.h>
+#include <tqpicture.h>
-AttachPropertyDialog::AttachPropertyDialog(QWidget *parent, const char *name)
+AttachPropertyDialog::AttachPropertyDialog(TQWidget *parent, const char *name)
: AttachPropertyDialogBase(parent, name, true)
{
}
@@ -53,7 +53,7 @@ void AttachPropertyDialog::setAttachment(KTNEFAttach *attach)
s.append(" bytes");
size_->setText(s);
KMimeType::Ptr mimetype = KMimeType::mimeType(attach->mimeTag());
- QPixmap pix = loadRenderingPixmap( attach, colorGroup().background() );
+ TQPixmap pix = loadRenderingPixmap( attach, colorGroup().background() );
if ( !pix.isNull() )
icon_->setPixmap( pix );
else
@@ -71,74 +71,74 @@ void AttachPropertyDialog::saveClicked()
saveProperty( properties_, m_attach, this );
}
-void formatProperties( const QMap<int,KTNEFProperty*>& props, QListView *lv, QListViewItem *item, const QString& prefix )
+void formatProperties( const TQMap<int,KTNEFProperty*>& props, TQListView *lv, TQListViewItem *item, const TQString& prefix )
{
- for ( QMap<int,KTNEFProperty*>::ConstIterator it=props.begin(); it!=props.end(); ++it )
+ for ( TQMap<int,KTNEFProperty*>::ConstIterator it=props.begin(); it!=props.end(); ++it )
{
- QListViewItem *newItem = 0;
+ TQListViewItem *newItem = 0;
if ( lv )
- newItem = new QListViewItem( lv, ( *it )->keyString() );
+ newItem = new TQListViewItem( lv, ( *it )->keyString() );
else if ( item )
- newItem = new QListViewItem( item, ( *it )->keyString() );
+ newItem = new TQListViewItem( item, ( *it )->keyString() );
else
{
kdWarning() << "formatProperties() called with no listview and no item" << endl;
return;
}
- QVariant value = ( *it )->value();
- if ( value.type() == QVariant::List )
+ TQVariant value = ( *it )->value();
+ if ( value.type() == TQVariant::List )
{
newItem->setOpen( true );
- newItem->setText( 0, newItem->text( 0 ) + " [" + QString::number( value.asList().count() ) + "]" );
+ newItem->setText( 0, newItem->text( 0 ) + " [" + TQString::number( value.asList().count() ) + "]" );
int i = 0;
- for ( QValueList<QVariant>::ConstIterator lit=value.listBegin(); lit!=value.listEnd(); ++lit, i++ )
- new QListViewItem( newItem, "[" + QString::number( i ) + "]", KTNEFProperty::formatValue( *lit ) );
+ for ( TQValueList<TQVariant>::ConstIterator lit=value.listBegin(); lit!=value.listEnd(); ++lit, i++ )
+ new TQListViewItem( newItem, "[" + TQString::number( i ) + "]", KTNEFProperty::formatValue( *lit ) );
}
- else if ( value.type() == QVariant::DateTime )
+ else if ( value.type() == TQVariant::DateTime )
newItem->setText( 1, value.asDateTime().toString() );
else
{
newItem->setText( 1, ( *it )->valueString() );
- newItem->setText( 2, prefix + "_" + QString::number( it.key() ) );
+ newItem->setText( 2, prefix + "_" + TQString::number( it.key() ) );
}
}
}
-void formatPropertySet( KTNEFPropertySet *pSet, QListView *lv )
+void formatPropertySet( KTNEFPropertySet *pSet, TQListView *lv )
{
formatProperties( pSet->properties(), lv, 0, "prop" );
- QListViewItem *item = new QListViewItem( lv, i18n( "TNEF Attributes" ) );
+ TQListViewItem *item = new TQListViewItem( lv, i18n( "TNEF Attributes" ) );
item->setOpen( true );
formatProperties( pSet->attributes(), 0, item, "attr" );
}
-void saveProperty( QListView *lv, KTNEFPropertySet *pSet, QWidget *parent )
+void saveProperty( TQListView *lv, KTNEFPropertySet *pSet, TQWidget *parent )
{
- QListViewItem *item = lv->selectedItem();
+ TQListViewItem *item = lv->selectedItem();
if ( !item )
KMessageBox::error( parent, i18n( "Select an item." ) );
else if ( item->text( 2 ).isEmpty() )
KMessageBox::error( parent, i18n( "The selected item cannot be saved." ) );
else
{
- QString tag = item->text( 2 );
+ TQString tag = item->text( 2 );
int key = tag.mid( 5 ).toInt();
- QVariant prop = ( tag.startsWith( "attr_" ) ? pSet->attribute( key ) : pSet->property( key ) );
- QString filename = KFileDialog::getSaveFileName( tag, QString::null, parent );
+ TQVariant prop = ( tag.startsWith( "attr_" ) ? pSet->attribute( key ) : pSet->property( key ) );
+ TQString filename = KFileDialog::getSaveFileName( tag, TQString::null, parent );
if ( !filename.isEmpty() )
{
- QFile f( filename );
+ TQFile f( filename );
if ( f.open( IO_WriteOnly ) )
{
switch ( prop.type() )
{
- case QVariant::ByteArray:
+ case TQVariant::ByteArray:
f.writeBlock( prop.asByteArray().data(), prop.asByteArray().size() );
break;
default:
{
- QTextStream t( &f );
+ TQTextStream t( &f );
t << prop.toString();
break;
}
@@ -151,17 +151,17 @@ void saveProperty( QListView *lv, KTNEFPropertySet *pSet, QWidget *parent )
}
}
-QPixmap loadRenderingPixmap( KTNEFPropertySet *pSet, const QColor& bgColor )
+TQPixmap loadRenderingPixmap( KTNEFPropertySet *pSet, const TQColor& bgColor )
{
- QPixmap pix;
- QVariant rendData = pSet->attribute( attATTACHRENDDATA ), wmf = pSet->attribute( attATTACHMETAFILE );
+ TQPixmap pix;
+ TQVariant rendData = pSet->attribute( attATTACHRENDDATA ), wmf = pSet->attribute( attATTACHMETAFILE );
if ( !rendData.isNull() && !wmf.isNull() )
{
// Get rendering size
- QBuffer rendBuffer( rendData.asByteArray() );
+ TQBuffer rendBuffer( rendData.asByteArray() );
rendBuffer.open( IO_ReadOnly );
- QDataStream rendStream( &rendBuffer );
- rendStream.setByteOrder( QDataStream::LittleEndian );
+ TQDataStream rendStream( &rendBuffer );
+ rendStream.setByteOrder( TQDataStream::LittleEndian );
Q_UINT16 type, w, h;
rendStream >> type >> w >> w; // read type and skip 4 bytes
rendStream >> w >> h;
@@ -171,9 +171,9 @@ QPixmap loadRenderingPixmap( KTNEFPropertySet *pSet, const QColor& bgColor )
{
// Load WMF data
QWinMetaFile wmfLoader;
- QBuffer wmfBuffer( wmf.asByteArray() );
+ TQBuffer wmfBuffer( wmf.asByteArray() );
wmfBuffer.open( IO_ReadOnly );
- wmfLoader.setBbox( QRect( 0, 0, w, h ) );
+ wmfLoader.setBbox( TQRect( 0, 0, w, h ) );
if ( wmfLoader.load( wmfBuffer ) )
{
pix.resize( w, h );