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++ -*-
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 $
*/
/****************************************************************************
** 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.
**
@ -29,53 +29,44 @@
#define KIPI_KDSTREAM
// Forward declarations.
class QImage;
class QPixmap;
class QColor;
class QColorGroup;
class QPalette;
class QCursor;
class QDate;
class QDateTime;
class QTime;
class QFont;
class QPen;
class QPoint;
class QSize;
class QRect;
class QObject;
class QVariant;
class QBrush;
class QSizePolicy;
class QKeySequence;
#include <qstring.h>
#include <qvaluelist.h>
#include <qstrlist.h>
#include <qasciidict.h>
#include <qintdict.h>
#include <qptrdict.h>
#include <qdict.h>
#include <qvaluestack.h>
#include <qasciicache.h>
#include <qintcache.h>
#include <qcache.h>
#if ( QT_VERSION < 300 )
#include <qlist.h>
#include <qstack.h>
#include <qqueue.h>
#include <qvector.h>
#endif
#if ( QT_VERSION >= 300 )
#include <qptrlist.h>
#include <qptrstack.h>
#include <qptrqueue.h>
#include <qpair.h>
#include <qptrvector.h>
#include <qvaluevector.h>
#endif
class TQImage;
class TQPixmap;
class TQColor;
class TQColorGroup;
class TQPalette;
class TQCursor;
class TQDate;
class TQDateTime;
class TQTime;
class TQFont;
class TQPen;
class TQPoint;
class TQSize;
class TQRect;
class TQObject;
class TQVariant;
class TQBrush;
class TQSizePolicy;
class TQKeySequence;
#include <tqstring.h>
#include <tqvaluelist.h>
#include <tqstrlist.h>
#include <tqasciidict.h>
#include <tqintdict.h>
#include <tqptrdict.h>
#include <tqdict.h>
#include <tqvaluestack.h>
#include <tqasciicache.h>
#include <tqintcache.h>
#include <tqcache.h>
#include <tqptrlist.h>
#include <tqptrstack.h>
#include <tqptrqueue.h>
#include <tqpair.h>
#include <tqptrvector.h>
#include <tqvaluevector.h>
// utility functions.
class KDStream;
@ -86,7 +77,7 @@ KDStream& flush( KDStream& stream);
class KDStream
{
public:
KDStream( QString* outputString = 0);
KDStream( TQString* outputString = 0);
~KDStream();
void flush();
@ -105,42 +96,42 @@ public:
KDStream& operator<<( const void* );
// Data holding classes.
KDStream& operator<<( const QString& );
KDStream& operator<<( const QCString& );
KDStream& operator<<( const QChar& );
KDStream& operator<<( const QColor& );
KDStream& operator<<( const QColorGroup& );
KDStream& operator<<( const QPalette& );
KDStream& operator<<( const QCursor& );
KDStream& operator<<( const QDate& );
KDStream& operator<<( const QDateTime& );
KDStream& operator<<( const QTime& );
KDStream& operator<<( const QFont& );
KDStream& operator<<( const QPen& );
KDStream& operator<<( const QPoint& );
KDStream& operator<<( const QSize& );
KDStream& operator<<( const QRect& );
KDStream& operator<<( const QBrush& );
KDStream& operator<<( const QSizePolicy& );
KDStream& operator<<( const QKeySequence& );
KDStream& operator<<( const QPixmap& );
KDStream& operator<<( const QImage& );
KDStream& operator<<( const TQString& );
KDStream& operator<<( const TQCString& );
KDStream& operator<<( const TQChar& );
KDStream& operator<<( const TQColor& );
KDStream& operator<<( const TQColorGroup& );
KDStream& operator<<( const TQPalette& );
KDStream& operator<<( const TQCursor& );
KDStream& operator<<( const TQDate& );
KDStream& operator<<( const TQDateTime& );
KDStream& operator<<( const TQTime& );
KDStream& operator<<( const TQFont& );
KDStream& operator<<( const TQPen& );
KDStream& operator<<( const TQPoint& );
KDStream& operator<<( const TQSize& );
KDStream& operator<<( const TQRect& );
KDStream& operator<<( const TQBrush& );
KDStream& operator<<( const TQSizePolicy& );
KDStream& operator<<( const TQKeySequence& );
KDStream& operator<<( const TQPixmap& );
KDStream& operator<<( const TQImage& );
// misc
KDStream& operator<<( KDSTREAMFUNC );
KDStream& operator<<( const QVariant& );
KDStream& operator<<( const QObject& );
KDStream& operator<<( const QStrList& list );
KDStream& operator<<( const TQVariant& );
KDStream& operator<<( const TQObject& );
KDStream& operator<<( const TQStrList& list );
protected:
QString QColor2Str( const QColor& col );
TQString TQColor2Str( const TQColor& col );
private:
QString _output;
QString* _out;
TQString _output;
TQString* _out;
};
@ -175,7 +166,7 @@ template<class Iterator> void KDStream_ptrListStream( KDStream& st, Iterator it,
if ( doubleDeref )
st << *(*it);
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 *
st << *it;
}
@ -202,82 +193,52 @@ template<class Iterator> void KDStream_ptrDictStream( KDStream& st, Iterator it
// Defined as global functions to support
// 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() );
return st;
}
#if ( QT_VERSION < 300 )
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 )
template<class T> KDStream& operator<<( KDStream& st, const TQMemArray<T>& array )
{
KDStream_valueListStream( st, array.begin(), array.end() );
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;
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 );
KDStream_ptrListStream ( st, TQPtrListIterator<T>( list ), true );
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 << ")";
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 );
KDStream_ptrListStream( st, QPtrListIterator<T>( list ), true );
KDStream_ptrListStream( st, TQPtrListIterator<T>( list ), true );
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() );
return st;
}
#endif
#if ( QT_VERSION < 300 )
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 )
template<class T> KDStream& operator<<( KDStream& st, const TQPtrStack<T>& stack )
{
// I need a copy to look at the individual elements.
QPtrStack<T> copy(stack);
TQPtrStack<T> copy(stack);
/*}*/
#endif
st << "[";
if ( stack.count() > 1 )
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,
// before streaming it:
// Q(Ptr)Stack: *this << *(copy.pop());
// QValueStack: *this << copy.pop() ;
template<class T> KDStream& operator<<( KDStream& st, const QValueStack<T>& stack )
// TQValueStack: *this << copy.pop() ;
template<class T> KDStream& operator<<( KDStream& st, const TQValueStack<T>& stack )
{
// I need a copy to look at the individual elements.
QValueStack<T> copy(stack);
TQValueStack<T> copy(stack);
st << "[";
if ( stack.count() > 1 )
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}

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

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

@ -32,29 +32,29 @@
/**
@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().
*/
QString KIPI::ImageCollection::comment() const
TQString KIPI::ImageCollection::comment() const
{
if ( _data )
return _data->comment();
else {
printNullError();
return QString::null;
return TQString();
}
}
/**
PENDING(blackie) document
*/
QString KIPI::ImageCollection::name() const
TQString KIPI::ImageCollection::name() const
{
if ( _data )
return _data->name();
else {
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,
a category is a sorting class like 'travels', 'friends', 'monuments', etc.
*/
QString KIPI::ImageCollection::category() const
TQString KIPI::ImageCollection::category() const
{
if ( _data )
return _data->category();
else {
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 a null date.
*/
QDate KIPI::ImageCollection::date() const
TQDate KIPI::ImageCollection::date() const
{
if ( _data )
return _data->date();
else {
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
app (like "Images" for Kimdaba or "My Albums" for Digikam).
*/
QString KIPI::ImageCollection::uploadRootName() const
TQString KIPI::ImageCollection::uploadRootName() const
{
if ( _data )
return _data->uploadRootName();
else {
printNullError();
return QString::null;
return TQString();
}
}

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

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

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

@ -76,7 +76,7 @@ KURL KIPI::ImageCollectionShared::uploadRoot()
return KURL( "file:/" );
}
QString KIPI::ImageCollectionShared::uploadRootName()
TQString KIPI::ImageCollectionShared::uploadRootName()
{
return (i18n("Images"));
}
@ -86,28 +86,28 @@ bool KIPI::ImageCollectionShared::isDirectory()
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"
"the KIPI::Features AlbumsHaveComments - if the host application do support that, then this function should\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"
"the KIPI::Features AlbumsHaveCategory - if the host application do support that, then this function should\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"
"the KIPI::Features AlbumsHaveCreationDate - if the host application do support that, then this function should\n"
"have been overriden in the host application.\n";
return QDate();
return TQDate();
}

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

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

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

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

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

@ -20,9 +20,9 @@
*
* ============================================================ */
// Qt includes.
// TQt includes.
#include <qfileinfo.h>
#include <tqfileinfo.h>
// KDE includes.
@ -50,17 +50,17 @@ int KIPI::ImageInfoShared::size()
return 0;
}
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() ) {
kdFatal() << "KIPI::ImageInfoShared::time does not yet support non local files, please fix\n";
return QDateTime();
return TQDateTime();
}
else
return QFileInfo( _url.path() ).lastModified();
return TQFileInfo( _url.path() ).lastModified();
}
void KIPI::ImageInfoShared::addRef()
@ -90,11 +90,11 @@ bool KIPI::ImageInfoShared::isTimeExact()
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"
"If the host application do support that, then this function should\n"

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

@ -40,7 +40,7 @@
for albums. Thus before a plugin expect a decant value for the comment,
it should check whether KIPI::AlbumsHaveComments are set. It does so
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.
*/
@ -95,8 +95,8 @@
*/
KIPI::Interface::Interface(QObject *parent, const char *name )
: QObject(parent, name)
KIPI::Interface::Interface(TQObject *tqparent, const char *name )
: TQObject(tqparent, name)
{
}
@ -120,7 +120,7 @@ bool KIPI::Interface::hasFeature( KIPI::Features feature )
return ( features() & feature ) != 0;
}
bool KIPI::Interface::hasFeature( const QString& feature )
bool KIPI::Interface::hasFeature( const TQString& feature )
{
if ( feature == "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
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"
"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.
*/
QValueList<KIPI::ImageCollection> KIPI::Interface::allAlbums()
TQValueList<KIPI::ImageCollection> KIPI::Interface::allAlbums()
{
// 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,
the supported images formats by KDE.
*/
QString KIPI::Interface::fileExtensions()
TQString KIPI::Interface::fileExtensions()
{
QStringList KDEImagetypes = KImageIO::mimeTypes( KImageIO::Reading );
QString imagesFileFilter = KDEImagetypes.join(" ");
TQStringList KDEImagetypes = KImageIO::mimeTypes( KImageIO::Reading );
TQString imagesFileFilter = KDEImagetypes.join(" ");
return ( imagesFileFilter.lower() + " " + imagesFileFilter.upper() );
}

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

@ -48,7 +48,7 @@
application.
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.
Selection of images can be obtained using

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

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

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

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

@ -20,12 +20,12 @@
*
* ============================================================ */
// Qt includes.
// TQt includes.
#include <qlayout.h>
#include <qheader.h>
#include <qlistview.h>
#include <qdir.h>
#include <tqlayout.h>
#include <tqheader.h>
#include <tqlistview.h>
#include <tqdir.h>
// KDE includes
@ -52,7 +52,7 @@ struct KIPI::UploadWidget::Private
{
KFileTreeView* m_treeView;
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.
*/
KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, QWidget* parent, const char* name )
: QWidget( parent, name )
KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, TQWidget* tqparent, const char* name )
: TQWidget( tqparent, name )
{
d = new Private;
QVBoxLayout* layout = new QVBoxLayout( this, 0 );
TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 0 );
d->m_treeView = new KFileTreeView( this );
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.
KIPI::ImageCollection album = interface->currentAlbum();
@ -78,7 +78,7 @@ KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, QWidget* parent, c
if ( !album.isValid() || !album.isDirectory() )
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() );
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()->hide();
QString root = album.uploadRoot().path();
QString uploadPath = album.isDirectory() ? album.uploadPath().path() : root;
TQString root = album.uploadRoot().path();
TQString uploadPath = album.isDirectory() ? album.uploadPath().path() : root;
root = QDir::cleanDirPath(root);
uploadPath = QDir::cleanDirPath(uploadPath);
root = TQDir::cleanDirPath(root);
uploadPath = TQDir::cleanDirPath(uploadPath);
if ( !uploadPath.startsWith( root ) )
{
@ -103,16 +103,16 @@ KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, QWidget* parent, c
{
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 *) ),
this, SLOT( slotPopulateFinished(KFileTreeViewItem *) ) );
connect( d->m_branch, TQT_SIGNAL( populateFinished(KFileTreeViewItem *) ),
this, TQT_SLOT( slotPopulateFinished(KFileTreeViewItem *) ) );
d->m_branch->setOpen(true);
}
connect( d->m_treeView, SIGNAL( executed(QListViewItem *) ),
this, SLOT( slotFolderSelected(QListViewItem *) ) );
connect( d->m_treeView, TQT_SIGNAL( executed(TQListViewItem *) ),
this, TQT_SLOT( slotFolderSelected(TQListViewItem *) ) );
}
KIPI::UploadWidget::~UploadWidget()
@ -130,21 +130,21 @@ void KIPI::UploadWidget::load( )
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() )
{
disconnect( d->m_branch, SIGNAL( populateFinished(KFileTreeViewItem *) ),
this, SLOT( slotPopulateFinished(KFileTreeViewItem *) ) );
disconnect( d->m_branch, TQT_SIGNAL( populateFinished(KFileTreeViewItem *) ),
this, TQT_SLOT( slotPopulateFinished(KFileTreeViewItem *) ) );
return;
}
QString itemName = d->m_pendingPath.front();
TQString itemName = d->m_pendingPath.front();
d->m_pendingPath.pop_front();
QListViewItem * item;
for ( item = parentItem->firstChild(); item; item = item->nextSibling() )
TQListViewItem * item;
for ( item = tqparentItem->firstChild(); item; item = item->nextSibling() )
{
if ( item->text(0) == itemName )
{
@ -178,9 +178,9 @@ void KIPI::UploadWidget::mkdir()
}
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>")
.arg(path().prettyURL()), "", &ok, this);
.tqarg(path().prettyURL()), "", &ok, this);
if (!ok) return;
@ -189,8 +189,8 @@ void KIPI::UploadWidget::mkdir()
KIO::SimpleJob* job = KIO::mkdir(url);
connect(job, SIGNAL(result(KIO::Job*)),
this, SLOT(slotAlbumCreated(KIO::Job*)));
connect(job, TQT_SIGNAL(result(KIO::Job*)),
this, TQT_SLOT(slotAlbumCreated(KIO::Job*)));
}
void KIPI::UploadWidget::slotAlbumCreated(KIO::Job* job)
@ -201,7 +201,7 @@ void KIPI::UploadWidget::slotAlbumCreated(KIO::Job* job)
job->showErrorDialog( this );
}
void KIPI::UploadWidget::slotFolderSelected(QListViewItem *)
void KIPI::UploadWidget::slotFolderSelected(TQListViewItem *)
{
emit folderItemSelected(d->m_treeView->currentURL());
}

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

Loading…
Cancel
Save