diff options
Diffstat (limited to 'src/app/kipiinterface.cpp')
-rw-r--r-- | src/app/kipiinterface.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/app/kipiinterface.cpp b/src/app/kipiinterface.cpp index 4013e3c..fd37853 100644 --- a/src/app/kipiinterface.cpp +++ b/src/app/kipiinterface.cpp @@ -21,10 +21,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include <config.h> #ifdef GV_HAVE_KIPI -// Qt -#include <qdir.h> -#include <qregexp.h> -#include <qtimer.h> +// TQt +#include <tqdir.h> +#include <tqregexp.h> +#include <tqtimer.h> // KDE #include <kdebug.h> @@ -56,62 +56,62 @@ namespace Gwenview { class ImageCollection : public KIPI::ImageCollectionShared { public: - ImageCollection(KURL dirURL, const QString& name, const KURL::List& images) + ImageCollection(KURL dirURL, const TQString& name, const KURL::List& images) : KIPI::ImageCollectionShared() , mDirURL(dirURL) , mName(name) , mImages(images) {} - QString name() { return mName; } - QString comment() { return QString::null; } + TQString name() { return mName; } + TQString comment() { return TQString(); } KURL::List images() { return mImages; } KURL uploadRoot() { return KURL("/"); } KURL uploadPath() { return mDirURL; } - QString uploadRootName() { return "/"; } + TQString uploadRootName() { return "/"; } bool isDirectory() { return true; } private: KURL mDirURL; - QString mName; + TQString mName; KURL::List mImages; }; class ImageInfo : public KIPI::ImageInfoShared { - static const QRegExp sExtensionRE; + static const TQRegExp sExtensionRE; public: ImageInfo(KIPI::Interface* interface, const KURL& url) : KIPI::ImageInfoShared(interface, url) {} - QString title() { - QString txt=_url.fileName(); - txt.replace("_", " "); - txt.replace(sExtensionRE, ""); + TQString title() { + TQString txt=_url.fileName(); + txt.tqreplace("_", " "); + txt.tqreplace(sExtensionRE, ""); return txt; } - QString description() { - if (!_url.isLocalFile()) return QString::null; + TQString description() { + if (!_url.isLocalFile()) return TQString(); ImageUtils::JPEGContent content; bool ok=content.load(_url.path()); - if (!ok) return QString::null; + if (!ok) return TQString(); return content.comment(); } - void setDescription(const QString&) {} + void setDescription(const TQString&) {} - QMap<QString,QVariant> attributes() { - return QMap<QString,QVariant>(); + TQMap<TQString,TQVariant> attributes() { + return TQMap<TQString,TQVariant>(); } void clearAttributes() {} - void addAttributes(const QMap<QString, QVariant>&) {} + void addAttributes(const TQMap<TQString, TQVariant>&) {} }; -const QRegExp ImageInfo::sExtensionRE("\\.[a-z0-9]+$", false /*caseSensitive*/); +const TQRegExp ImageInfo::sExtensionRE("\\.[a-z0-9]+$", false /*caseSensitive*/); struct KIPIInterfacePrivate { @@ -119,18 +119,18 @@ struct KIPIInterfacePrivate { }; -KIPIInterface::KIPIInterface( QWidget* parent, FileViewController* fileView) -:KIPI::Interface(parent, "Gwenview kipi interface") { +KIPIInterface::KIPIInterface( TQWidget* tqparent, FileViewController* fileView) +:KIPI::Interface(tqparent, "Gwenview kipi interface") { d=new KIPIInterfacePrivate; d->mFileView=fileView; - connect(d->mFileView, SIGNAL(selectionChanged()), - this, SLOT(slotSelectionChanged()) ); + connect(d->mFileView, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotSelectionChanged()) ); - connect(d->mFileView, SIGNAL(completed()), - this, SLOT(slotDirectoryChanged()) ); + connect(d->mFileView, TQT_SIGNAL(completed()), + this, TQT_SLOT(slotDirectoryChanged()) ); // delay a bit, so that it's called after loadPlugins() - QTimer::singleShot( 0, this, SLOT( init())); + TQTimer::singleShot( 0, this, TQT_SLOT( init())); } @@ -163,13 +163,13 @@ KIPI::ImageCollection KIPIInterface::currentSelection() { LOG(""); KURL::List list=d->mFileView->selectedImageURLs(); KURL url=d->mFileView->dirURL(); - return KIPI::ImageCollection(new ImageCollection(url, i18n("%1 (Selected Images)").arg(url.fileName()), list)); + return KIPI::ImageCollection(new ImageCollection(url, i18n("%1 (Selected Images)").tqarg(url.fileName()), list)); } -QValueList<KIPI::ImageCollection> KIPIInterface::allAlbums() { +TQValueList<KIPI::ImageCollection> KIPIInterface::allAlbums() { LOG(""); - QValueList<KIPI::ImageCollection> list; + TQValueList<KIPI::ImageCollection> list; list << currentAlbum() << currentSelection(); return list; } @@ -188,13 +188,13 @@ int KIPIInterface::features() const { * KDirLister will pick up the image if necessary, so no updating is needed * here, it is however necessary to discard caches if the plugin preserves timestamp */ -bool KIPIInterface::addImage(const KURL& url, QString&) { - Cache::instance()->invalidate( url ); +bool KIPIInterface::addImage(const KURL& url, TQString&) { + Cache::instance()->tqinvalidate( url ); return true; } void KIPIInterface::delImage(const KURL& url) { - Cache::instance()->invalidate( url ); + Cache::instance()->tqinvalidate( url ); } // TODO currently KDirWatch doesn't have watching of files in a directory @@ -203,7 +203,7 @@ void KIPIInterface::refreshImages( const KURL::List& urls ) { for( KURL::List::ConstIterator it = urls.begin(); it != urls.end(); ++it ) { - Cache::instance()->invalidate( *it ); + Cache::instance()->tqinvalidate( *it ); } d->mFileView->refreshItems( urls ); } |