TQt4 port libkipi

This enables compilation under Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/libkipi@1232471 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 7e1bbd9180
commit 252b74ae40

File diff suppressed because it is too large Load Diff

@ -1,10 +1,10 @@
/* -*- Mode: C++ -*- /* -*- Mode: C++ -*-
KD Tools - a set of useful widgets for Qt KD Tools - a set of useful widgets for TQt
$Id: KDStream.h 387954 2005-02-10 07:49:40Z blackie $ $Id: KDStream.h 387954 2005-02-10 07:49:40Z blackie $
*/ */
/**************************************************************************** /****************************************************************************
** Copyright (C) 2001-2005 Klarälvdalens Datakonsult AB. All rights reserved. ** Copyright (C) 2001-2005 Klar<EFBFBD>lvdalens Datakonsult AB. All rights reserved.
** **
** This file is part of the KD Tools library. ** This file is part of the KD Tools library.
** **
@ -29,53 +29,44 @@
#define KIPI_KDSTREAM #define KIPI_KDSTREAM
// Forward declarations. // Forward declarations.
class QImage; class TQImage;
class QPixmap; class TQPixmap;
class QColor; class TQColor;
class QColorGroup; class TQColorGroup;
class QPalette; class TQPalette;
class QCursor; class TQCursor;
class QDate; class TQDate;
class QDateTime; class TQDateTime;
class QTime; class TQTime;
class QFont; class TQFont;
class QPen; class TQPen;
class QPoint; class TQPoint;
class QSize; class TQSize;
class QRect; class TQRect;
class QObject; class TQObject;
class QVariant; class TQVariant;
class QBrush; class TQBrush;
class QSizePolicy; class TQSizePolicy;
class QKeySequence; class TQKeySequence;
#include <qstring.h> #include <tqstring.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <qstrlist.h> #include <tqstrlist.h>
#include <qasciidict.h> #include <tqasciidict.h>
#include <qintdict.h> #include <tqintdict.h>
#include <qptrdict.h> #include <tqptrdict.h>
#include <qdict.h> #include <tqdict.h>
#include <qvaluestack.h> #include <tqvaluestack.h>
#include <qasciicache.h> #include <tqasciicache.h>
#include <qintcache.h> #include <tqintcache.h>
#include <qcache.h> #include <tqcache.h>
#if ( QT_VERSION < 300 ) #include <tqptrlist.h>
#include <qlist.h> #include <tqptrstack.h>
#include <qstack.h> #include <tqptrqueue.h>
#include <qqueue.h> #include <tqpair.h>
#include <qvector.h> #include <tqptrvector.h>
#endif #include <tqvaluevector.h>
#if ( QT_VERSION >= 300 )
#include <qptrlist.h>
#include <qptrstack.h>
#include <qptrqueue.h>
#include <qpair.h>
#include <qptrvector.h>
#include <qvaluevector.h>
#endif
// utility functions. // utility functions.
class KDStream; class KDStream;
@ -86,7 +77,7 @@ KDStream& flush( KDStream& stream);
class KDStream class KDStream
{ {
public: public:
KDStream( QString* outputString = 0); KDStream( TQString* outputString = 0);
~KDStream(); ~KDStream();
void flush(); void flush();
@ -105,42 +96,42 @@ public:
KDStream& operator<<( const void* ); KDStream& operator<<( const void* );
// Data holding classes. // Data holding classes.
KDStream& operator<<( const QString& ); KDStream& operator<<( const TQString& );
KDStream& operator<<( const QCString& ); KDStream& operator<<( const TQCString& );
KDStream& operator<<( const QChar& ); KDStream& operator<<( const TQChar& );
KDStream& operator<<( const QColor& ); KDStream& operator<<( const TQColor& );
KDStream& operator<<( const QColorGroup& ); KDStream& operator<<( const TQColorGroup& );
KDStream& operator<<( const QPalette& ); KDStream& operator<<( const TQPalette& );
KDStream& operator<<( const QCursor& ); KDStream& operator<<( const TQCursor& );
KDStream& operator<<( const QDate& ); KDStream& operator<<( const TQDate& );
KDStream& operator<<( const QDateTime& ); KDStream& operator<<( const TQDateTime& );
KDStream& operator<<( const QTime& ); KDStream& operator<<( const TQTime& );
KDStream& operator<<( const QFont& ); KDStream& operator<<( const TQFont& );
KDStream& operator<<( const QPen& ); KDStream& operator<<( const TQPen& );
KDStream& operator<<( const QPoint& ); KDStream& operator<<( const TQPoint& );
KDStream& operator<<( const QSize& ); KDStream& operator<<( const TQSize& );
KDStream& operator<<( const QRect& ); KDStream& operator<<( const TQRect& );
KDStream& operator<<( const QBrush& ); KDStream& operator<<( const TQBrush& );
KDStream& operator<<( const QSizePolicy& ); KDStream& operator<<( const TQSizePolicy& );
KDStream& operator<<( const QKeySequence& ); KDStream& operator<<( const TQKeySequence& );
KDStream& operator<<( const QPixmap& ); KDStream& operator<<( const TQPixmap& );
KDStream& operator<<( const QImage& ); KDStream& operator<<( const TQImage& );
// misc // misc
KDStream& operator<<( KDSTREAMFUNC ); KDStream& operator<<( KDSTREAMFUNC );
KDStream& operator<<( const QVariant& ); KDStream& operator<<( const TQVariant& );
KDStream& operator<<( const QObject& ); KDStream& operator<<( const TQObject& );
KDStream& operator<<( const QStrList& list ); KDStream& operator<<( const TQStrList& list );
protected: protected:
QString QColor2Str( const QColor& col ); TQString TQColor2Str( const TQColor& col );
private: private:
QString _output; TQString _output;
QString* _out; TQString* _out;
}; };
@ -175,7 +166,7 @@ template<class Iterator> void KDStream_ptrListStream( KDStream& st, Iterator it,
if ( doubleDeref ) if ( doubleDeref )
st << *(*it); st << *(*it);
else { else {
// QStrList ought to be a value list rather than a ptr list, one less dereference is // TQStrList ought to be a value list rather than a ptr list, one less dereference is
// necesary here, otherwise we will only stream out a char, rather than a char * // necesary here, otherwise we will only stream out a char, rather than a char *
st << *it; st << *it;
} }
@ -202,82 +193,52 @@ template<class Iterator> void KDStream_ptrDictStream( KDStream& st, Iterator it
// Defined as global functions to support // Defined as global functions to support
// compilers without member templates // compilers without member templates
template<class T> KDStream& operator<<( KDStream& st, const QValueList<T>& list ) template<class T> KDStream& operator<<( KDStream& st, const TQValueList<T>& list )
{ {
KDStream_valueListStream( st, list.begin(), list.end() ); KDStream_valueListStream( st, list.begin(), list.end() );
return st; return st;
} }
#if ( QT_VERSION < 300 ) template<class T> KDStream& operator<<( KDStream& st, const TQMemArray<T>& array )
template<class T> KDStream& operator<<( KDStream& st, const QList<T>& list )
{
KDStream_ptrListStream ( st, QListIterator<T>( list ) , true );
return st;
}
template<class T> KDStream& operator<<( KDStream& st, const QArray<T>& array )
{ {
KDStream_valueListStream( st, array.begin(), array.end() ); KDStream_valueListStream( st, array.begin(), array.end() );
return st; return st;
} }
template<class T> KDStream& operator<<( KDStream& st, const QVector<T>& vector ) template<class T> KDStream& operator<<( KDStream& st, const TQPtrList<T>& list )
{ {
QList<T> list; KDStream_ptrListStream ( st, TQPtrListIterator<T>( list ), true );
vector.toList( &list );
KDStream_ptrListStream ( st, QListIterator<T>( list ), true );
return st;
}
#endif
#if ( QT_VERSION >= 300 )
template<class T> KDStream& operator<<( KDStream& st, const QMemArray<T>& array )
{
KDStream_valueListStream( st, array.begin(), array.end() );
return st;
}
template<class T> KDStream& operator<<( KDStream& st, const QPtrList<T>& list )
{
KDStream_ptrListStream ( st, QPtrListIterator<T>( list ), true );
return st; return st;
} }
template<class T1, class T2> KDStream& operator<<( KDStream& st, const QPair<T1,T2>& pair ) template<class T1, class T2> KDStream& operator<<( KDStream& st, const TQPair<T1,T2>& pair )
{ {
st << "(" << pair.first << "," << pair.second << ")"; st << "(" << pair.first << "," << pair.second << ")";
return st; return st;
} }
template<class T> KDStream& operator<<( KDStream& st, const QPtrVector<T>& vector ) template<class T> KDStream& operator<<( KDStream& st, const TQPtrVector<T>& vector )
{ {
QPtrList<T> list; TQPtrList<T> list;
vector.toList( &list ); vector.toList( &list );
KDStream_ptrListStream( st, QPtrListIterator<T>( list ), true ); KDStream_ptrListStream( st, TQPtrListIterator<T>( list ), true );
return st; return st;
} }
template<class T> KDStream& operator<<( KDStream& st, const QValueVector<T>& vector ) template<class T> KDStream& operator<<( KDStream& st, const TQValueVector<T>& vector )
{ {
KDStream_valueListStream( st, vector.begin(), vector.end() ); KDStream_valueListStream( st, vector.begin(), vector.end() );
return st; return st;
} }
#endif
#if ( QT_VERSION < 300 ) template<class T> KDStream& operator<<( KDStream& st, const TQPtrStack<T>& stack )
template<class T> KDStream& operator<<( KDStream& st, const QStack<T>& stack )
{
// I need a copy to look at the individual elements.
QStack<T> copy(stack);
#else
template<class T> KDStream& operator<<( KDStream& st, const QPtrStack<T>& stack )
{ {
// I need a copy to look at the individual elements. // I need a copy to look at the individual elements.
QPtrStack<T> copy(stack); TQPtrStack<T> copy(stack);
/*}*/ /*}*/
#endif
st << "["; st << "[";
if ( stack.count() > 1 ) if ( stack.count() > 1 )
st << "top| "; st << "top| ";
@ -303,11 +264,11 @@ template<class T> KDStream& operator<<( KDStream& st, const QPtrStack<T>& stack
// Q(Ptr)Stack, as the Q(Ptr)Stack dereferences what it pops of the stack, // Q(Ptr)Stack, as the Q(Ptr)Stack dereferences what it pops of the stack,
// before streaming it: // before streaming it:
// Q(Ptr)Stack: *this << *(copy.pop()); // Q(Ptr)Stack: *this << *(copy.pop());
// QValueStack: *this << copy.pop() ; // TQValueStack: *this << copy.pop() ;
template<class T> KDStream& operator<<( KDStream& st, const QValueStack<T>& stack ) template<class T> KDStream& operator<<( KDStream& st, const TQValueStack<T>& stack )
{ {
// I need a copy to look at the individual elements. // I need a copy to look at the individual elements.
QValueStack<T> copy(stack); TQValueStack<T> copy(stack);
st << "["; st << "[";
if ( stack.count() > 1 ) if ( stack.count() > 1 )
st << "top| "; st << "top| ";
@ -330,45 +291,45 @@ template<class T> KDStream& operator<<( KDStream& st, const QValueStack<T>& stac
} }
template<class T> KDStream& operator<<( KDStream& st, const QAsciiDict<T>& dict ) template<class T> KDStream& operator<<( KDStream& st, const TQAsciiDict<T>& dict )
{ {
KDStream_ptrDictStream( st, QAsciiDictIterator<T>( dict ) ); KDStream_ptrDictStream( st, TQAsciiDictIterator<T>( dict ) );
return st; return st;
} }
template<class T> KDStream& operator<<( KDStream& st, const QIntDict<T>& dict ) template<class T> KDStream& operator<<( KDStream& st, const TQIntDict<T>& dict )
{ {
KDStream_ptrDictStream( st, QIntDictIterator<T>( dict ) ); KDStream_ptrDictStream( st, TQIntDictIterator<T>( dict ) );
return st; return st;
} }
template<class T> KDStream& operator<<( KDStream& st, const QPtrDict<T>& dict ) template<class T> KDStream& operator<<( KDStream& st, const TQPtrDict<T>& dict )
{ {
KDStream_ptrDictStream( st, QPtrDictIterator<T>( dict ) ); KDStream_ptrDictStream( st, TQPtrDictIterator<T>( dict ) );
return st; return st;
} }
template<class T> KDStream& operator<<( KDStream& st, const QDict<T>& dict ) template<class T> KDStream& operator<<( KDStream& st, const TQDict<T>& dict )
{ {
KDStream_ptrDictStream( st, QDictIterator<T>( dict ) ); KDStream_ptrDictStream( st, TQDictIterator<T>( dict ) );
return st; return st;
} }
template<class T> KDStream& operator<<( KDStream& st, const QAsciiCache<T>& cache ) template<class T> KDStream& operator<<( KDStream& st, const TQAsciiCache<T>& cache )
{ {
KDStream_ptrDictStream( st, QAsciiCacheIterator<T>( cache ) ); KDStream_ptrDictStream( st, TQAsciiCacheIterator<T>( cache ) );
return st; return st;
} }
template<class T> KDStream& operator<<( KDStream& st, const QIntCache<T>& cache ) template<class T> KDStream& operator<<( KDStream& st, const TQIntCache<T>& cache )
{ {
KDStream_ptrDictStream( st, QIntCacheIterator<T>( cache ) ); KDStream_ptrDictStream( st, TQIntCacheIterator<T>( cache ) );
return st; return st;
} }
template<class T> KDStream& operator<<( KDStream& st, const QCache<T>& cache ) template<class T> KDStream& operator<<( KDStream& st, const TQCache<T>& cache )
{ {
KDStream_ptrDictStream( st, QCacheIterator<T>( cache ) ); KDStream_ptrDictStream( st, TQCacheIterator<T>( cache ) );
return st; return st;
} }

@ -21,24 +21,24 @@
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// Include files for Qt // Include files for TQt
#include <qvbox.h> #include <tqvbox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qdir.h> #include <tqdir.h>
#include <qwidget.h> #include <tqwidget.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qhgroupbox.h> #include <tqhgroupbox.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qheader.h> #include <tqheader.h>
#include <qlistview.h> #include <tqlistview.h>
#include <qframe.h> #include <tqframe.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
// Include files for KDE // Include files for KDE
@ -72,8 +72,8 @@ namespace KIPI
class BatchProgressItem : public KListViewItem class BatchProgressItem : public KListViewItem
{ {
public: public:
BatchProgressItem(KListView * parent, QListViewItem *after, const QString &message, int messageType) BatchProgressItem(KListView * tqparent, TQListViewItem *after, const TQString &message, int messageType)
: KListViewItem( parent, after), m_messagetype(messageType) : KListViewItem( tqparent, after), m_messagetype(messageType)
{ {
// Set the icon. // Set the icon.
@ -106,25 +106,25 @@ public:
private: private:
int m_messagetype; int m_messagetype;
void paintCell (QPainter *p, const QColorGroup &cg, int column, int width, int alignment) void paintCell (TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment)
{ {
QColorGroup _cg( cg ); TQColorGroup _cg( cg );
if ( m_messagetype == KIPI::ErrorMessage ) if ( m_messagetype == KIPI::ErrorMessage )
{ {
_cg.setColor( QColorGroup::Text, Qt::red ); _cg.setColor( TQColorGroup::Text, TQt::red );
KListViewItem::paintCell( p, _cg, column, width, alignment ); KListViewItem::paintCell( p, _cg, column, width, tqalignment );
return; return;
} }
if ( m_messagetype == KIPI::WarningMessage ) if ( m_messagetype == KIPI::WarningMessage )
{ {
_cg.setColor( QColorGroup::Text, Qt::darkYellow ); _cg.setColor( TQColorGroup::Text, TQt::darkYellow );
KListViewItem::paintCell( p, _cg, column, width, alignment ); KListViewItem::paintCell( p, _cg, column, width, tqalignment );
return; return;
} }
KListViewItem::paintCell( p, cg, column, width, alignment ); KListViewItem::paintCell( p, cg, column, width, tqalignment );
} }
}; };
@ -135,53 +135,53 @@ struct BatchProgressDialog::Private {
/////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////// /////////////////////////////////// CONSTRUCTOR ////////////////////////////////////////////
BatchProgressDialog::BatchProgressDialog( QWidget *parent, const QString &caption ) BatchProgressDialog::BatchProgressDialog( TQWidget *tqparent, const TQString &caption )
: KDialogBase( parent, "KIPIBatchProgressDialog", true /* modal */, : KDialogBase( tqparent, "KIPIBatchProgressDialog", true /* modal */,
caption, Cancel) caption, Cancel)
{ {
d = new Private; d = new Private;
QWidget* box = makeVBoxMainWidget(); TQWidget* box = makeVBoxMainWidget();
//--------------------------------------------- //---------------------------------------------
QFrame *headerFrame = new QFrame( box ); TQFrame *headerFrame = new TQFrame( box );
headerFrame->setFrameStyle(QFrame::Panel|QFrame::Sunken); headerFrame->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
QHBoxLayout* layout = new QHBoxLayout( headerFrame ); TQHBoxLayout* tqlayout = new TQHBoxLayout( headerFrame );
layout->setMargin( 2 ); // to make sure the frame gets displayed tqlayout->setMargin( 2 ); // to make sure the frame gets displayed
layout->setSpacing( 0 ); tqlayout->setSpacing( 0 );
QLabel *pixmapLabelLeft = new QLabel( headerFrame, "pixmapLabelLeft" ); TQLabel *pixmapLabelLeft = new TQLabel( headerFrame, "pixmapLabelLeft" );
pixmapLabelLeft->setScaledContents( false ); pixmapLabelLeft->setScaledContents( false );
layout->addWidget( pixmapLabelLeft ); tqlayout->addWidget( pixmapLabelLeft );
QLabel *labelTitle = new QLabel( caption, headerFrame, "labelTitle" ); TQLabel *labelTitle = new TQLabel( caption, headerFrame, "labelTitle" );
layout->addWidget( labelTitle ); tqlayout->addWidget( labelTitle );
layout->setStretchFactor( labelTitle, 1 ); tqlayout->setStretchFactor( labelTitle, 1 );
QString dir; TQString dir;
KGlobal::dirs()->addResourceType("kipi_banner_left", KGlobal::dirs()->kde_default("data") + "kipi/data"); KGlobal::dirs()->addResourceType("kipi_banner_left", KGlobal::dirs()->kde_default("data") + "kipi/data");
dir = KGlobal::dirs()->findResourceDir("kipi_banner_left", "banner_left.png"); dir = KGlobal::dirs()->findResourceDir("kipi_banner_left", "banner_left.png");
pixmapLabelLeft->setPaletteBackgroundColor( QColor(201, 208, 255) ); pixmapLabelLeft->setPaletteBackgroundColor( TQColor(201, 208, 255) );
pixmapLabelLeft->setPixmap( QPixmap( dir + "banner_left.png" ) ); pixmapLabelLeft->setPixmap( TQPixmap( dir + "banner_left.png" ) );
labelTitle->setPaletteBackgroundColor( QColor(201, 208, 255) ); labelTitle->setPaletteBackgroundColor( TQColor(201, 208, 255) );
//--------------------------------------------- //---------------------------------------------
m_actionsList = new KListView( box ); m_actionsList = new KListView( box );
m_actionsList->addColumn(i18n( "Status" )); m_actionsList->addColumn(i18n( "tqStatus" ));
m_actionsList->addColumn(i18n( "Current Actions" )); m_actionsList->addColumn(i18n( "Current Actions" ));
m_actionsList->setSorting(-1); m_actionsList->setSorting(-1);
m_actionsList->setItemMargin(1); m_actionsList->setItemMargin(1);
m_actionsList->header()->hide(); m_actionsList->header()->hide();
m_actionsList->setResizeMode(QListView::LastColumn); m_actionsList->setResizeMode(TQListView::LastColumn);
QWhatsThis::add( m_actionsList, i18n("<p>This is the current tasks list released.") ); TQWhatsThis::add( m_actionsList, i18n("<p>This is the current tasks list released.") );
//--------------------------------------------- //---------------------------------------------
m_progress = new KProgress( box, "Progress" ); m_progress = new KProgress( box, "Progress" );
m_progress->setTotalSteps(100); m_progress->setTotalSteps(100);
m_progress->setValue(0); m_progress->setValue(0);
QWhatsThis::add( m_progress, i18n("<p>This is the list current percent task released.") ); TQWhatsThis::add( m_progress, i18n("<p>This is the list current percent task released.") );
resize( 600, 400 ); resize( 600, 400 );
} }
@ -196,7 +196,7 @@ BatchProgressDialog::~BatchProgressDialog()
///////////////////////////////////// FONCTIONS ///////////////////////////////////////////// ///////////////////////////////////// FONCTIONS /////////////////////////////////////////////
void BatchProgressDialog::addedAction(const QString &text, int type) void BatchProgressDialog::addedAction(const TQString &text, int type)
{ {
m_item = new KIPI::BatchProgressItem(m_actionsList, m_item = new KIPI::BatchProgressItem(m_actionsList,
m_actionsList->lastItem(), m_actionsList->lastItem(),

@ -53,13 +53,14 @@ enum ActionMessageType
class LIBKIPI_EXPORT BatchProgressDialog : public KDialogBase class LIBKIPI_EXPORT BatchProgressDialog : public KDialogBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
BatchProgressDialog( QWidget *parent=0, const QString &caption=QString::null ); BatchProgressDialog( TQWidget *tqparent=0, const TQString &caption=TQString() );
~BatchProgressDialog(); ~BatchProgressDialog();
void addedAction(const QString &text, int type); void addedAction(const TQString &text, int type);
void reset(); void reset();
void setProgress(int current, int total); void setProgress(int current, int total);

@ -32,29 +32,29 @@
/** /**
@file imagecollection.cpp @file imagecollection.cpp
returns the comment for the collection of images or QString::null if that doesn't make any sense. returns the comment for the collection of images or TQString() if that doesn't make any sense.
A comment makes sense for an album, but not for a KIPI::Interface::currentSelection(). A comment makes sense for an album, but not for a KIPI::Interface::currentSelection().
*/ */
QString KIPI::ImageCollection::comment() const TQString KIPI::ImageCollection::comment() const
{ {
if ( _data ) if ( _data )
return _data->comment(); return _data->comment();
else { else {
printNullError(); printNullError();
return QString::null; return TQString();
} }
} }
/** /**
PENDING(blackie) document PENDING(blackie) document
*/ */
QString KIPI::ImageCollection::name() const TQString KIPI::ImageCollection::name() const
{ {
if ( _data ) if ( _data )
return _data->name(); return _data->name();
else { else {
printNullError(); printNullError();
return QString::null; return TQString();
} }
} }
@ -62,13 +62,13 @@ QString KIPI::ImageCollection::name() const
Return the category of the image collection. For example in Digikam, Return the category of the image collection. For example in Digikam,
a category is a sorting class like 'travels', 'friends', 'monuments', etc. a category is a sorting class like 'travels', 'friends', 'monuments', etc.
*/ */
QString KIPI::ImageCollection::category() const TQString KIPI::ImageCollection::category() const
{ {
if ( _data ) if ( _data )
return _data->category(); return _data->category();
else { else {
printNullError(); printNullError();
return QString::null; return TQString();
} }
} }
@ -76,13 +76,13 @@ QString KIPI::ImageCollection::category() const
Return the Creation date of the image collection. The default implementation Return the Creation date of the image collection. The default implementation
return a null date. return a null date.
*/ */
QDate KIPI::ImageCollection::date() const TQDate KIPI::ImageCollection::date() const
{ {
if ( _data ) if ( _data )
return _data->date(); return _data->date();
else { else {
printNullError(); printNullError();
return QDate(); return TQDate();
} }
} }
@ -213,13 +213,13 @@ KURL KIPI::ImageCollection::uploadRoot() const
the KIPI::UploadWidget. This name can be different for each host the KIPI::UploadWidget. This name can be different for each host
app (like "Images" for Kimdaba or "My Albums" for Digikam). app (like "Images" for Kimdaba or "My Albums" for Digikam).
*/ */
QString KIPI::ImageCollection::uploadRootName() const TQString KIPI::ImageCollection::uploadRootName() const
{ {
if ( _data ) if ( _data )
return _data->uploadRootName(); return _data->uploadRootName();
else { else {
printNullError(); printNullError();
return QString::null; return TQString();
} }
} }

@ -25,10 +25,10 @@
#ifndef KIPI_IMAGECOLLECTION_H #ifndef KIPI_IMAGECOLLECTION_H
#define KIPI_IMAGECOLLECTION_H #define KIPI_IMAGECOLLECTION_H
// Qt includes // TQt includes
#include <qstring.h> #include <tqstring.h>
#include <qdatetime.h> #include <tqdatetime.h>
// KDE includes. // KDE includes.
@ -46,15 +46,15 @@ namespace KIPI
class LIBKIPI_EXPORT ImageCollection class LIBKIPI_EXPORT ImageCollection
{ {
public: public:
QString name() const; TQString name() const;
QString comment() const; TQString comment() const;
QString category() const; TQString category() const;
QDate date() const; TQDate date() const;
KURL::List images() const; KURL::List images() const;
KURL path() const; KURL path() const;
KURL uploadPath() const; KURL uploadPath() const;
KURL uploadRoot() const; KURL uploadRoot() const;
QString uploadRootName() const; TQString uploadRootName() const;
bool isDirectory() const; bool isDirectory() const;
bool isValid() const; bool isValid() const;

@ -20,14 +20,14 @@
* *
* ============================================================ */ * ============================================================ */
// Qt includes. // TQt includes.
#include <qheader.h> #include <tqheader.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qtimer.h> #include <tqtimer.h>
// KDE includes. // KDE includes.
@ -49,12 +49,12 @@
namespace KIPI namespace KIPI
{ {
class ImageCollectionItem : public QCheckListItem class ImageCollectionItem : public TQCheckListItem
{ {
public: public:
ImageCollectionItem(ImageCollectionSelector* selector, ImageCollectionItem(ImageCollectionSelector* selector,
QListView * parent, ImageCollection collection) TQListView * tqparent, ImageCollection collection)
: QCheckListItem( parent, collection.name(), QCheckListItem::CheckBox), : TQCheckListItem( tqparent, collection.name(), TQCheckListItem::CheckBox),
_imageCollection(collection), _selector(selector) _imageCollection(collection), _selector(selector)
{} {}
@ -64,7 +64,7 @@ protected:
virtual void stateChange(bool val) virtual void stateChange(bool val)
{ {
QCheckListItem::stateChange(val); TQCheckListItem::stateChange(val);
_selector->emitSelectionChanged(); _selector->emitSelectionChanged();
} }
@ -77,68 +77,68 @@ private:
struct ImageCollectionSelector::Private { struct ImageCollectionSelector::Private {
Interface* _interface; Interface* _interface;
KListView* _list; KListView* _list;
QLabel* _thumbLabel; TQLabel* _thumbLabel;
QLabel* _textLabel; TQLabel* _textLabel;
QListViewItem* _itemToSelect; TQListViewItem* _itemToSelect;
}; };
ImageCollectionSelector::ImageCollectionSelector(QWidget* parent, Interface* interface, const char* name) ImageCollectionSelector::ImageCollectionSelector(TQWidget* tqparent, Interface* interface, const char* name)
: QWidget(parent, name) : TQWidget(tqparent, name)
{ {
d=new Private; d=new Private;
d->_interface=interface; d->_interface=interface;
d->_itemToSelect = 0; d->_itemToSelect = 0;
d->_list=new KListView(this); d->_list=new KListView(this);
d->_list->setResizeMode( QListView::LastColumn ); d->_list->setResizeMode( TQListView::LastColumn );
d->_list->addColumn(""); d->_list->addColumn("");
d->_list->header()->hide(); d->_list->header()->hide();
connect(d->_list, SIGNAL(selectionChanged(QListViewItem*)), connect(d->_list, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
SLOT(slotSelectionChanged(QListViewItem*))); TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
QHBoxLayout* mainLayout=new QHBoxLayout(this, 0, KDialog::spacingHint()); TQHBoxLayout* mainLayout=new TQHBoxLayout(this, 0, KDialog::spacingHint());
mainLayout->addWidget(d->_list); mainLayout->addWidget(d->_list);
QVBoxLayout* rightLayout = new QVBoxLayout(mainLayout, 0); TQVBoxLayout* rightLayout = new TQVBoxLayout(mainLayout, 0);
KButtonBox* box=new KButtonBox(this, Vertical); KButtonBox* box=new KButtonBox(this,Qt::Vertical);
rightLayout->addWidget(box); rightLayout->addWidget(box);
QPushButton* selectAll=box->addButton(i18n("Select All")); TQPushButton* selectAll=box->addButton(i18n("Select All"));
QPushButton* invertSelection=box->addButton(i18n("Invert Selection")); TQPushButton* invertSelection=box->addButton(i18n("Invert Selection"));
QPushButton* selectNone=box->addButton(i18n("Select None")); TQPushButton* selectNone=box->addButton(i18n("Select None"));
box->layout(); box->tqlayout();
connect(selectAll, SIGNAL(clicked()), connect(selectAll, TQT_SIGNAL(clicked()),
this, SLOT(slotSelectAll()) ); this, TQT_SLOT(slotSelectAll()) );
connect(invertSelection, SIGNAL(clicked()), connect(invertSelection, TQT_SIGNAL(clicked()),
this, SLOT(slotInvertSelection()) ); this, TQT_SLOT(slotInvertSelection()) );
connect(selectNone, SIGNAL(clicked()), connect(selectNone, TQT_SIGNAL(clicked()),
this, SLOT(slotSelectNone()) ); this, TQT_SLOT(slotSelectNone()) );
rightLayout->addItem(new QSpacerItem(10,20,QSizePolicy::Fixed, rightLayout->addItem(new TQSpacerItem(10,20,TQSizePolicy::Fixed,
QSizePolicy::Expanding)); TQSizePolicy::Expanding));
QVGroupBox* rightBox = new QVGroupBox(this); TQVGroupBox* rightBox = new TQVGroupBox(this);
rightBox->setInsideMargin(KDialog::marginHint()); rightBox->setInsideMargin(KDialog::marginHint());
rightBox->setInsideSpacing(KDialog::spacingHint()); rightBox->setInsideSpacing(KDialog::spacingHint());
rightLayout->addWidget(rightBox); rightLayout->addWidget(rightBox);
if (interface->hasFeature(AlbumsUseFirstImagePreview)) if (interface->hasFeature(AlbumsUseFirstImagePreview))
{ {
d->_thumbLabel = new QLabel(rightBox); d->_thumbLabel = new TQLabel(rightBox);
d->_thumbLabel->setFixedSize(QSize(128,128)); d->_thumbLabel->setFixedSize(TQSize(128,128));
d->_thumbLabel->setAlignment(AlignHCenter | AlignVCenter); d->_thumbLabel->tqsetAlignment(AlignHCenter | AlignVCenter);
} }
else else
{ {
d->_thumbLabel = 0; d->_thumbLabel = 0;
} }
d->_textLabel = new QLabel(rightBox); d->_textLabel = new TQLabel(rightBox);
fillList(); fillList();
QTimer::singleShot(0, this, SLOT(slotInitialShow())); TQTimer::singleShot(0, this, TQT_SLOT(slotInitialShow()));
} }
@ -148,7 +148,7 @@ ImageCollectionSelector::~ImageCollectionSelector() {
void ImageCollectionSelector::fillList() { void ImageCollectionSelector::fillList() {
QValueList<ImageCollection> collections = d->_interface->allAlbums(); TQValueList<ImageCollection> collections = d->_interface->allAlbums();
d->_list->clear(); d->_list->clear();
ImageCollection current = d->_interface->currentAlbum(); ImageCollection current = d->_interface->currentAlbum();
bool currentWasInList = false; bool currentWasInList = false;
@ -158,7 +158,7 @@ void ImageCollectionSelector::fillList() {
them */ them */
blockSignals(true); blockSignals(true);
for( QValueList<ImageCollection>::Iterator it = collections.begin() ; for( TQValueList<ImageCollection>::Iterator it = collections.begin() ;
it != collections.end() ; ++it ) it != collections.end() ; ++it )
{ {
ImageCollectionItem* item = new ImageCollectionItem( this, d->_list, *it); ImageCollectionItem* item = new ImageCollectionItem( this, d->_list, *it);
@ -182,10 +182,10 @@ void ImageCollectionSelector::emitSelectionChanged()
emit selectionChanged(); emit selectionChanged();
} }
QValueList<ImageCollection> ImageCollectionSelector::selectedImageCollections() const { TQValueList<ImageCollection> ImageCollectionSelector::selectedImageCollections() const {
QValueList<ImageCollection> list; TQValueList<ImageCollection> list;
QListViewItemIterator it( d->_list ); TQListViewItemIterator it( d->_list );
for (; it.current(); ++it) { for (; it.current(); ++it) {
ImageCollectionItem *item = static_cast<ImageCollectionItem*>( it.current() ); ImageCollectionItem *item = static_cast<ImageCollectionItem*>( it.current() );
@ -199,7 +199,7 @@ QValueList<ImageCollection> ImageCollectionSelector::selectedImageCollections()
} }
void ImageCollectionSelector::slotSelectAll() { void ImageCollectionSelector::slotSelectAll() {
QListViewItemIterator it( d->_list ); TQListViewItemIterator it( d->_list );
/* note: the extensive use of blocksignals is to prevent bombarding /* note: the extensive use of blocksignals is to prevent bombarding
the plugin with too many selection changed signals. do not remove the plugin with too many selection changed signals. do not remove
@ -216,7 +216,7 @@ void ImageCollectionSelector::slotSelectAll() {
void ImageCollectionSelector::slotInvertSelection() { void ImageCollectionSelector::slotInvertSelection() {
QListViewItemIterator it( d->_list ); TQListViewItemIterator it( d->_list );
/* note: the extensive use of blocksignals is to prevent bombarding /* note: the extensive use of blocksignals is to prevent bombarding
the plugin with too many selection changed signals. do not remove the plugin with too many selection changed signals. do not remove
@ -233,7 +233,7 @@ void ImageCollectionSelector::slotInvertSelection() {
void ImageCollectionSelector::slotSelectNone() { void ImageCollectionSelector::slotSelectNone() {
QListViewItemIterator it( d->_list ); TQListViewItemIterator it( d->_list );
/* note: the extensive use of blocksignals is to prevent bombarding /* note: the extensive use of blocksignals is to prevent bombarding
the plugin with too many selection changed signals. do not remove the plugin with too many selection changed signals. do not remove
@ -248,7 +248,7 @@ void ImageCollectionSelector::slotSelectNone() {
emit selectionChanged(); emit selectionChanged();
} }
void ImageCollectionSelector::slotSelectionChanged(QListViewItem* listItem) void ImageCollectionSelector::slotSelectionChanged(TQListViewItem* listItem)
{ {
if (d->_thumbLabel) if (d->_thumbLabel)
d->_thumbLabel->clear(); d->_thumbLabel->clear();
@ -266,22 +266,22 @@ void ImageCollectionSelector::slotSelectionChanged(QListViewItem* listItem)
if (!images.isEmpty()) if (!images.isEmpty())
{ {
KIO::PreviewJob* thumbJob = KIO::filePreview(images.first(), 128); KIO::PreviewJob* thumbJob = KIO::filePreview(images.first(), 128);
connect( thumbJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), connect( thumbJob, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)),
SLOT(slotGotPreview(const KFileItem* , const QPixmap&))); TQT_SLOT(slotGotPreview(const KFileItem* , const TQPixmap&)));
} }
} }
// Layout the ImageCollection information nicely // Layout the ImageCollection information nicely
QString cellBeg("<tr><td><nobr><font size=-1><i>"); TQString cellBeg("<tr><td><nobr><font size=-1><i>");
QString cellMid("</i></font></nobr></td><td><font size=-1>"); TQString cellMid("</i></font></nobr></td><td><font size=-1>");
QString cellEnd("</font></td></tr>"); TQString cellEnd("</font></td></tr>");
QString text("<table cellspacing=0 cellpadding=0>"); TQString text("<table cellspacing=0 cellpadding=0>");
// number of images // number of images
text += cellBeg + i18n("Images:") + text += cellBeg + i18n("Images:") +
cellMid + QString::number(imcollItem->imageCollection().images().count()) + cellMid + TQString::number(imcollItem->imageCollection().images().count()) +
cellEnd; cellEnd;
// Optional features ------------------------------------------------------- // Optional features -------------------------------------------------------
@ -290,7 +290,7 @@ void ImageCollectionSelector::slotSelectionChanged(QListViewItem* listItem)
if (d->_interface->hasFeature(AlbumsHaveComments)) if (d->_interface->hasFeature(AlbumsHaveComments))
{ {
// Limit the comments string to 20 char... // Limit the comments string to 20 char...
QString comments = imcollItem->imageCollection().comment(); TQString comments = imcollItem->imageCollection().comment();
if (!comments.isEmpty()) if (!comments.isEmpty())
{ {
comments.truncate(20); comments.truncate(20);
@ -313,7 +313,7 @@ void ImageCollectionSelector::slotSelectionChanged(QListViewItem* listItem)
// Album Creation Date // Album Creation Date
if (d->_interface->hasFeature(AlbumsHaveCreationDate)) if (d->_interface->hasFeature(AlbumsHaveCreationDate))
{ {
QDate date(imcollItem->imageCollection().date()); TQDate date(imcollItem->imageCollection().date());
text += cellBeg + i18n("Date:") + text += cellBeg + i18n("Date:") +
cellMid + KGlobal::locale()->formatDate(date) + cellMid + KGlobal::locale()->formatDate(date) +
cellEnd; cellEnd;
@ -327,7 +327,7 @@ void ImageCollectionSelector::slotSelectionChanged(QListViewItem* listItem)
emit selectionChanged(); emit selectionChanged();
} }
void ImageCollectionSelector::slotGotPreview(const KFileItem*, const QPixmap& pix) void ImageCollectionSelector::slotGotPreview(const KFileItem*, const TQPixmap& pix)
{ {
d->_thumbLabel->setPixmap(pix); d->_thumbLabel->setPixmap(pix);
} }

@ -23,18 +23,18 @@
#ifndef IMAGECOLLECTIONSELECTOR_H #ifndef IMAGECOLLECTIONSELECTOR_H
#define IMAGECOLLECTIONSELECTOR_H #define IMAGECOLLECTIONSELECTOR_H
// Qt includes. // TQt includes.
#include <qwidget.h> #include <tqwidget.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <qpixmap.h> #include <tqpixmap.h>
// KIPI includes. // KIPI includes.
#include "libkipi/imagecollection.h" #include "libkipi/imagecollection.h"
#include "libkipi/libkipi_export.h" #include "libkipi/libkipi_export.h"
class QListViewItem; class TQListViewItem;
class KFileItem; class KFileItem;
namespace KIPI namespace KIPI
@ -42,17 +42,18 @@ namespace KIPI
class Interface; class Interface;
class LIBKIPI_EXPORT ImageCollectionSelector : public QWidget class LIBKIPI_EXPORT ImageCollectionSelector : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
class Private; class Private;
public: public:
ImageCollectionSelector(QWidget* parent, Interface*, const char* name=0); ImageCollectionSelector(TQWidget* tqparent, Interface*, const char* name=0);
~ImageCollectionSelector(); ~ImageCollectionSelector();
QValueList<ImageCollection> selectedImageCollections() const; TQValueList<ImageCollection> selectedImageCollections() const;
signals: signals:
@ -70,8 +71,8 @@ private slots:
void slotSelectAll(); void slotSelectAll();
void slotInvertSelection(); void slotInvertSelection();
void slotSelectNone(); void slotSelectNone();
void slotSelectionChanged(QListViewItem* listItem); void slotSelectionChanged(TQListViewItem* listItem);
void slotGotPreview(const KFileItem*, const QPixmap&); void slotGotPreview(const KFileItem*, const TQPixmap&);
void slotInitialShow(); void slotInitialShow();
}; };

@ -76,7 +76,7 @@ KURL KIPI::ImageCollectionShared::uploadRoot()
return KURL( "file:/" ); return KURL( "file:/" );
} }
QString KIPI::ImageCollectionShared::uploadRootName() TQString KIPI::ImageCollectionShared::uploadRootName()
{ {
return (i18n("Images")); return (i18n("Images"));
} }
@ -86,28 +86,28 @@ bool KIPI::ImageCollectionShared::isDirectory()
return false; return false;
} }
QString KIPI::ImageCollectionShared::comment() TQString KIPI::ImageCollectionShared::comment()
{ {
kdWarning(51000) << "KIPI::ImageCollectionShared::comment should only be invoked if the host application supports\n" kdWarning(51000) << "KIPI::ImageCollectionShared::comment should only be invoked if the host application supports\n"
"the KIPI::Features AlbumsHaveComments - if the host application do support that, then this function should\n" "the KIPI::Features AlbumsHaveComments - if the host application do support that, then this function should\n"
"have been overriden in the host application.\n"; "have been overriden in the host application.\n";
return QString::null; return TQString();
} }
QString KIPI::ImageCollectionShared::category() TQString KIPI::ImageCollectionShared::category()
{ {
kdWarning(51000) << "KIPI::ImageCollectionShared::category should only be invoked if the host application supports\n" kdWarning(51000) << "KIPI::ImageCollectionShared::category should only be invoked if the host application supports\n"
"the KIPI::Features AlbumsHaveCategory - if the host application do support that, then this function should\n" "the KIPI::Features AlbumsHaveCategory - if the host application do support that, then this function should\n"
"have been overriden in the host application.\n"; "have been overriden in the host application.\n";
return QString::null; return TQString();
} }
QDate KIPI::ImageCollectionShared::date() TQDate KIPI::ImageCollectionShared::date()
{ {
kdWarning(51000) << "KIPI::ImageCollectionShared::date should only be invoked if the host application supports\n" kdWarning(51000) << "KIPI::ImageCollectionShared::date should only be invoked if the host application supports\n"
"the KIPI::Features AlbumsHaveCreationDate - if the host application do support that, then this function should\n" "the KIPI::Features AlbumsHaveCreationDate - if the host application do support that, then this function should\n"
"have been overriden in the host application.\n"; "have been overriden in the host application.\n";
return QDate(); return TQDate();
} }

@ -23,10 +23,10 @@
#ifndef KIPI_IMAGECOLLECTIONSHARED_H #ifndef KIPI_IMAGECOLLECTIONSHARED_H
#define KIPI_IMAGECOLLECTIONSHARED_H #define KIPI_IMAGECOLLECTIONSHARED_H
// Qt Includes. // TQt Includes.
#include <qstring.h> #include <tqstring.h>
#include <qdatetime.h> #include <tqdatetime.h>
// KDE includes. // KDE includes.
@ -44,15 +44,15 @@ namespace KIPI
public: public:
ImageCollectionShared(); ImageCollectionShared();
virtual ~ImageCollectionShared() {} virtual ~ImageCollectionShared() {}
virtual QString name() = 0; virtual TQString name() = 0;
virtual QString comment(); virtual TQString comment();
virtual QString category(); virtual TQString category();
virtual QDate date(); virtual TQDate date();
virtual KURL::List images() = 0; virtual KURL::List images() = 0;
virtual KURL path(); virtual KURL path();
virtual KURL uploadPath(); virtual KURL uploadPath();
virtual KURL uploadRoot(); virtual KURL uploadRoot();
virtual QString uploadRootName(); virtual TQString uploadRootName();
virtual bool isDirectory(); virtual bool isDirectory();
virtual bool operator==(ImageCollectionShared&); virtual bool operator==(ImageCollectionShared&);

@ -20,15 +20,15 @@
* *
* ============================================================ */ * ============================================================ */
// Qt includes. // TQt includes.
#include <qguardedptr.h> #include <tqguardedptr.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qsplitter.h> #include <tqsplitter.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qframe.h> #include <tqframe.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qtimer.h> #include <tqtimer.h>
// KDE includes. // KDE includes.
@ -57,8 +57,8 @@ namespace KIPI
{ {
struct AlbumLVI : public KListViewItem { struct AlbumLVI : public KListViewItem {
AlbumLVI(KListView* parent, const KIPI::ImageCollection& album) AlbumLVI(KListView* tqparent, const KIPI::ImageCollection& album)
: KListViewItem(parent, album.name()) : KListViewItem(tqparent, album.name())
, _album(album) {} , _album(album) {}
const KIPI::ImageCollection& _album; const KIPI::ImageCollection& _album;
@ -66,8 +66,8 @@ struct AlbumLVI : public KListViewItem {
struct ImageLVI : public KListViewItem { struct ImageLVI : public KListViewItem {
ImageLVI(KListView* parent, const KURL& url) ImageLVI(KListView* tqparent, const KURL& url)
: KListViewItem(parent, url.fileName()), _url(url) {} : KListViewItem(tqparent, url.fileName()), _url(url) {}
KURL _url; KURL _url;
}; };
@ -79,46 +79,46 @@ struct ImageDialog::Private {
KIPI::Interface* _interface; KIPI::Interface* _interface;
KListView* _albumList; KListView* _albumList;
KListView* _imageList; KListView* _imageList;
QLabel* _preview; TQLabel* _preview;
QValueList<ImageCollection> _albums; TQValueList<ImageCollection> _albums;
bool _singleSelection; bool _singleSelection;
}; };
ImageDialog::ImageDialog(QWidget* parent, KIPI::Interface* interface, ImageDialog::ImageDialog(TQWidget* tqparent, KIPI::Interface* interface,
bool singleSelection) bool singleSelection)
: KDialogBase(KDialogBase::Plain, i18n("Select Image From Album"), Help|Ok|Cancel, : KDialogBase(KDialogBase::Plain, i18n("Select Image From Album"), Help|Ok|Cancel,
Ok, parent, "album-dialog", true, true) Ok, tqparent, "album-dialog", true, true)
{ {
d = new Private; d = new Private;
d->_interface=interface; d->_interface=interface;
d->_singleSelection = singleSelection; d->_singleSelection = singleSelection;
QWidget* box = plainPage(); TQWidget* box = plainPage();
QVBoxLayout *dvlay = new QVBoxLayout( box, 6 ); TQVBoxLayout *dvlay = new TQVBoxLayout( box, 6 );
//--------------------------------------------- //---------------------------------------------
QFrame *headerFrame = new QFrame( box ); TQFrame *headerFrame = new TQFrame( box );
headerFrame->setFrameStyle(QFrame::Panel|QFrame::Sunken); headerFrame->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
QHBoxLayout* layout = new QHBoxLayout( headerFrame ); TQHBoxLayout* tqlayout = new TQHBoxLayout( headerFrame );
layout->setMargin( 2 ); // to make sure the frame gets displayed tqlayout->setMargin( 2 ); // to make sure the frame gets displayed
layout->setSpacing( 0 ); tqlayout->setSpacing( 0 );
QLabel *pixmapLabelLeft = new QLabel( headerFrame, "pixmapLabelLeft" ); TQLabel *pixmapLabelLeft = new TQLabel( headerFrame, "pixmapLabelLeft" );
pixmapLabelLeft->setScaledContents( false ); pixmapLabelLeft->setScaledContents( false );
layout->addWidget( pixmapLabelLeft ); tqlayout->addWidget( pixmapLabelLeft );
QLabel *labelTitle = new QLabel( i18n("Select Image From Album"), headerFrame, "labelTitle" ); TQLabel *labelTitle = new TQLabel( i18n("Select Image From Album"), headerFrame, "labelTitle" );
layout->addWidget( labelTitle ); tqlayout->addWidget( labelTitle );
layout->setStretchFactor( labelTitle, 1 ); tqlayout->setStretchFactor( labelTitle, 1 );
dvlay->addWidget( headerFrame ); dvlay->addWidget( headerFrame );
QString directory; TQString directory;
KGlobal::dirs()->addResourceType("kipi_banner_left", KGlobal::dirs()->kde_default("data") + "kipi/data"); KGlobal::dirs()->addResourceType("kipi_banner_left", KGlobal::dirs()->kde_default("data") + "kipi/data");
directory = KGlobal::dirs()->findResourceDir("kipi_banner_left", "banner_left.png"); directory = KGlobal::dirs()->findResourceDir("kipi_banner_left", "banner_left.png");
pixmapLabelLeft->setPaletteBackgroundColor( QColor(201, 208, 255) ); pixmapLabelLeft->setPaletteBackgroundColor( TQColor(201, 208, 255) );
pixmapLabelLeft->setPixmap( QPixmap( directory + "banner_left.png" ) ); pixmapLabelLeft->setPixmap( TQPixmap( directory + "banner_left.png" ) );
labelTitle->setPaletteBackgroundColor( QColor(201, 208, 255) ); labelTitle->setPaletteBackgroundColor( TQColor(201, 208, 255) );
//--------------------------------------------- //---------------------------------------------
@ -133,52 +133,52 @@ ImageDialog::ImageDialog(QWidget* parent, KIPI::Interface* interface,
0, 0,
"http://extragear.kde.org/apps/kipi"); "http://extragear.kde.org/apps/kipi");
QPushButton *helpButton = actionButton( Help ); TQPushButton *helpButton = actionButton( Help );
KHelpMenu* helpMenu = new KHelpMenu(this, about, false); KHelpMenu* helpMenu = new KHelpMenu(this, about, false);
helpMenu->menu()->removeItemAt(0); helpMenu->menu()->removeItemAt(0);
helpMenu->menu()->insertItem(i18n("Kipi Plugins Handbooks"), this, SLOT(slotHelp()), 0, -1, 0); helpMenu->menu()->insertItem(i18n("Kipi Plugins Handbooks"), this, TQT_SLOT(slotHelp()), 0, -1, 0);
helpButton->setPopup( helpMenu->menu() ); helpButton->setPopup( helpMenu->menu() );
//--------------------------------------------- //---------------------------------------------
QSplitter* splitter = new QSplitter(box); TQSplitter* splitter = new TQSplitter(box);
d->_albumList=new KListView(splitter); d->_albumList=new KListView(splitter);
d->_albumList->addColumn(i18n("Album Name")); d->_albumList->addColumn(i18n("Album Name"));
d->_albumList->setMinimumWidth(200); d->_albumList->setMinimumWidth(200);
d->_albumList->setResizeMode(QListView::LastColumn); d->_albumList->setResizeMode(TQListView::LastColumn);
d->_imageList=new KListView(splitter); d->_imageList=new KListView(splitter);
d->_imageList->addColumn(i18n("Image Name")); d->_imageList->addColumn(i18n("Image Name"));
d->_imageList->setMinimumWidth(200); d->_imageList->setMinimumWidth(200);
d->_imageList->setSelectionMode(singleSelection ? QListView::Single : d->_imageList->setSelectionMode(singleSelection ? TQListView::Single :
QListView::Extended); TQListView::Extended);
d->_imageList->setResizeMode(QListView::LastColumn); d->_imageList->setResizeMode(TQListView::LastColumn);
d->_preview=new QLabel(splitter); d->_preview=new TQLabel(splitter);
d->_preview->setAlignment(AlignHCenter | AlignVCenter | WordBreak); d->_preview->tqsetAlignment(AlignHCenter | AlignVCenter | WordBreak);
d->_preview->setFixedWidth(PREVIEW_SIZE); d->_preview->setFixedWidth(PREVIEW_SIZE);
d->_preview->setText(i18n("No image selected")); d->_preview->setText(i18n("No image selected"));
dvlay->addWidget( splitter ); dvlay->addWidget( splitter );
d->_albums=d->_interface->allAlbums(); d->_albums=d->_interface->allAlbums();
QValueList<ImageCollection>::ConstIterator it=d->_albums.begin(); TQValueList<ImageCollection>::ConstIterator it=d->_albums.begin();
for(; it!=d->_albums.end(); ++it) { for(; it!=d->_albums.end(); ++it) {
new AlbumLVI(d->_albumList, *it); new AlbumLVI(d->_albumList, *it);
} }
QTimer::singleShot(0, this, SLOT(slotInitialShow())); TQTimer::singleShot(0, this, TQT_SLOT(slotInitialShow()));
connect(d->_albumList, SIGNAL(selectionChanged(QListViewItem*)), connect(d->_albumList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
this, SLOT(fillImageList(QListViewItem*)) ); this, TQT_SLOT(fillImageList(TQListViewItem*)) );
if (singleSelection) if (singleSelection)
connect(d->_imageList, SIGNAL(selectionChanged(QListViewItem*)), connect(d->_imageList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
this, SLOT(slotImageSelected(QListViewItem*)) ); this, TQT_SLOT(slotImageSelected(TQListViewItem*)) );
else else
connect(d->_imageList, SIGNAL(selectionChanged()), connect(d->_imageList, TQT_SIGNAL(selectionChanged()),
this, SLOT(slotImagesSelected())); this, TQT_SLOT(slotImagesSelected()));
enableButtonOK(false); enableButtonOK(false);
} }
@ -198,19 +198,19 @@ KURL::List ImageDialog::urls() const
return d->_urls; return d->_urls;
} }
KURL ImageDialog::getImageURL(QWidget* parent, KIPI::Interface* interface) { KURL ImageDialog::getImageURL(TQWidget* tqparent, KIPI::Interface* interface) {
ImageDialog dlg(parent, interface, true); ImageDialog dlg(tqparent, interface, true);
if (dlg.exec() == QDialog::Accepted) { if (dlg.exec() == TQDialog::Accepted) {
return dlg.url(); return dlg.url();
} else { } else {
return KURL(); return KURL();
} }
} }
KURL::List ImageDialog::getImageURLs(QWidget* parent, Interface* interface) KURL::List ImageDialog::getImageURLs(TQWidget* tqparent, Interface* interface)
{ {
ImageDialog dlg(parent, interface, false); ImageDialog dlg(tqparent, interface, false);
if (dlg.exec() == QDialog::Accepted) if (dlg.exec() == TQDialog::Accepted)
return dlg.urls(); return dlg.urls();
else else
{ {
@ -220,7 +220,7 @@ KURL::List ImageDialog::getImageURLs(QWidget* parent, Interface* interface)
} }
void ImageDialog::fillImageList(QListViewItem* item) { void ImageDialog::fillImageList(TQListViewItem* item) {
d->_imageList->clear(); d->_imageList->clear();
if (!item) return; if (!item) return;
@ -234,7 +234,7 @@ void ImageDialog::fillImageList(QListViewItem* item) {
} }
void ImageDialog::slotImageSelected(QListViewItem* item) { void ImageDialog::slotImageSelected(TQListViewItem* item) {
if (!item) { if (!item) {
enableButtonOK(false); enableButtonOK(false);
d->_preview->setText(i18n("No image selected")); d->_preview->setText(i18n("No image selected"));
@ -246,8 +246,8 @@ void ImageDialog::slotImageSelected(QListViewItem* item) {
d->_preview->clear(); d->_preview->clear();
KIO::PreviewJob* thumbJob = KIO::filePreview(d->_url, PREVIEW_SIZE); KIO::PreviewJob* thumbJob = KIO::filePreview(d->_url, PREVIEW_SIZE);
connect( thumbJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), connect( thumbJob, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)),
SLOT(slotGotPreview(const KFileItem* , const QPixmap&))); TQT_SLOT(slotGotPreview(const KFileItem* , const TQPixmap&)));
} }
void ImageDialog::slotImagesSelected() void ImageDialog::slotImagesSelected()
@ -256,8 +256,8 @@ void ImageDialog::slotImagesSelected()
d->_urls.clear(); d->_urls.clear();
d->_preview->clear(); d->_preview->clear();
QListViewItem* selectedItem = 0; TQListViewItem* selectedItem = 0;
QListViewItem* listItem = d->_imageList->firstChild(); TQListViewItem* listItem = d->_imageList->firstChild();
while (listItem) while (listItem)
{ {
if (listItem->isSelected()) if (listItem->isSelected())
@ -284,8 +284,8 @@ void ImageDialog::slotImagesSelected()
d->_url = d->_urls.first(); d->_url = d->_urls.first();
KIO::PreviewJob* thumbJob = KIO::filePreview(d->_url, PREVIEW_SIZE); KIO::PreviewJob* thumbJob = KIO::filePreview(d->_url, PREVIEW_SIZE);
connect( thumbJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), connect( thumbJob, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)),
SLOT(slotGotPreview(const KFileItem* , const QPixmap&))); TQT_SLOT(slotGotPreview(const KFileItem* , const TQPixmap&)));
} }
else else
{ {
@ -294,7 +294,7 @@ void ImageDialog::slotImagesSelected()
} }
} }
void ImageDialog::slotGotPreview(const KFileItem*, const QPixmap& pix) { void ImageDialog::slotGotPreview(const KFileItem*, const TQPixmap& pix) {
d->_preview->setPixmap(pix); d->_preview->setPixmap(pix);
} }
@ -308,7 +308,7 @@ void ImageDialog::slotInitialShow()
{ {
ImageCollection current = d->_interface->currentAlbum(); ImageCollection current = d->_interface->currentAlbum();
QListViewItemIterator it( d->_albumList ); TQListViewItemIterator it( d->_albumList );
while ( it.current() ) while ( it.current() )
{ {
AlbumLVI* lvi = static_cast<AlbumLVI*>( it.current() ); AlbumLVI* lvi = static_cast<AlbumLVI*>( it.current() );

@ -23,10 +23,10 @@
#ifndef IMAGEDIALOG_H #ifndef IMAGEDIALOG_H
#define IMAGEDIALOG_H #define IMAGEDIALOG_H
// Qt includes. // TQt includes.
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <qwidget.h> #include <tqwidget.h>
// KDE includes. // KDE includes.
@ -39,7 +39,7 @@
#include "libkipi/imagecollection.h" #include "libkipi/imagecollection.h"
#include "libkipi/libkipi_export.h" #include "libkipi/libkipi_export.h"
class QListViewItem; class TQListViewItem;
class KFileItem; class KFileItem;
class KListView; class KListView;
@ -51,26 +51,27 @@ namespace KIPI
class LIBKIPI_EXPORT ImageDialog : public KDialogBase class LIBKIPI_EXPORT ImageDialog : public KDialogBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
class Private; class Private;
public: public:
ImageDialog(QWidget*, Interface*, bool singleSelection=false); ImageDialog(TQWidget*, Interface*, bool singleSelection=false);
~ImageDialog(); ~ImageDialog();
KURL url() const; KURL url() const;
KURL::List urls() const; KURL::List urls() const;
static KURL getImageURL(QWidget*, Interface*); static KURL getImageURL(TQWidget*, Interface*);
static KURL::List getImageURLs(QWidget*, Interface*); static KURL::List getImageURLs(TQWidget*, Interface*);
private slots: private slots:
void fillImageList(QListViewItem*); void fillImageList(TQListViewItem*);
void slotImageSelected(QListViewItem*); void slotImageSelected(TQListViewItem*);
void slotImagesSelected(); void slotImagesSelected();
void slotGotPreview(const KFileItem* , const QPixmap&); void slotGotPreview(const KFileItem* , const TQPixmap&);
void slotHelp( void ); void slotHelp( void );
void slotInitialShow(); void slotInitialShow();

@ -25,9 +25,9 @@
/** @file imageinfo.cpp /** @file imageinfo.cpp
*/ */
QString KIPI::ImageInfo::toString( const QVariant& data ) const TQString KIPI::ImageInfo::toString( const TQVariant& data ) const
{ {
QString string; TQString string;
KDStream stream( &string ); KDStream stream( &string );
stream << data stream << data
<< flush ; << flush ;
@ -37,7 +37,7 @@ QString KIPI::ImageInfo::toString( const QVariant& data ) const
/** /**
PENDING(blackie) document PENDING(blackie) document
*/ */
QString KIPI::ImageInfo::title() const TQString KIPI::ImageInfo::title() const
{ {
return _data->title(); return _data->title();
} }
@ -53,7 +53,7 @@ KURL KIPI::ImageInfo::path() const
/** /**
PENDING(blackie) document PENDING(blackie) document
*/ */
QString KIPI::ImageInfo::description() const TQString KIPI::ImageInfo::description() const
{ {
return _data->description(); return _data->description();
} }
@ -63,7 +63,7 @@ QString KIPI::ImageInfo::description() const
In case the host application supports time range, the spec argument In case the host application supports time range, the spec argument
specifies if it is the start or end time that should be returned. specifies if it is the start or end time that should be returned.
*/ */
QDateTime KIPI::ImageInfo::time( TimeSpec spec ) const TQDateTime KIPI::ImageInfo::time( TimeSpec spec ) const
{ {
return _data->time( spec ); return _data->time( spec );
} }
@ -72,11 +72,11 @@ QDateTime KIPI::ImageInfo::time( TimeSpec spec ) const
Returns a Map of attributes of the image Returns a Map of attributes of the image
In case the host application supports some special attributes of the image In case the host application supports some special attributes of the image
this function can be used to return them. this function can be used to return them.
Tags are supported by this feature: "tags" key contains QStringList() Tags are supported by this feature: "tags" key contains TQStringList()
encapsulated in a QVariant encapsulated in a TQVariant
*/ */
QMap<QString,QVariant> KIPI::ImageInfo::attributes() const TQMap<TQString,TQVariant> KIPI::ImageInfo::attributes() const
{ {
return _data->attributes(); return _data->attributes();
} }
@ -105,12 +105,12 @@ KIPI::ImageInfo::~ImageInfo()
_data->removeRef(); _data->removeRef();
} }
void KIPI::ImageInfo::setTitle( const QString& name ) void KIPI::ImageInfo::setTitle( const TQString& name )
{ {
_data->setTitle( name ); _data->setTitle( name );
} }
void KIPI::ImageInfo::setDescription( const QString& description ) void KIPI::ImageInfo::setDescription( const TQString& description )
{ {
_data->setDescription( description ); _data->setDescription( description );
} }
@ -120,7 +120,7 @@ void KIPI::ImageInfo::clearAttributes()
_data->clearAttributes(); _data->clearAttributes();
} }
void KIPI::ImageInfo::addAttributes( const QMap<QString,QVariant>& attributes ) void KIPI::ImageInfo::addAttributes( const TQMap<TQString,TQVariant>& attributes )
{ {
_data->addAttributes( attributes ); _data->addAttributes( attributes );
} }
@ -154,7 +154,7 @@ bool KIPI::ImageInfo::isTimeExact() const
return _data->isTimeExact(); return _data->isTimeExact();
} }
void KIPI::ImageInfo::setTime( const QDateTime& time, TimeSpec spec ) void KIPI::ImageInfo::setTime( const TQDateTime& time, TimeSpec spec )
{ {
_data->setTime( time, spec ); _data->setTime( time, spec );
} }

@ -24,10 +24,10 @@
#ifndef KIPI_IMAGEINFO_H #ifndef KIPI_IMAGEINFO_H
#define KIPI_IMAGEINFO_H #define KIPI_IMAGEINFO_H
#include <kurl.h> #include <kurl.h>
#include <qstring.h> #include <tqstring.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <qmap.h> #include <tqmap.h>
#include <qvariant.h> #include <tqvariant.h>
#include "libkipi/libkipi_export.h" #include "libkipi/libkipi_export.h"
namespace KIPI namespace KIPI
@ -41,26 +41,26 @@ namespace KIPI
class LIBKIPI_EXPORT ImageInfo class LIBKIPI_EXPORT ImageInfo
{ {
public: public:
QString title() const; TQString title() const;
void setTitle( const QString& name ); void setTitle( const TQString& name );
QString description() const; TQString description() const;
void setDescription( const QString& description); void setDescription( const TQString& description);
QMap<QString,QVariant> attributes() const; TQMap<TQString,TQVariant> attributes() const;
void clearAttributes(); void clearAttributes();
void addAttributes( const QMap<QString,QVariant>& ); void addAttributes( const TQMap<TQString,TQVariant>& );
KURL path() const; KURL path() const;
QDateTime time( TimeSpec spec = FromInfo ) const; TQDateTime time( TimeSpec spec = FromInfo ) const;
void setTime( const QDateTime& time, TimeSpec spec = FromInfo ); void setTime( const TQDateTime& time, TimeSpec spec = FromInfo );
bool isTimeExact() const; bool isTimeExact() const;
int size() const; int size() const;
int angle() const; int angle() const;
void setAngle( int ); void setAngle( int );
QString toString( const QVariant& ) const; TQString toString( const TQVariant& ) const;
void cloneData( const ImageInfo& other ); void cloneData( const ImageInfo& other );

@ -20,9 +20,9 @@
* *
* ============================================================ */ * ============================================================ */
// Qt includes. // TQt includes.
#include <qfileinfo.h> #include <tqfileinfo.h>
// KDE includes. // KDE includes.
@ -50,17 +50,17 @@ int KIPI::ImageInfoShared::size()
return 0; return 0;
} }
else else
return QFileInfo( _url.path() ).size(); return TQFileInfo( _url.path() ).size();
} }
QDateTime KIPI::ImageInfoShared::time( KIPI::TimeSpec ) TQDateTime KIPI::ImageInfoShared::time( KIPI::TimeSpec )
{ {
if ( ! _url.isLocalFile() ) { if ( ! _url.isLocalFile() ) {
kdFatal() << "KIPI::ImageInfoShared::time does not yet support non local files, please fix\n"; kdFatal() << "KIPI::ImageInfoShared::time does not yet support non local files, please fix\n";
return QDateTime(); return TQDateTime();
} }
else else
return QFileInfo( _url.path() ).lastModified(); return TQFileInfo( _url.path() ).lastModified();
} }
void KIPI::ImageInfoShared::addRef() void KIPI::ImageInfoShared::addRef()
@ -90,11 +90,11 @@ bool KIPI::ImageInfoShared::isTimeExact()
return true; return true;
} }
void KIPI::ImageInfoShared::setTime( const QDateTime& /*time*/, TimeSpec /*spec*/ ) void KIPI::ImageInfoShared::setTime( const TQDateTime& /*time*/, TimeSpec /*spec*/ )
{ {
} }
void KIPI::ImageInfoShared::setTitle( const QString& ) void KIPI::ImageInfoShared::setTitle( const TQString& )
{ {
kdWarning(51000) << "This method should only be invoked if the host application supports the KIPI::ImageTitlesWritable\n" kdWarning(51000) << "This method should only be invoked if the host application supports the KIPI::ImageTitlesWritable\n"
"If the host application do support that, then this function should\n" "If the host application do support that, then this function should\n"

@ -23,12 +23,12 @@
#ifndef KIPI_IMAGEINFOSHARED_H #ifndef KIPI_IMAGEINFOSHARED_H
#define KIPI_IMAGEINFOSHARED_H #define KIPI_IMAGEINFOSHARED_H
// Qt includes. // TQt includes.
#include <qstring.h> #include <tqstring.h>
#include <qmap.h> #include <tqmap.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <qvariant.h> #include <tqvariant.h>
// KDE includes. // KDE includes.
@ -48,19 +48,19 @@ namespace KIPI
public: public:
ImageInfoShared( KIPI::Interface* interface, const KURL& url ); ImageInfoShared( KIPI::Interface* interface, const KURL& url );
virtual ~ImageInfoShared() {} virtual ~ImageInfoShared() {}
virtual QString title() {return QString::null;} virtual TQString title() {return TQString();}
virtual void setTitle( const QString& ); virtual void setTitle( const TQString& );
virtual QString description() = 0; virtual TQString description() = 0;
virtual void setDescription( const QString& ) = 0; virtual void setDescription( const TQString& ) = 0;
virtual QMap<QString,QVariant> attributes() = 0; virtual TQMap<TQString,TQVariant> attributes() = 0;
virtual void clearAttributes() = 0; virtual void clearAttributes() = 0;
virtual void addAttributes( const QMap<QString,QVariant>& ) = 0; virtual void addAttributes( const TQMap<TQString,TQVariant>& ) = 0;
virtual KURL path(); virtual KURL path();
virtual QDateTime time( KIPI::TimeSpec spec ); virtual TQDateTime time( KIPI::TimeSpec spec );
virtual void setTime( const QDateTime& time, TimeSpec spec = FromInfo ); virtual void setTime( const TQDateTime& time, TimeSpec spec = FromInfo );
virtual bool isTimeExact(); virtual bool isTimeExact();
@ -69,7 +69,7 @@ namespace KIPI
virtual int angle(); virtual int angle();
virtual void setAngle( int ); virtual void setAngle( int );
QString toString( const QVariant& ); TQString toString( const TQVariant& );
virtual void cloneData( ImageInfoShared* other ); virtual void cloneData( ImageInfoShared* other );

@ -40,7 +40,7 @@
for albums. Thus before a plugin expect a decant value for the comment, for albums. Thus before a plugin expect a decant value for the comment,
it should check whether KIPI::AlbumsHaveComments are set. It does so it should check whether KIPI::AlbumsHaveComments are set. It does so
using KIPI::Interface::hasFeature() using KIPI::Interface::hasFeature()
When adding new items, remember to update "hasFeature( const QString& feature )" When adding new items, remember to update "hasFeature( const TQString& feature )"
and the hello world plugin. and the hello world plugin.
*/ */
@ -95,8 +95,8 @@
*/ */
KIPI::Interface::Interface(QObject *parent, const char *name ) KIPI::Interface::Interface(TQObject *tqparent, const char *name )
: QObject(parent, name) : TQObject(tqparent, name)
{ {
} }
@ -120,7 +120,7 @@ bool KIPI::Interface::hasFeature( KIPI::Features feature )
return ( features() & feature ) != 0; return ( features() & feature ) != 0;
} }
bool KIPI::Interface::hasFeature( const QString& feature ) bool KIPI::Interface::hasFeature( const TQString& feature )
{ {
if ( feature == "AlbumsHaveComments" ) if ( feature == "AlbumsHaveComments" )
return hasFeature( KIPI::AlbumsHaveComments ); return hasFeature( KIPI::AlbumsHaveComments );
@ -153,7 +153,7 @@ bool KIPI::Interface::hasFeature( const QString& feature )
Returns true if the host application did accept the new image, otherwise err will be filled with Returns true if the host application did accept the new image, otherwise err will be filled with
an error description. an error description.
*/ */
bool KIPI::Interface::addImage( const KURL&, QString& /*err*/ ) bool KIPI::Interface::addImage( const KURL&, TQString& /*err*/ )
{ {
kdWarning(51000) << "Interface::addImage should only be invoked if the host application supports the KIPI::Features\n" kdWarning(51000) << "Interface::addImage should only be invoked if the host application supports the KIPI::Features\n"
"AcceptNewImages - if the host application do support that, then this function should\n" "AcceptNewImages - if the host application do support that, then this function should\n"
@ -190,10 +190,10 @@ KIPI::ImageCollection KIPI::Interface::currentSelection()
/** /**
Returns a list of albums. Returns a list of albums.
*/ */
QValueList<KIPI::ImageCollection> KIPI::Interface::allAlbums() TQValueList<KIPI::ImageCollection> KIPI::Interface::allAlbums()
{ {
// This implementation is just to be able to write documentation above. // This implementation is just to be able to write documentation above.
return QValueList<KIPI::ImageCollection>(); return TQValueList<KIPI::ImageCollection>();
} }
@ -211,10 +211,10 @@ int KIPI::Interface::features() const
to sort the files list before a treatment. The default implementation return, to sort the files list before a treatment. The default implementation return,
the supported images formats by KDE. the supported images formats by KDE.
*/ */
QString KIPI::Interface::fileExtensions() TQString KIPI::Interface::fileExtensions()
{ {
QStringList KDEImagetypes = KImageIO::mimeTypes( KImageIO::Reading ); TQStringList KDEImagetypes = KImageIO::mimeTypes( KImageIO::Reading );
QString imagesFileFilter = KDEImagetypes.join(" "); TQString imagesFileFilter = KDEImagetypes.join(" ");
return ( imagesFileFilter.lower() + " " + imagesFileFilter.upper() ); return ( imagesFileFilter.lower() + " " + imagesFileFilter.upper() );
} }

@ -24,10 +24,10 @@
#ifndef KIPI_INTERFACE_H #ifndef KIPI_INTERFACE_H
#define KIPI_INTERFACE_H #define KIPI_INTERFACE_H
// Qt includes. // TQt includes.
#include <qstring.h> #include <tqstring.h>
#include <qobject.h> #include <tqobject.h>
// KDE includes. // KDE includes.
@ -56,25 +56,26 @@ namespace KIPI
}; };
/** class Interface */ /** class Interface */
class LIBKIPI_EXPORT Interface : public QObject class LIBKIPI_EXPORT Interface : public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
Interface(QObject *parent, const char *name=0); Interface(TQObject *tqparent, const char *name=0);
virtual ~Interface(); virtual ~Interface();
virtual ImageCollection currentAlbum() = 0; virtual ImageCollection currentAlbum() = 0;
virtual ImageCollection currentSelection() = 0; virtual ImageCollection currentSelection() = 0;
virtual QValueList<ImageCollection> allAlbums() = 0; virtual TQValueList<ImageCollection> allAlbums() = 0;
virtual ImageInfo info( const KURL& ) = 0; virtual ImageInfo info( const KURL& ) = 0;
virtual bool addImage( const KURL&, QString& err ); virtual bool addImage( const KURL&, TQString& err );
virtual void delImage( const KURL& ); virtual void delImage( const KURL& );
virtual void refreshImages( const KURL::List& ); virtual void refreshImages( const KURL::List& );
virtual QString fileExtensions(); virtual TQString fileExtensions();
bool hasFeature( KIPI::Features feature ); bool hasFeature( KIPI::Features feature );
@ -83,7 +84,7 @@ namespace KIPI
private: private:
friend class PluginLoader; friend class PluginLoader;
bool hasFeature( const QString& feature ); bool hasFeature( const TQString& feature );
signals: signals:
void selectionChanged( bool hasSelection ); void selectionChanged( bool hasSelection );

@ -48,7 +48,7 @@
application. application.
The origin of all your communication with the host application is The origin of all your communication with the host application is
\ref KIPI::Interface. You obtain a pointer to this by casting the parent \ref KIPI::Interface. You obtain a pointer to this by casting the tqparent
pointer given to your plugin during construction. pointer given to your plugin during construction.
Selection of images can be obtained using Selection of images can be obtained using

@ -20,9 +20,9 @@
* *
* ============================================================ */ * ============================================================ */
// Qt includes. // TQt includes.
#include <qwidget.h> #include <tqwidget.h>
// KDE includes. // KDE includes.
@ -36,15 +36,15 @@
struct KIPI::Plugin::Private { struct KIPI::Plugin::Private {
QMap<QWidget*, KActionCollection*> m_actionCollection; TQMap<TQWidget*, KActionCollection*> m_actionCollection;
KInstance* m_instance; KInstance* m_instance;
QMap<QWidget*, KActionPtrList> m_actions; TQMap<TQWidget*, KActionPtrList> m_actions;
QWidget* m_defaultWidget; TQWidget* m_defaultWidget;
}; };
KIPI::Plugin::Plugin( KInstance* instance, QObject *parent, const char* name) KIPI::Plugin::Plugin( KInstance* instance, TQObject *tqparent, const char* name)
: QObject( parent, name) : TQObject( tqparent, name)
{ {
d=new Private; d=new Private;
d->m_instance=instance; d->m_instance=instance;
@ -55,13 +55,13 @@ KIPI::Plugin::~Plugin()
delete d; delete d;
} }
KActionCollection* KIPI::Plugin::actionCollection( QWidget* widget ) KActionCollection* KIPI::Plugin::actionCollection( TQWidget* widget )
{ {
if ( widget == 0 ) if ( widget == 0 )
widget = d->m_defaultWidget; widget = d->m_defaultWidget;
if (!d->m_actionCollection.contains( widget )) if (!d->m_actionCollection.tqcontains( widget ))
kdWarning( 51000 ) << "Error in the plugin. The plugin needs to call Plugin::setup( QWidget* ) " kdWarning( 51000 ) << "Error in the plugin. The plugin needs to call Plugin::setup( TQWidget* ) "
<< "as the very first line when overriding the setup method." << endl; << "as the very first line when overriding the setup method." << endl;
return d->m_actionCollection[widget]; return d->m_actionCollection[widget];
} }
@ -71,7 +71,7 @@ void KIPI::Plugin::addAction( KAction* action )
d->m_actions[d->m_defaultWidget].append( action ); d->m_actions[d->m_defaultWidget].append( action );
} }
KActionPtrList KIPI::Plugin::actions( QWidget* widget ) KActionPtrList KIPI::Plugin::actions( TQWidget* widget )
{ {
if ( widget == 0 ) if ( widget == 0 )
widget = d->m_defaultWidget; widget = d->m_defaultWidget;
@ -79,12 +79,12 @@ KActionPtrList KIPI::Plugin::actions( QWidget* widget )
return d->m_actions[widget]; return d->m_actions[widget];
} }
void KIPI::Plugin::setup( QWidget* widget ) void KIPI::Plugin::setup( TQWidget* widget )
{ {
d->m_defaultWidget = widget; d->m_defaultWidget = widget;
d->m_actions.insert( widget, KActionPtrList() ); d->m_actions.insert( widget, KActionPtrList() );
QString name = QString( "action collection for %1" ).arg( widget->name() ); TQString name = TQString( "action collection for %1" ).tqarg( widget->name() );
d->m_actionCollection.insert( widget, new KActionCollection( widget, widget, name.latin1(), d->m_instance ) ); d->m_actionCollection.insert( widget, new KActionCollection( widget, TQT_TQOBJECT(widget), name.latin1(), d->m_instance ) );
} }

@ -23,9 +23,9 @@
#ifndef KIPI_PLUGIN_H #ifndef KIPI_PLUGIN_H
#define KIPI_PLUGIN_H #define KIPI_PLUGIN_H
// Qt includes. // TQt includes.
#include <qobject.h> #include <tqobject.h>
// KDE includes. // KDE includes.
@ -53,15 +53,15 @@ namespace KIPI
COLLECTIONSPLUGIN COLLECTIONSPLUGIN
}; };
class LIBKIPI_EXPORT Plugin : public QObject class LIBKIPI_EXPORT Plugin : public TQObject
{ {
public: public:
Plugin( KInstance* instance, QObject *parent, const char* name); Plugin( KInstance* instance, TQObject *tqparent, const char* name);
virtual ~Plugin(); virtual ~Plugin();
virtual void setup( QWidget* widget ) = 0; virtual void setup( TQWidget* widget ) = 0;
KActionPtrList actions( QWidget* parent = 0 ); KActionPtrList actions( TQWidget* tqparent = 0 );
KActionCollection* actionCollection( QWidget* parent = 0 ); KActionCollection* actionCollection( TQWidget* tqparent = 0 );
virtual Category category( KAction* action ) const = 0; virtual Category category( KAction* action ) const = 0;
protected: protected:

@ -21,7 +21,7 @@
/** @file pluginloader.cpp */ /** @file pluginloader.cpp */
#include <qstringlist.h> #include <tqstringlist.h>
#include <ktrader.h> #include <ktrader.h>
#include <kparts/componentfactory.h> #include <kparts/componentfactory.h>
@ -32,8 +32,8 @@
#include "pluginloader.h" #include "pluginloader.h"
#include "interface.h" #include "interface.h"
#include <kconfig.h> #include <kconfig.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlayout.h> #include <tqlayout.h>
/** /**
\author Renchi Raju \author Renchi Raju
@ -55,13 +55,13 @@
Then plugin plugins into menus could be done with code similiar to this from KimDaBa: Then plugin plugins into menus could be done with code similiar to this from KimDaBa:
\code \code
void slotReplug() { void slotReplug() {
unplugActionList( QString::fromLatin1("file_actions") ); unplugActionList( TQString::tqfromLatin1("file_actions") );
unplugActionList( QString::fromLatin1("image_actions") ); unplugActionList( TQString::tqfromLatin1("image_actions") );
unplugActionList( QString::fromLatin1("tool_actions") ); unplugActionList( TQString::tqfromLatin1("tool_actions") );
QPtrList<KAction> fileActions; TQPtrList<KAction> fileActions;
QPtrList<KAction> imageActions; TQPtrList<KAction> imageActions;
QPtrList<KAction> toolsActions; TQPtrList<KAction> toolsActions;
KIPI::PluginLoader::PluginList list = _pluginLoader->pluginList(); KIPI::PluginLoader::PluginList list = _pluginLoader->pluginList();
for( KIPI::PluginLoader::PluginList::Iterator it = list.begin(); it != list.end(); ++it ) { for( KIPI::PluginLoader::PluginList::Iterator it = list.begin(); it != list.end(); ++it ) {
@ -70,7 +70,7 @@
continue; continue;
plugin->setup( this ); plugin->setup( this );
QPtrList<KAction>* popup = 0; TQPtrList<KAction>* popup = 0;
if ( plugin->category() == KIPI::IMAGESPLUGIN ) if ( plugin->category() == KIPI::IMAGESPLUGIN )
popup = &imageActions; popup = &imageActions;
@ -94,9 +94,9 @@
} }
// For this to work I need to pass false as second arg for createGUI // For this to work I need to pass false as second arg for createGUI
plugActionList( QString::fromLatin1("file_actions"), fileActions ); plugActionList( TQString::tqfromLatin1("file_actions"), fileActions );
plugActionList( QString::fromLatin1("image_actions"), imageActions ); plugActionList( TQString::tqfromLatin1("image_actions"), imageActions );
plugActionList( QString::fromLatin1("tool_actions"), toolsActions ); plugActionList( TQString::tqfromLatin1("tool_actions"), toolsActions );
} }
\endcode \endcode
@ -112,15 +112,15 @@ namespace KIPI {
// //
//--------------------------------------------------------------------- //---------------------------------------------------------------------
struct PluginLoader::Info::Private { struct PluginLoader::Info::Private {
QString m_name; TQString m_name;
QString m_comment; TQString m_comment;
QString m_library; TQString m_library;
Plugin* m_plugin; Plugin* m_plugin;
bool m_shouldLoad; bool m_shouldLoad;
}; };
PluginLoader::Info::Info(const QString& name, const QString& comment, const QString& library, bool shouldLoad) PluginLoader::Info::Info(const TQString& name, const TQString& comment, const TQString& library, bool shouldLoad)
{ {
d=new Private; d=new Private;
d->m_name=name; d->m_name=name;
@ -137,19 +137,19 @@ PluginLoader::Info::~Info()
} }
QString PluginLoader::Info::name() const TQString PluginLoader::Info::name() const
{ {
return d->m_name; return d->m_name;
} }
QString PluginLoader::Info::comment() const TQString PluginLoader::Info::comment() const
{ {
return d->m_comment; return d->m_comment;
} }
QString PluginLoader::Info::library() const TQString PluginLoader::Info::library() const
{ {
return d->m_library; return d->m_library;
} }
@ -191,11 +191,11 @@ struct PluginLoader::Private
{ {
PluginList m_pluginList; PluginList m_pluginList;
Interface* m_interface; Interface* m_interface;
QStringList m_ignores; TQStringList m_ignores;
}; };
PluginLoader::PluginLoader( const QStringList& ignores, Interface* interface ) PluginLoader::PluginLoader( const TQStringList& ignores, Interface* interface )
{ {
Q_ASSERT( s_instance == 0 ); Q_ASSERT( s_instance == 0 );
s_instance = this; s_instance = this;
@ -206,29 +206,29 @@ PluginLoader::PluginLoader( const QStringList& ignores, Interface* interface )
KTrader::OfferList offers = KTrader::self()->query("KIPI/Plugin"); KTrader::OfferList offers = KTrader::self()->query("KIPI/Plugin");
KConfig* config = KGlobal::config(); KConfig* config = KGlobal::config();
config->setGroup( QString::fromLatin1( "KIPI/EnabledPlugin" ) ); config->setGroup( TQString::tqfromLatin1( "KIPI/EnabledPlugin" ) );
KTrader::OfferList::ConstIterator iter; KTrader::OfferList::ConstIterator iter;
for(iter = offers.begin(); iter != offers.end(); ++iter) { for(iter = offers.begin(); iter != offers.end(); ++iter) {
KService::Ptr service = *iter; KService::Ptr service = *iter;
QString name = service->name(); TQString name = service->name();
QString comment = service->comment(); TQString comment = service->comment();
QString library = service->library(); TQString library = service->library();
QStringList reqFeatures = service->property( QString::fromLatin1( "X-KIPI-ReqFeatures" ) ).toStringList(); TQStringList reqFeatures = service->property( TQString::tqfromLatin1( "X-KIPI-ReqFeatures" ) ).toStringList();
if (library.isEmpty() || name.isEmpty() ) { if (library.isEmpty() || name.isEmpty() ) {
kdWarning( 51001 ) << "KIPI::PluginLoader: Plugin had an empty name or library file - this should not happen." << endl; kdWarning( 51001 ) << "KIPI::PluginLoader: Plugin had an empty name or library file - this should not happen." << endl;
continue; continue;
} }
if ( d->m_ignores.contains( name ) ) { if ( d->m_ignores.tqcontains( name ) ) {
kdDebug( 51001 ) << "KIPI::PluginLoader: plugin " << name << " is in the ignore list for host application" << endl; kdDebug( 51001 ) << "KIPI::PluginLoader: plugin " << name << " is in the ignore list for host application" << endl;
continue; continue;
} }
bool appHasAllReqFeatures=true; bool appHasAllReqFeatures=true;
for( QStringList::Iterator featureIt = reqFeatures.begin(); featureIt != reqFeatures.end(); ++featureIt ) { for( TQStringList::Iterator featureIt = reqFeatures.begin(); featureIt != reqFeatures.end(); ++featureIt ) {
if ( !d->m_interface->hasFeature( *featureIt ) ) { if ( !d->m_interface->hasFeature( *featureIt ) ) {
kdDebug( 51001 ) << "Plugin " << name << " was not loaded because the host application is missing\n" kdDebug( 51001 ) << "Plugin " << name << " was not loaded because the host application is missing\n"
<< "the feature " << *featureIt << endl; << "the feature " << *featureIt << endl;
@ -267,7 +267,7 @@ void PluginLoader::loadPlugin( Info* info )
int error; int error;
plugin = KParts::ComponentFactory plugin = KParts::ComponentFactory
::createInstanceFromLibrary<Plugin>(info->library().local8Bit().data(), ::createInstanceFromLibrary<Plugin>(info->library().local8Bit().data(),
d->m_interface, 0, QStringList(), &error); d->m_interface, 0, TQStringList(), &error);
if (plugin) if (plugin)
kdDebug( 51001 ) << "KIPI::PluginLoader: Loaded plugin " << plugin->name()<< endl; kdDebug( 51001 ) << "KIPI::PluginLoader: Loaded plugin " << plugin->name()<< endl;
@ -306,17 +306,17 @@ PluginLoader* PluginLoader::instance()
// ConfigWidget // ConfigWidget
// //
//--------------------------------------------------------------------- //---------------------------------------------------------------------
ConfigWidget* PluginLoader::configWidget( QWidget* parent ) ConfigWidget* PluginLoader::configWidget( TQWidget* tqparent )
{ {
return new ConfigWidget( parent ); return new ConfigWidget( tqparent );
} }
class PluginCheckBox :public QCheckBox class PluginCheckBox :public TQCheckBox
{ {
public: public:
PluginCheckBox( PluginLoader::Info* info, QWidget* parent ) PluginCheckBox( PluginLoader::Info* info, TQWidget* tqparent )
: QCheckBox( info->comment(), parent ), info( info ) : TQCheckBox( info->comment(), tqparent ), info( info )
{ {
setChecked( info->shouldLoad() ); setChecked( info->shouldLoad() );
} }
@ -326,19 +326,19 @@ public:
struct ConfigWidget::Private struct ConfigWidget::Private
{ {
QValueList< PluginCheckBox* > _boxes; TQValueList< PluginCheckBox* > _boxes;
}; };
ConfigWidget::ConfigWidget( QWidget* parent ) ConfigWidget::ConfigWidget( TQWidget* tqparent )
:QScrollView( parent, "KIPI::PluginLoader::ConfigWidget" ) :TQScrollView( tqparent, "KIPI::PluginLoader::ConfigWidget" )
{ {
d=new Private; d=new Private;
QWidget* top = new QWidget( viewport() ); TQWidget* top = new TQWidget( viewport() );
addChild( top ); addChild( top );
setResizePolicy( AutoOneFit ); setResizePolicy( AutoOneFit );
QVBoxLayout* lay = new QVBoxLayout( top, KDialog::marginHint(), KDialog::spacingHint() ); TQVBoxLayout* lay = new TQVBoxLayout( top, KDialog::marginHint(), KDialog::spacingHint() );
PluginLoader::PluginList list = PluginLoader::instance()->d->m_pluginList; PluginLoader::PluginList list = PluginLoader::instance()->d->m_pluginList;
for( PluginLoader::PluginList::Iterator it = list.begin(); it != list.end(); ++it ) { for( PluginLoader::PluginList::Iterator it = list.begin(); it != list.end(); ++it ) {
@ -360,10 +360,10 @@ ConfigWidget::~ConfigWidget()
void ConfigWidget::apply() void ConfigWidget::apply()
{ {
KConfig* config = KGlobal::config(); KConfig* config = KGlobal::config();
config->setGroup( QString::fromLatin1( "KIPI/EnabledPlugin" ) ); config->setGroup( TQString::tqfromLatin1( "KIPI/EnabledPlugin" ) );
bool changes = false; bool changes = false;
for( QValueList<PluginCheckBox*>::Iterator it = d->_boxes.begin(); it != d->_boxes.end(); ++it ) { for( TQValueList<PluginCheckBox*>::Iterator it = d->_boxes.begin(); it != d->_boxes.end(); ++it ) {
bool orig = (*it)->info->shouldLoad(); bool orig = (*it)->info->shouldLoad();
bool load = (*it)->isChecked(); bool load = (*it)->isChecked();
if ( orig != load ) { if ( orig != load ) {

@ -24,8 +24,8 @@
#include "libkipi/interface.h" #include "libkipi/interface.h"
#include "libkipi/libkipi_export.h" #include "libkipi/libkipi_export.h"
#include <qwidget.h> #include <tqwidget.h>
#include <qscrollview.h> #include <tqscrollview.h>
namespace KIPI namespace KIPI
@ -34,20 +34,21 @@ namespace KIPI
class Interface; class Interface;
class ConfigWidget; class ConfigWidget;
class LIBKIPI_EXPORT PluginLoader :public QObject class LIBKIPI_EXPORT PluginLoader :public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
class LIBKIPI_EXPORT Info class LIBKIPI_EXPORT Info
{ {
public: public:
Info( const QString& name, const QString& comment, const QString& library, bool shouldLoad ); Info( const TQString& name, const TQString& comment, const TQString& library, bool shouldLoad );
~Info(); ~Info();
QString name() const; TQString name() const;
QString comment() const; TQString comment() const;
QString library() const; TQString library() const;
Plugin* plugin() const; Plugin* plugin() const;
void setPlugin(Plugin*); void setPlugin(Plugin*);
@ -60,13 +61,13 @@ namespace KIPI
Private* d; Private* d;
}; };
PluginLoader( const QStringList& ignores, Interface* interface ); PluginLoader( const TQStringList& ignores, Interface* interface );
virtual ~PluginLoader(); virtual ~PluginLoader();
void loadPlugins(); void loadPlugins();
static PluginLoader* instance(); static PluginLoader* instance();
ConfigWidget* configWidget( QWidget* parent ); ConfigWidget* configWidget( TQWidget* tqparent );
typedef QValueList<Info*> PluginList; typedef TQValueList<Info*> PluginList;
const PluginList& pluginList(); const PluginList& pluginList();
@ -85,11 +86,12 @@ namespace KIPI
Private* d; Private* d;
}; };
class LIBKIPI_EXPORT ConfigWidget :public QScrollView class LIBKIPI_EXPORT ConfigWidget :public TQScrollView
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
ConfigWidget( QWidget* parent ); ConfigWidget( TQWidget* tqparent );
~ConfigWidget(); ~ConfigWidget();
public slots: public slots:
void apply(); void apply();

@ -20,12 +20,12 @@
* *
* ============================================================ */ * ============================================================ */
// Qt includes. // TQt includes.
#include <qlayout.h> #include <tqlayout.h>
#include <qheader.h> #include <tqheader.h>
#include <qlistview.h> #include <tqlistview.h>
#include <qdir.h> #include <tqdir.h>
// KDE includes // KDE includes
@ -52,7 +52,7 @@ struct KIPI::UploadWidget::Private
{ {
KFileTreeView* m_treeView; KFileTreeView* m_treeView;
KFileTreeBranch* m_branch; KFileTreeBranch* m_branch;
QStringList m_pendingPath; TQStringList m_pendingPath;
}; };
@ -61,15 +61,15 @@ struct KIPI::UploadWidget::Private
This widget is used to specify an upload directory for new images. This widget is used to specify an upload directory for new images.
*/ */
KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, QWidget* parent, const char* name ) KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, TQWidget* tqparent, const char* name )
: QWidget( parent, name ) : TQWidget( tqparent, name )
{ {
d = new Private; d = new Private;
QVBoxLayout* layout = new QVBoxLayout( this, 0 ); TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 0 );
d->m_treeView = new KFileTreeView( this ); d->m_treeView = new KFileTreeView( this );
d->m_treeView->setRootIsDecorated( true ); d->m_treeView->setRootIsDecorated( true );
layout->addWidget( d->m_treeView ); tqlayout->addWidget( d->m_treeView );
// Fetch the current album, so we can start out there. // Fetch the current album, so we can start out there.
KIPI::ImageCollection album = interface->currentAlbum(); KIPI::ImageCollection album = interface->currentAlbum();
@ -78,7 +78,7 @@ KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, QWidget* parent, c
if ( !album.isValid() || !album.isDirectory() ) if ( !album.isValid() || !album.isDirectory() )
album = interface->allAlbums().first(); album = interface->allAlbums().first();
d->m_branch = d->m_treeView->addBranch( QDir::cleanDirPath(album.uploadRoot().path()), d->m_branch = d->m_treeView->addBranch( TQDir::cleanDirPath(album.uploadRoot().path()),
album.uploadRootName() ); album.uploadRootName() );
d->m_treeView->setDirOnlyMode( d->m_branch, true ); d->m_treeView->setDirOnlyMode( d->m_branch, true );
@ -87,11 +87,11 @@ KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, QWidget* parent, c
d->m_treeView->header()->setStretchEnabled( true, 0 ); d->m_treeView->header()->setStretchEnabled( true, 0 );
d->m_treeView->header()->hide(); d->m_treeView->header()->hide();
QString root = album.uploadRoot().path(); TQString root = album.uploadRoot().path();
QString uploadPath = album.isDirectory() ? album.uploadPath().path() : root; TQString uploadPath = album.isDirectory() ? album.uploadPath().path() : root;
root = QDir::cleanDirPath(root); root = TQDir::cleanDirPath(root);
uploadPath = QDir::cleanDirPath(uploadPath); uploadPath = TQDir::cleanDirPath(uploadPath);
if ( !uploadPath.startsWith( root ) ) if ( !uploadPath.startsWith( root ) )
{ {
@ -103,16 +103,16 @@ KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, QWidget* parent, c
{ {
uploadPath = uploadPath.mid( root.length() ); uploadPath = uploadPath.mid( root.length() );
d->m_pendingPath = QStringList::split( "/", uploadPath, false ); d->m_pendingPath = TQStringList::split( "/", uploadPath, false );
connect( d->m_branch, SIGNAL( populateFinished(KFileTreeViewItem *) ), connect( d->m_branch, TQT_SIGNAL( populateFinished(KFileTreeViewItem *) ),
this, SLOT( slotPopulateFinished(KFileTreeViewItem *) ) ); this, TQT_SLOT( slotPopulateFinished(KFileTreeViewItem *) ) );
d->m_branch->setOpen(true); d->m_branch->setOpen(true);
} }
connect( d->m_treeView, SIGNAL( executed(QListViewItem *) ), connect( d->m_treeView, TQT_SIGNAL( executed(TQListViewItem *) ),
this, SLOT( slotFolderSelected(QListViewItem *) ) ); this, TQT_SLOT( slotFolderSelected(TQListViewItem *) ) );
} }
KIPI::UploadWidget::~UploadWidget() KIPI::UploadWidget::~UploadWidget()
@ -130,21 +130,21 @@ void KIPI::UploadWidget::load( )
kdWarning() << "KIPI::UploadWidget::load(): This method is obsolete\n"; kdWarning() << "KIPI::UploadWidget::load(): This method is obsolete\n";
} }
void KIPI::UploadWidget::slotPopulateFinished( KFileTreeViewItem * parentItem ) void KIPI::UploadWidget::slotPopulateFinished( KFileTreeViewItem * tqparentItem )
{ {
if ( d->m_pendingPath.isEmpty() ) if ( d->m_pendingPath.isEmpty() )
{ {
disconnect( d->m_branch, SIGNAL( populateFinished(KFileTreeViewItem *) ), disconnect( d->m_branch, TQT_SIGNAL( populateFinished(KFileTreeViewItem *) ),
this, SLOT( slotPopulateFinished(KFileTreeViewItem *) ) ); this, TQT_SLOT( slotPopulateFinished(KFileTreeViewItem *) ) );
return; return;
} }
QString itemName = d->m_pendingPath.front(); TQString itemName = d->m_pendingPath.front();
d->m_pendingPath.pop_front(); d->m_pendingPath.pop_front();
QListViewItem * item; TQListViewItem * item;
for ( item = parentItem->firstChild(); item; item = item->nextSibling() ) for ( item = tqparentItem->firstChild(); item; item = item->nextSibling() )
{ {
if ( item->text(0) == itemName ) if ( item->text(0) == itemName )
{ {
@ -178,9 +178,9 @@ void KIPI::UploadWidget::mkdir()
} }
bool ok; bool ok;
QString dir = KInputDialog::getText( i18n("Create Directory"), TQString dir = KInputDialog::getText( i18n("Create Directory"),
i18n("<qt>Enter new directory name (to be created as subdir of %1):</qt>") i18n("<qt>Enter new directory name (to be created as subdir of %1):</qt>")
.arg(path().prettyURL()), "", &ok, this); .tqarg(path().prettyURL()), "", &ok, this);
if (!ok) return; if (!ok) return;
@ -189,8 +189,8 @@ void KIPI::UploadWidget::mkdir()
KIO::SimpleJob* job = KIO::mkdir(url); KIO::SimpleJob* job = KIO::mkdir(url);
connect(job, SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(KIO::Job*)),
this, SLOT(slotAlbumCreated(KIO::Job*))); this, TQT_SLOT(slotAlbumCreated(KIO::Job*)));
} }
void KIPI::UploadWidget::slotAlbumCreated(KIO::Job* job) void KIPI::UploadWidget::slotAlbumCreated(KIO::Job* job)
@ -201,7 +201,7 @@ void KIPI::UploadWidget::slotAlbumCreated(KIO::Job* job)
job->showErrorDialog( this ); job->showErrorDialog( this );
} }
void KIPI::UploadWidget::slotFolderSelected(QListViewItem *) void KIPI::UploadWidget::slotFolderSelected(TQListViewItem *)
{ {
emit folderItemSelected(d->m_treeView->currentURL()); emit folderItemSelected(d->m_treeView->currentURL());
} }

@ -24,9 +24,9 @@
#ifndef KIPI_UPLOADWIDGET_H #ifndef KIPI_UPLOADWIDGET_H
#define KIPI_UPLOADWIDGET_H #define KIPI_UPLOADWIDGET_H
// Qt includes. // TQt includes.
#include <qwidget.h> #include <tqwidget.h>
// KDE includes. // KDE includes.
@ -38,16 +38,17 @@
#include "libkipi/interface.h" #include "libkipi/interface.h"
#include "libkipi/libkipi_export.h" #include "libkipi/libkipi_export.h"
class QListViewItem; class TQListViewItem;
namespace KIPI namespace KIPI
{ {
class LIBKIPI_EXPORT UploadWidget :public QWidget class LIBKIPI_EXPORT UploadWidget :public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
UploadWidget( KIPI::Interface* interface, QWidget* parent, const char* name = 0 ); UploadWidget( KIPI::Interface* interface, TQWidget* tqparent, const char* name = 0 );
~UploadWidget(); ~UploadWidget();
KURL path() const; KURL path() const;
@ -60,7 +61,7 @@ namespace KIPI
protected slots: protected slots:
void load(); void load();
void slotAlbumCreated(KIO::Job* job); void slotAlbumCreated(KIO::Job* job);
void slotFolderSelected(QListViewItem *); void slotFolderSelected(TQListViewItem *);
private slots: private slots:
void slotPopulateFinished(KFileTreeViewItem *); void slotPopulateFinished(KFileTreeViewItem *);

Loading…
Cancel
Save