diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /renamedlgplugins/images | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'renamedlgplugins/images')
-rw-r--r-- | renamedlgplugins/images/image_plugin.cpp | 32 | ||||
-rw-r--r-- | renamedlgplugins/images/imagevisualizer.cpp | 36 | ||||
-rw-r--r-- | renamedlgplugins/images/imagevisualizer.h | 12 |
3 files changed, 40 insertions, 40 deletions
diff --git a/renamedlgplugins/images/image_plugin.cpp b/renamedlgplugins/images/image_plugin.cpp index 7c347ea..0bc6567 100644 --- a/renamedlgplugins/images/image_plugin.cpp +++ b/renamedlgplugins/images/image_plugin.cpp @@ -24,12 +24,12 @@ #include <kiconloader.h> #include <renamedlgplugin.h> #include <kio/renamedlg.h> -#include <qlabel.h> -#include <qdialog.h> -#include <qwidget.h> -#include <qstringlist.h> +#include <tqlabel.h> +#include <tqdialog.h> +#include <tqwidget.h> +#include <tqstringlist.h> #include <kio/global.h> -#include <qlayout.h> +#include <tqlayout.h> #include <sys/types.h> @@ -37,10 +37,10 @@ class ImagePlugin : public RenameDlgPlugin{ public: - ImagePlugin( QDialog *dialog, const char *name, const QStringList & ); - virtual bool initialize( KIO::RenameDlg_Mode /*mod*/, const QString &/*_src*/, const QString &/*_dest*/, - const QString &/*mimeSrc*/, - const QString &/*mimeDest*/, + ImagePlugin( TQDialog *dialog, const char *name, const TQStringList & ); + virtual bool initialize( KIO::RenameDlg_Mode /*mod*/, const TQString &/*_src*/, const TQString &/*_dest*/, + const TQString &/*mimeSrc*/, + const TQString &/*mimeDest*/, KIO::filesize_t /*sizeSrc*/, KIO::filesize_t /*sizeDest*/, time_t /*ctimeSrc*/, @@ -49,14 +49,14 @@ public: time_t /*mtimeDest*/ ); }; -ImagePlugin::ImagePlugin( QDialog *dialog, const char *name, const QStringList &list ) +ImagePlugin::ImagePlugin( TQDialog *dialog, const char *name, const TQStringList &list ) : RenameDlgPlugin( dialog, name, list) { } -bool ImagePlugin::initialize( KIO::RenameDlg_Mode mode, const QString &_src, const QString &_dest, - const QString &/*mimeSrc*/, - const QString &/*mimeDest*/, +bool ImagePlugin::initialize( KIO::RenameDlg_Mode mode, const TQString &_src, const TQString &_dest, + const TQString &/*mimeSrc*/, + const TQString &/*mimeDest*/, KIO::filesize_t /*sizeSrc*/, KIO::filesize_t /*sizeDest*/, time_t /*ctimeSrc*/, @@ -64,10 +64,10 @@ bool ImagePlugin::initialize( KIO::RenameDlg_Mode mode, const QString &_src, con time_t /*mtimeSrc*/, time_t /*mtimeDest*/ ) { - QGridLayout *lay = new QGridLayout(this, 2, 3, 5 ); + TQGridLayout *lay = new TQGridLayout(this, 2, 3, 5 ); if( mode & KIO::M_OVERWRITE ) { - QLabel *label = new QLabel(this ); + TQLabel *label = new TQLabel(this ); label->setText(i18n("You want to overwrite the left picture with the one on the right.") ); label->adjustSize(); lay->addMultiCellWidget(label, 1, 1, 0, 2, Qt::AlignHCenter ); @@ -81,5 +81,5 @@ bool ImagePlugin::initialize( KIO::RenameDlg_Mode mode, const QString &_src, con return true; } -typedef KGenericFactory<ImagePlugin, QDialog> ImagePluginFactory; +typedef KGenericFactory<ImagePlugin, TQDialog> ImagePluginFactory; K_EXPORT_COMPONENT_FACTORY( librenimageplugin, ImagePluginFactory("imagerename_plugin") ) diff --git a/renamedlgplugins/images/imagevisualizer.cpp b/renamedlgplugins/images/imagevisualizer.cpp index cb890c5..706787c 100644 --- a/renamedlgplugins/images/imagevisualizer.cpp +++ b/renamedlgplugins/images/imagevisualizer.cpp @@ -21,58 +21,58 @@ #include <klocale.h> #include <kurl.h> #include <kurllabel.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qimage.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqimage.h> #include <kio/netaccess.h> #include "imagevisualizer.h" -ImageVisualizer::ImageVisualizer( QWidget *parent, const char *name, const QString &fileName ) - : QVBox( parent, name ) +ImageVisualizer::ImageVisualizer( TQWidget *parent, const char *name, const TQString &fileName ) + : TQVBox( parent, name ) { pic = 0; description = 0; KURL url=KURL::fromPathOrURL( fileName ); setSpacing( 0 ); if( url.isValid() && url.isLocalFile() ) { - pic = new QLabel(this ); - description = new QLabel( this ); + pic = new TQLabel(this ); + description = new TQLabel( this ); loadImage( url.path() ); } else if( !url.isLocalFile() ) { KURLLabel *label = new KURLLabel( this ); label->setText(i18n("This picture isn't stored\non the local host.\nClick on this label to load it.\n" ) ); label->setURL( url.prettyURL() ); - connect(label, SIGNAL(leftClickedURL(const QString&)), SLOT(downloadImage(const QString&))); + connect(label, TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(downloadImage(const TQString&))); pic = label; - description = new QLabel(this); + description = new TQLabel(this); description->adjustSize( ); } else { - description = new QLabel(this ); + description = new TQLabel(this ); description->setText(i18n("Unable to load image") ); } } -void ImageVisualizer::loadImage( const QString& path ) +void ImageVisualizer::loadImage( const TQString& path ) { - QImage img(path); - QPixmap pixmap(img.smoothScale(180,200, QImage::ScaleMin) ); - pic->setText( QString::null ); + TQImage img(path); + TQPixmap pixmap(img.smoothScale(180,200, TQImage::ScaleMin) ); + pic->setText( TQString::null ); pic->setPixmap(pixmap ); pic->adjustSize(); - QString desc; + TQString desc; desc.append(i18n("The color depth of an image", "Depth: %1\n").arg( img.depth() )); desc.append(i18n("The dimensions of an image", "Dimensions: %1x%1").arg(img.width()).arg(img.height() )); description->setText(desc ); description->adjustSize(); } -void ImageVisualizer::downloadImage(const QString& url) +void ImageVisualizer::downloadImage(const TQString& url) { - QString tmpFile; + TQString tmpFile; if( KIO::NetAccess::download( KURL::fromPathOrURL( url ), tmpFile , topLevelWidget()) ) { loadImage( tmpFile ); diff --git a/renamedlgplugins/images/imagevisualizer.h b/renamedlgplugins/images/imagevisualizer.h index 391fad2..4130a03 100644 --- a/renamedlgplugins/images/imagevisualizer.h +++ b/renamedlgplugins/images/imagevisualizer.h @@ -20,7 +20,7 @@ #ifndef imagevisualizer_h #define imagevisualizer_h -#include <qvbox.h> +#include <tqvbox.h> class QPixmap; class QLabel; @@ -28,17 +28,17 @@ class ImageVisualizer : public QVBox { Q_OBJECT public: - ImageVisualizer(QWidget *parent, const char *name, const QString &fileName ); + ImageVisualizer(TQWidget *parent, const char *name, const TQString &fileName ); private: - void loadImage( const QString& path ); + void loadImage( const TQString& path ); private slots: - void downloadImage( const QString& url ); + void downloadImage( const TQString& url ); private: - QLabel *pic; - QLabel *description; + TQLabel *pic; + TQLabel *description; }; #endif |