diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-18 06:46:40 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-18 06:46:40 +0000 |
commit | 7c19562ad065b6729bac8eb9b40dfe0452a72272 (patch) | |
tree | 33325d1e02ecc9ca614c7209296f8f796a1c3478 | |
parent | a65baa328fac0a1ce12971fef8d998ce7bfbe237 (diff) | |
download | kipi-plugins-7c19562ad065b6729bac8eb9b40dfe0452a72272.tar.gz kipi-plugins-7c19562ad065b6729bac8eb9b40dfe0452a72272.zip |
TQt4 port kipi-plugins
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/kipi-plugins@1232561 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
446 files changed, 12795 insertions, 12651 deletions
diff --git a/kipi-plugins/acquireimages/acquireimagedialog.cpp b/kipi-plugins/acquireimages/acquireimagedialog.cpp index 830b2ad..a8529e6 100644 --- a/kipi-plugins/acquireimages/acquireimagedialog.cpp +++ b/kipi-plugins/acquireimages/acquireimagedialog.cpp @@ -34,26 +34,26 @@ extern "C" #include <fcntl.h> } -// Include files for Qt +// Include files for TQt #undef Unsorted // x headers suck - make qdir.h work with --enable-final -#include <qvbox.h> -#include <qlayout.h> -#include <qdir.h> -#include <qwidget.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qstring.h> -#include <qwhatsthis.h> -#include <qtextedit.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qcombobox.h> -#include <qlistbox.h> -#include <qfile.h> -#include <qapplication.h> -#include <qvgroupbox.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqstring.h> +#include <tqwhatsthis.h> +#include <tqtextedit.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqcombobox.h> +#include <tqlistbox.h> +#include <tqfile.h> +#include <tqapplication.h> +#include <tqvgroupbox.h> // Include files for KDE @@ -101,9 +101,9 @@ namespace KIPIAcquireImagesPlugin #define NETACCESS_WIDGET #endif -AcquireImageDialog::AcquireImageDialog( KIPI::Interface* interface, QWidget *parent, const QImage &img) +AcquireImageDialog::AcquireImageDialog( KIPI::Interface* interface, TQWidget *tqparent, const TQImage &img) : KDialogBase( IconList, i18n("Save Target Image Options"), Help|Ok|Cancel, - Ok, parent, "AcquireImageDialog", true, false ), m_interface( interface ) + Ok, tqparent, "AcquireImageDialog", true, false ), m_interface( interface ) { KImageIO::registerFormats(); m_qimageScanned = img; @@ -129,7 +129,7 @@ AcquireImageDialog::AcquireImageDialog( KIPI::Interface* interface, QWidget *par m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); } @@ -175,48 +175,48 @@ void AcquireImageDialog::writeSettings(void) void AcquireImageDialog::setupImageOptions(void) { - QString whatsThis; + TQString whatsThis; page_setupImageOptions = addPage( i18n("Target Image"), i18n("Target Image Options"), BarIcon("image", KIcon::SizeMedium ) ); - QVBoxLayout *vlay = new QVBoxLayout( page_setupImageOptions, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page_setupImageOptions, 0, spacingHint() ); //--------------------------------------------- - QGroupBox * groupBox1 = new QGroupBox( page_setupImageOptions ); + TQGroupBox * groupBox1 = new TQGroupBox( page_setupImageOptions ); groupBox1->setFlat(false); groupBox1->setTitle(i18n("File Name && Caption")); - QWhatsThis::add( groupBox1, i18n("<p>The target image preview with the file name and caption.") ); - QGridLayout* grid2 = new QGridLayout( groupBox1, 3, 3 , 20, 10); + TQWhatsThis::add( groupBox1, i18n("<p>The target image preview with the file name and caption.") ); + TQGridLayout* grid2 = new TQGridLayout( groupBox1, 3, 3 , 20, 10); - m_ImageFileName = new QLabel( i18n("File name (without suffix):"), groupBox1); + m_ImageFileName = new TQLabel( i18n("File name (without suffix):"), groupBox1); grid2->addMultiCellWidget(m_ImageFileName, 0, 0, 0, 3); - m_FileName = new QLineEdit(i18n("acquired_image"), groupBox1); - QWhatsThis::add( m_FileName, i18n("<p>Enter here the target image file name without suffix " + m_FileName = new TQLineEdit(i18n("acquired_image"), groupBox1); + TQWhatsThis::add( m_FileName, i18n("<p>Enter here the target image file name without suffix " "(that will be automatically added to the file name according " "to the file-format option.)") ); m_ImageFileName->setBuddy(m_FileName); grid2->addMultiCellWidget(m_FileName, 1, 1, 0, 3); - m_ImageComments = new QLabel( i18n("Caption:"), groupBox1); + m_ImageComments = new TQLabel( i18n("Caption:"), groupBox1); grid2->addMultiCellWidget(m_ImageComments, 2, 2, 0, 3); - m_CommentsEdit = new QTextEdit(groupBox1); + m_CommentsEdit = new TQTextEdit(groupBox1); m_CommentsEdit->setMaximumHeight( 200 ); - QWhatsThis::add( m_CommentsEdit, i18n("<p>Enter here the target image's caption.") ); + TQWhatsThis::add( m_CommentsEdit, i18n("<p>Enter here the target image's caption.") ); grid2->addMultiCellWidget(m_CommentsEdit, 3, 3, 0, 2); - m_preview = new QLabel( groupBox1, "preview" ); + m_preview = new TQLabel( groupBox1, "preview" ); m_preview->setFixedHeight( 120 ); - m_preview->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - m_preview->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); - QWhatsThis::add( m_preview, i18n( "<p>The preview of the target image." ) ); + m_preview->tqsetAlignment( TQt::AlignHCenter | TQt::AlignVCenter ); + m_preview->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); + TQWhatsThis::add( m_preview, i18n( "<p>The preview of the target image." ) ); m_preview->setScaledContents( false ); - QImage scanned = m_qimageScanned.smoothScale((m_qimageScanned.width() * 100) / m_qimageScanned.height(), 100); - QPixmap pix; + TQImage scanned = m_qimageScanned.smoothScale((m_qimageScanned.width() * 100) / m_qimageScanned.height(), 100); + TQPixmap pix; pix.convertFromImage(scanned); m_preview->setPixmap(pix); grid2->addMultiCellWidget(m_preview, 3, 3, 3, 3); @@ -225,14 +225,14 @@ void AcquireImageDialog::setupImageOptions(void) //--------------------------------------------- - QGroupBox * groupBox2 = new QGroupBox( i18n("Saving Options"), page_setupImageOptions ); + TQGroupBox * groupBox2 = new TQGroupBox( i18n("Saving Options"), page_setupImageOptions ); groupBox2->setColumnLayout(0, Qt::Vertical ); - groupBox2->layout()->setSpacing( 6 ); - groupBox2->layout()->setMargin( 11 ); - QWhatsThis::add( groupBox2, i18n("<p>The saving options of the target image.") ); + groupBox2->tqlayout()->setSpacing( 6 ); + groupBox2->tqlayout()->setMargin( 11 ); + TQWhatsThis::add( groupBox2, i18n("<p>The saving options of the target image.") ); - QVBoxLayout * groupBox2Layout = new QVBoxLayout( groupBox2->layout() ); - groupBox2Layout->setAlignment( Qt::AlignTop ); + TQVBoxLayout * groupBox2Layout = new TQVBoxLayout( groupBox2->tqlayout() ); + groupBox2Layout->tqsetAlignment( TQt::AlignTop ); m_imageCompression = new KIntNumInput(75, groupBox2); m_imageCompression->setRange(1, 100, 1, true ); @@ -244,13 +244,13 @@ void AcquireImageDialog::setupImageOptions(void) "<b>75</b>: low compression (default value)<p>" "<b>100</b>: no compression"); - QWhatsThis::add( m_imageCompression, whatsThis); + TQWhatsThis::add( m_imageCompression, whatsThis); groupBox2Layout->addWidget( m_imageCompression ); - QHBoxLayout *hlay12 = new QHBoxLayout( ); + TQHBoxLayout *hlay12 = new TQHBoxLayout( ); groupBox2Layout->addLayout( hlay12 ); - m_imagesFormat = new QComboBox(false, groupBox2); + m_imagesFormat = new TQComboBox(false, groupBox2); m_imagesFormat->insertItem("JPEG"); m_imagesFormat->insertItem("PNG"); m_imagesFormat->insertItem("TIFF"); @@ -279,9 +279,9 @@ void AcquireImageDialog::setupImageOptions(void) "1-, 4-, 8-, or 24-bits in size. Data may be stored raw or compressed using a 4-bit or " "8-bit RLE data compression algorithm. BMP is an excellent choice for a simple bitmap " "format which supports a wide range of RGB image data."); - QWhatsThis::add( m_imagesFormat, whatsThis ); + TQWhatsThis::add( m_imagesFormat, whatsThis ); - m_labelImageFormat = new QLabel( i18n("Image file format:"), groupBox2); + m_labelImageFormat = new TQLabel( i18n("Image file format:"), groupBox2); hlay12->addWidget( m_labelImageFormat ); m_labelImageFormat->setBuddy( m_imagesFormat ); hlay12->addStretch( 1 ); @@ -292,62 +292,62 @@ void AcquireImageDialog::setupImageOptions(void) //--------------------------------------------- - connect(m_imagesFormat, SIGNAL(activated(const QString &)), - this, SLOT(slotImageFormatChanged(const QString &))); + connect(m_imagesFormat, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotImageFormatChanged(const TQString &))); } void AcquireImageDialog::setupAlbumsList(void) { - QString whatsThis; + TQString whatsThis; page_setupAlbumsList = addPage( i18n("Selection"), i18n("Album selection"), BarIcon("folder_image", KIcon::SizeMedium ) ); - QVBoxLayout *vlay = new QVBoxLayout( page_setupAlbumsList, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page_setupAlbumsList, 0, spacingHint() ); //--------------------------------------------- - QVGroupBox * groupBox1 = new QVGroupBox( i18n("Select Folder in Which to Save Target Image"), + TQVGroupBox * groupBox1 = new TQVGroupBox( i18n("Select Folder in Which to Save Target Image"), page_setupAlbumsList ); m_uploadPath = new KIPI::UploadWidget( m_interface, groupBox1, "m_uploadPath" ); - QWidget* w = new QWidget( groupBox1 ); - QHBoxLayout* hlay = new QHBoxLayout( w, 6 ); + TQWidget* w = new TQWidget( groupBox1 ); + TQHBoxLayout* hlay = new TQHBoxLayout( w, 6 ); hlay->addStretch( 1 ); - m_addNewAlbumButton = new QPushButton (i18n( "&Add New Folder"), w, "PushButton_AddNewAlbum"); + m_addNewAlbumButton = new TQPushButton (i18n( "&Add New Folder"), w, "PushButton_AddNewAlbum"); hlay->addWidget( m_addNewAlbumButton ); - QWhatsThis::add( m_addNewAlbumButton, i18n( "<p>Add a new folder.")); + TQWhatsThis::add( m_addNewAlbumButton, i18n( "<p>Add a new folder.")); vlay->addWidget( groupBox1 ); //--------------------------------------------- - QGroupBox * groupBox2 = new QGroupBox( i18n("Album Description"), page_setupAlbumsList ); + TQGroupBox * groupBox2 = new TQGroupBox( i18n("Album Description"), page_setupAlbumsList ); groupBox2->setColumnLayout(0, Qt::Vertical ); - groupBox2->layout()->setSpacing( 6 ); - groupBox2->layout()->setMargin( 11 ); - QWhatsThis::add( groupBox2, i18n("<p>The description of the current Album in the selection list.") ); + groupBox2->tqlayout()->setSpacing( 6 ); + groupBox2->tqlayout()->setMargin( 11 ); + TQWhatsThis::add( groupBox2, i18n("<p>The description of the current Album in the selection list.") ); - QVBoxLayout * groupBox2Layout = new QVBoxLayout( groupBox2->layout() ); - groupBox2Layout->setAlignment( Qt::AlignTop ); + TQVBoxLayout * groupBox2Layout = new TQVBoxLayout( groupBox2->tqlayout() ); + groupBox2Layout->tqsetAlignment( TQt::AlignTop ); m_AlbumComments = new KSqueezedTextLabel( groupBox2 ); - m_AlbumComments->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + m_AlbumComments->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); groupBox2Layout->addWidget( m_AlbumComments ); m_AlbumCollection = new KSqueezedTextLabel( groupBox2 ); - m_AlbumCollection->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + m_AlbumCollection->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); groupBox2Layout->addWidget( m_AlbumCollection ); m_AlbumDate = new KSqueezedTextLabel( groupBox2 ); - m_AlbumDate->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + m_AlbumDate->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); groupBox2Layout->addWidget( m_AlbumDate ); m_AlbumItems = new KSqueezedTextLabel( groupBox2 ); - m_AlbumItems->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + m_AlbumItems->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); groupBox2Layout->addWidget( m_AlbumItems ); vlay->addWidget( groupBox2 ); @@ -359,11 +359,11 @@ void AcquireImageDialog::setupAlbumsList(void) //--------------------------------------------- - connect(m_addNewAlbumButton, SIGNAL(clicked()), - m_uploadPath, SLOT(mkdir())); + connect(m_addNewAlbumButton, TQT_SIGNAL(clicked()), + m_uploadPath, TQT_SLOT(mkdir())); - connect(m_uploadPath, SIGNAL( folderItemSelected( const KURL & ) ), - this, SLOT( slotAlbumSelected( const KURL & ))); + connect(m_uploadPath, TQT_SIGNAL( folderItemSelected( const KURL & ) ), + this, TQT_SLOT( slotAlbumSelected( const KURL & ))); //--------------------------------------------- @@ -372,9 +372,9 @@ void AcquireImageDialog::setupAlbumsList(void) void AcquireImageDialog::slotAlbumSelected( const KURL &url ) { - QString comments, category, date, items; - QValueList<KIPI::ImageCollection> albums = m_interface->allAlbums(); - QValueList<KIPI::ImageCollection>::Iterator albumIt; + TQString comments, category, date, items; + TQValueList<KIPI::ImageCollection> albums = m_interface->allAlbums(); + TQValueList<KIPI::ImageCollection>::Iterator albumIt; for( albumIt = albums.begin() ; albumIt != albums.end() ; ++albumIt ) { @@ -390,10 +390,10 @@ void AcquireImageDialog::slotAlbumSelected( const KURL &url ) items.setNum((*albumIt).images().count()); } - m_AlbumComments->setText( i18n("Caption: %1").arg(comments) ); - m_AlbumCollection->setText( i18n("Collection: %1").arg(category) ); - m_AlbumDate->setText( i18n("Date: %1").arg(date) ); - m_AlbumItems->setText( i18n("Items: %1").arg( items ) ); + m_AlbumComments->setText( i18n("Caption: %1").tqarg(comments) ); + m_AlbumCollection->setText( i18n("Collection: %1").tqarg(category) ); + m_AlbumDate->setText( i18n("Date: %1").tqarg(date) ); + m_AlbumItems->setText( i18n("Items: %1").tqarg( items ) ); } void AcquireImageDialog::slotOk() @@ -419,20 +419,20 @@ void AcquireImageDialog::slotOk() writeSettings(); // Get all scanned image information. - QString imageFormat = m_imagesFormat->currentText(); + TQString imageFormat = m_imagesFormat->currentText(); int imageCompression = m_imageCompression->value(); - QString Commentsimg = m_CommentsEdit->text(); + TQString Commentsimg = m_CommentsEdit->text(); // Find an unique url - QString fileName = m_FileName->text(); - QString ext = extension(imageFormat); + TQString fileName = m_FileName->text(); + TQString ext = extension(imageFormat); url.setFileName(fileName + ext); if (KIO::NetAccess::exists(url, false NETACCESS_WIDGET)) { for (int idx = 1; idx < 100 ; ++idx) { - url.setFileName(QString("%1_%2%3").arg(fileName).arg(idx).arg(ext)); + url.setFileName(TQString("%1_%2%3").tqarg(fileName).tqarg(idx).tqarg(ext)); kdDebug(51001) << "File already exist. Try to fixed target Url to: " << url.prettyURL() << endl; if (!KIO::NetAccess::exists(url, false NETACCESS_WIDGET)) @@ -445,7 +445,7 @@ void AcquireImageDialog::slotOk() // Save file KTempFile tmp; tmp.setAutoDelete(true); - QString imagePath; + TQString imagePath; if (url.isLocalFile()) { imagePath=url.path(); @@ -462,7 +462,7 @@ void AcquireImageDialog::slotOk() } else if (imageFormat=="TIFF") { - ok = QImageToTiff(m_qimageScanned, imagePath); + ok = TQImageToTiff(m_qimageScanned, imagePath); } else { @@ -471,7 +471,7 @@ void AcquireImageDialog::slotOk() if ( !ok ) { - KMessageBox::error(this, i18n("Cannot write image file \"%1\".").arg(imagePath)); + KMessageBox::error(this, i18n("Cannot write image file \"%1\".").tqarg(imagePath)); return; } @@ -480,18 +480,18 @@ void AcquireImageDialog::slotOk() { if (!KIO::NetAccess::upload(imagePath, url NETACCESS_WIDGET)) { - KMessageBox::error(this, i18n("Could not upload image to \"%1\".").arg(url.prettyURL())); + KMessageBox::error(this, i18n("Could not upload image to \"%1\".").tqarg(url.prettyURL())); return; } } // Save the comments for this image. - QString err; + TQString err; ok = m_interface->addImage( url, err ); if ( !ok ) { KMessageBox::error(this, i18n("<qt>Error when informing the application about the new image. " - "The error was: %1</qt>" ).arg( err ) ); + "The error was: %1</qt>" ).tqarg( err ) ); return; } @@ -504,7 +504,7 @@ void AcquireImageDialog::slotOk() delete this; } -void AcquireImageDialog::slotImageFormatChanged(const QString &string) +void AcquireImageDialog::slotImageFormatChanged(const TQString &string) { if ( string == "JPEG" || string == "PNG" ) m_imageCompression->setEnabled(true); @@ -512,7 +512,7 @@ void AcquireImageDialog::slotImageFormatChanged(const QString &string) m_imageCompression->setEnabled(false); } -QString AcquireImageDialog::extension(const QString& imageFormat) +TQString AcquireImageDialog::extension(const TQString& imageFormat) { if (imageFormat == "PNG") return ".png"; @@ -533,14 +533,14 @@ QString AcquireImageDialog::extension(const QString& imageFormat) return ""; } -bool AcquireImageDialog::QImageToTiff(const QImage& image, const QString& dst) +bool AcquireImageDialog::TQImageToTiff(const TQImage& image, const TQString& dst) { TIFF *tif; unsigned char *data; int x, y; - QRgb rgb; + TQRgb rgb; - tif = TIFFOpen(QFile::encodeName(dst).data(), "w"); + tif = TIFFOpen(TQFile::encodeName(dst).data(), "w"); if ( tif ) { TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, image.width()); @@ -564,9 +564,9 @@ bool AcquireImageDialog::QImageToTiff(const QImage& image, const QString& dst) for (x = 0 ; x < image.width() ; ++x) { rgb = *((uint *)image.scanLine(y) + x); - *(dptr++) = qRed(rgb); - *(dptr++) = qGreen(rgb); - *(dptr++) = qBlue(rgb); + *(dptr++) = tqRed(rgb); + *(dptr++) = tqGreen(rgb); + *(dptr++) = tqBlue(rgb); } TIFFWriteScanline(tif, data, y, 0); diff --git a/kipi-plugins/acquireimages/acquireimagedialog.h b/kipi-plugins/acquireimages/acquireimagedialog.h index 903ce0c..dce0c49 100644 --- a/kipi-plugins/acquireimages/acquireimagedialog.h +++ b/kipi-plugins/acquireimages/acquireimagedialog.h @@ -20,15 +20,15 @@ * * ============================================================ */ -#ifndef ACQUIREIMAGEDIALOG_H -#define ACQUIREIMAGEDIALOG_H +#ifndef ACTQUIREIMAGEDIALOG_H +#define ACTQUIREIMAGEDIALOG_H -// Include files for Qt +// Include files for TQt -#include <qimage.h> -#include <qstring.h> -#include <qfileinfo.h> -#include <qguardedptr.h> +#include <tqimage.h> +#include <tqstring.h> +#include <tqfileinfo.h> +#include <tqguardedptr.h> // Include files for KDE @@ -45,13 +45,13 @@ #include "kpaboutdata.h" -class QPushButton; -class QLineEdit; -class QLabel; -class QTextEdit; -class QComboBox; -class QFrame; -class QPushButton; +class TQPushButton; +class TQLineEdit; +class TQLabel; +class TQTextEdit; +class TQComboBox; +class TQFrame; +class TQPushButton; class KListBox; class KConfig; @@ -64,10 +64,11 @@ namespace KIPIAcquireImagesPlugin class AcquireImageDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - AcquireImageDialog( KIPI::Interface* interface, QWidget *parent=0, const QImage &img=0); + AcquireImageDialog( KIPI::Interface* interface, TQWidget *tqparent=0, const TQImage &img=0); ~AcquireImageDialog(); private slots: @@ -75,20 +76,20 @@ private slots: void slotHelp(); void slotOk(); void slotAlbumSelected( const KURL &url ); - void slotImageFormatChanged(const QString &string); + void slotImageFormatChanged(const TQString &string); private: KIPI::Interface *m_interface; - QImage m_qimageScanned; + TQImage m_qimageScanned; - QPushButton *m_addNewAlbumButton; - QPushButton *m_helpButton; + TQPushButton *m_addNewAlbumButton; + TQPushButton *m_helpButton; KConfig *m_config; - QString m_newDir; - QString m_ImagesFilesSort; + TQString m_newDir; + TQString m_ImagesFilesSort; KIPI::UploadWidget* m_uploadPath; @@ -96,20 +97,20 @@ private: KIntNumInput *m_imageCompression; - QComboBox *m_imagesFormat; + TQComboBox *m_imagesFormat; - QLineEdit *m_FileName; + TQLineEdit *m_FileName; - QTextEdit *m_CommentsEdit; + TQTextEdit *m_CommentsEdit; - QLabel *m_ImageComments; - QLabel *m_imageLabel; - QLabel *m_labelImageFormat; - QLabel *m_ImageFileName; - QLabel *m_preview; + TQLabel *m_ImageComments; + TQLabel *m_imageLabel; + TQLabel *m_labelImageFormat; + TQLabel *m_ImageFileName; + TQLabel *m_preview; - QFrame *page_setupImageOptions; - QFrame *page_setupAlbumsList; + TQFrame *page_setupImageOptions; + TQFrame *page_setupAlbumsList; KSqueezedTextLabel *m_AlbumComments; KSqueezedTextLabel *m_AlbumCollection; @@ -118,8 +119,8 @@ private: private: - QString extension(const QString& imageFormat); - bool QImageToTiff(const QImage& image, const QString& dst); + TQString extension(const TQString& imageFormat); + bool TQImageToTiff(const TQImage& image, const TQString& dst); void setupImageOptions(void); void setupAlbumsList(void); void writeSettings(void); @@ -128,4 +129,4 @@ private: } // NameSpace KIPIAcquireImagesPlugin -#endif // ACQUIREIMAGEDIALOG_H +#endif // ACTQUIREIMAGEDIALOG_H diff --git a/kipi-plugins/acquireimages/plugin_acquireimages.cpp b/kipi-plugins/acquireimages/plugin_acquireimages.cpp index 46881c7..015367b 100644 --- a/kipi-plugins/acquireimages/plugin_acquireimages.cpp +++ b/kipi-plugins/acquireimages/plugin_acquireimages.cpp @@ -20,9 +20,9 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qimage.h> +#include <tqimage.h> // Include files for KDE @@ -52,13 +52,13 @@ typedef KGenericFactory<Plugin_AcquireImages> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_acquireimages, Factory("kipiplugin_acquireimages")) -Plugin_AcquireImages::Plugin_AcquireImages(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "AcquireImages") +Plugin_AcquireImages::Plugin_AcquireImages(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "AcquireImages") { kdDebug( 51001 ) << "Plugin_AcquireImages plugin loaded" << endl; } -void Plugin_AcquireImages::setup( QWidget* widget ) +void Plugin_AcquireImages::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -66,7 +66,7 @@ void Plugin_AcquireImages::setup( QWidget* widget ) "scanner", // Menu icon. 0, // default shortcut. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "scan_images"); @@ -74,7 +74,7 @@ void Plugin_AcquireImages::setup( QWidget* widget ) "ksnapshot", // Menu icon. 0, // default shortcut. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "screenshot_images"); @@ -88,7 +88,7 @@ Plugin_AcquireImages::~Plugin_AcquireImages() void Plugin_AcquireImages::slotActivate() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -96,22 +96,22 @@ void Plugin_AcquireImages::slotActivate() return; } - QString from(sender()->name()); + TQString from(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()); if (from == "scan_images") { - m_scanDialog = KScanDialog::getScanDialog(kapp->activeWindow(), "KIPI Scan Images Plugin"); + m_scanDialog = KScanDialog::getScanDialog(TQT_TQWIDGET(kapp->activeWindow()), "KIPI Scan Images Plugin"); if ( m_scanDialog ) { m_scanDialog->setMinimumSize(400, 300); - connect(m_scanDialog, SIGNAL(finalImage(const QImage &, int)), - this, SLOT(slotAcquireImageDone(const QImage &))); + connect(m_scanDialog, TQT_SIGNAL(finalImage(const TQImage &, int)), + this, TQT_SLOT(slotAcquireImageDone(const TQImage &))); } else { - KMessageBox::sorry(kapp->activeWindow(), i18n("No KDE scan-service available; check your system."), + KMessageBox::sorry(TQT_TQWIDGET(kapp->activeWindow()), i18n("No KDE scan-service available; check your system."), i18n("KIPI's 'Scan Images' Plugin")); kdDebug ( 51000 ) << "No Scan-service available, aborting!" << endl; return; @@ -123,7 +123,7 @@ void Plugin_AcquireImages::slotActivate() else if (from == "screenshot_images") { m_screenshotDialog = new KIPIAcquireImagesPlugin::ScreenGrabDialog(interface, - kapp->activeWindow(), "KIPI ScreenshotImagesDialog"); + TQT_TQWIDGET(kapp->activeWindow()), "KIPI ScreenshotImagesDialog"); m_screenshotDialog->show(); } else @@ -133,18 +133,18 @@ void Plugin_AcquireImages::slotActivate() } } -void Plugin_AcquireImages::slotAcquireImageDone(const QImage &img) +void Plugin_AcquireImages::slotAcquireImageDone(const TQImage &img) { //FIXME: this is not a cleaned way to test if scan has been interrupted // anyway it prevents a crash - QImage * pImg = (QImage*)&img; + TQImage * pImg = (TQImage*)&img; if (!pImg ) { kdError(51000) << "Acquired image is null!" << endl; return; } - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -152,7 +152,7 @@ void Plugin_AcquireImages::slotAcquireImageDone(const QImage &img) return; } - m_acquireImageDialog = new KIPIAcquireImagesPlugin::AcquireImageDialog( interface, kapp->activeWindow(), img); + m_acquireImageDialog = new KIPIAcquireImagesPlugin::AcquireImageDialog( interface, TQT_TQWIDGET(kapp->activeWindow()), img); m_acquireImageDialog->setMinimumWidth(400); m_acquireImageDialog->exec(); } diff --git a/kipi-plugins/acquireimages/plugin_acquireimages.h b/kipi-plugins/acquireimages/plugin_acquireimages.h index e5469d3..23be39d 100644 --- a/kipi-plugins/acquireimages/plugin_acquireimages.h +++ b/kipi-plugins/acquireimages/plugin_acquireimages.h @@ -20,8 +20,8 @@ * * ============================================================ */ -#ifndef PLUGIN_ACQUIREIMAGES_H -#define PLUGIN_ACQUIREIMAGES_H +#ifndef PLUGIN_ACTQUIREIMAGES_H +#define PLUGIN_ACTQUIREIMAGES_H // LibKIPI includes. @@ -36,18 +36,19 @@ class ScreenGrabDialog; class Plugin_AcquireImages : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_AcquireImages(QObject *parent, const char* name, const QStringList &args); + Plugin_AcquireImages(TQObject *tqparent, const char* name, const TQStringList &args); virtual ~Plugin_AcquireImages(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); public slots: void slotActivate(); - void slotAcquireImageDone(const QImage &img); + void slotAcquireImageDone(const TQImage &img); private: @@ -59,4 +60,4 @@ private: KIPIAcquireImagesPlugin::ScreenGrabDialog *m_screenshotDialog; }; -#endif /* PLUGIN_ACQUIREIMAGES_H */ +#endif /* PLUGIN_ACTQUIREIMAGES_H */ diff --git a/kipi-plugins/acquireimages/screenshotdialog.cpp b/kipi-plugins/acquireimages/screenshotdialog.cpp index 5374a90..780d17b 100644 --- a/kipi-plugins/acquireimages/screenshotdialog.cpp +++ b/kipi-plugins/acquireimages/screenshotdialog.cpp @@ -30,17 +30,17 @@ extern "C" #include <unistd.h> } -// Include files for Qt - -#include <qlayout.h> -#include <qlabel.h> -#include <qfileinfo.h> -#include <qapplication.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qframe.h> -#include <qwidgetlist.h> +// Include files for TQt + +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqfileinfo.h> +#include <tqapplication.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqframe.h> +#include <tqwidgetlist.h> // Include files for KDE @@ -67,64 +67,64 @@ extern "C" namespace KIPIAcquireImagesPlugin { -ScreenGrabDialog::ScreenGrabDialog( KIPI::Interface* interface, QWidget *parent, const char *name) - : KDialogBase(parent, name, false, i18n("Screenshot"), +ScreenGrabDialog::ScreenGrabDialog( KIPI::Interface* interface, TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, false, i18n("Screenshot"), Help|User1|Close, Close, false, i18n("&New Snapshot")), m_interface( interface ) { m_inSelect = false; - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout *layout = new QVBoxLayout(box); + TQVBoxLayout *tqlayout = new TQVBoxLayout(box); //--------------------------------------------- - QLabel *label1 = new QLabel(i18n("This dialog will grab either your desktop or a single\n" + TQLabel *label1 = new TQLabel(i18n("This dialog will grab either your desktop or a single\n" "application window. If you grab a single window your mouse\n" "cursor will change into crosshairs; then, simply select the\n" "window with your mouse."), box); - layout->addWidget(label1); + tqlayout->addWidget(label1); //--------------------------------------------- - m_desktopCB = new QCheckBox(i18n("Grab the entire desktop"), box); - QWhatsThis::add( m_desktopCB, i18n( "<p>If you enable this option, the entire desktop will be grabbed; " + m_desktopCB = new TQCheckBox(i18n("Grab the entire desktop"), box); + TQWhatsThis::add( m_desktopCB, i18n( "<p>If you enable this option, the entire desktop will be grabbed; " "otherwise, only the active windows." ) ); - layout->addWidget(m_desktopCB); + tqlayout->addWidget(m_desktopCB); //--------------------------------------------- - m_hideCB = new QCheckBox(i18n("Hide all host application windows"), box); - QWhatsThis::add( m_hideCB, i18n( "<p>If you enable this option, all host application windows will be hidden " + m_hideCB = new TQCheckBox(i18n("Hide all host application windows"), box); + TQWhatsThis::add( m_hideCB, i18n( "<p>If you enable this option, all host application windows will be hidden " "during the grab operation." ) ); - layout->addWidget(m_hideCB); + tqlayout->addWidget(m_hideCB); //--------------------------------------------- - QLabel *label2 = new QLabel(i18n("Delay:"), box); - layout->addWidget(label2); + TQLabel *label2 = new TQLabel(i18n("Delay:"), box); + tqlayout->addWidget(label2); m_delay = new KIntNumInput(box); - QWhatsThis::add( m_delay, i18n( "<p>The delay in seconds before the grab operation is started.") ); + TQWhatsThis::add( m_delay, i18n( "<p>The delay in seconds before the grab operation is started.") ); m_delay->setRange(0, 60); - layout->addWidget(m_delay); - layout->addStretch(1); + tqlayout->addWidget(m_delay); + tqlayout->addStretch(1); //--------------------------------------------- - m_grabber = new QWidget( 0, 0, WStyle_Customize | WX11BypassWM ); + m_grabber = new TQWidget( 0, 0, WStyle_Customize | WX11BypassWM ); m_grabber->move( -4000, -4000 ); m_grabber->installEventFilter( this ); //--------------------------------------------- - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotGrab())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotGrab())); - connect(this, SIGNAL(closeClicked()), - this, SLOT(slotClose())); + connect(this, TQT_SIGNAL(closeClicked()), + this, TQT_SLOT(slotClose())); - connect( &m_grabTimer, SIGNAL(timeout()), - this, SLOT(slotPerformGrab())); + connect( &m_grabTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotPerformGrab())); //--------------------------------------------- @@ -164,7 +164,7 @@ ScreenGrabDialog::ScreenGrabDialog( KIPI::Interface* interface, QWidget *parent, m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); } @@ -201,9 +201,9 @@ void ScreenGrabDialog::slotGrab() m_hiddenWindows.clear(); if (m_hideCB->isChecked()) { - QWidgetList *list = QApplication::topLevelWidgets(); - QWidgetListIt it( *list ); - QWidget * w; + TQWidgetList *list = TQApplication::tqtopLevelWidgets(); + TQWidgetListIt it( *list ); + TQWidget * w; while ( (w=it.current()) != 0 ) { ++it; @@ -217,7 +217,7 @@ void ScreenGrabDialog::slotGrab() } kapp->processEvents(); - QApplication::syncX(); + TQApplication::syncX(); if ( m_delay->value() != 0 ) m_grabTimer.start( m_delay->value() * 1000, true ); @@ -238,11 +238,11 @@ void ScreenGrabDialog::slotPerformGrab() { Window root; Window child; - uint mask; + uint tqmask; int rootX, rootY, winX, winY; XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, &rootX, &rootY, &winX, &winY, - &mask); + &tqmask); int x, y; unsigned int w, h; @@ -251,10 +251,10 @@ void ScreenGrabDialog::slotPerformGrab() XGetGeometry( qt_xdisplay(), child, &root, &x, &y, &w, &h, &border, &depth ); - m_snapshot = QPixmap::grabWindow( qt_xrootwin(), x, y, w, h ); + m_snapshot = TQPixmap::grabWindow( qt_xrootwin(), x, y, w, h ); } else - m_snapshot = QPixmap::grabWindow( qt_xrootwin() ); + m_snapshot = TQPixmap::grabWindow( qt_xrootwin() ); if (m_snapshot.isNull()) { @@ -265,7 +265,7 @@ void ScreenGrabDialog::slotPerformGrab() return; } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KNotifyClient::beep(); m_screenshotImage = m_snapshot.convertToImage(); @@ -282,26 +282,26 @@ void ScreenGrabDialog::endGrab(void) if (m_hideCB->isChecked()) { - for( QValueList< QWidget* >::ConstIterator it = m_hiddenWindows.begin(); + for( TQValueList< TQWidget* >::ConstIterator it = m_hiddenWindows.begin(); it != m_hiddenWindows.end(); ++it ) (*it)->show(); - QApplication::syncX(); + TQApplication::syncX(); } show(); } -bool ScreenGrabDialog::eventFilter( QObject* o, QEvent* e) +bool ScreenGrabDialog::eventFilter( TQObject* o, TQEvent* e) { - if ( o == m_grabber && e->type() == QEvent::MouseButtonPress ) + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_grabber) && e->type() == TQEvent::MouseButtonPress ) { - QMouseEvent* me = (QMouseEvent*) e; + TQMouseEvent* me = (TQMouseEvent*) e; - if ( QWidget::mouseGrabber() != m_grabber ) + if ( TQWidget::mouseGrabber() != m_grabber ) return false; - if ( me->button() == LeftButton ) + if ( me->button() == Qt::LeftButton ) slotPerformGrab(); } diff --git a/kipi-plugins/acquireimages/screenshotdialog.h b/kipi-plugins/acquireimages/screenshotdialog.h index 8cb3ebd..1045ad6 100644 --- a/kipi-plugins/acquireimages/screenshotdialog.h +++ b/kipi-plugins/acquireimages/screenshotdialog.h @@ -26,11 +26,11 @@ #ifndef SCREENSHOOTDIALOG_H #define SCREENSHOOTDIALOG_H -// Include files for Qt +// Include files for TQt -#include <qimage.h> -#include <qpixmap.h> -#include <qtimer.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqtimer.h> // Include files for KDE @@ -48,9 +48,9 @@ extern "C" #include <libkipi/interface.h> -class QWidget; -class QCheckBox; -class QPushButton; +class TQWidget; +class TQCheckBox; +class TQPushButton; class KConfig; class KIntNumInput; @@ -63,11 +63,12 @@ class AcquireImageDialog; class ScreenGrabDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: ScreenGrabDialog( KIPI::Interface* interface, - QWidget *parent=0, const char *name=0); + TQWidget *tqparent=0, const char *name=0); ~ScreenGrabDialog(); private slots: @@ -79,7 +80,7 @@ private slots: private: - bool eventFilter( QObject* o, QEvent* e); + bool eventFilter( TQObject* o, TQEvent* e); void endGrab(void); private: @@ -88,26 +89,26 @@ private: bool m_inSelect; - QCheckBox *m_desktopCB; - QCheckBox *m_hideCB; + TQCheckBox *m_desktopCB; + TQCheckBox *m_hideCB; KIntNumInput *m_delay; AcquireImageDialog *m_acquireImageDialog; - QImage m_screenshotImage; + TQImage m_screenshotImage; KConfig *m_config; - QWidget *m_grabber; + TQWidget *m_grabber; - QTimer m_grabTimer; + TQTimer m_grabTimer; - QPixmap m_snapshot; + TQPixmap m_snapshot; - QPushButton *m_helpButton; + TQPushButton *m_helpButton; - QValueList< QWidget* > m_hiddenWindows; + TQValueList< TQWidget* > m_hiddenWindows; }; } // NameSpace KIPIAcquireImagesPlugin diff --git a/kipi-plugins/batchprocessimages/batchprocessimagesdialog.cpp b/kipi-plugins/batchprocessimages/batchprocessimagesdialog.cpp index e1706a6..43306e7 100644 --- a/kipi-plugins/batchprocessimages/batchprocessimagesdialog.cpp +++ b/kipi-plugins/batchprocessimages/batchprocessimagesdialog.cpp @@ -27,29 +27,29 @@ extern "C" #include <unistd.h> } -// Include files for Qt - -#include <qvbox.h> -#include <qlayout.h> -#include <qdir.h> -#include <qwidget.h> -#include <qlabel.h> -#include <qgroupbox.h> -#include <qwhatsthis.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qprocess.h> -#include <qcolor.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qimage.h> -#include <qevent.h> -#include <qdragobject.h> -#include <qfileinfo.h> -#include <qhgroupbox.h> -#include <qvgroupbox.h> -#include <qframe.h> -#include <qwmatrix.h> +// Include files for TQt + +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqgroupbox.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqprocess.h> +#include <tqcolor.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqimage.h> +#include <tqevent.h> +#include <tqdragobject.h> +#include <tqfileinfo.h> +#include <tqhgroupbox.h> +#include <tqvgroupbox.h> +#include <tqframe.h> +#include <tqwmatrix.h> // Include files for KDE @@ -97,57 +97,57 @@ namespace KIPIBatchProcessImagesPlugin { BatchProcessImagesDialog::BatchProcessImagesDialog( KURL::List urlList, KIPI::Interface* interface, - QString caption, QWidget *parent ) + TQString caption, TQWidget *tqparent ) : KDialogBase( KDialogBase::Plain, caption, Help|User1|Cancel, - Cancel, parent, "BatchProcessImagesDialog", false, false, i18n("&Start")), + Cancel, tqparent, "BatchProcessImagesDialog", false, false, i18n("&Start")), m_selectedImageFiles( urlList), m_interface( interface ) { // Init. Tmp folder KStandardDirs dir; m_tmpFolder = dir.saveLocation("tmp", "kipi-batchprocessimagesplugin-" + - QString::number(getpid()) ); + TQString::number(getpid()) ); - m_convertStatus = NO_PROCESS; - m_progressStatus = 0; + m_converttqStatus = NO_PROCESS; + m_progresstqStatus = 0; m_ProcessusProc = 0; m_PreviewProc = 0; KImageIO::registerFormats(); - QWidget* box = plainPage(); - QVBoxLayout *dvlay = new QVBoxLayout(box, 0, KDialog::spacingHint()); + TQWidget* box = plainPage(); + TQVBoxLayout *dvlay = new TQVBoxLayout(box, 0, KDialog::spacingHint()); //--------------------------------------------- - QHBoxLayout *hlay = new QHBoxLayout( dvlay ); - groupBox1 = new QGroupBox( 0, Qt::Vertical, box ); - groupBox1->layout()->setSpacing(KDialog::spacingHint()); - groupBox1->layout()->setMargin(KDialog::marginHint()); - QGridLayout* grid = new QGridLayout( groupBox1->layout(), 2, 3); - m_labelType = new QLabel( groupBox1 ); + TQHBoxLayout *hlay = new TQHBoxLayout( dvlay ); + groupBox1 = new TQGroupBox( 0, Qt::Vertical, box ); + groupBox1->tqlayout()->setSpacing(KDialog::spacingHint()); + groupBox1->tqlayout()->setMargin(KDialog::marginHint()); + TQGridLayout* grid = new TQGridLayout( groupBox1->tqlayout(), 2, 3); + m_labelType = new TQLabel( groupBox1 ); grid->addMultiCellWidget(m_labelType, 0, 0, 0, 0); - m_Type = new QComboBox(false, groupBox1); + m_Type = new TQComboBox(false, groupBox1); grid->addMultiCellWidget(m_Type, 0, 0, 1, 1); - m_optionsButton = new QPushButton (groupBox1, "OptionButton"); + m_optionsButton = new TQPushButton (groupBox1, "OptionButton"); m_optionsButton->setText(i18n("Options")); - QWhatsThis::add( m_optionsButton, i18n("<p>You can choose here the options to use " + TQWhatsThis::add( m_optionsButton, i18n("<p>You can choose here the options to use " "for the current process.")); grid->addMultiCellWidget(m_optionsButton, 0, 0, 2, 2); - m_smallPreview = new QCheckBox(i18n("Small preview"), groupBox1); - QWhatsThis::add( m_smallPreview, i18n("<p>If you enable this option, " + m_smallPreview = new TQCheckBox(i18n("Small preview"), groupBox1); + TQWhatsThis::add( m_smallPreview, i18n("<p>If you enable this option, " "all preview effects will be calculated on a small zone " "of the image (300x300 pixels in the top left corner). " "Enable this option if you have a slow computer.") ); m_smallPreview->setChecked( true ); grid->addMultiCellWidget(m_smallPreview, 1, 1, 0, 1); - m_previewButton = new QPushButton (groupBox1, "PreviewButton"); + m_previewButton = new TQPushButton (groupBox1, "PreviewButton"); m_previewButton->setText(i18n("&Preview")); - QWhatsThis::add( m_previewButton, i18n("<p>This button builds a process " + TQWhatsThis::add( m_previewButton, i18n("<p>This button builds a process " "preview for the currently selected image on the list.")); grid->addMultiCellWidget(m_previewButton, 1, 1, 2, 2); @@ -155,20 +155,20 @@ BatchProcessImagesDialog::BatchProcessImagesDialog( KURL::List urlList, KIPI::In //--------------------------------------------- - groupBox2 = new QGroupBox( 2, Qt::Horizontal, i18n("File Operations"), box ); + groupBox2 = new TQGroupBox( 2, Qt::Horizontal, i18n("File Operations"), box ); - m_labelOverWrite = new QLabel (i18n("Overwrite mode:"), groupBox2); - m_overWriteMode = new QComboBox( false, groupBox2 ); + m_labelOverWrite = new TQLabel (i18n("Overwrite mode:"), groupBox2); + m_overWriteMode = new TQComboBox( false, groupBox2 ); m_overWriteMode->insertItem(i18n("Ask")); m_overWriteMode->insertItem(i18n("Always Overwrite")); m_overWriteMode->insertItem(i18n("Rename")); m_overWriteMode->insertItem(i18n("Skip")); m_overWriteMode->setCurrentText (i18n("Rename")); - QWhatsThis::add( m_overWriteMode, i18n("<p>Select here the overwrite mode used if your target's image " + TQWhatsThis::add( m_overWriteMode, i18n("<p>Select here the overwrite mode used if your target's image " "files already exist.") ); - m_removeOriginal = new QCheckBox(i18n("Remove original"), groupBox2); - QWhatsThis::add( m_removeOriginal, i18n("<p>If you enable this option, " + m_removeOriginal = new TQCheckBox(i18n("Remove original"), groupBox2); + TQWhatsThis::add( m_removeOriginal, i18n("<p>If you enable this option, " "all original image files will be removed after processing.") ); m_removeOriginal->setChecked( false ); @@ -176,54 +176,54 @@ BatchProcessImagesDialog::BatchProcessImagesDialog( KURL::List urlList, KIPI::In //--------------------------------------------- - groupBox3 = new QHGroupBox( i18n("Target Folder"), box ); + groupBox3 = new TQHGroupBox( i18n("Target Folder"), box ); m_destinationURL = new KURLRequester(groupBox3); m_destinationURL->setMode(KFile::Directory | KFile::LocalOnly); KIPI::ImageCollection album = interface->currentAlbum(); if (album.isValid()) { - QString url; + TQString url; if (album.isDirectory()) { url = album.uploadPath().path(); } else { - url = QDir::homeDirPath(); + url = TQDir::homeDirPath(); } m_destinationURL->lineEdit()->setText(url); } - QWhatsThis::add( m_destinationURL, i18n("<p>Here you can select the target folder which " + TQWhatsThis::add( m_destinationURL, i18n("<p>Here you can select the target folder which " "will used by the process.")); dvlay->addWidget( groupBox3 ); //--------------------------------------------- - groupBox4 = new QHGroupBox( box ); - QWidget* box41 = new QWidget( groupBox4 ); - QHBoxLayout* lay2 = new QHBoxLayout( box41, 0, spacingHint() ); + groupBox4 = new TQHGroupBox( box ); + TQWidget* box41 = new TQWidget( groupBox4 ); + TQHBoxLayout* lay2 = new TQHBoxLayout( box41, 0, spacingHint() ); m_listFiles = new BatchProcessImagesList( box41 ); lay2->addWidget( m_listFiles ); - m_listFiles->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding); + m_listFiles->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::MinimumExpanding); - QVBoxLayout* lay3 = new QVBoxLayout( lay2 ); - m_addImagesButton = new QPushButton ( i18n( "&Add..." ), box41 ); + TQVBoxLayout* lay3 = new TQVBoxLayout( lay2 ); + m_addImagesButton = new TQPushButton ( i18n( "&Add..." ), box41 ); lay3->addWidget( m_addImagesButton ); - QWhatsThis::add( m_addImagesButton, i18n("<p>Add images to the list.") ); + TQWhatsThis::add( m_addImagesButton, i18n("<p>Add images to the list.") ); - m_remImagesButton = new QPushButton ( i18n( "&Remove" ), box41 ); + m_remImagesButton = new TQPushButton ( i18n( "&Remove" ), box41 ); lay3->addWidget( m_remImagesButton ); - QWhatsThis::add( m_remImagesButton, i18n("<p>Remove selected image from the list.") ); + TQWhatsThis::add( m_remImagesButton, i18n("<p>Remove selected image from the list.") ); - m_imageLabel = new QLabel( box41 ); + m_imageLabel = new TQLabel( box41 ); m_imageLabel->setFixedHeight( 80 ); - m_imageLabel->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - m_imageLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); + m_imageLabel->tqsetAlignment( TQt::AlignHCenter | TQt::AlignVCenter ); + m_imageLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); lay3->addWidget( m_imageLabel ); - QWhatsThis::add( m_imageLabel, i18n( "<p>The preview of the selected image on the list." ) ); + TQWhatsThis::add( m_imageLabel, i18n( "<p>The preview of the selected image on the list." ) ); lay3->addStretch( 1 ); dvlay->addWidget( groupBox4 ); @@ -233,38 +233,38 @@ BatchProcessImagesDialog::BatchProcessImagesDialog( KURL::List urlList, KIPI::In m_progress = new KProgress( box, "Progress" ); m_progress->setTotalSteps(100); m_progress->setValue(0); - QWhatsThis::add( m_progress, i18n("<p>This is the current percentage of the task completed.") ); + TQWhatsThis::add( m_progress, i18n("<p>This is the current percentage of the task completed.") ); dvlay->addWidget( m_progress ); //--------------------------------------------- - connect(m_listFiles, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(slotListDoubleClicked(QListViewItem *))); + connect(m_listFiles, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + this, TQT_SLOT(slotListDoubleClicked(TQListViewItem *))); - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotProcessStart())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotProcessStart())); - connect(m_optionsButton, SIGNAL(clicked()), - this, SLOT(slotOptionsClicked())); + connect(m_optionsButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotOptionsClicked())); - connect(m_previewButton, SIGNAL(clicked()), - this, SLOT(slotPreview())); + connect(m_previewButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotPreview())); - connect(m_Type, SIGNAL(activated(int)), - this, SLOT(slotTypeChanged(int))); + connect(m_Type, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotTypeChanged(int))); - connect(m_listFiles, SIGNAL( addedDropItems(QStringList) ), - this, SLOT( slotAddDropItems(QStringList))); + connect(m_listFiles, TQT_SIGNAL( addedDropItems(TQStringList) ), + this, TQT_SLOT( slotAddDropItems(TQStringList))); - connect(m_listFiles, SIGNAL( currentChanged( QListViewItem * ) ), - this, SLOT( slotImageSelected( QListViewItem * ))); + connect(m_listFiles, TQT_SIGNAL( currentChanged( TQListViewItem * ) ), + this, TQT_SLOT( slotImageSelected( TQListViewItem * ))); - connect(m_addImagesButton, SIGNAL(clicked()), - this, SLOT(slotImagesFilesButtonAdd())); + connect(m_addImagesButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotImagesFilesButtonAdd())); - connect(m_remImagesButton, SIGNAL(clicked()), - this, SLOT(slotImagesFilesButtonRem())); + connect(m_remImagesButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotImagesFilesButtonRem())); // Get the image files filters from the hosts app. @@ -279,7 +279,7 @@ BatchProcessImagesDialog::~BatchProcessImagesDialog() void BatchProcessImagesDialog::slotImagesFilesButtonAdd( void ) { - QStringList ImageFilesList; + TQStringList ImageFilesList; KURL::List urls = KIPI::ImageDialog::getImageURLs( this, m_interface ); @@ -299,7 +299,7 @@ void BatchProcessImagesDialog::slotImagesFilesButtonRem( void ) { m_listFiles->takeItem(pitem); m_listFiles->setSelected( m_listFiles->currentItem(), true ); - m_selectedImageFiles.remove(m_selectedImageFiles.find(pitem->pathSrc())); + m_selectedImageFiles.remove(m_selectedImageFiles.tqfind(pitem->pathSrc())); delete pitem; m_nbItem = m_selectedImageFiles.count(); @@ -310,7 +310,7 @@ void BatchProcessImagesDialog::slotImagesFilesButtonRem( void ) } } -void BatchProcessImagesDialog::slotImageSelected( QListViewItem * item ) +void BatchProcessImagesDialog::slotImageSelected( TQListViewItem * item ) { if ( !item || m_listFiles->childCount() == 0 ) { @@ -323,26 +323,26 @@ void BatchProcessImagesDialog::slotImageSelected( QListViewItem * item ) m_imageLabel->clear(); - QString IdemIndexed = "file:" + pitem->pathSrc(); + TQString IdemIndexed = "file:" + pitem->pathSrc(); KURL url(IdemIndexed); KIO::PreviewJob* m_thumbJob = KIO::filePreview( url, m_imageLabel->height() ); - connect(m_thumbJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), - this, SLOT(slotGotPreview(const KFileItem*, const QPixmap&))); + connect(m_thumbJob, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), + this, TQT_SLOT(slotGotPreview(const KFileItem*, const TQPixmap&))); } -void BatchProcessImagesDialog::slotGotPreview(const KFileItem* url, const QPixmap &pixmap) +void BatchProcessImagesDialog::slotGotPreview(const KFileItem* url, const TQPixmap &pixmap) { - QPixmap pix( pixmap ); + TQPixmap pix( pixmap ); // Rotate the thumbnail compared to the angle the host application dictate KIPI::ImageInfo info = m_interface->info( url->url() ); if ( info.angle() != 0 ) { - QImage img = pix.convertToImage(); - QWMatrix matrix; + TQImage img = pix.convertToImage(); + TQWMatrix matrix; matrix.rotate( info.angle() ); img = img.xForm( matrix ); @@ -352,13 +352,13 @@ void BatchProcessImagesDialog::slotGotPreview(const KFileItem* url, const QPixma m_imageLabel->setPixmap(pix); } -void BatchProcessImagesDialog::slotAddDropItems(QStringList filesPath) +void BatchProcessImagesDialog::slotAddDropItems(TQStringList filesPath) { if (filesPath.isEmpty()) return; - for ( QStringList::Iterator it = filesPath.begin() ; it != filesPath.end() ; ++it ) + for ( TQStringList::Iterator it = filesPath.begin() ; it != filesPath.end() ; ++it ) { - QString currentDropFile = *it; + TQString currentDropFile = *it; // Check if the new item already exist in the list. @@ -366,7 +366,7 @@ void BatchProcessImagesDialog::slotAddDropItems(QStringList filesPath) for ( KURL::List::Iterator it2 = m_selectedImageFiles.begin() ; it2 != m_selectedImageFiles.end() ; ++it2 ) { - QString currentFile = (*it2).path(); // PENDING(blackie) Handle URL's + TQString currentFile = (*it2).path(); // PENDING(blackie) Handle URL's if ( currentFile == currentDropFile ) findItem = true; @@ -379,7 +379,7 @@ void BatchProcessImagesDialog::slotAddDropItems(QStringList filesPath) listImageFiles(); } -void BatchProcessImagesDialog::closeEvent ( QCloseEvent *e ) +void BatchProcessImagesDialog::closeEvent ( TQCloseEvent *e ) { if (!e) return; @@ -406,11 +406,11 @@ void BatchProcessImagesDialog::slotProcessStart( void ) return; } - m_convertStatus = UNDER_PROCESS; - disconnect( this, SIGNAL(user1Clicked()), this, SLOT(slotProcessStart())); + m_converttqStatus = UNDER_PROCESS; + disconnect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotProcessStart())); showButtonCancel( false ); setButtonText( User1, i18n("&Stop") ); - connect(this, SIGNAL(user1Clicked()), this, SLOT(slotProcessStop())); + connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotProcessStop())); m_labelType->setEnabled(false); m_Type->setEnabled(false); @@ -426,23 +426,23 @@ void BatchProcessImagesDialog::slotProcessStart( void ) m_addImagesButton->setEnabled(false); m_remImagesButton->setEnabled(false); - m_listFile2Process_iterator = new QListViewItemIterator( m_listFiles ); + m_listFile2Process_iterator = new TQListViewItemIterator( m_listFiles ); startProcess(); } bool BatchProcessImagesDialog::startProcess(void) { - if ( m_convertStatus == STOP_PROCESS ) + if ( m_converttqStatus == STOP_PROCESS ) { endProcess(); return true; } - QString targetAlbum = m_destinationURL->url(); + TQString targetAlbum = m_destinationURL->url(); //TODO check if it is valid also for remote URL's // this is a workarond for bug 117397 - QFileInfo dirInfo(targetAlbum + "/"); + TQFileInfo dirInfo(targetAlbum + "/"); if (!dirInfo.isDir () || !dirInfo.isWritable()) { KMessageBox::error(this, i18n("You must specify a writable path for your output file.")); @@ -456,8 +456,8 @@ bool BatchProcessImagesDialog::startProcess(void) if ( prepareStartProcess(item, targetAlbum) == false ) // If there is a problem during the { // preparation -> pass to the next item! ++*m_listFile2Process_iterator; - ++m_progressStatus; - m_progress->setValue((int)((float)m_progressStatus *(float)100 / (float)m_nbItem)); + ++m_progresstqStatus; + m_progress->setValue((int)((float)m_progresstqStatus *(float)100 / (float)m_nbItem)); item = static_cast<BatchProcessImagesItem*>( m_listFile2Process_iterator->current() ); m_listFiles->setCurrentItem(item); @@ -476,7 +476,7 @@ bool BatchProcessImagesDialog::startProcess(void) KURL desturl(targetAlbum + "/" + item->nameDest()); #if KDE_VERSION >= 0x30200 - if ( KIO::NetAccess::exists( desturl, false, kapp->activeWindow() ) == true ) + if ( KIO::NetAccess::exists( desturl, false, TQT_TQWIDGET(kapp->activeWindow()) ) == true ) #else if ( KIO::NetAccess::exists( desturl ) == true ) #endif @@ -487,7 +487,7 @@ bool BatchProcessImagesDialog::startProcess(void) { int ValRet = KMessageBox::warningYesNoCancel(this, i18n("The destination file \"%1\" already exists;\n" - "do you want overwrite it?").arg(item->nameDest()), + "do you want overwrite it?").tqarg(item->nameDest()), i18n("Overwrite Destination Image File"), KStdGuiItem::cont()); if ( ValRet == KMessageBox::No ) @@ -495,8 +495,8 @@ bool BatchProcessImagesDialog::startProcess(void) item->changeResult(i18n("Skipped.")); item->changeError(i18n("destination image file already exists (skipped by user).")); ++*m_listFile2Process_iterator; - ++m_progressStatus; - m_progress->setValue((int)((float)m_progressStatus *(float)100 / (float)m_nbItem)); + ++m_progresstqStatus; + m_progress->setValue((int)((float)m_progresstqStatus *(float)100 / (float)m_nbItem)); if ( m_listFile2Process_iterator->current() ) { @@ -524,16 +524,16 @@ bool BatchProcessImagesDialog::startProcess(void) case OVERWRITE_RENAME: { - QFileInfo *Target = new QFileInfo(targetAlbum + "/" + item->nameDest()); - QString newFileName = RenameTargetImageFile(Target); + TQFileInfo *Target = new TQFileInfo(targetAlbum + "/" + item->nameDest()); + TQString newFileName = RenameTargetImageFile(Target); if ( newFileName.isNull() ) { item->changeResult(i18n("Failed.")); item->changeError(i18n("destination image file already exists and cannot be renamed.")); ++*m_listFile2Process_iterator; - ++m_progressStatus; - m_progress->setValue((int)((float)m_progressStatus *(float)100 / (float)m_nbItem)); + ++m_progresstqStatus; + m_progress->setValue((int)((float)m_progresstqStatus *(float)100 / (float)m_nbItem)); if ( m_listFile2Process_iterator->current() ) { @@ -548,7 +548,7 @@ bool BatchProcessImagesDialog::startProcess(void) } else { - QFileInfo *newTarget = new QFileInfo(newFileName); + TQFileInfo *newTarget = new TQFileInfo(newFileName); item->changeNameDest(newTarget->fileName()); } @@ -560,8 +560,8 @@ bool BatchProcessImagesDialog::startProcess(void) item->changeResult(i18n("Skipped.")); item->changeError(i18n("destination image file already exists (skipped automatically).")); ++*m_listFile2Process_iterator; - ++m_progressStatus; - m_progress->setValue((int)((float)m_progressStatus *(float)100 / (float)m_nbItem)); + ++m_progresstqStatus; + m_progress->setValue((int)((float)m_progresstqStatus *(float)100 / (float)m_nbItem)); if ( m_listFile2Process_iterator->current() ) { @@ -589,20 +589,20 @@ bool BatchProcessImagesDialog::startProcess(void) } } - m_commandLine = QString(); + m_commandLine = TQString(); m_ProcessusProc = new KProcess; m_commandLine.append(makeProcess(m_ProcessusProc, item, targetAlbum)); item->changeOutputMess(m_commandLine + "\n\n"); - connect(m_ProcessusProc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotProcessDone(KProcess*))); + connect(m_ProcessusProc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotProcessDone(KProcess*))); - connect(m_ProcessusProc, SIGNAL(receivedStdout(KProcess *, char*, int)), - this, SLOT(slotReadStd(KProcess*, char*, int))); + connect(m_ProcessusProc, TQT_SIGNAL(receivedStdout(KProcess *, char*, int)), + this, TQT_SLOT(slotReadStd(KProcess*, char*, int))); - connect(m_ProcessusProc, SIGNAL(receivedStderr(KProcess *, char*, int)), - this, SLOT(slotReadStd(KProcess*, char*, int))); + connect(m_ProcessusProc, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)), + this, TQT_SLOT(slotReadStd(KProcess*, char*, int))); bool result = m_ProcessusProc->start(KProcess::NotifyOnExit, KProcess::All); if(!result) @@ -618,12 +618,12 @@ bool BatchProcessImagesDialog::startProcess(void) void BatchProcessImagesDialog::slotReadStd(KProcess* /*proc*/, char *buffer, int buflen) { BatchProcessImagesItem *item = static_cast<BatchProcessImagesItem*>( m_listFile2Process_iterator->current() ); - item->changeOutputMess( QString::fromLocal8Bit(buffer, buflen) ); + item->changeOutputMess( TQString::fromLocal8Bit(buffer, buflen) ); } void BatchProcessImagesDialog::slotProcessDone(KProcess* proc) { - if ( m_convertStatus == PROCESS_DONE ) + if ( m_converttqStatus == PROCESS_DONE ) { // processAborted() has already been called. No need to show the warning. return; @@ -647,8 +647,8 @@ void BatchProcessImagesDialog::slotProcessDone(KProcess* proc) item->changeResult(i18n("Failed.")); item->changeError(i18n("'convert' program from 'ImageMagick' package has been stopped abnormally.")); ++*m_listFile2Process_iterator; - ++m_progressStatus; - m_progress->setValue((int)((float)m_progressStatus *(float)100 / (float)m_nbItem)); + ++m_progresstqStatus; + m_progress->setValue((int)((float)m_progresstqStatus *(float)100 / (float)m_nbItem)); if ( m_listFile2Process_iterator->current() ) startProcess(); @@ -674,7 +674,7 @@ void BatchProcessImagesDialog::slotProcessDone(KProcess* proc) src.setPath( item->pathSrc() ); KURL dest = m_destinationURL->url(); dest.addPath( item->nameDest() ); - QString errmsg; + TQString errmsg; KURL::List urlList; urlList.append(src); @@ -690,7 +690,7 @@ void BatchProcessImagesDialog::slotProcessDone(KProcess* proc) { int code = KMessageBox::warningContinueCancel( this, i18n("<qt>Error adding image to application; error message was: " - "<b>%1</b></qt>").arg( errmsg ), + "<b>%1</b></qt>").tqarg( errmsg ), i18n("Error Adding Image to Application") ); if ( code == KMessageBox::Cancel ) @@ -715,7 +715,7 @@ void BatchProcessImagesDialog::slotProcessDone(KProcess* proc) KURL deleteImage(item->pathSrc()); #if KDE_VERSION >= 0x30200 - if ( KIO::NetAccess::del( deleteImage, kapp->activeWindow() ) == false ) + if ( KIO::NetAccess::del( deleteImage, TQT_TQWIDGET(kapp->activeWindow()) ) == false ) #else if ( KIO::NetAccess::del( deleteImage ) == false ) #endif @@ -742,8 +742,8 @@ void BatchProcessImagesDialog::slotProcessDone(KProcess* proc) } ++*m_listFile2Process_iterator; - ++m_progressStatus; - m_progress->setValue((int)((float)m_progressStatus *(float)100 / (float)m_nbItem)); + ++m_progresstqStatus; + m_progress->setValue((int)((float)m_progresstqStatus *(float)100 / (float)m_nbItem)); if ( m_listFile2Process_iterator->current() ) startProcess(); @@ -751,17 +751,17 @@ void BatchProcessImagesDialog::slotProcessDone(KProcess* proc) endProcess(); } -void BatchProcessImagesDialog::slotListDoubleClicked(QListViewItem *itemClicked) +void BatchProcessImagesDialog::slotListDoubleClicked(TQListViewItem *itemClicked) { BatchProcessImagesItem *item = static_cast<BatchProcessImagesItem*>( itemClicked ); - if (m_convertStatus == PROCESS_DONE) + if (m_converttqStatus == PROCESS_DONE) { OutputDialog *infoDialog = new OutputDialog(this, i18n("Image processing error"), item->outputMess(), i18n("Image \"%1\": %2\n\nThe output messages are:\n") - .arg(item->nameSrc()).arg(item->error()) + .tqarg(item->nameSrc()).tqarg(item->error()) ); infoDialog->exec(); } @@ -792,31 +792,31 @@ void BatchProcessImagesDialog::slotPreview(void) m_addImagesButton->setEnabled(false); m_remImagesButton->setEnabled(false); - disconnect( this, SIGNAL(user1Clicked()), - this, SLOT(slotProcessStart())); + disconnect( this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotProcessStart())); showButtonCancel( false ); setButtonText( User1, i18n("&Stop") ); - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotPreviewStop())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotPreviewStop())); m_previewOutput = ""; m_PreviewProc = new KProcess; - m_previewOutput.append(makeProcess(m_PreviewProc, item, QString(), true)); + m_previewOutput.append(makeProcess(m_PreviewProc, item, TQString(), true)); - *m_PreviewProc << m_tmpFolder + "/" + QString::number(getpid()) + "preview.PNG"; - m_previewOutput.append( " " + m_tmpFolder + "/" + QString::number(getpid()) + "preview.PNG\n\n"); + *m_PreviewProc << m_tmpFolder + "/" + TQString::number(getpid()) + "preview.PNG"; + m_previewOutput.append( " " + m_tmpFolder + "/" + TQString::number(getpid()) + "preview.PNG\n\n"); - connect(m_PreviewProc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotPreviewProcessDone(KProcess*))); + connect(m_PreviewProc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotPreviewProcessDone(KProcess*))); - connect(m_PreviewProc, SIGNAL(receivedStdout(KProcess *, char*, int)), - this, SLOT(slotPreviewReadStd(KProcess*, char*, int))); + connect(m_PreviewProc, TQT_SIGNAL(receivedStdout(KProcess *, char*, int)), + this, TQT_SLOT(slotPreviewReadStd(KProcess*, char*, int))); - connect(m_PreviewProc, SIGNAL(receivedStderr(KProcess *, char*, int)), - this, SLOT(slotPreviewReadStd(KProcess*, char*, int))); + connect(m_PreviewProc, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)), + this, TQT_SLOT(slotPreviewReadStd(KProcess*, char*, int))); bool result = m_PreviewProc->start(KProcess::NotifyOnExit, KProcess::All); if(!result) @@ -830,7 +830,7 @@ void BatchProcessImagesDialog::slotPreview(void) void BatchProcessImagesDialog::slotPreviewReadStd(KProcess* /*proc*/, char *buffer, int buflen) { - m_previewOutput.append( QString::fromLocal8Bit(buffer, buflen) ); + m_previewOutput.append( TQString::fromLocal8Bit(buffer, buflen) ); } void BatchProcessImagesDialog::slotPreviewProcessDone(KProcess* proc) @@ -849,14 +849,14 @@ void BatchProcessImagesDialog::slotPreviewProcessDone(KProcess* proc) if ( ValRet == 0 ) { - QString cropTitle = ""; + TQString cropTitle = ""; if ( m_smallPreview->isChecked() ) cropTitle = i18n(" - small preview"); ImagePreview *previewDialog = new ImagePreview( item->pathSrc(), - m_tmpFolder + "/" + QString::number(getpid()) + "preview.PNG", + m_tmpFolder + "/" + TQString::number(getpid()) + "preview.PNG", m_tmpFolder, m_smallPreview->isChecked(), false, @@ -865,10 +865,10 @@ void BatchProcessImagesDialog::slotPreviewProcessDone(KProcess* proc) this); previewDialog->exec(); - KURL deletePreviewImage(m_tmpFolder + "/" + QString::number(getpid()) + "preview.PNG"); + KURL deletePreviewImage(m_tmpFolder + "/" + TQString::number(getpid()) + "preview.PNG"); #if KDE_VERSION >= 0x30200 - KIO::NetAccess::del( deletePreviewImage, kapp->activeWindow() ); + KIO::NetAccess::del( deletePreviewImage, TQT_TQWIDGET(kapp->activeWindow()) ); #else KIO::NetAccess::del( deletePreviewImage ); #endif @@ -880,7 +880,7 @@ void BatchProcessImagesDialog::slotPreviewProcessDone(KProcess* proc) m_previewOutput, i18n("Cannot process preview for image \"%1\"." "\nThe output messages are:\n") - .arg(item->nameSrc()) + .tqarg(item->nameSrc()) ); infoDialog->exec(); } @@ -902,7 +902,7 @@ void BatchProcessImagesDialog::slotProcessStop( void ) if ( m_ProcessusProc->isRunning() == true ) m_ProcessusProc->kill(SIGTERM); // If kill operation failed, Stop the process at the next image ! - if ( m_convertStatus == UNDER_PROCESS ) m_convertStatus = STOP_PROCESS; + if ( m_converttqStatus == UNDER_PROCESS ) m_converttqStatus = STOP_PROCESS; processAborted(true); } @@ -926,14 +926,14 @@ void BatchProcessImagesDialog::listImageFiles(void) for ( KURL::List::Iterator it = m_selectedImageFiles.begin() ; it != m_selectedImageFiles.end() ; ++it ) { - QString currentFile = (*it).path(); // PENDING(blackie) Handle URLS - QFileInfo *fi = new QFileInfo(currentFile); + TQString currentFile = (*it).path(); // PENDING(blackie) Handle URLS + TQFileInfo *fi = new TQFileInfo(currentFile); // Check if the new item already exist in the list. bool findItem = false; - QListViewItemIterator it2( m_listFiles ); + TQListViewItemIterator it2( m_listFiles ); while ( it2.current() ) { @@ -947,8 +947,8 @@ void BatchProcessImagesDialog::listImageFiles(void) if (findItem == false) { - QString oldFileName = fi->fileName(); - QString newFileName = oldFileName2NewFileName(oldFileName); + TQString oldFileName = fi->fileName(); + TQString newFileName = oldFileName2NewFileName(oldFileName); new BatchProcessImagesItem(m_listFiles, currentFile.section('/', 0, -1), @@ -987,16 +987,16 @@ void BatchProcessImagesDialog::endPreview(void) setButtonText( User1, i18n("&Start") ); - disconnect(this, SIGNAL(user1Clicked()), - this, SLOT(slotPreviewStop())); + disconnect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotPreviewStop())); - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotProcessStart())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotProcessStart())); } int BatchProcessImagesDialog::overwriteMode(void) { - QString OverWrite = m_overWriteMode->currentText(); + TQString OverWrite = m_overWriteMode->currentText(); if (OverWrite == i18n("Ask")) return OVERWRITE_ASK; @@ -1029,8 +1029,8 @@ void BatchProcessImagesDialog::processAborted(bool removeFlag) deleteImage.addPath(item->nameDest()); #if KDE_VERSION >= 0x30200 - if ( KIO::NetAccess::exists( deleteImage, false, kapp->activeWindow() ) == true ) - KIO::NetAccess::del( deleteImage, kapp->activeWindow() ); + if ( KIO::NetAccess::exists( deleteImage, false, TQT_TQWIDGET(kapp->activeWindow()) ) == true ) + KIO::NetAccess::del( deleteImage, TQT_TQWIDGET(kapp->activeWindow()) ); #else if ( KIO::NetAccess::exists( deleteImage ) == true ) KIO::NetAccess::del( deleteImage ); @@ -1042,19 +1042,19 @@ void BatchProcessImagesDialog::processAborted(bool removeFlag) void BatchProcessImagesDialog::endProcess(void) { - m_convertStatus = PROCESS_DONE; + m_converttqStatus = PROCESS_DONE; setButtonText( User1, i18n("&Close") ); - disconnect(this, SIGNAL(user1Clicked()), - this, SLOT(slotProcessStop())); + disconnect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotProcessStop())); - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotOk())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotOk())); } -QString BatchProcessImagesDialog::RenameTargetImageFile(QFileInfo *fi) +TQString BatchProcessImagesDialog::RenameTargetImageFile(TQFileInfo *fi) { - QString Temp; + TQString Temp; int Enumerator = 0; KURL NewDestUrl; @@ -1062,28 +1062,28 @@ QString BatchProcessImagesDialog::RenameTargetImageFile(QFileInfo *fi) { ++Enumerator; Temp = Temp.setNum( Enumerator ); - NewDestUrl = fi->filePath().left( fi->filePath().findRev('.', -1)) + "_" + Temp + NewDestUrl = fi->filePath().left( fi->filePath().tqfindRev('.', -1)) + "_" + Temp + "." + fi->filePath().section('.', -1 ); } while ( Enumerator < 100 && #if KDE_VERSION >= 0x30200 - KIO::NetAccess::exists( NewDestUrl, true, kapp->activeWindow() ) + KIO::NetAccess::exists( NewDestUrl, true, TQT_TQWIDGET(kapp->activeWindow()) ) #else KIO::NetAccess::exists( NewDestUrl ) #endif == true ); - if (Enumerator == 100) return QString(); + if (Enumerator == 100) return TQString(); return (NewDestUrl.path()); } -QString BatchProcessImagesDialog::extractArguments(KProcess *proc) +TQString BatchProcessImagesDialog::extractArguments(KProcess *proc) { - QString retArguments; - QValueList<QCString> argumentsList = proc->args(); + TQString retArguments; + TQValueList<TQCString> argumentsList = proc->args(); - for ( QValueList<QCString>::iterator it = argumentsList.begin() ; it != argumentsList.end() ; ++it ) + for ( TQValueList<TQCString>::iterator it = argumentsList.begin() ; it != argumentsList.end() ; ++it ) retArguments.append(*it + " "); return (retArguments); diff --git a/kipi-plugins/batchprocessimages/batchprocessimagesdialog.h b/kipi-plugins/batchprocessimages/batchprocessimagesdialog.h index 6792781..3ae68e1 100644 --- a/kipi-plugins/batchprocessimages/batchprocessimagesdialog.h +++ b/kipi-plugins/batchprocessimages/batchprocessimagesdialog.h @@ -33,11 +33,11 @@ #define PROCESS_DONE 2 #define STOP_PROCESS 3 -// Include files for Qt +// Include files for TQt -#include <qstring.h> -#include <qpushbutton.h> -#include <qguardedptr.h> +#include <tqstring.h> +#include <tqpushbutton.h> +#include <tqguardedptr.h> // Include files for KDE @@ -55,14 +55,14 @@ #include "batchprocessimagesitem.h" #include "batchprocessimageslist.h" -class QLabel; -class QComboBox; -class QCheckBox; -class QFileInfo; -class QPushButton; -class QListViewItemIterator; -class QListViewItem; -class QGroupBox; +class TQLabel; +class TQComboBox; +class TQCheckBox; +class TQFileInfo; +class TQPushButton; +class TQListViewItemIterator; +class TQListViewItem; +class TQGroupBox; class KProcess; class KConfig; @@ -77,12 +77,13 @@ namespace KIPIBatchProcessImagesPlugin class BatchProcessImagesDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: // Don't forget to add the 'm_Type' and 'm_labelType' implementation in the constructor of - // children dialog class. + // tqchildren dialog class. - BatchProcessImagesDialog( KURL::List urlList, KIPI::Interface* interface, QString caption, QWidget *parent=0 ); + BatchProcessImagesDialog( KURL::List urlList, KIPI::Interface* interface, TQString caption, TQWidget *tqparent=0 ); ~BatchProcessImagesDialog(); protected slots: @@ -93,7 +94,7 @@ private slots: // -------------------------------------------------------------------------------------------------------- // Standards slots - void closeEvent ( QCloseEvent *e ); + void closeEvent ( TQCloseEvent *e ); void slotOk( void ); void slotProcessStart(void); @@ -105,12 +106,12 @@ private slots: void slotPreviewReadStd(KProcess* proc, char *buffer, int buflen); void slotPreviewStop( void ); - void slotListDoubleClicked(QListViewItem *itemClicked); + void slotListDoubleClicked(TQListViewItem *itemClicked); - void slotAddDropItems(QStringList filesPath); + void slotAddDropItems(TQStringList filesPath); - void slotImageSelected( QListViewItem * item ); - void slotGotPreview(const KFileItem* , const QPixmap &pixmap); + void slotImageSelected( TQListViewItem * item ); + void slotGotPreview(const KFileItem* , const TQPixmap &pixmap); void slotImagesFilesButtonAdd( void ); void slotImagesFilesButtonRem( void ); @@ -127,50 +128,50 @@ private slots: // -------------------------------------------------------------------------------------------------------- // Standards widgets in the dialog - QLabel *m_labelOverWrite; - QLabel *m_labelType; - QLabel *m_imageLabel; + TQLabel *m_labelOverWrite; + TQLabel *m_labelType; + TQLabel *m_imageLabel; - QComboBox *m_overWriteMode; - QComboBox *m_Type; + TQComboBox *m_overWriteMode; + TQComboBox *m_Type; KURLRequester *m_destinationURL; BatchProcessImagesList *m_listFiles; KProgress *m_progress; - QCheckBox *m_removeOriginal; - QCheckBox *m_smallPreview; + TQCheckBox *m_removeOriginal; + TQCheckBox *m_smallPreview; - QGroupBox *groupBox1; - QGroupBox *groupBox2; - QGroupBox *groupBox3; - QGroupBox *groupBox4; - QGroupBox *groupBox41; + TQGroupBox *groupBox1; + TQGroupBox *groupBox2; + TQGroupBox *groupBox3; + TQGroupBox *groupBox4; + TQGroupBox *groupBox41; - QPushButton *m_optionsButton; - QPushButton *m_previewButton; - QPushButton *m_addImagesButton; - QPushButton *m_remImagesButton; - QPushButton *m_helpButton; + TQPushButton *m_optionsButton; + TQPushButton *m_previewButton; + TQPushButton *m_addImagesButton; + TQPushButton *m_remImagesButton; + TQPushButton *m_helpButton; KConfig *m_config; - int m_convertStatus; - int m_progressStatus; + int m_converttqStatus; + int m_progresstqStatus; int m_nbItem; KProcess *m_ProcessusProc; KProcess *m_PreviewProc; - QListViewItemIterator *m_listFile2Process_iterator; + TQListViewItemIterator *m_listFile2Process_iterator; - QString whatsThis; - QString m_ImagesFilesSort; - QString m_newDir; - QString m_commandLine; - QString m_tmpFolder; - QString m_previewOutput; + TQString whatsThis; + TQString m_ImagesFilesSort; + TQString m_newDir; + TQString m_commandLine; + TQString m_tmpFolder; + TQString m_previewOutput; KURL::List m_selectedImageFiles; KIPI::Interface *m_interface; @@ -189,12 +190,12 @@ private slots: // Called for rename the target current image file name if already exist. - QString RenameTargetImageFile(QFileInfo *fi); + TQString RenameTargetImageFile(TQFileInfo *fi); - // Extract the arguments from a KProcess an merge that in a QString. Used by makeProcess for to + // Extract the arguments from a KProcess an merge that in a TQString. Used by makeProcess for to // show the command line arguments (debugging). - QString extractArguments(KProcess *proc); + TQString extractArguments(KProcess *proc); // -------------------------------------------------------------------------------------------------------- // Standards virtuals fonctions for re-implementation. @@ -214,15 +215,15 @@ private slots: // Called by 'startProcess' fonction at start. You can checking here some things about the current // 'item' before the 'startprocess' fonction execution. - virtual bool prepareStartProcess(BatchProcessImagesItem */*item*/, const QString& /*albumDest*/) { return true; }; + virtual bool prepareStartProcess(BatchProcessImagesItem */*item*/, const TQString& /*albumDest*/) { return true; }; // Called for to contruct the ImageMagick command line used for to process or preview the image traitements. // If 'albumDest' = 0L ==> preview process. - virtual QString makeProcess(KProcess* /*proc*/, BatchProcessImagesItem */*item*/, - const QString& /*albumDest*/ = QString::null, + virtual TQString makeProcess(KProcess* /*proc*/, BatchProcessImagesItem */*item*/, + const TQString& /*albumDest*/ = TQString(), bool /*previewMode*/ = false) - { return QString::null; }; + { return TQString(); }; virtual void processDone(){}; @@ -237,7 +238,7 @@ private slots: // Called by 'listImageFiles' for renamed if necessary the target image file name. - virtual QString oldFileName2NewFileName(QString fileName) + virtual TQString oldFileName2NewFileName(TQString fileName) { return (fileName); }; }; diff --git a/kipi-plugins/batchprocessimages/batchprocessimagesitem.cpp b/kipi-plugins/batchprocessimages/batchprocessimagesitem.cpp index caed54f..4adea96 100644 --- a/kipi-plugins/batchprocessimages/batchprocessimagesitem.cpp +++ b/kipi-plugins/batchprocessimages/batchprocessimagesitem.cpp @@ -20,10 +20,10 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qpainter.h> -#include <qlistview.h> +#include <tqpainter.h> +#include <tqlistview.h> // Include files for KDE @@ -36,9 +36,9 @@ namespace KIPIBatchProcessImagesPlugin { -BatchProcessImagesItem::BatchProcessImagesItem(QListView * parent, QString const & pathSrc, - QString const & nameSrc, QString const & nameDest, QString const & result) - : KListViewItem( parent, "", nameSrc, nameDest, result), +BatchProcessImagesItem::BatchProcessImagesItem(TQListView * tqparent, TQString const & pathSrc, + TQString const & nameSrc, TQString const & nameDest, TQString const & result) + : KListViewItem( tqparent, "", nameSrc, nameDest, result), _pathSrc(pathSrc), _nameSrc(nameSrc), _nameDest(nameDest), _result(result), _overwrote( false ), _reverseSort( false ) @@ -50,36 +50,36 @@ BatchProcessImagesItem::~BatchProcessImagesItem() { } -QString BatchProcessImagesItem::pathSrc() { return _pathSrc; } -QString BatchProcessImagesItem::nameSrc() { return _nameSrc; } -QString BatchProcessImagesItem::nameDest() { return _nameDest; } -QString BatchProcessImagesItem::result() { return _result; } -QString BatchProcessImagesItem::error() { return _error; } -QString BatchProcessImagesItem::outputMess() { return _outputMess; } +TQString BatchProcessImagesItem::pathSrc() { return _pathSrc; } +TQString BatchProcessImagesItem::nameSrc() { return _nameSrc; } +TQString BatchProcessImagesItem::nameDest() { return _nameDest; } +TQString BatchProcessImagesItem::result() { return _result; } +TQString BatchProcessImagesItem::error() { return _error; } +TQString BatchProcessImagesItem::outputMess() { return _outputMess; } -void BatchProcessImagesItem::changeResult(QString text) { setText(3, text); } -void BatchProcessImagesItem::changeError(QString text) { _error = text; } -void BatchProcessImagesItem::changeNameDest(QString text) { _nameDest = text; setText(2, _nameDest); } -void BatchProcessImagesItem::changeOutputMess(QString text) { _outputMess.append(text); } +void BatchProcessImagesItem::changeResult(TQString text) { setText(3, text); } +void BatchProcessImagesItem::changeError(TQString text) { _error = text; } +void BatchProcessImagesItem::changeNameDest(TQString text) { _nameDest = text; setText(2, _nameDest); } +void BatchProcessImagesItem::changeOutputMess(TQString text) { _outputMess.append(text); } -void BatchProcessImagesItem::paintCell (QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void BatchProcessImagesItem::paintCell (TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { - QColorGroup _cg( cg ); + TQColorGroup _cg( cg ); if (text(3) != i18n("OK") && !text(3).isEmpty() ) { - _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 (text(3) == i18n("OK") ) { - _cg.setColor( QColorGroup::Text, Qt::darkGreen ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); + _cg.setColor( TQColorGroup::Text, TQt::darkGreen ); + KListViewItem::paintCell( p, _cg, column, width, tqalignment ); return; } - KListViewItem::paintCell( p, cg, column, width, alignment ); + KListViewItem::paintCell( p, cg, column, width, tqalignment ); } bool BatchProcessImagesItem::overWrote() @@ -92,13 +92,13 @@ void BatchProcessImagesItem::setDidOverWrite( bool b ) _overwrote = b; } -void BatchProcessImagesItem::setKey(const QString& val, bool reverseSort) +void BatchProcessImagesItem::setKey(const TQString& val, bool reverseSort) { _key = val; _reverseSort = reverseSort; } -QString BatchProcessImagesItem::key(int column, bool ) const +TQString BatchProcessImagesItem::key(int column, bool ) const { if (_key.isNull()) return text(column); @@ -106,7 +106,7 @@ QString BatchProcessImagesItem::key(int column, bool ) const return _key; } -int BatchProcessImagesItem::compare(QListViewItem * i, int col, bool ascending) const +int BatchProcessImagesItem::compare(TQListViewItem * i, int col, bool ascending) const { int weight = _reverseSort ? -1 : 1; return weight * key(col, ascending).localeAwareCompare(i->key( col, ascending)); diff --git a/kipi-plugins/batchprocessimages/batchprocessimagesitem.h b/kipi-plugins/batchprocessimages/batchprocessimagesitem.h index 686ac89..d9b6de7 100644 --- a/kipi-plugins/batchprocessimages/batchprocessimagesitem.h +++ b/kipi-plugins/batchprocessimages/batchprocessimagesitem.h @@ -23,17 +23,17 @@ #ifndef BATCHPROCESSIMAGESITEM_H #define BATCHPROCESSIMAGESITEM_H -// Include files for Qt +// Include files for TQt -#include <qstring.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqobject.h> // Include files for KDE #include <klistview.h> -class QPainter; -class QListView; +class TQPainter; +class TQListView; namespace KIPIBatchProcessImagesPlugin { @@ -42,40 +42,40 @@ class BatchProcessImagesItem : public KListViewItem { public: - BatchProcessImagesItem(QListView * parent, QString const & pathSrc, QString const & nameSrc, - QString const & nameDest, QString const & result); + BatchProcessImagesItem(TQListView * tqparent, TQString const & pathSrc, TQString const & nameSrc, + TQString const & nameDest, TQString const & result); ~BatchProcessImagesItem(); - QString pathSrc(); - QString nameSrc(); - QString nameDest(); - QString result(); - QString error(); - QString outputMess(); + TQString pathSrc(); + TQString nameSrc(); + TQString nameDest(); + TQString result(); + TQString error(); + TQString outputMess(); bool overWrote(); void setDidOverWrite( bool b ); - void changeResult(QString text); - void changeError(QString text); - void changeNameDest(QString text); - void changeOutputMess(QString text); + void changeResult(TQString text); + void changeError(TQString text); + void changeNameDest(TQString text); + void changeOutputMess(TQString text); - 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); - void setKey(const QString& val, bool reverseSort); - QString key(int column, bool ascending) const; - int compare (QListViewItem * i, int col, bool ascending) const; + void setKey(const TQString& val, bool reverseSort); + TQString key(int column, bool ascending) const; + int compare (TQListViewItem * i, int col, bool ascending) const; private: - QString _pathSrc; - QString _nameSrc; - QString _nameDest; - QString _result; - QString _error; - QString _outputMess; + TQString _pathSrc; + TQString _nameSrc; + TQString _nameDest; + TQString _result; + TQString _error; + TQString _outputMess; bool _overwrote; - QString _key; + TQString _key; bool _reverseSort; }; diff --git a/kipi-plugins/batchprocessimages/batchprocessimageslist.cpp b/kipi-plugins/batchprocessimages/batchprocessimageslist.cpp index fd0e3fd..aa2ad34 100644 --- a/kipi-plugins/batchprocessimages/batchprocessimageslist.cpp +++ b/kipi-plugins/batchprocessimages/batchprocessimageslist.cpp @@ -20,14 +20,14 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qevent.h> -#include <qdragobject.h> -#include <qstrlist.h> -#include <qfileinfo.h> -#include <qwhatsthis.h> -#include <qlistview.h> +#include <tqevent.h> +#include <tqdragobject.h> +#include <tqstrlist.h> +#include <tqfileinfo.h> +#include <tqwhatsthis.h> +#include <tqlistview.h> // Include files for KDE @@ -41,8 +41,8 @@ namespace KIPIBatchProcessImagesPlugin { -BatchProcessImagesList::BatchProcessImagesList(QWidget *parent, const char *name) - : KListView(parent, name) +BatchProcessImagesList::BatchProcessImagesList(TQWidget *tqparent, const char *name) + : KListView(tqparent, name) { setAcceptDrops(true); setDropVisualizer(false); @@ -52,10 +52,10 @@ BatchProcessImagesList::BatchProcessImagesList(QWidget *parent, const char *name addColumn(i18n("Result")); setSorting(3); setItemMargin(3); - setResizeMode(QListView::LastColumn); - setSelectionMode(QListView::Single); + setResizeMode(TQListView::LastColumn); + setSelectionMode(TQListView::Single); setAllColumnsShowFocus ( true ); - QWhatsThis::add( this, i18n("<p>You can see here the operations' results " + TQWhatsThis::add( this, i18n("<p>You can see here the operations' results " "during the process. Double-click on an item for more " "information once the process has ended. " "<p>You can use the \"Add\" button or drag-and-drop " @@ -64,41 +64,41 @@ BatchProcessImagesList::BatchProcessImagesList(QWidget *parent, const char *name "the process' results will be merged to the target Album.") ); } -void BatchProcessImagesList::dragEnterEvent(QDragEnterEvent *e) +void BatchProcessImagesList::dragEnterEvent(TQDragEnterEvent *e) { - e->accept(QUriDrag::canDecode(e)); + e->accept(TQUriDrag::canDecode(e)); } -bool BatchProcessImagesList::acceptDrag(QDropEvent* e) const +bool BatchProcessImagesList::acceptDrag(TQDropEvent* e) const { - return ( QUriDrag::canDecode(e) ); + return ( TQUriDrag::canDecode(e) ); } -void BatchProcessImagesList::contentsDropEvent(QDropEvent* e) +void BatchProcessImagesList::contentsDropEvent(TQDropEvent* e) { droppedImagesItems(e); } -void BatchProcessImagesList::dropEvent(QDropEvent *e) +void BatchProcessImagesList::dropEvent(TQDropEvent *e) { droppedImagesItems(e); } -void BatchProcessImagesList::droppedImagesItems(QDropEvent *e) +void BatchProcessImagesList::droppedImagesItems(TQDropEvent *e) { - QStrList strList; - QStringList FilesPath; + TQStrList strList; + TQStringList FilesPath; - if ( !QUriDrag::decode(e, strList) ) return; + if ( !TQUriDrag::decode(e, strList) ) return; - QStrList stringList; - QStrListIterator it(strList); + TQStrList stringList; + TQStrListIterator it(strList); char *str; while ( (str = it.current()) != 0 ) { - QString filePath = QUriDrag::uriToLocalFile(str); - QFileInfo fileInfo(filePath); + TQString filePath = TQUriDrag::uriToLocalFile(str); + TQFileInfo fileInfo(filePath); if (fileInfo.isFile() && fileInfo.exists()) FilesPath.append(fileInfo.filePath()); diff --git a/kipi-plugins/batchprocessimages/batchprocessimageslist.h b/kipi-plugins/batchprocessimages/batchprocessimageslist.h index 4c078c6..95359e2 100644 --- a/kipi-plugins/batchprocessimages/batchprocessimageslist.h +++ b/kipi-plugins/batchprocessimages/batchprocessimageslist.h @@ -23,9 +23,9 @@ #ifndef BATCHPROCESSIMAGE_H #define BATCHPROCESSIMAGE_H -// Include files for Qt +// Include files for TQt -#include <qobject.h> +#include <tqobject.h> // Include files for KDE @@ -37,19 +37,20 @@ namespace KIPIBatchProcessImagesPlugin class BatchProcessImagesList : public KListView { Q_OBJECT + TQ_OBJECT public: - BatchProcessImagesList(QWidget *parent=0, const char *name=0); + BatchProcessImagesList(TQWidget *tqparent=0, const char *name=0); signals: - void addedDropItems(QStringList filesPath); + void addedDropItems(TQStringList filesPath); protected: - void dragEnterEvent(QDragEnterEvent *e); - void dropEvent(QDropEvent* e); - bool acceptDrag(QDropEvent* e) const; - void contentsDropEvent(QDropEvent* e); - void droppedImagesItems(QDropEvent *e); + void dragEnterEvent(TQDragEnterEvent *e); + void dropEvent(TQDropEvent* e); + bool acceptDrag(TQDropEvent* e) const; + void contentsDropEvent(TQDropEvent* e); + void droppedImagesItems(TQDropEvent *e); }; } // NameSpace KIPIBatchProcessImagesPlugin diff --git a/kipi-plugins/batchprocessimages/borderimagesdialog.cpp b/kipi-plugins/batchprocessimages/borderimagesdialog.cpp index 8ce5894..94c7063 100644 --- a/kipi-plugins/batchprocessimages/borderimagesdialog.cpp +++ b/kipi-plugins/batchprocessimages/borderimagesdialog.cpp @@ -20,14 +20,14 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qgroupbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> // Include files for KDE @@ -55,8 +55,8 @@ namespace KIPIBatchProcessImagesPlugin { -BorderImagesDialog::BorderImagesDialog( KURL::List urlList, KIPI::Interface* interface, QWidget *parent ) - : BatchProcessImagesDialog( urlList, interface, i18n("Batch-Bordering Images"), parent ) +BorderImagesDialog::BorderImagesDialog( KURL::List urlList, KIPI::Interface* interface, TQWidget *tqparent ) + : BatchProcessImagesDialog( urlList, interface, i18n("Batch-Bordering Images"), tqparent ) { // About data and help button. @@ -73,7 +73,7 @@ BorderImagesDialog::BorderImagesDialog( KURL::List urlList, KIPI::Interface* int m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); //--------------------------------------------- @@ -101,7 +101,7 @@ BorderImagesDialog::BorderImagesDialog( KURL::List urlList, KIPI::Interface* int "<b>Raise</b>: creating a 3D effect around the images.<p>" "<b>Frame</b>: surround the images with an ornamental border.<p>"); - QWhatsThis::add( m_Type, whatsThis ); + TQWhatsThis::add( m_Type, whatsThis ); //--------------------------------------------- @@ -184,8 +184,8 @@ void BorderImagesDialog::readSettings(void) m_config->setGroup("BorderImages Settings"); m_Type->setCurrentItem(m_config->readNumEntry("BorderType", 1)); // Niepce per default. - QColor *ColorBlack = new QColor( 0, 0, 0 ); - QColor *ColorWhite = new QColor( 255, 255, 255 ); + TQColor *ColorBlack = new TQColor( 0, 0, 0 ); + TQColor *ColorWhite = new TQColor( 255, 255, 255 ); m_solidWidth = m_config->readNumEntry("SolidWidth", 25); m_solidColor = m_config->readColorEntry("SolidColor", ColorBlack); @@ -248,8 +248,8 @@ void BorderImagesDialog::saveSettings(void) delete m_config; } -QString BorderImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode) +TQString BorderImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode) { *proc << "convert"; @@ -262,7 +262,7 @@ QString BorderImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 0) // Solid { *proc << "-border"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_solidWidth ) + "x"; Temp2.append(Temp.setNum( m_solidWidth )); *proc << Temp2; @@ -275,7 +275,7 @@ QString BorderImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 1) // Niepce { - QString Temp, Temp2; + TQString Temp, Temp2; *proc << "-border"; Temp2 = Temp.setNum( m_lineNiepceWidth ) + "x"; @@ -303,7 +303,7 @@ QString BorderImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 2) // Raise { *proc << "-raise"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_raiseWidth ) + "x"; Temp2.append(Temp.setNum( m_raiseWidth )); *proc << Temp2; @@ -312,7 +312,7 @@ QString BorderImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 3) // Frame { *proc << "-frame"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_frameWidth ) + "x"; Temp2.append(Temp.setNum( m_frameWidth ) + "+"); Temp2.append(Temp.setNum( m_bevelWidth ) + "+"); diff --git a/kipi-plugins/batchprocessimages/borderimagesdialog.h b/kipi-plugins/batchprocessimages/borderimagesdialog.h index f0cd7aa..a73cbeb 100644 --- a/kipi-plugins/batchprocessimages/borderimagesdialog.h +++ b/kipi-plugins/batchprocessimages/borderimagesdialog.h @@ -36,10 +36,11 @@ class BatchProcessImagesItem; class BorderImagesDialog : public BatchProcessImagesDialog { Q_OBJECT + TQ_OBJECT public: - BorderImagesDialog( KURL::List images, KIPI::Interface* interface, QWidget *parent=0 ); + BorderImagesDialog( KURL::List images, KIPI::Interface* interface, TQWidget *tqparent=0 ); ~BorderImagesDialog(); private slots: @@ -50,21 +51,21 @@ Q_OBJECT protected: int m_solidWidth; - QColor m_solidColor; + TQColor m_solidColor; int m_lineNiepceWidth; - QColor m_lineNiepceColor; + TQColor m_lineNiepceColor; int m_NiepceWidth; - QColor m_NiepceColor; + TQColor m_NiepceColor; int m_raiseWidth; int m_frameWidth; int m_bevelWidth; - QColor m_frameColor; + TQColor m_frameColor; - QString makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode); + TQString makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode); void readSettings(void); void saveSettings(void); diff --git a/kipi-plugins/batchprocessimages/borderoptionsdialog.cpp b/kipi-plugins/batchprocessimages/borderoptionsdialog.cpp index bc69173..70dcfbd 100644 --- a/kipi-plugins/batchprocessimages/borderoptionsdialog.cpp +++ b/kipi-plugins/batchprocessimages/borderoptionsdialog.cpp @@ -20,18 +20,18 @@ * * ============================================================ */ -// Include files for Qt - -#include <qvbox.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qstring.h> -#include <qcombobox.h> -#include <qcolor.h> +// Include files for TQt + +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqstring.h> +#include <tqcombobox.h> +#include <tqcolor.h> // Include files for KDE @@ -47,104 +47,104 @@ namespace KIPIBatchProcessImagesPlugin { -BorderOptionsDialog::BorderOptionsDialog(QWidget *parent, int BorderType) - : KDialogBase( parent, "BorderOptionsDialog", true, +BorderOptionsDialog::BorderOptionsDialog(TQWidget *tqparent, int BorderType) + : KDialogBase( tqparent, "BorderOptionsDialog", true, i18n("Border Options"), Ok|Cancel, Ok, false) { - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout *dvlay = new QVBoxLayout( box, 10, spacingHint() ); - QString whatsThis; + TQVBoxLayout *dvlay = new TQVBoxLayout( box, 10, spacingHint() ); + TQString whatsThis; if (BorderType == 0) // Solid { - QLabel *m_label_solidBorderWidth = new QLabel (i18n("Border width:"), box); + TQLabel *m_label_solidBorderWidth = new TQLabel (i18n("Border width:"), box); dvlay->addWidget( m_label_solidBorderWidth ); m_solidBorderWidth = new KIntNumInput(25, box); m_solidBorderWidth->setRange(1, 1000, 1, true ); - QWhatsThis::add( m_solidBorderWidth, i18n("<p>Select here the border width in pixels.") ); + TQWhatsThis::add( m_solidBorderWidth, i18n("<p>Select here the border width in pixels.") ); m_label_solidBorderWidth->setBuddy( m_solidBorderWidth ); dvlay->addWidget( m_solidBorderWidth ); - QLabel *m_label_solidColor = new QLabel(i18n("Border color:"), box); + TQLabel *m_label_solidColor = new TQLabel(i18n("Border color:"), box); dvlay->addWidget( m_label_solidColor ); - QColor solidBorderColor = QColor( 0, 0, 0 ); // Black per default. + TQColor solidBorderColor = TQColor( 0, 0, 0 ); // Black per default. m_button_solidBorderColor = new KColorButton( solidBorderColor, box ); - QWhatsThis::add( m_button_solidBorderColor, i18n( "<p>You can select here the border color." )); + TQWhatsThis::add( m_button_solidBorderColor, i18n( "<p>You can select here the border color." )); dvlay->addWidget( m_button_solidBorderColor ); } if (BorderType == 1) // Niepce { - QLabel *m_label_lineNiepceBorderWidth = new QLabel (i18n("Line border width:"), box); + TQLabel *m_label_lineNiepceBorderWidth = new TQLabel (i18n("Line border width:"), box); dvlay->addWidget( m_label_lineNiepceBorderWidth ); m_lineNiepceBorderWidth = new KIntNumInput(10, box); m_lineNiepceBorderWidth->setRange(1, 500, 1, true ); - QWhatsThis::add( m_lineNiepceBorderWidth, i18n("<p>Select here the line border width in pixels.") ); + TQWhatsThis::add( m_lineNiepceBorderWidth, i18n("<p>Select here the line border width in pixels.") ); m_label_lineNiepceBorderWidth->setBuddy( m_lineNiepceBorderWidth ); dvlay->addWidget( m_lineNiepceBorderWidth ); - QLabel *m_label_lineNiepceColor = new QLabel(i18n("Line border color:"), box); + TQLabel *m_label_lineNiepceColor = new TQLabel(i18n("Line border color:"), box); dvlay->addWidget( m_label_lineNiepceColor ); - QColor lineNiepceBorderColor = QColor( 0, 0, 0 ); // Black per default. + TQColor lineNiepceBorderColor = TQColor( 0, 0, 0 ); // Black per default. m_button_lineNiepceBorderColor = new KColorButton( lineNiepceBorderColor, box ); - QWhatsThis::add( m_button_lineNiepceBorderColor, i18n( "<p>You can select here the line border color." )); + TQWhatsThis::add( m_button_lineNiepceBorderColor, i18n( "<p>You can select here the line border color." )); dvlay->addWidget( m_button_lineNiepceBorderColor ); - QLabel *m_label_NiepceBorderWidth = new QLabel (i18n("Border width:"), box); + TQLabel *m_label_NiepceBorderWidth = new TQLabel (i18n("Border width:"), box); dvlay->addWidget( m_label_NiepceBorderWidth ); m_NiepceBorderWidth = new KIntNumInput(100, box); m_NiepceBorderWidth->setRange(1, 500, 1, true ); - QWhatsThis::add( m_NiepceBorderWidth, i18n("<p>Select here the border width in pixels.") ); + TQWhatsThis::add( m_NiepceBorderWidth, i18n("<p>Select here the border width in pixels.") ); m_label_NiepceBorderWidth->setBuddy( m_NiepceBorderWidth ); dvlay->addWidget( m_NiepceBorderWidth ); - QLabel *m_label_NiepceColor = new QLabel(i18n("Border color:"), box); + TQLabel *m_label_NiepceColor = new TQLabel(i18n("Border color:"), box); dvlay->addWidget( m_label_NiepceColor ); - QColor NiepceBorderColor = QColor( 255, 255, 255 ); // White per default. + TQColor NiepceBorderColor = TQColor( 255, 255, 255 ); // White per default. m_button_NiepceBorderColor = new KColorButton( NiepceBorderColor, box ); - QWhatsThis::add( m_button_NiepceBorderColor, i18n( "<p>You can select here the border color." )); + TQWhatsThis::add( m_button_NiepceBorderColor, i18n( "<p>You can select here the border color." )); dvlay->addWidget( m_button_NiepceBorderColor ); } if (BorderType == 2) // Raise { - QLabel *m_label_raiseBorderWidth = new QLabel (i18n("Border width:"), box); + TQLabel *m_label_raiseBorderWidth = new TQLabel (i18n("Border width:"), box); dvlay->addWidget( m_label_raiseBorderWidth ); m_raiseBorderWidth = new KIntNumInput(50, box); m_raiseBorderWidth->setRange(1, 500, 1, true ); - QWhatsThis::add( m_raiseBorderWidth, i18n("<p>Select here the border width in pixels.") ); + TQWhatsThis::add( m_raiseBorderWidth, i18n("<p>Select here the border width in pixels.") ); m_label_raiseBorderWidth->setBuddy( m_raiseBorderWidth ); dvlay->addWidget( m_raiseBorderWidth ); } if (BorderType == 3) // Frame { - QLabel *m_label_frameBorderWidth = new QLabel (i18n("Border width:"), box); + TQLabel *m_label_frameBorderWidth = new TQLabel (i18n("Border width:"), box); dvlay->addWidget( m_label_frameBorderWidth ); m_frameBorderWidth = new KIntNumInput(25, box); m_frameBorderWidth->setRange(0, 500, 1, true ); - QWhatsThis::add( m_frameBorderWidth, i18n("<p>Select here the border width in pixels.") ); + TQWhatsThis::add( m_frameBorderWidth, i18n("<p>Select here the border width in pixels.") ); m_label_frameBorderWidth->setBuddy( m_frameBorderWidth ); dvlay->addWidget( m_frameBorderWidth ); - QLabel *m_label_frameBevelBorderWidth = new QLabel (i18n("Bevel width:"), box); + TQLabel *m_label_frameBevelBorderWidth = new TQLabel (i18n("Bevel width:"), box); dvlay->addWidget( m_label_frameBevelBorderWidth ); m_frameBevelBorderWidth = new KIntNumInput(10, box); m_frameBevelBorderWidth->setRange(0, 250, 1, true ); - QWhatsThis::add( m_frameBevelBorderWidth, i18n("<p>Select here the bevel width in pixels. " + TQWhatsThis::add( m_frameBevelBorderWidth, i18n("<p>Select here the bevel width in pixels. " "This value must be <= Border width / 2") ); m_label_frameBevelBorderWidth->setBuddy( m_frameBevelBorderWidth ); dvlay->addWidget( m_frameBevelBorderWidth ); - QLabel *m_label_frameColor = new QLabel(i18n("Border color:"), box); + TQLabel *m_label_frameColor = new TQLabel(i18n("Border color:"), box); dvlay->addWidget( m_label_frameColor ); - QColor frameBorderColor = QColor( 0, 0, 0 ); // Black per default. + TQColor frameBorderColor = TQColor( 0, 0, 0 ); // Black per default. m_button_frameBorderColor = new KColorButton( frameBorderColor, box ); - QWhatsThis::add( m_button_frameBorderColor, i18n( "<p>You can select here the border color." )); + TQWhatsThis::add( m_button_frameBorderColor, i18n( "<p>You can select here the border color." )); dvlay->addWidget( m_button_frameBorderColor ); - connect(m_frameBorderWidth, SIGNAL(valueChanged(int)), this, SLOT(slotFrameBorderWidthChanged(int))); + connect(m_frameBorderWidth, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotFrameBorderWidthChanged(int))); } } diff --git a/kipi-plugins/batchprocessimages/borderoptionsdialog.h b/kipi-plugins/batchprocessimages/borderoptionsdialog.h index 3f2f514..68b1d49 100644 --- a/kipi-plugins/batchprocessimages/borderoptionsdialog.h +++ b/kipi-plugins/batchprocessimages/borderoptionsdialog.h @@ -36,9 +36,10 @@ namespace KIPIBatchProcessImagesPlugin class BorderOptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - BorderOptionsDialog(QWidget *parent=0, int BorderType = 0); + BorderOptionsDialog(TQWidget *tqparent=0, int BorderType = 0); ~BorderOptionsDialog(); KIntNumInput *m_solidBorderWidth; diff --git a/kipi-plugins/batchprocessimages/colorimagesdialog.cpp b/kipi-plugins/batchprocessimages/colorimagesdialog.cpp index 33be98e..18821b9 100644 --- a/kipi-plugins/batchprocessimages/colorimagesdialog.cpp +++ b/kipi-plugins/batchprocessimages/colorimagesdialog.cpp @@ -20,14 +20,14 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qgroupbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> // Include files for KDE @@ -54,8 +54,8 @@ namespace KIPIBatchProcessImagesPlugin { -ColorImagesDialog::ColorImagesDialog( KURL::List urlList, KIPI::Interface* interface, QWidget *parent ) - : BatchProcessImagesDialog( urlList, interface, i18n("Batch Image-Color Processing"), parent ) +ColorImagesDialog::ColorImagesDialog( KURL::List urlList, KIPI::Interface* interface, TQWidget *tqparent ) + : BatchProcessImagesDialog( urlList, interface, i18n("Batch Image-Color Processing"), tqparent ) { // About data and help button. @@ -72,7 +72,7 @@ ColorImagesDialog::ColorImagesDialog( KURL::List urlList, KIPI::Interface* inter m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); //--------------------------------------------- @@ -121,7 +121,7 @@ ColorImagesDialog::ColorImagesDialog( KURL::List urlList, KIPI::Interface* inter "<b>Trim</b>: trim an image (fuzz reverse technic). The algorithm remove edges " "that are the background color from the image.<p>"); - QWhatsThis::add( m_Type, whatsThis ); + TQWhatsThis::add( m_Type, whatsThis ); //--------------------------------------------- @@ -237,8 +237,8 @@ void ColorImagesDialog::saveSettings(void) delete m_config; } -QString ColorImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode) +TQString ColorImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode) { *proc << "convert"; @@ -265,7 +265,7 @@ QString ColorImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *i if (m_Type->currentItem() == 3) // Fuzz { - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_fuzzDistance ); *proc << "-fuzz" << Temp2; } @@ -299,7 +299,7 @@ QString ColorImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *i if (m_Type->currentItem() == 9) // Segment { *proc << "-segment"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_segmentCluster ) + "x"; Temp2.append (Temp.setNum( m_segmentSmooth )); *proc << Temp2; diff --git a/kipi-plugins/batchprocessimages/colorimagesdialog.h b/kipi-plugins/batchprocessimages/colorimagesdialog.h index 2feeb4c..132d8b4 100644 --- a/kipi-plugins/batchprocessimages/colorimagesdialog.h +++ b/kipi-plugins/batchprocessimages/colorimagesdialog.h @@ -37,10 +37,11 @@ class BatchProcessImagesItem; class ColorImagesDialog : public BatchProcessImagesDialog { Q_OBJECT + TQ_OBJECT public: - ColorImagesDialog( KURL::List images, KIPI::Interface* interface, QWidget *parent=0 ); + ColorImagesDialog( KURL::List images, KIPI::Interface* interface, TQWidget *tqparent=0 ); ~ColorImagesDialog(); private slots: @@ -51,13 +52,13 @@ Q_OBJECT protected: - QString m_depthValue; + TQString m_depthValue; int m_fuzzDistance; int m_segmentCluster; int m_segmentSmooth; - QString makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode); + TQString makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode); void readSettings(void); void saveSettings(void); diff --git a/kipi-plugins/batchprocessimages/coloroptionsdialog.cpp b/kipi-plugins/batchprocessimages/coloroptionsdialog.cpp index bd08870..6014b76 100644 --- a/kipi-plugins/batchprocessimages/coloroptionsdialog.cpp +++ b/kipi-plugins/batchprocessimages/coloroptionsdialog.cpp @@ -20,17 +20,17 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qvbox.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qcombobox.h> -#include <qcolor.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqcombobox.h> +#include <tqcolor.h> // Include files for KDE @@ -47,35 +47,35 @@ namespace KIPIBatchProcessImagesPlugin { -ColorOptionsDialog::ColorOptionsDialog(QWidget *parent, int ColorType) - : KDialogBase( parent, "ColorOptionsDialog", true, +ColorOptionsDialog::ColorOptionsDialog(TQWidget *tqparent, int ColorType) + : KDialogBase( tqparent, "ColorOptionsDialog", true, i18n("Color Options"), Ok|Cancel, Ok, false) { - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout *dvlay = new QVBoxLayout( box, 10, spacingHint() ); - QString whatsThis; + TQVBoxLayout *dvlay = new TQVBoxLayout( box, 10, spacingHint() ); + TQString whatsThis; if (ColorType == 1) // Depth { - QLabel *m_label_depthValue = new QLabel (i18n("Depth value:"), box); + TQLabel *m_label_depthValue = new TQLabel (i18n("Depth value:"), box); dvlay->addWidget( m_label_depthValue ); - m_depthValue = new QComboBox( false, box ); + m_depthValue = new TQComboBox( false, box ); m_depthValue->insertItem("8"); m_depthValue->insertItem("16"); m_depthValue->insertItem("32"); - QWhatsThis::add( m_depthValue, i18n("<p>Select here the image depth in bits.") ); + TQWhatsThis::add( m_depthValue, i18n("<p>Select here the image depth in bits.") ); m_label_depthValue->setBuddy( m_depthValue ); dvlay->addWidget( m_depthValue ); } if (ColorType == 3) // Fuzz { - QLabel *m_label_fuzzDistance = new QLabel (i18n("Distance:"), box); + TQLabel *m_label_fuzzDistance = new TQLabel (i18n("Distance:"), box); dvlay->addWidget( m_label_fuzzDistance ); m_fuzzDistance = new KIntNumInput(3, box); m_fuzzDistance->setRange(0, 20, 1, true ); - QWhatsThis::add( m_fuzzDistance, i18n("<p>Select here the fuzz distance in " + TQWhatsThis::add( m_fuzzDistance, i18n("<p>Select here the fuzz distance in " "absolute intensity units.") ); m_label_fuzzDistance->setBuddy( m_fuzzDistance ); dvlay->addWidget( m_fuzzDistance ); @@ -83,21 +83,21 @@ ColorOptionsDialog::ColorOptionsDialog(QWidget *parent, int ColorType) if (ColorType == 9) // Segment { - QLabel *m_label_segmentCluster = new QLabel (i18n("Cluster threshold:"), box); + TQLabel *m_label_segmentCluster = new TQLabel (i18n("Cluster threshold:"), box); dvlay->addWidget( m_label_segmentCluster ); m_segmentCluster = new KIntNumInput(3, box); m_segmentCluster->setRange(0, 20, 1, true ); - QWhatsThis::add( m_segmentCluster, i18n("<p>Select here the value which represents the minimum " + TQWhatsThis::add( m_segmentCluster, i18n("<p>Select here the value which represents the minimum " "number of pixels contained in a hexahedra before it can " "be considered valid.") ); m_label_segmentCluster->setBuddy( m_segmentCluster ); dvlay->addWidget( m_segmentCluster ); - QLabel *m_label_segmentSmooth = new QLabel (i18n("Smooth threshold:"), box); + TQLabel *m_label_segmentSmooth = new TQLabel (i18n("Smooth threshold:"), box); dvlay->addWidget( m_label_segmentSmooth ); m_segmentSmooth = new KIntNumInput(3, box); m_segmentSmooth->setRange(0, 20, 1, true ); - QWhatsThis::add( m_segmentSmooth, i18n("<p>Select here the value which eliminates noise in the " + TQWhatsThis::add( m_segmentSmooth, i18n("<p>Select here the value which eliminates noise in the " "second derivative of the histogram. As the value is increased, " "you can expect a smoother second derivative.") ); m_label_segmentSmooth->setBuddy( m_segmentSmooth ); diff --git a/kipi-plugins/batchprocessimages/coloroptionsdialog.h b/kipi-plugins/batchprocessimages/coloroptionsdialog.h index 7445d7f..a8b3f20 100644 --- a/kipi-plugins/batchprocessimages/coloroptionsdialog.h +++ b/kipi-plugins/batchprocessimages/coloroptionsdialog.h @@ -23,15 +23,15 @@ #ifndef COLOROPTIONSDIALOG_H #define COLOROPTIONSDIALOG_H -// Include files for Qt +// Include files for TQt -#include <qstring.h> +#include <tqstring.h> // Include files for KDE #include <kdialogbase.h> -class QComboBox; +class TQComboBox; class KIntNumInput; @@ -41,12 +41,13 @@ namespace KIPIBatchProcessImagesPlugin class ColorOptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ColorOptionsDialog(QWidget *parent=0, int ColorType = 0); + ColorOptionsDialog(TQWidget *tqparent=0, int ColorType = 0); ~ColorOptionsDialog(); - QComboBox *m_depthValue; + TQComboBox *m_depthValue; KIntNumInput *m_fuzzDistance; diff --git a/kipi-plugins/batchprocessimages/convertimagesdialog.cpp b/kipi-plugins/batchprocessimages/convertimagesdialog.cpp index 6947f2f..73f6706 100644 --- a/kipi-plugins/batchprocessimages/convertimagesdialog.cpp +++ b/kipi-plugins/batchprocessimages/convertimagesdialog.cpp @@ -20,16 +20,16 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qgroupbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qfileinfo.h> -#include <qdir.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqfileinfo.h> +#include <tqdir.h> // Include files for KDE @@ -60,8 +60,8 @@ namespace KIPIBatchProcessImagesPlugin { -ConvertImagesDialog::ConvertImagesDialog( KURL::List urlList, KIPI::Interface* interface, QWidget *parent ) - : BatchProcessImagesDialog( urlList, interface, i18n("Batch Convert Images"), parent ) +ConvertImagesDialog::ConvertImagesDialog( KURL::List urlList, KIPI::Interface* interface, TQWidget *tqparent ) + : BatchProcessImagesDialog( urlList, interface, i18n("Batch Convert Images"), tqparent ) { // About data and help button. @@ -78,7 +78,7 @@ ConvertImagesDialog::ConvertImagesDialog( KURL::List urlList, KIPI::Interface* i m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); //--------------------------------------------- @@ -129,7 +129,7 @@ ConvertImagesDialog::ConvertImagesDialog( KURL::List urlList, KIPI::Interface* i "Usually, the purpose of the EPS file is to be embedded inside another PostScript " "language page description."); - QWhatsThis::add( m_Type, whatsThis ); + TQWhatsThis::add( m_Type, whatsThis ); m_previewButton->hide(); m_smallPreview->hide(); @@ -243,8 +243,8 @@ void ConvertImagesDialog::saveSettings(void) delete m_config; } -QString ConvertImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode) +TQString ConvertImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode) { *proc << "convert"; @@ -263,7 +263,7 @@ QString ConvertImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem else { *proc << "-quality"; - QString Temp; + TQString Temp; *proc << Temp.setNum( m_JPEGPNGCompression ); } } @@ -271,7 +271,7 @@ QString ConvertImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem if (m_Type->currentItem() == 1) // PNG { *proc << "-quality"; - QString Temp; + TQString Temp; *proc << Temp.setNum( m_JPEGPNGCompression ); } @@ -325,9 +325,9 @@ void ConvertImagesDialog::processDone() m_listFile2Process_iterator->current() ); if (item) { - QString src = item->pathSrc(); - QString tgt = m_destinationURL->url() + "/" + item->nameDest(); - QFileInfo fi(tgt); + TQString src = item->pathSrc(); + TQString tgt = m_destinationURL->url() + "/" + item->nameDest(); + TQFileInfo fi(tgt); kdDebug() << src << endl; kdDebug() << tgt << fi.size()<< endl; @@ -353,17 +353,17 @@ void ConvertImagesDialog::processDone() BatchProcessImagesDialog::processDone(); } -QString ConvertImagesDialog::oldFileName2NewFileName(QString fileName) +TQString ConvertImagesDialog::oldFileName2NewFileName(TQString fileName) { - QString Temp; + TQString Temp; - Temp = fileName.left( fileName.findRev('.', -1) ); // The source file name without extension. + Temp = fileName.left( fileName.tqfindRev('.', -1) ); // The source file name without extension. Temp = Temp + "." + ImageFileExt(m_Type->currentText()); // Added new file extension. return Temp; } -QString ConvertImagesDialog::ImageFileExt(QString Ext) +TQString ConvertImagesDialog::ImageFileExt(TQString Ext) { if ( Ext == "TIFF" || Ext == "tiff" ) return ("tif"); diff --git a/kipi-plugins/batchprocessimages/convertimagesdialog.h b/kipi-plugins/batchprocessimages/convertimagesdialog.h index cc96fd8..9907680 100644 --- a/kipi-plugins/batchprocessimages/convertimagesdialog.h +++ b/kipi-plugins/batchprocessimages/convertimagesdialog.h @@ -37,10 +37,11 @@ class BatchProcessImagesItem; class ConvertImagesDialog : public BatchProcessImagesDialog { Q_OBJECT + TQ_OBJECT public: - ConvertImagesDialog( KURL::List images, KIPI::Interface* interface, QWidget *parent=0 ); + ConvertImagesDialog( KURL::List images, KIPI::Interface* interface, TQWidget *tqparent=0 ); ~ConvertImagesDialog(); private slots: @@ -53,19 +54,19 @@ Q_OBJECT int m_JPEGPNGCompression; bool m_compressLossLess; - QString m_TIFFCompressionAlgo; - QString m_TGACompressionAlgo; + TQString m_TIFFCompressionAlgo; + TQString m_TGACompressionAlgo; - QString makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode); + TQString makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode); void processDone(); void readSettings(void); void saveSettings(void); - QString oldFileName2NewFileName(QString fileName); - QString ImageFileExt(QString Ext); + TQString oldFileName2NewFileName(TQString fileName); + TQString ImageFileExt(TQString Ext); private: diff --git a/kipi-plugins/batchprocessimages/convertoptionsdialog.cpp b/kipi-plugins/batchprocessimages/convertoptionsdialog.cpp index 46ece4b..33eae6a 100644 --- a/kipi-plugins/batchprocessimages/convertoptionsdialog.cpp +++ b/kipi-plugins/batchprocessimages/convertoptionsdialog.cpp @@ -20,17 +20,17 @@ * * ============================================================ */ -// Include files for Qt - -#include <qvbox.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qcombobox.h> -#include <qcheckbox.h> +// Include files for TQt + +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> // Include files for KDE @@ -45,18 +45,18 @@ namespace KIPIBatchProcessImagesPlugin { -ConvertOptionsDialog::ConvertOptionsDialog(QWidget *parent, int ImageFormatType) - : KDialogBase( parent, "ConvertOptionsDialog", true, +ConvertOptionsDialog::ConvertOptionsDialog(TQWidget *tqparent, int ImageFormatType) + : KDialogBase( tqparent, "ConvertOptionsDialog", true, i18n("Image File Format Options"), Ok|Cancel, Ok, false) { - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout *dvlay = new QVBoxLayout( box, 10, spacingHint() ); - QString whatsThis; + TQVBoxLayout *dvlay = new TQVBoxLayout( box, 10, spacingHint() ); + TQString whatsThis; if (ImageFormatType == 0 || ImageFormatType == 1) // JPEG || PNG { - m_label_imageCompression = new QLabel (i18n("Image compression level:"), box); + m_label_imageCompression = new TQLabel (i18n("Image compression level:"), box); dvlay->addWidget( m_label_imageCompression ); m_JPEGPNGCompression = new KIntNumInput(75, box); m_JPEGPNGCompression->setRange(1, 100, 1, true ); @@ -67,42 +67,42 @@ ConvertOptionsDialog::ConvertOptionsDialog(QWidget *parent, int ImageFormatType) "<b>75</b>: low compression (default value)<p>" "<b>100</b>: no compression"); - QWhatsThis::add( m_JPEGPNGCompression, whatsThis); + TQWhatsThis::add( m_JPEGPNGCompression, whatsThis); m_label_imageCompression->setBuddy( m_JPEGPNGCompression ); dvlay->addWidget( m_JPEGPNGCompression ); if (ImageFormatType == 0) // JPEG { - m_compressLossLess = new QCheckBox( i18n("Use lossless compression"), box); - QWhatsThis::add( m_compressLossLess, i18n("<p>If this option is enabled, " + m_compressLossLess = new TQCheckBox( i18n("Use lossless compression"), box); + TQWhatsThis::add( m_compressLossLess, i18n("<p>If this option is enabled, " "all JPEG operations will use a lossless compression.")); dvlay->addWidget( m_compressLossLess ); - connect(m_compressLossLess, SIGNAL( toggled(bool) ), this, SLOT( slotCompressLossLessEnabled(bool) ) ); + connect(m_compressLossLess, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotCompressLossLessEnabled(bool) ) ); } } if (ImageFormatType == 2) // TIFF { - QLabel *m_label_imageCompression = new QLabel (i18n("Image compression algorithm:"), box); + TQLabel *m_label_imageCompression = new TQLabel (i18n("Image compression algorithm:"), box); dvlay->addWidget( m_label_imageCompression ); - m_TIFFCompressionAlgo = new QComboBox( false, box ); + m_TIFFCompressionAlgo = new TQComboBox( false, box ); m_TIFFCompressionAlgo->insertItem("LZW"); m_TIFFCompressionAlgo->insertItem("JPEG"); m_TIFFCompressionAlgo->insertItem(i18n("None")); - QWhatsThis::add( m_TIFFCompressionAlgo, i18n("<p>Select here the compression algorithm.") ); + TQWhatsThis::add( m_TIFFCompressionAlgo, i18n("<p>Select here the compression algorithm.") ); m_label_imageCompression->setBuddy( m_TIFFCompressionAlgo ); dvlay->addWidget( m_TIFFCompressionAlgo ); } if (ImageFormatType == 5) // TGA { - QLabel *m_label_imageCompression = new QLabel (i18n("Image compression algorithm:"), box); + TQLabel *m_label_imageCompression = new TQLabel (i18n("Image compression algorithm:"), box); dvlay->addWidget( m_label_imageCompression ); - m_TGACompressionAlgo = new QComboBox( false, box ); + m_TGACompressionAlgo = new TQComboBox( false, box ); m_TGACompressionAlgo->insertItem("RLE"); m_TGACompressionAlgo->insertItem(i18n("None")); - QWhatsThis::add( m_TGACompressionAlgo, i18n("<p>Select here the compression algorithm.") ); + TQWhatsThis::add( m_TGACompressionAlgo, i18n("<p>Select here the compression algorithm.") ); m_label_imageCompression->setBuddy( m_TGACompressionAlgo ); dvlay->addWidget( m_TGACompressionAlgo ); } diff --git a/kipi-plugins/batchprocessimages/convertoptionsdialog.h b/kipi-plugins/batchprocessimages/convertoptionsdialog.h index e7275a2..c6d9f57 100644 --- a/kipi-plugins/batchprocessimages/convertoptionsdialog.h +++ b/kipi-plugins/batchprocessimages/convertoptionsdialog.h @@ -23,17 +23,17 @@ #ifndef CONVERTOPTIONSDIALOG_H #define CONVERTOPTIONSDIALOG_H -// Include files for Qt +// Include files for TQt -#include <qstring.h> +#include <tqstring.h> // Include files for KDE #include <kdialogbase.h> -class QLabel; -class QCheckBox; -class QComboBox; +class TQLabel; +class TQCheckBox; +class TQComboBox; class KIntNumInput; @@ -43,16 +43,17 @@ namespace KIPIBatchProcessImagesPlugin class ConvertOptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ConvertOptionsDialog(QWidget *parent=0, int ImageFormatType = 0); + ConvertOptionsDialog(TQWidget *tqparent=0, int ImageFormatType = 0); ~ConvertOptionsDialog(); - QLabel *m_label_imageCompression; + TQLabel *m_label_imageCompression; KIntNumInput *m_JPEGPNGCompression; - QCheckBox *m_compressLossLess; - QComboBox *m_TIFFCompressionAlgo; - QComboBox *m_TGACompressionAlgo; + TQCheckBox *m_compressLossLess; + TQComboBox *m_TIFFCompressionAlgo; + TQComboBox *m_TGACompressionAlgo; public slots: void slotCompressLossLessEnabled(bool val); diff --git a/kipi-plugins/batchprocessimages/effectimagesdialog.cpp b/kipi-plugins/batchprocessimages/effectimagesdialog.cpp index 4c857ba..f75f7e7 100644 --- a/kipi-plugins/batchprocessimages/effectimagesdialog.cpp +++ b/kipi-plugins/batchprocessimages/effectimagesdialog.cpp @@ -20,14 +20,14 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qgroupbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> // Include files for KDE @@ -54,8 +54,8 @@ namespace KIPIBatchProcessImagesPlugin { -EffectImagesDialog::EffectImagesDialog( KURL::List urlList, KIPI::Interface* interface, QWidget *parent ) - : BatchProcessImagesDialog( urlList, interface, i18n("Batch Image Effects"), parent ) +EffectImagesDialog::EffectImagesDialog( KURL::List urlList, KIPI::Interface* interface, TQWidget *tqparent ) + : BatchProcessImagesDialog( urlList, interface, i18n("Batch Image Effects"), tqparent ) { // About data and help button. @@ -72,7 +72,7 @@ EffectImagesDialog::EffectImagesDialog( KURL::List urlList, KIPI::Interface* int m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); //--------------------------------------------- @@ -120,7 +120,7 @@ EffectImagesDialog::EffectImagesDialog( KURL::List urlList, KIPI::Interface* int "<b>Wave</b>: creates a \"ripple\" effect in the image by shifting the pixels vertically " "along a sine wave.<p>"); - QWhatsThis::add( m_Type, whatsThis ); + TQWhatsThis::add( m_Type, whatsThis ); //--------------------------------------------- @@ -322,8 +322,8 @@ void EffectImagesDialog::saveSettings(void) delete m_config; } -QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode) +TQString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode) { *proc << "convert"; @@ -336,7 +336,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 0) // Adaptive threshold { *proc << "-lat"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_latWidth ) + "x"; Temp2.append ( Temp.setNum( m_latHeight ) + "+" ); Temp2.append ( Temp.setNum( m_latOffset ) ); @@ -346,7 +346,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 1) // Charcoal { *proc << "-charcoal"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_charcoalRadius ) + "x"; Temp2.append ( Temp.setNum( m_charcoalDeviation ) ); *proc << Temp2; @@ -355,7 +355,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 2) // Detect edges { *proc << "-edge"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_edgeRadius ); *proc << Temp2; } @@ -363,7 +363,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 3) // Emboss { *proc << "-emboss"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_embossRadius ) + "x"; Temp2.append ( Temp.setNum( m_embossDeviation ) ); *proc << Temp2; @@ -372,7 +372,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 4) // Implode { *proc << "-implode"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_implodeFactor ); *proc << Temp2; } @@ -380,7 +380,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 5) // Paint { *proc << "-paint"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_paintRadius ); *proc << Temp2; } @@ -388,7 +388,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 6) // Shade light { *proc << "-shade"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_shadeAzimuth ) + "x"; Temp2.append ( Temp.setNum( m_shadeElevation ) ); *proc << Temp2; @@ -397,7 +397,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 7) // Solarize { *proc << "-solarize"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_solarizeFactor ); *proc << Temp2; } @@ -405,7 +405,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 8) // Spread { *proc << "-spread"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_spreadRadius ); *proc << Temp2; } @@ -413,7 +413,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 9) // Swirl { *proc << "-swirl"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_swirlDegrees ); *proc << Temp2; } @@ -421,7 +421,7 @@ QString EffectImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 10) // Wave { *proc << "-wave"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_waveAmplitude ) + "x"; Temp2.append ( Temp.setNum( m_waveLenght ) ); *proc << Temp2; diff --git a/kipi-plugins/batchprocessimages/effectimagesdialog.h b/kipi-plugins/batchprocessimages/effectimagesdialog.h index 26ab5e9..51e6da9 100644 --- a/kipi-plugins/batchprocessimages/effectimagesdialog.h +++ b/kipi-plugins/batchprocessimages/effectimagesdialog.h @@ -36,10 +36,11 @@ class BatchProcessImagesItem; class EffectImagesDialog : public BatchProcessImagesDialog { Q_OBJECT + TQ_OBJECT public: - EffectImagesDialog( KURL::List images, KIPI::Interface* interface, QWidget *parent=0 ); + EffectImagesDialog( KURL::List images, KIPI::Interface* interface, TQWidget *tqparent=0 ); ~EffectImagesDialog(); private slots: @@ -67,8 +68,8 @@ Q_OBJECT int m_waveAmplitude; int m_waveLenght; - QString makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode); + TQString makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode); void readSettings(void); void saveSettings(void); diff --git a/kipi-plugins/batchprocessimages/effectoptionsdialog.cpp b/kipi-plugins/batchprocessimages/effectoptionsdialog.cpp index e56a740..b50d08e 100644 --- a/kipi-plugins/batchprocessimages/effectoptionsdialog.cpp +++ b/kipi-plugins/batchprocessimages/effectoptionsdialog.cpp @@ -20,17 +20,17 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qvbox.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qcombobox.h> -#include <qcolor.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqcombobox.h> +#include <tqcolor.h> // Include files for KDE @@ -46,60 +46,60 @@ namespace KIPIBatchProcessImagesPlugin { -EffectOptionsDialog::EffectOptionsDialog(QWidget *parent, int EffectType) - : KDialogBase( parent, "EffectOptionsDialog", true, +EffectOptionsDialog::EffectOptionsDialog(TQWidget *tqparent, int EffectType) + : KDialogBase( tqparent, "EffectOptionsDialog", true, i18n("Effect Options"), Ok|Cancel, Ok, false) { - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout *dvlay = new QVBoxLayout( box, 10, spacingHint() ); - QString whatsThis; + TQVBoxLayout *dvlay = new TQVBoxLayout( box, 10, spacingHint() ); + TQString whatsThis; if (EffectType == 0) // Adaptive threshold { - QLabel *m_label_latWidth = new QLabel (i18n("Width:"), box); + TQLabel *m_label_latWidth = new TQLabel (i18n("Width:"), box); dvlay->addWidget( m_label_latWidth ); m_latWidth = new KIntNumInput(50, box); m_latWidth->setRange(0, 200, 1, true ); - QWhatsThis::add( m_latWidth, i18n("<p>Select here the value which represents the width " + TQWhatsThis::add( m_latWidth, i18n("<p>Select here the value which represents the width " "of the local neighborhood.") ); m_label_latWidth->setBuddy( m_latWidth ); dvlay->addWidget( m_latWidth ); - QLabel *m_label_latHeight = new QLabel (i18n("Height:"), box); + TQLabel *m_label_latHeight = new TQLabel (i18n("Height:"), box); dvlay->addWidget( m_label_latHeight ); m_latHeight = new KIntNumInput(50, box); m_latHeight->setRange(0, 200, 1, true ); - QWhatsThis::add( m_latHeight, i18n("<p>Select here the value which represents the height of " + TQWhatsThis::add( m_latHeight, i18n("<p>Select here the value which represents the height of " "the local neighborhood.") ); m_label_latHeight->setBuddy( m_latHeight ); dvlay->addWidget( m_latHeight ); - QLabel *m_label_latOffset = new QLabel (i18n("Offset:"), box); + TQLabel *m_label_latOffset = new TQLabel (i18n("Offset:"), box); dvlay->addWidget( m_label_latOffset ); m_latOffset = new KIntNumInput(1, box); m_latOffset->setRange(0, 200, 1, true ); - QWhatsThis::add( m_latOffset, i18n("<p>Select here the value which represents the mean offset.") ); + TQWhatsThis::add( m_latOffset, i18n("<p>Select here the value which represents the mean offset.") ); m_label_latOffset->setBuddy( m_latOffset ); dvlay->addWidget( m_latOffset ); } if (EffectType == 1) // Charcoal { - QLabel *m_label_charcoalRadius = new QLabel (i18n("Radius:"), box); + TQLabel *m_label_charcoalRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_charcoalRadius ); m_charcoalRadius = new KIntNumInput(3, box); m_charcoalRadius->setRange(0, 20, 1, true ); - QWhatsThis::add( m_charcoalRadius, i18n("<p>Select here the value which represents the " + TQWhatsThis::add( m_charcoalRadius, i18n("<p>Select here the value which represents the " "radius of the pixel neighborhood.") ); m_label_charcoalRadius->setBuddy( m_charcoalRadius ); dvlay->addWidget( m_charcoalRadius ); - QLabel *m_label_charcoalDeviation = new QLabel (i18n("Deviation:"), box); + TQLabel *m_label_charcoalDeviation = new TQLabel (i18n("Deviation:"), box); dvlay->addWidget( m_label_charcoalDeviation ); m_charcoalDeviation = new KIntNumInput(3, box); m_charcoalDeviation->setRange(0, 20, 1, true ); - QWhatsThis::add( m_charcoalDeviation, i18n("<p>Select here the value which represents the " + TQWhatsThis::add( m_charcoalDeviation, i18n("<p>Select here the value which represents the " "standard deviation of the Gaussian, in pixels.") ); m_label_charcoalDeviation->setBuddy( m_charcoalDeviation ); dvlay->addWidget( m_charcoalDeviation ); @@ -107,11 +107,11 @@ EffectOptionsDialog::EffectOptionsDialog(QWidget *parent, int EffectType) if (EffectType == 2) // Detect edges { - QLabel *m_label_edgeRadius = new QLabel (i18n("Radius:"), box); + TQLabel *m_label_edgeRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_edgeRadius ); m_edgeRadius = new KIntNumInput(3, box); m_edgeRadius->setRange(0, 20, 1, true ); - QWhatsThis::add( m_edgeRadius, i18n("<p>Select here the value which represents the radius of " + TQWhatsThis::add( m_edgeRadius, i18n("<p>Select here the value which represents the radius of " "the pixel neighborhood. Radius defines the radius of the " "convolution filter. If you use a radius of 0 the algorithm selects " "a suitable radius.") ); @@ -121,22 +121,22 @@ EffectOptionsDialog::EffectOptionsDialog(QWidget *parent, int EffectType) if (EffectType == 3) // Emboss { - QLabel *m_label_embossRadius = new QLabel (i18n("Radius:"), box); + TQLabel *m_label_embossRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_embossRadius ); m_embossRadius = new KIntNumInput(3, box); m_embossRadius->setRange(0, 20, 1, true ); - QWhatsThis::add( m_embossRadius, i18n("<p>Select here the value which represents the radius of the " + TQWhatsThis::add( m_embossRadius, i18n("<p>Select here the value which represents the radius of the " "pixel neighborhood. For reasonable results, radius should be " "larger than deviation. If you use a radius of 0 the algorithm " "selects a suitable radius.") ); m_label_embossRadius->setBuddy( m_embossRadius ); dvlay->addWidget( m_embossRadius ); - QLabel *m_label_embossDeviation = new QLabel (i18n("Deviation:"), box); + TQLabel *m_label_embossDeviation = new TQLabel (i18n("Deviation:"), box); dvlay->addWidget( m_label_embossDeviation ); m_embossDeviation = new KIntNumInput(3, box); m_embossDeviation->setRange(0, 20, 1, true ); - QWhatsThis::add( m_embossDeviation, i18n("<p>Select here the value which represents the standard " + TQWhatsThis::add( m_embossDeviation, i18n("<p>Select here the value which represents the standard " "deviation of the Gaussian, in pixels.") ); m_label_embossDeviation->setBuddy( m_embossDeviation ); dvlay->addWidget( m_embossDeviation ); @@ -144,11 +144,11 @@ EffectOptionsDialog::EffectOptionsDialog(QWidget *parent, int EffectType) if (EffectType == 4) // Implode { - QLabel *m_label_implodeFactor = new QLabel (i18n("Factor:"), box); + TQLabel *m_label_implodeFactor = new TQLabel (i18n("Factor:"), box); dvlay->addWidget( m_label_implodeFactor ); m_implodeFactor = new KIntNumInput(1, box); m_implodeFactor->setRange(0, 20, 1, true ); - QWhatsThis::add( m_implodeFactor, i18n("<p>Select here the value which represents the extent of " + TQWhatsThis::add( m_implodeFactor, i18n("<p>Select here the value which represents the extent of " "the implosion.") ); m_label_implodeFactor->setBuddy( m_implodeFactor ); dvlay->addWidget( m_implodeFactor ); @@ -156,11 +156,11 @@ EffectOptionsDialog::EffectOptionsDialog(QWidget *parent, int EffectType) if (EffectType == 5) // Paint { - QLabel *m_label_paintRadius = new QLabel (i18n("Radius:"), box); + TQLabel *m_label_paintRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_paintRadius ); m_paintRadius = new KIntNumInput(3, box); m_paintRadius->setRange(0, 20, 1, true ); - QWhatsThis::add( m_paintRadius, i18n("<p>Select here the value which represents the radius of " + TQWhatsThis::add( m_paintRadius, i18n("<p>Select here the value which represents the radius of " "the circular neighborhood. Each pixel is replaced by the " "most frequent color occurring in a circular region defined " "by the radius.") ); @@ -170,21 +170,21 @@ EffectOptionsDialog::EffectOptionsDialog(QWidget *parent, int EffectType) if (EffectType == 6) // Shade light { - QLabel *m_label_shadeAzimuth = new QLabel (i18n("Azimuth:"), box); + TQLabel *m_label_shadeAzimuth = new TQLabel (i18n("Azimuth:"), box); dvlay->addWidget( m_label_shadeAzimuth ); m_shadeAzimuth = new KIntNumInput(40, box); m_shadeAzimuth->setRange(0, 360, 1, true ); - QWhatsThis::add( m_shadeAzimuth, i18n("<p>Select here the value which represents the azimuth of " + TQWhatsThis::add( m_shadeAzimuth, i18n("<p>Select here the value which represents the azimuth of " "the light source direction. The azimuth is measured in degrees " "above the x axis.") ); m_label_shadeAzimuth->setBuddy( m_shadeAzimuth ); dvlay->addWidget( m_shadeAzimuth ); - QLabel *m_label_shadeElevation = new QLabel (i18n("Elevation:"), box); + TQLabel *m_label_shadeElevation = new TQLabel (i18n("Elevation:"), box); dvlay->addWidget( m_label_shadeElevation ); m_shadeElevation = new KIntNumInput(40, box); m_shadeElevation->setRange(0, 500, 1, true ); - QWhatsThis::add( m_shadeElevation, i18n("<p>Select here the value which represents the elevation of " + TQWhatsThis::add( m_shadeElevation, i18n("<p>Select here the value which represents the elevation of " "the light source direction. The elevation is measured in " "pixels above the Z axis.") ); m_label_shadeElevation->setBuddy( m_shadeElevation ); @@ -193,11 +193,11 @@ EffectOptionsDialog::EffectOptionsDialog(QWidget *parent, int EffectType) if (EffectType == 7) // Solarize { - QLabel *m_label_solarizeFactor = new QLabel (i18n("Factor:"), box); + TQLabel *m_label_solarizeFactor = new TQLabel (i18n("Factor:"), box); dvlay->addWidget( m_label_solarizeFactor ); m_solarizeFactor = new KIntNumInput(3, box); m_solarizeFactor->setRange(0, 99, 1, true ); - QWhatsThis::add( m_solarizeFactor, i18n("<p>Select here the value which represents the percent-" + TQWhatsThis::add( m_solarizeFactor, i18n("<p>Select here the value which represents the percent-" "threshold of the solarize intensity.") ); m_label_solarizeFactor->setBuddy( m_solarizeFactor ); dvlay->addWidget( m_solarizeFactor ); @@ -205,11 +205,11 @@ EffectOptionsDialog::EffectOptionsDialog(QWidget *parent, int EffectType) if (EffectType == 8) // Spread { - QLabel *m_label_spreadRadius = new QLabel (i18n("Radius:"), box); + TQLabel *m_label_spreadRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_spreadRadius ); m_spreadRadius = new KIntNumInput(10, box); m_spreadRadius->setRange(0, 200, 1, true ); - QWhatsThis::add( m_spreadRadius, i18n("<p>Select here the value which represents the random " + TQWhatsThis::add( m_spreadRadius, i18n("<p>Select here the value which represents the random " "pixel in a neighborhood of this extent.") ); m_label_spreadRadius->setBuddy( m_spreadRadius ); dvlay->addWidget( m_spreadRadius ); @@ -217,11 +217,11 @@ EffectOptionsDialog::EffectOptionsDialog(QWidget *parent, int EffectType) if (EffectType == 9) // Swirl { - QLabel *m_label_swirlDegrees = new QLabel (i18n("Degrees:"), box); + TQLabel *m_label_swirlDegrees = new TQLabel (i18n("Degrees:"), box); dvlay->addWidget( m_label_swirlDegrees ); m_swirlDegrees = new KIntNumInput(45, box); m_swirlDegrees->setRange(0, 360, 1, true ); - QWhatsThis::add( m_swirlDegrees, i18n("<p>Select here the value which represents the tightness of " + TQWhatsThis::add( m_swirlDegrees, i18n("<p>Select here the value which represents the tightness of " "the swirling effect. You get a more dramatic effect as the " "degrees move from 1 to 360.") ); m_label_swirlDegrees->setBuddy( m_swirlDegrees ); @@ -230,20 +230,20 @@ EffectOptionsDialog::EffectOptionsDialog(QWidget *parent, int EffectType) if (EffectType == 10) // Wave { - QLabel *m_label_waveAmplitude = new QLabel (i18n("Amplitude:"), box); + TQLabel *m_label_waveAmplitude = new TQLabel (i18n("Amplitude:"), box); dvlay->addWidget( m_label_waveAmplitude ); m_waveAmplitude = new KIntNumInput(50, box); m_waveAmplitude->setRange(0, 200, 1, true ); - QWhatsThis::add( m_waveAmplitude, i18n("<p>Select here the value which represents the amplitude of " + TQWhatsThis::add( m_waveAmplitude, i18n("<p>Select here the value which represents the amplitude of " "the sine wave.") ); m_label_waveAmplitude->setBuddy( m_waveAmplitude ); dvlay->addWidget( m_waveAmplitude ); - QLabel *m_label_waveLenght = new QLabel (i18n("Length:"), box); + TQLabel *m_label_waveLenght = new TQLabel (i18n("Length:"), box); dvlay->addWidget( m_label_waveLenght ); m_waveLenght = new KIntNumInput(100, box); m_waveLenght->setRange(0, 200, 1, true ); - QWhatsThis::add( m_waveLenght, i18n("<p>Select here the value which represents the wave length " + TQWhatsThis::add( m_waveLenght, i18n("<p>Select here the value which represents the wave length " "of the sine wave.") ); m_label_waveLenght->setBuddy( m_waveLenght ); dvlay->addWidget( m_waveLenght ); diff --git a/kipi-plugins/batchprocessimages/effectoptionsdialog.h b/kipi-plugins/batchprocessimages/effectoptionsdialog.h index 673fc91..ece7b16 100644 --- a/kipi-plugins/batchprocessimages/effectoptionsdialog.h +++ b/kipi-plugins/batchprocessimages/effectoptionsdialog.h @@ -23,9 +23,9 @@ #ifndef EFFECTOPTIONSDIALOG_H #define EFFECTOPTIONSDIALOG_H -// Include files for Qt +// Include files for TQt -#include <qstring.h> +#include <tqstring.h> // Include files for KDE @@ -39,9 +39,10 @@ namespace KIPIBatchProcessImagesPlugin class EffectOptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - EffectOptionsDialog(QWidget *parent=0, int EffectType = 0); + EffectOptionsDialog(TQWidget *tqparent=0, int EffectType = 0); ~EffectOptionsDialog(); KIntNumInput *m_latWidth; diff --git a/kipi-plugins/batchprocessimages/filterimagesdialog.cpp b/kipi-plugins/batchprocessimages/filterimagesdialog.cpp index 220b383..993d158 100644 --- a/kipi-plugins/batchprocessimages/filterimagesdialog.cpp +++ b/kipi-plugins/batchprocessimages/filterimagesdialog.cpp @@ -20,14 +20,14 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qgroupbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> // Include files for KDE @@ -54,8 +54,8 @@ namespace KIPIBatchProcessImagesPlugin { -FilterImagesDialog::FilterImagesDialog( KURL::List urlList, KIPI::Interface* interface, QWidget *parent ) - : BatchProcessImagesDialog( urlList, interface, i18n("Batch Image Filtering"), parent ) +FilterImagesDialog::FilterImagesDialog( KURL::List urlList, KIPI::Interface* interface, TQWidget *tqparent ) + : BatchProcessImagesDialog( urlList, interface, i18n("Batch Image Filtering"), tqparent ) { // About data and help button. @@ -72,7 +72,7 @@ FilterImagesDialog::FilterImagesDialog( KURL::List urlList, KIPI::Interface* int m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); //--------------------------------------------- @@ -105,9 +105,9 @@ FilterImagesDialog::FilterImagesDialog( KURL::List urlList, KIPI::Interface* int "<b>Median</b>: apply a median filter to an image.<p>" "<b>Noise reduction</b>: reduce noise in an image. <p>" "<b>Sharpen</b>: sharpen the image with a Gaussian operator.<p>" - "<b>Unsharp</b>: sharpen the image with an unsharp mask operator.<p>"); + "<b>Unsharp</b>: sharpen the image with an unsharp tqmask operator.<p>"); - QWhatsThis::add( m_Type, whatsThis ); + TQWhatsThis::add( m_Type, whatsThis ); //--------------------------------------------- @@ -269,8 +269,8 @@ void FilterImagesDialog::saveSettings(void) delete m_config; } -QString FilterImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode) +TQString FilterImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode) { *proc << "convert"; @@ -282,7 +282,7 @@ QString FilterImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 0) // Add noise { - QString Temp; + TQString Temp; if ( m_noiseType == i18n("Uniform") ) Temp = "Uniform"; if ( m_noiseType == i18n("Gaussian") ) Temp = "Gaussian"; if ( m_noiseType == i18n("Multiplicative") ) Temp = "Multiplicative"; @@ -300,7 +300,7 @@ QString FilterImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 2) // Blur { *proc << "-blur"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_blurRadius ) + "x"; Temp2.append(Temp.setNum( m_blurDeviation )); *proc << Temp2; @@ -318,14 +318,14 @@ QString FilterImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 5) // Median { - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_medianRadius ); *proc << "-median" << Temp2; } if (m_Type->currentItem() == 6) // Noise reduction { - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_noiseRadius ); *proc << "-noise" << Temp2; } @@ -333,7 +333,7 @@ QString FilterImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 7) // Sharpen { *proc << "-sharpen"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_sharpenRadius ) + "x"; Temp2.append(Temp.setNum( m_sharpenDeviation )); *proc << Temp2; @@ -342,7 +342,7 @@ QString FilterImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (m_Type->currentItem() == 8) // Unsharp { *proc << "-unsharp"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_unsharpenRadius ) + "x"; Temp2.append(Temp.setNum( m_unsharpenDeviation )); Temp2.append( "+" + Temp.setNum( m_unsharpenPercent )); diff --git a/kipi-plugins/batchprocessimages/filterimagesdialog.h b/kipi-plugins/batchprocessimages/filterimagesdialog.h index 7b1285e..af92fd4 100644 --- a/kipi-plugins/batchprocessimages/filterimagesdialog.h +++ b/kipi-plugins/batchprocessimages/filterimagesdialog.h @@ -36,10 +36,11 @@ class BatchProcessImagesItem; class FilterImagesDialog : public BatchProcessImagesDialog { Q_OBJECT + TQ_OBJECT public: - FilterImagesDialog( KURL::List images, KIPI::Interface* interface, QWidget *parent=0 ); + FilterImagesDialog( KURL::List images, KIPI::Interface* interface, TQWidget *tqparent=0 ); ~FilterImagesDialog(); private slots: @@ -50,7 +51,7 @@ Q_OBJECT protected: - QString m_noiseType; + TQString m_noiseType; int m_blurRadius; int m_blurDeviation; int m_medianRadius; @@ -62,8 +63,8 @@ Q_OBJECT int m_unsharpenPercent; int m_unsharpenThreshold; - QString makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode); + TQString makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode); void readSettings(void); void saveSettings(void); diff --git a/kipi-plugins/batchprocessimages/filteroptionsdialog.cpp b/kipi-plugins/batchprocessimages/filteroptionsdialog.cpp index f7f195c..084510a 100644 --- a/kipi-plugins/batchprocessimages/filteroptionsdialog.cpp +++ b/kipi-plugins/batchprocessimages/filteroptionsdialog.cpp @@ -20,17 +20,17 @@ * * ============================================================ */ -// Include files for Qt - -#include <qvbox.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qcombobox.h> -#include <qcolor.h> +// Include files for TQt + +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqcombobox.h> +#include <tqcolor.h> // Include files for KDE @@ -46,27 +46,27 @@ namespace KIPIBatchProcessImagesPlugin { -FilterOptionsDialog::FilterOptionsDialog(QWidget *parent, int FilterType) - : KDialogBase( parent, "FilterOptionsDialog", true, +FilterOptionsDialog::FilterOptionsDialog(TQWidget *tqparent, int FilterType) + : KDialogBase( tqparent, "FilterOptionsDialog", true, i18n("Filter Options"), Ok|Cancel, Ok, false) { - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout *dvlay = new QVBoxLayout( box, 10, spacingHint() ); - QString whatsThis; + TQVBoxLayout *dvlay = new TQVBoxLayout( box, 10, spacingHint() ); + TQString whatsThis; if (FilterType == 0) // Add noise { - QLabel *m_label_noiseType = new QLabel (i18n("Noise algorithm:"), box); + TQLabel *m_label_noiseType = new TQLabel (i18n("Noise algorithm:"), box); dvlay->addWidget( m_label_noiseType ); - m_noiseType = new QComboBox( false, box ); + m_noiseType = new TQComboBox( false, box ); m_noiseType->insertItem(i18n("Uniform")); m_noiseType->insertItem(i18n("Gaussian")); m_noiseType->insertItem(i18n("Multiplicative")); m_noiseType->insertItem(i18n("Impulse")); m_noiseType->insertItem(i18n("Laplacian")); m_noiseType->insertItem(i18n("Poisson")); - QWhatsThis::add( m_noiseType, i18n("<p>Select here the algorithm method which will used " + TQWhatsThis::add( m_noiseType, i18n("<p>Select here the algorithm method which will used " "to add random noise to the images.") ); m_label_noiseType->setBuddy( m_noiseType ); dvlay->addWidget( m_noiseType ); @@ -74,22 +74,22 @@ FilterOptionsDialog::FilterOptionsDialog(QWidget *parent, int FilterType) if (FilterType == 2) // Blur { - QLabel *m_label_blurRadius = new QLabel (i18n("Radius:"), box); + TQLabel *m_label_blurRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_blurRadius ); m_blurRadius = new KIntNumInput(3, box); m_blurRadius->setRange(0, 20, 1, true ); - QWhatsThis::add( m_blurRadius, i18n("<p>Select here the blur radius of the Gaussian, in pixels, " + TQWhatsThis::add( m_blurRadius, i18n("<p>Select here the blur radius of the Gaussian, in pixels, " "not counting the center pixel. For reasonable results, the " "radius should be larger than deviation. If you use a radius of 0 " "the blur operations selects a suitable radius.") ); m_label_blurRadius->setBuddy( m_blurRadius ); dvlay->addWidget( m_blurRadius ); - QLabel *m_label_blurDeviation = new QLabel (i18n("Deviation:"), box); + TQLabel *m_label_blurDeviation = new TQLabel (i18n("Deviation:"), box); dvlay->addWidget( m_label_blurDeviation ); m_blurDeviation = new KIntNumInput(1, box); m_blurDeviation->setRange(0, 20, 1, true ); - QWhatsThis::add( m_blurDeviation, i18n("<p>Select here the standard deviation of the blur Gaussian, " + TQWhatsThis::add( m_blurDeviation, i18n("<p>Select here the standard deviation of the blur Gaussian, " "in pixels.") ); m_label_blurDeviation->setBuddy( m_blurDeviation ); dvlay->addWidget( m_blurDeviation ); @@ -97,11 +97,11 @@ FilterOptionsDialog::FilterOptionsDialog(QWidget *parent, int FilterType) if (FilterType == 5) // Median { - QLabel *m_label_medianRadius = new QLabel (i18n("Radius:"), box); + TQLabel *m_label_medianRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_medianRadius ); m_medianRadius = new KIntNumInput(3, box); m_medianRadius->setRange(0, 20, 1, true ); - QWhatsThis::add( m_medianRadius, i18n("<p>Select here the median radius of the pixel neighborhood. " + TQWhatsThis::add( m_medianRadius, i18n("<p>Select here the median radius of the pixel neighborhood. " "The algorithm applies a digital filter that improves the quality " "of noisy images. Each pixel is replaced by the median in a " "set of neighboring pixels as defined by the radius.") ); @@ -112,11 +112,11 @@ FilterOptionsDialog::FilterOptionsDialog(QWidget *parent, int FilterType) if (FilterType == 6) // Noise reduction { - QLabel *m_label_noiseRadius = new QLabel (i18n("Radius:"), box); + TQLabel *m_label_noiseRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_noiseRadius ); m_noiseRadius = new KIntNumInput(3, box); m_noiseRadius->setRange(0, 20, 1, true ); - QWhatsThis::add( m_noiseRadius, i18n("<p>Select here the noise reduction radius value, in pixels. " + TQWhatsThis::add( m_noiseRadius, i18n("<p>Select here the noise reduction radius value, in pixels. " "The algorithm smooths the contours of an image while still " "preserving edge information. The algorithm works by replacing " "each pixel with its neighbor closest in value. A neighbor is " @@ -128,11 +128,11 @@ FilterOptionsDialog::FilterOptionsDialog(QWidget *parent, int FilterType) if (FilterType == 7) // Sharpen { - QLabel *m_label_sharpenRadius = new QLabel (i18n("Radius:"), box); + TQLabel *m_label_sharpenRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_sharpenRadius ); m_sharpenRadius = new KIntNumInput(3, box); m_sharpenRadius->setRange(0, 20, 1, true ); - QWhatsThis::add( m_sharpenRadius, i18n("<p>Select here the radius of the sharpen Gaussian, in " + TQWhatsThis::add( m_sharpenRadius, i18n("<p>Select here the radius of the sharpen Gaussian, in " "pixels, not counting the center pixel. For reasonable " "results, the radius should be larger than deviation. " "if you use a radius of 0 the sharpen operation selects a " @@ -140,11 +140,11 @@ FilterOptionsDialog::FilterOptionsDialog(QWidget *parent, int FilterType) m_label_sharpenRadius->setBuddy( m_sharpenRadius ); dvlay->addWidget( m_sharpenRadius ); - QLabel *m_label_sharpenDeviation = new QLabel (i18n("Deviation:"), box); + TQLabel *m_label_sharpenDeviation = new TQLabel (i18n("Deviation:"), box); dvlay->addWidget( m_label_sharpenDeviation ); m_sharpenDeviation = new KIntNumInput(1, box); m_sharpenDeviation->setRange(0, 20, 1, true ); - QWhatsThis::add( m_sharpenDeviation, i18n("<p>Select here the sharpen deviation value of the " + TQWhatsThis::add( m_sharpenDeviation, i18n("<p>Select here the sharpen deviation value of the " "Laplacian in pixels.") ); m_label_sharpenDeviation->setBuddy( m_sharpenDeviation ); dvlay->addWidget( m_sharpenDeviation ); @@ -152,11 +152,11 @@ FilterOptionsDialog::FilterOptionsDialog(QWidget *parent, int FilterType) if (FilterType == 8) // Unsharp { - QLabel *m_label_unsharpenRadius = new QLabel (i18n("Radius:"), box); + TQLabel *m_label_unsharpenRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_unsharpenRadius ); m_unsharpenRadius = new KIntNumInput(3, box); m_unsharpenRadius->setRange(0, 20, 1, true ); - QWhatsThis::add( m_unsharpenRadius, i18n("<p>Select here the radius of the unsharpen Gaussian, " + TQWhatsThis::add( m_unsharpenRadius, i18n("<p>Select here the radius of the unsharpen Gaussian, " "in pixels, not counting the center pixel. The algorithm " "convolve the image with a Gaussian operator of the given " "radius and standard deviation. For reasonable results, " @@ -165,29 +165,29 @@ FilterOptionsDialog::FilterOptionsDialog(QWidget *parent, int FilterType) m_label_unsharpenRadius->setBuddy( m_unsharpenRadius ); dvlay->addWidget( m_unsharpenRadius ); - QLabel *m_label_unsharpenDeviation = new QLabel (i18n("Deviation:"), box); + TQLabel *m_label_unsharpenDeviation = new TQLabel (i18n("Deviation:"), box); dvlay->addWidget( m_label_unsharpenDeviation ); m_unsharpenDeviation = new KIntNumInput(1, box); m_unsharpenDeviation->setRange(0, 20, 1, true ); - QWhatsThis::add( m_unsharpenDeviation, i18n("<p>Select here the unsharpen deviation value of the " + TQWhatsThis::add( m_unsharpenDeviation, i18n("<p>Select here the unsharpen deviation value of the " "Gaussian, in pixels.") ); m_label_unsharpenDeviation->setBuddy( m_unsharpenDeviation ); dvlay->addWidget( m_unsharpenDeviation ); - QLabel *m_label_unsharpenPercent = new QLabel (i18n("Percent:"), box); + TQLabel *m_label_unsharpenPercent = new TQLabel (i18n("Percent:"), box); dvlay->addWidget( m_label_unsharpenPercent ); m_unsharpenPercent = new KIntNumInput(3, box); m_unsharpenPercent->setRange(1, 100, 1, true ); - QWhatsThis::add( m_unsharpenPercent, i18n("<p>Select here the percentage difference between original " + TQWhatsThis::add( m_unsharpenPercent, i18n("<p>Select here the percentage difference between original " "and blurred image which should be added to original.") ); m_label_unsharpenPercent->setBuddy( m_unsharpenPercent ); dvlay->addWidget( m_unsharpenPercent ); - QLabel *m_label_unsharpenThreshold = new QLabel (i18n("Threshold:"), box); + TQLabel *m_label_unsharpenThreshold = new TQLabel (i18n("Threshold:"), box); dvlay->addWidget( m_label_unsharpenThreshold ); m_unsharpenThreshold = new KIntNumInput(1, box); m_unsharpenThreshold->setRange(0, 20, 1, true ); - QWhatsThis::add( m_unsharpenThreshold, i18n("<p>Select here the unsharpen threshold value, in " + TQWhatsThis::add( m_unsharpenThreshold, i18n("<p>Select here the unsharpen threshold value, in " "pixels, needed to apply the diffence amount.")); m_label_unsharpenThreshold->setBuddy( m_unsharpenThreshold ); dvlay->addWidget( m_unsharpenThreshold ); diff --git a/kipi-plugins/batchprocessimages/filteroptionsdialog.h b/kipi-plugins/batchprocessimages/filteroptionsdialog.h index 1446c06..c8766fd 100644 --- a/kipi-plugins/batchprocessimages/filteroptionsdialog.h +++ b/kipi-plugins/batchprocessimages/filteroptionsdialog.h @@ -23,15 +23,15 @@ #ifndef FILTEROPTIONSDIALOG_H #define FILTEROPTIONSDIALOG_H -// Include files for Qt +// Include files for TQt -#include <qstring.h> +#include <tqstring.h> // Include files for KDE #include <kdialogbase.h> -class QComboBox; +class TQComboBox; class KIntNumInput; @@ -41,12 +41,13 @@ namespace KIPIBatchProcessImagesPlugin class FilterOptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FilterOptionsDialog(QWidget *parent=0, int FilterType = 0); + FilterOptionsDialog(TQWidget *tqparent=0, int FilterType = 0); ~FilterOptionsDialog(); - QComboBox *m_noiseType; + TQComboBox *m_noiseType; KIntNumInput *m_blurRadius; KIntNumInput *m_blurDeviation; diff --git a/kipi-plugins/batchprocessimages/imagepreview.cpp b/kipi-plugins/batchprocessimages/imagepreview.cpp index 21a2db1..e990595 100644 --- a/kipi-plugins/batchprocessimages/imagepreview.cpp +++ b/kipi-plugins/batchprocessimages/imagepreview.cpp @@ -31,20 +31,20 @@ extern "C" #include <cstdlib> -// Qt includes - -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qslider.h> -#include <qlcdnumber.h> -#include <qpainter.h> -#include <qwhatsthis.h> -#include <qapplication.h> -#include <qcursor.h> +// TQt includes + +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqslider.h> +#include <tqlcdnumber.h> +#include <tqpainter.h> +#include <tqwhatsthis.h> +#include <tqapplication.h> +#include <tqcursor.h> // KDE includes @@ -77,11 +77,11 @@ namespace KIPIBatchProcessImagesPlugin int INIT_ZOOM_FACTOR; -ImagePreview::ImagePreview(const QString &fileOrig, const QString &fileDest, const QString &tmpPath, - bool cropActionOrig, bool cropActionDest, const QString &EffectName, - const QString &FileName, QWidget *parent) - : KDialogBase( parent, "PreviewDialog", true, i18n("Batch Process Preview (%1 - %2)").arg(EffectName) - .arg(FileName), Help|Ok, Ok, true) +ImagePreview::ImagePreview(const TQString &fileOrig, const TQString &fileDest, const TQString &tmpPath, + bool cropActionOrig, bool cropActionDest, const TQString &EffectName, + const TQString &FileName, TQWidget *tqparent) + : KDialogBase( tqparent, "PreviewDialog", true, i18n("Batch Process Preview (%1 - %2)").tqarg(EffectName) + .tqarg(FileName), Help|Ok, Ok, true) { // About data and help button. @@ -100,12 +100,12 @@ ImagePreview::ImagePreview(const QString &fileOrig, const QString &fileDest, con m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbooks"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbooks"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); //--------------------------------------------- - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); resize(700, 400); @@ -114,53 +114,53 @@ ImagePreview::ImagePreview(const QString &fileOrig, const QString &fileDest, con else INIT_ZOOM_FACTOR = 5; - QVBoxLayout* ml = new QVBoxLayout( box, 10 ); + TQVBoxLayout* ml = new TQVBoxLayout( box, 10 ); //--------------------------------------------- - QHBoxLayout* h1 = new QHBoxLayout( ml ); - QVBoxLayout* v1 = new QVBoxLayout( h1 ); + TQHBoxLayout* h1 = new TQHBoxLayout( ml ); + TQVBoxLayout* v1 = new TQVBoxLayout( h1 ); h1->addSpacing( 5 ); - QGridLayout* g1 = new QGridLayout( v1, 1, 2 ); + TQGridLayout* g1 = new TQGridLayout( v1, 1, 2 ); - QGroupBox * groupBoxZoomFactor = new QGroupBox( 2, Qt::Horizontal, i18n("Zoom Factor"), box ); - LCDZoomFactorValue = new QLCDNumber (4, groupBoxZoomFactor, "ZoomFactorLCDvalue"); - LCDZoomFactorValue->setSegmentStyle ( QLCDNumber::Flat ); - LCDZoomFactorValue->display( QString::number(INIT_ZOOM_FACTOR * 5) ); - QWhatsThis::add( LCDZoomFactorValue, i18n("<p>The zoom factor value, as a percentage.")); + TQGroupBox * groupBoxZoomFactor = new TQGroupBox( 2, Qt::Horizontal, i18n("Zoom Factor"), box ); + LCDZoomFactorValue = new TQLCDNumber (4, groupBoxZoomFactor, "ZoomFactorLCDvalue"); + LCDZoomFactorValue->setSegmentStyle ( TQLCDNumber::Flat ); + LCDZoomFactorValue->display( TQString::number(INIT_ZOOM_FACTOR * 5) ); + TQWhatsThis::add( LCDZoomFactorValue, i18n("<p>The zoom factor value, as a percentage.")); - ZoomFactorSlider = new QSlider (1, 20, 1, INIT_ZOOM_FACTOR, Qt::Horizontal, + ZoomFactorSlider = new TQSlider (1, 20, 1, INIT_ZOOM_FACTOR, Qt::Horizontal, groupBoxZoomFactor, "ZoomFactorSlider"); ZoomFactorSlider->setTracking ( false ); ZoomFactorSlider->setTickInterval ( 5 ); - QWhatsThis::add( ZoomFactorSlider, i18n("<p>Moving this slider changes the zoom factor value.")); + TQWhatsThis::add( ZoomFactorSlider, i18n("<p>Moving this slider changes the zoom factor value.")); g1->addWidget( groupBoxZoomFactor, 0, 0); - QGridLayout* g2 = new QGridLayout( v1, 1, 2 ); - QGroupBox * groupBox1 = new QGroupBox( 1, Qt::Horizontal, i18n("Original Image"), box ); + TQGridLayout* g2 = new TQGridLayout( v1, 1, 2 ); + TQGroupBox * groupBox1 = new TQGroupBox( 1, Qt::Horizontal, i18n("Original Image"), box ); m_previewOrig = new PixmapView(cropActionOrig, groupBox1); - QWhatsThis::add( m_previewOrig, i18n("<p>This is the original image preview. You can use the mouse " + TQWhatsThis::add( m_previewOrig, i18n("<p>This is the original image preview. You can use the mouse " "wheel to change the zoom factor. Click in and use the mouse " "to move the image.")); g2->addWidget( groupBox1 , 0, 0); - QGroupBox * groupBox2 = new QGroupBox( 1, Qt::Horizontal, i18n("Destination Image"), box ); + TQGroupBox * groupBox2 = new TQGroupBox( 1, Qt::Horizontal, i18n("Destination Image"), box ); m_previewDest = new PixmapView(cropActionDest, groupBox2); - QWhatsThis::add( m_previewDest, i18n("<p>This is the destination image preview. You can use the " + TQWhatsThis::add( m_previewDest, i18n("<p>This is the destination image preview. You can use the " "mouse wheel to change the zoom factor. Click in and use the " "mouse to move the image.")); g2->setColStretch(0,1); g2->setColStretch(1,1); g2->addWidget( groupBox2 , 0, 1); - connect( ZoomFactorSlider, SIGNAL(valueChanged(int)), - this, SLOT(slotZoomFactorValueChanged(int)) ); + connect( ZoomFactorSlider, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotZoomFactorValueChanged(int)) ); - connect( m_previewOrig, SIGNAL(wheelEvent(int)), - this, SLOT(slotWheelChanged(int)) ); + connect( m_previewOrig, TQT_SIGNAL(wheelEvent(int)), + this, TQT_SLOT(slotWheelChanged(int)) ); - connect( m_previewDest, SIGNAL(wheelEvent(int)), - this, SLOT(slotWheelChanged(int)) ); + connect( m_previewDest, TQT_SIGNAL(wheelEvent(int)), + this, TQT_SLOT(slotWheelChanged(int)) ); m_previewOrig->setImage(fileOrig, tmpPath); m_previewDest->setImage(fileDest, tmpPath); @@ -188,26 +188,26 @@ void ImagePreview::slotWheelChanged( int delta ) void ImagePreview::slotZoomFactorValueChanged( int ZoomFactorValue ) { - LCDZoomFactorValue->display( QString::number(ZoomFactorValue * 5) ); + LCDZoomFactorValue->display( TQString::number(ZoomFactorValue * 5) ); m_previewOrig->resizeImage( ZoomFactorValue * 5 ); m_previewDest->resizeImage( ZoomFactorValue * 5 ); } -PixmapView::PixmapView(bool cropAction, QWidget *parent, const char *name) - : QScrollView(parent, name) +PixmapView::PixmapView(bool cropAction, TQWidget *tqparent, const char *name) + : TQScrollView(tqparent, name) { m_cropAction = cropAction; m_pix = NULL; m_validPreview = false; - setMinimumSize(QSize(300,300)); + setMinimumSize(TQSize(300,300)); horizontalScrollBar()->setLineStep( 1 ); horizontalScrollBar()->setPageStep( 1 ); verticalScrollBar()->setLineStep( 1 ); verticalScrollBar()->setPageStep( 1 ); KGlobal::dirs()->addResourceType("kipi_handcursor", KGlobal::dirs()->kde_default("data") + "kipi/data"); - m_handCursor = new QCursor( KGlobal::dirs()->findResourceDir("kipi_handcursor", "handcursor.png") + m_handCursor = new TQCursor( KGlobal::dirs()->findResourceDir("kipi_handcursor", "handcursor.png") + "handcursor.png" ); } @@ -216,11 +216,11 @@ PixmapView::~PixmapView() if(m_pix) delete m_pix; } -void PixmapView::setImage(const QString &ImagePath, const QString &tmpPath) +void PixmapView::setImage(const TQString &ImagePath, const TQString &tmpPath) { - m_previewFileName = tmpPath + "/" + QString::number(getpid()) + "-" - + QString::number(random()) + "PreviewImage.PNG"; + m_previewFileName = tmpPath + "/" + TQString::number(getpid()) + "-" + + TQString::number(random()) + "PreviewImage.PNG"; if (m_cropAction == true) PreviewCal(ImagePath, tmpPath); @@ -230,7 +230,7 @@ void PixmapView::setImage(const QString &ImagePath, const QString &tmpPath) PreviewCal(ImagePath, tmpPath); else { - if(!m_pix) m_pix = new QPixmap(m_img.width(), m_img.height()); + if(!m_pix) m_pix = new TQPixmap(m_img.width(), m_img.height()); m_w = m_img.width(); m_h = m_img.height(); m_validPreview = true; @@ -241,14 +241,14 @@ void PixmapView::setImage(const QString &ImagePath, const QString &tmpPath) } } -void PixmapView::PreviewCal(const QString &ImagePath, const QString &/*tmpPath*/) +void PixmapView::PreviewCal(const TQString &ImagePath, const TQString &/*tmpPath*/) { - m_pix = new QPixmap(300, 300); - QPainter p; + m_pix = new TQPixmap(300, 300); + TQPainter p; p.begin(m_pix); - p.fillRect(0, 0, m_pix->width(), m_pix->height(), Qt::white); - p.setPen(Qt::green); - p.drawText(0, 0, m_pix->width(), m_pix->height(), Qt::AlignCenter, + p.fillRect(0, 0, m_pix->width(), m_pix->height(), TQt::white); + p.setPen(TQt::green); + p.drawText(0, 0, m_pix->width(), m_pix->height(), TQt::AlignCenter, i18n("Preview\nimage\nprocessing\nin\nprogress...")); p.end(); @@ -267,14 +267,14 @@ void PixmapView::PreviewCal(const QString &ImagePath, const QString &/*tmpPath*/ *m_PreviewProc << m_previewFileName; m_previewOutput.append( " -verbose " + ImagePath + " " + m_previewFileName + "\n\n"); - connect(m_PreviewProc, SIGNAL(processExited(KProcess *)), - this, SLOT(PreviewProcessDone(KProcess*))); + connect(m_PreviewProc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(PreviewProcessDone(KProcess*))); - connect(m_PreviewProc, SIGNAL(receivedStdout(KProcess *, char*, int)), - this, SLOT(slotPreviewReadStd(KProcess*, char*, int))); + connect(m_PreviewProc, TQT_SIGNAL(receivedStdout(KProcess *, char*, int)), + this, TQT_SLOT(slotPreviewReadStd(KProcess*, char*, int))); - connect(m_PreviewProc, SIGNAL(receivedStderr(KProcess *, char*, int)), - this, SLOT(slotPreviewReadStd(KProcess*, char*, int))); + connect(m_PreviewProc, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)), + this, TQT_SLOT(slotPreviewReadStd(KProcess*, char*, int))); bool result = m_PreviewProc->start(KProcess::NotifyOnExit, KProcess::All); if(!result) @@ -287,7 +287,7 @@ void PixmapView::PreviewCal(const QString &ImagePath, const QString &/*tmpPath*/ void PixmapView::slotPreviewReadStd(KProcess* /*proc*/, char *buffer, int buflen) { - m_previewOutput.append( QString::fromLocal8Bit(buffer, buflen) ); + m_previewOutput.append( TQString::fromLocal8Bit(buffer, buflen) ); } void PixmapView::PreviewProcessDone(KProcess* proc) @@ -299,7 +299,7 @@ void PixmapView::PreviewProcessDone(KProcess* proc) { if ( m_img.load( m_previewFileName ) == true ) { - if(!m_pix) m_pix = new QPixmap(300, 300); + if(!m_pix) m_pix = new TQPixmap(300, 300); m_w = m_img.width(); m_h = m_img.height(); m_validPreview = true; @@ -309,22 +309,22 @@ void PixmapView::PreviewProcessDone(KProcess* proc) KURL deletePreviewImage( m_previewFileName ); #if KDE_VERSION >= 0x30200 - KIO::NetAccess::del( deletePreviewImage, kapp->activeWindow() ); + KIO::NetAccess::del( deletePreviewImage, TQT_TQWIDGET(kapp->activeWindow()) ); #else KIO::NetAccess::del( deletePreviewImage ); #endif } else { - m_pix = new QPixmap(visibleWidth(), visibleHeight()); - QPainter p; + m_pix = new TQPixmap(visibleWidth(), visibleHeight()); + TQPainter p; p.begin(m_pix); - p.fillRect(0, 0, m_pix->width(), m_pix->height(), Qt::white); - p.setPen(Qt::red); - p.drawText(0, 0, m_pix->width(), m_pix->height(), Qt::AlignCenter, + p.fillRect(0, 0, m_pix->width(), m_pix->height(), TQt::white); + p.setPen(TQt::red); + p.drawText(0, 0, m_pix->width(), m_pix->height(), TQt::AlignCenter, i18n("Cannot\nprocess\npreview\nimage.")); p.end(); - repaintContents(); + tqrepaintContents(); m_validPreview = false; } } @@ -337,24 +337,24 @@ void PixmapView::resizeImage(int ZoomFactor) int w = m_w - (int)((float)m_w * (100-(float)ZoomFactor) / 100); int h = m_h - (int)((float)m_h * (100-(float)ZoomFactor) / 100); - QImage imgTmp = m_img.scale(w, h); + TQImage imgTmp = m_img.scale(w, h); m_pix->convertFromImage(imgTmp); resizeContents(w, h); - repaintContents(false); + tqrepaintContents(false); } -void PixmapView::drawContents(QPainter *p, int x, int y, int w, int h) +void PixmapView::drawContents(TQPainter *p, int x, int y, int w, int h) { if(!m_pix) return; else p->drawPixmap(x, y, *m_pix, x, y, w, h); } -void PixmapView::contentsWheelEvent( QWheelEvent * e ) +void PixmapView::contentsWheelEvent( TQWheelEvent * e ) { emit wheelEvent(e->delta()); } -void PixmapView::contentsMousePressEvent ( QMouseEvent * e ) +void PixmapView::contentsMousePressEvent ( TQMouseEvent * e ) { if ( e->button() == Qt::LeftButton ) { @@ -364,12 +364,12 @@ void PixmapView::contentsMousePressEvent ( QMouseEvent * e ) } } -void PixmapView::contentsMouseReleaseEvent ( QMouseEvent * /*e*/ ) +void PixmapView::contentsMouseReleaseEvent ( TQMouseEvent * /*e*/ ) { setCursor ( KCursor::arrowCursor() ); } -void PixmapView::contentsMouseMoveEvent( QMouseEvent * e ) +void PixmapView::contentsMouseMoveEvent( TQMouseEvent * e ) { if ( e->state() == Qt::LeftButton ) { diff --git a/kipi-plugins/batchprocessimages/imagepreview.h b/kipi-plugins/batchprocessimages/imagepreview.h index 27e7204..82b4ba1 100644 --- a/kipi-plugins/batchprocessimages/imagepreview.h +++ b/kipi-plugins/batchprocessimages/imagepreview.h @@ -23,11 +23,11 @@ #ifndef IMAGEPREVIEW_H #define IMAGEPREVIEW_H -// Include files for Qt +// Include files for TQt -#include <qscrollview.h> -#include <qimage.h> -#include <qstring.h> +#include <tqscrollview.h> +#include <tqimage.h> +#include <tqstring.h> // Include files for KDE @@ -37,11 +37,11 @@ #include "kpaboutdata.h" -class QPixmap; -class QCursor; -class QLCDNumber; -class QSlider; -class QPushButton; +class TQPixmap; +class TQCursor; +class TQLCDNumber; +class TQSlider; +class TQPushButton; class KProcess; @@ -50,26 +50,27 @@ namespace KIPIBatchProcessImagesPlugin ///////////////////////////////////////////////////////////////////////////////////////////////////// -class PixmapView : public QScrollView +class PixmapView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - PixmapView(bool cropAction, QWidget *parent=0, const char *name=0); + PixmapView(bool cropAction, TQWidget *tqparent=0, const char *name=0); ~PixmapView(); - void setImage(const QString &ImagePath, const QString &tmpPath); + void setImage(const TQString &ImagePath, const TQString &tmpPath); void resizeImage(int ZoomFactor); private slots: void slotPreviewReadStd(KProcess* proc, char *buffer, int buflen); void PreviewProcessDone(KProcess* proc); - void contentsWheelEvent( QWheelEvent * e ); - void contentsMousePressEvent ( QMouseEvent * e ); - void contentsMouseReleaseEvent ( QMouseEvent * e ); - void contentsMouseMoveEvent( QMouseEvent * e ); + void contentsWheelEvent( TQWheelEvent * e ); + void contentsMousePressEvent ( TQMouseEvent * e ); + void contentsMouseReleaseEvent ( TQMouseEvent * e ); + void contentsMouseMoveEvent( TQMouseEvent * e ); signals: @@ -77,9 +78,9 @@ signals: protected: - QPixmap *m_pix; + TQPixmap *m_pix; - QImage m_img; + TQImage m_img; int m_w; int m_h; @@ -88,16 +89,16 @@ protected: KProcess *m_PreviewProc; - QString m_previewOutput; - QString m_previewFileName; + TQString m_previewOutput; + TQString m_previewFileName; bool m_validPreview; bool m_cropAction; - QCursor *m_handCursor; + TQCursor *m_handCursor; - void drawContents(QPainter *p, int x, int y, int w, int h); - void PreviewCal(const QString &ImagePath, const QString &tmpPath); + void drawContents(TQPainter *p, int x, int y, int w, int h); + void PreviewCal(const TQString &ImagePath, const TQString &tmpPath); }; @@ -106,12 +107,13 @@ protected: class ImagePreview : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ImagePreview(const QString &fileOrig, const QString &fileDest, const QString &tmpPath, - bool cropActionOrig, bool cropActionDest, const QString &EffectName, - const QString &FileName, QWidget *parent=0); + ImagePreview(const TQString &fileOrig, const TQString &fileDest, const TQString &tmpPath, + bool cropActionOrig, bool cropActionDest, const TQString &EffectName, + const TQString &FileName, TQWidget *tqparent=0); ~ImagePreview(); private slots: @@ -125,11 +127,11 @@ protected: PixmapView *m_previewOrig; PixmapView *m_previewDest; - QLCDNumber *LCDZoomFactorValue; + TQLCDNumber *LCDZoomFactorValue; - QSlider *ZoomFactorSlider; + TQSlider *ZoomFactorSlider; - QPushButton *m_helpButton; + TQPushButton *m_helpButton; private: diff --git a/kipi-plugins/batchprocessimages/outputdialog.cpp b/kipi-plugins/batchprocessimages/outputdialog.cpp index 3ba2a60..7f56456 100644 --- a/kipi-plugins/batchprocessimages/outputdialog.cpp +++ b/kipi-plugins/batchprocessimages/outputdialog.cpp @@ -20,13 +20,13 @@ * * ============================================================ */ -// Qt includes +// TQt includes -#include <qtextview.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qframe.h> +#include <tqtextview.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqframe.h> // KDElib includes @@ -46,8 +46,8 @@ namespace KIPIBatchProcessImagesPlugin { -OutputDialog::OutputDialog(QWidget* parent, QString caption, QString Messages, QString Header ) - : KDialogBase( parent, "OutputDialog", true, caption, Help|User1|Ok, Ok, false, +OutputDialog::OutputDialog(TQWidget* tqparent, TQString caption, TQString Messages, TQString Header ) + : KDialogBase( tqparent, "OutputDialog", true, caption, Help|User1|Ok, Ok, false, i18n("Copy to Clip&board")) { // About data and help button. @@ -67,26 +67,26 @@ OutputDialog::OutputDialog(QWidget* parent, QString caption, QString Messages, Q m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbooks"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbooks"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); //--------------------------------------------- - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout *dvlay = new QVBoxLayout( box, 10, spacingHint() ); + TQVBoxLayout *dvlay = new TQVBoxLayout( box, 10, spacingHint() ); //--------------------------------------------- - QLabel *labelHeader = new QLabel( Header, box); + TQLabel *labelHeader = new TQLabel( Header, box); dvlay->addWidget( labelHeader ); - debugView = new QTextView( box ); + debugView = new TQTextView( box ); debugView->append( Messages ); dvlay->addWidget( debugView ); - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotCopyToCliboard())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotCopyToCliboard())); resize( 600, 400 ); } diff --git a/kipi-plugins/batchprocessimages/outputdialog.h b/kipi-plugins/batchprocessimages/outputdialog.h index f849439..c77d131 100644 --- a/kipi-plugins/batchprocessimages/outputdialog.h +++ b/kipi-plugins/batchprocessimages/outputdialog.h @@ -23,9 +23,9 @@ #ifndef OUTPUTDIALOG_H #define OUTPUTDIALOG_H -// Include files for Qt +// Include files for TQt -#include <qstring.h> +#include <tqstring.h> // Include files for KDE @@ -35,8 +35,8 @@ #include "kpaboutdata.h" -class QTextView; -class QPushButton; +class TQTextView; +class TQPushButton; namespace KIPIBatchProcessImagesPlugin { @@ -44,11 +44,12 @@ namespace KIPIBatchProcessImagesPlugin class OutputDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - OutputDialog( QWidget* parent=0, QString caption=QString::null, - QString Messages=QString::null, QString Header=QString::null ); + OutputDialog( TQWidget* tqparent=0, TQString caption=TQString(), + TQString Messages=TQString(), TQString Header=TQString() ); ~OutputDialog(); private slots: @@ -58,8 +59,8 @@ private slots: private: - QPushButton *m_helpButton; - QTextView *debugView; + TQPushButton *m_helpButton; + TQTextView *debugView; KIPIPlugins::KPAboutData *m_about; diff --git a/kipi-plugins/batchprocessimages/plugin_batchprocessimages.cpp b/kipi-plugins/batchprocessimages/plugin_batchprocessimages.cpp index 084fb03..f1f4ee3 100644 --- a/kipi-plugins/batchprocessimages/plugin_batchprocessimages.cpp +++ b/kipi-plugins/batchprocessimages/plugin_batchprocessimages.cpp @@ -27,9 +27,9 @@ extern "C" #include <unistd.h> } -// Qt Includes +// TQt Includes -#include <qimage.h> +#include <tqimage.h> // KDE includes @@ -69,14 +69,14 @@ typedef KGenericFactory<Plugin_BatchProcessImages> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_batchprocessimages, Factory("kipiplugin_batchprocessimages")) -Plugin_BatchProcessImages::Plugin_BatchProcessImages(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "BatchProcessImages") +Plugin_BatchProcessImages::Plugin_BatchProcessImages(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "BatchProcessImages") { kdDebug( 51001 ) << "Plugin_BatchProcessImages plugin loaded" << endl; } -void Plugin_BatchProcessImages::setup( QWidget* widget ) +void Plugin_BatchProcessImages::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -84,7 +84,7 @@ void Plugin_BatchProcessImages::setup( QWidget* widget ) "borderimages", // Menu icon. 0, // default shortcut. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "batch_border_images"); @@ -92,7 +92,7 @@ void Plugin_BatchProcessImages::setup( QWidget* widget ) "colorimages", // Menu icon. 0, // default shortcut. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "batch_color_images"); @@ -100,7 +100,7 @@ void Plugin_BatchProcessImages::setup( QWidget* widget ) "convertimages", // Menu icon. 0, // default shortcut. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "batch_convert_images"); @@ -108,7 +108,7 @@ void Plugin_BatchProcessImages::setup( QWidget* widget ) "effectimages", // Menu icon. 0, // default shortcut. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "batch_effect_images"); @@ -116,7 +116,7 @@ void Plugin_BatchProcessImages::setup( QWidget* widget ) "filterimages", // Menu icon. 0, // default shortcut. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "batch_filter_images"); @@ -124,7 +124,7 @@ void Plugin_BatchProcessImages::setup( QWidget* widget ) "renameimages", // Menu icon. 0, // default shortcut. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "batch_rename_images"); @@ -132,7 +132,7 @@ void Plugin_BatchProcessImages::setup( QWidget* widget ) "recompressimages", // Menu icon. 0, // default shortcut. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "batch_recompress_images"); @@ -140,7 +140,7 @@ void Plugin_BatchProcessImages::setup( QWidget* widget ) "resizeimages", // Menu icon. 0, // default shortcut. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "batch_resize_images"); @@ -153,7 +153,7 @@ void Plugin_BatchProcessImages::setup( QWidget* widget ) addAction( m_action_recompressimages ); addAction( m_action_resizeimages ); - KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( parent() ); + KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( tqparent() ); if ( !interface ) { @@ -173,29 +173,29 @@ void Plugin_BatchProcessImages::setup( QWidget* widget ) m_action_recompressimages->setEnabled( enable ); m_action_resizeimages->setEnabled( enable ); - connect( interface, SIGNAL( currentAlbumChanged( bool ) ), - m_action_borderimages, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( currentAlbumChanged( bool ) ), + m_action_borderimages, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( currentAlbumChanged( bool ) ), - m_action_colorimages, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( currentAlbumChanged( bool ) ), + m_action_colorimages, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( currentAlbumChanged( bool ) ), - m_action_convertimages, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( currentAlbumChanged( bool ) ), + m_action_convertimages, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( currentAlbumChanged( bool ) ), - m_action_effectimages, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( currentAlbumChanged( bool ) ), + m_action_effectimages, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( currentAlbumChanged( bool ) ), - m_action_filterimages, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( currentAlbumChanged( bool ) ), + m_action_filterimages, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( currentAlbumChanged( bool ) ), - m_action_renameimages, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( currentAlbumChanged( bool ) ), + m_action_renameimages, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( currentAlbumChanged( bool ) ), - m_action_recompressimages, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( currentAlbumChanged( bool ) ), + m_action_recompressimages, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( currentAlbumChanged( bool ) ), - m_action_resizeimages, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( currentAlbumChanged( bool ) ), + m_action_resizeimages, TQT_SLOT( setEnabled( bool ) ) ); } Plugin_BatchProcessImages::~Plugin_BatchProcessImages() @@ -204,7 +204,7 @@ Plugin_BatchProcessImages::~Plugin_BatchProcessImages() void Plugin_BatchProcessImages::slotActivate() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -225,61 +225,61 @@ void Plugin_BatchProcessImages::slotActivate() if ( images.images().isEmpty() ) { - KMessageBox::sorry(kapp->activeWindow(), + KMessageBox::sorry(TQT_TQWIDGET(kapp->activeWindow()), i18n("Please select an album or a selection of images.")); return; } KURL::List urlList = images.images(); - QString from(sender()->name()); + TQString from(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()); if (from == "batch_convert_images") { m_ConvertImagesDialog = new KIPIBatchProcessImagesPlugin::ConvertImagesDialog( urlList, - interface, kapp->activeWindow()); + interface, TQT_TQWIDGET(kapp->activeWindow())); m_ConvertImagesDialog->show(); } else if (from == "batch_rename_images") { KIPIBatchProcessImagesPlugin::RenameImagesDialog - dlg(urlList, interface, kapp->activeWindow()); + dlg(urlList, interface, TQT_TQWIDGET(kapp->activeWindow())); dlg.exec(); } else if (from == "batch_border_images") { m_BorderImagesDialog = new KIPIBatchProcessImagesPlugin::BorderImagesDialog( urlList, - interface, kapp->activeWindow()); + interface, TQT_TQWIDGET(kapp->activeWindow())); m_BorderImagesDialog->show(); } else if (from == "batch_color_images") { m_ColorImagesDialog = new KIPIBatchProcessImagesPlugin::ColorImagesDialog( urlList, - interface, kapp->activeWindow()); + interface, TQT_TQWIDGET(kapp->activeWindow())); m_ColorImagesDialog->show(); } else if (from == "batch_filter_images") { m_FilterImagesDialog = new KIPIBatchProcessImagesPlugin::FilterImagesDialog( urlList, - interface, kapp->activeWindow()); + interface, TQT_TQWIDGET(kapp->activeWindow())); m_FilterImagesDialog->show(); } else if (from == "batch_effect_images") { m_EffectImagesDialog = new KIPIBatchProcessImagesPlugin::EffectImagesDialog( urlList, - interface, kapp->activeWindow()); + interface, TQT_TQWIDGET(kapp->activeWindow())); m_EffectImagesDialog->show(); } else if (from == "batch_recompress_images") { m_RecompressImagesDialog = new KIPIBatchProcessImagesPlugin::RecompressImagesDialog( urlList, - interface, kapp->activeWindow()); + interface, TQT_TQWIDGET(kapp->activeWindow())); m_RecompressImagesDialog->show(); } else if (from == "batch_resize_images") { m_ResizeImagesDialog = new KIPIBatchProcessImagesPlugin::ResizeImagesDialog( urlList, - interface, kapp->activeWindow()); + interface, TQT_TQWIDGET(kapp->activeWindow())); m_ResizeImagesDialog->show(); } else diff --git a/kipi-plugins/batchprocessimages/plugin_batchprocessimages.h b/kipi-plugins/batchprocessimages/plugin_batchprocessimages.h index ff78a8f..3600c55 100644 --- a/kipi-plugins/batchprocessimages/plugin_batchprocessimages.h +++ b/kipi-plugins/batchprocessimages/plugin_batchprocessimages.h @@ -23,9 +23,9 @@ #ifndef PLUGIN_BATCHPROCESSIMAGES_H #define PLUGIN_BATCHPROCESSIMAGES_H -// Include files for Qt +// Include files for TQt -#include <qstring.h> +#include <tqstring.h> // Include files for KDE @@ -45,12 +45,13 @@ class KIPIBatchProcessImagesPlugin::ResizeImagesDialog; class Plugin_BatchProcessImages : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_BatchProcessImages(QObject *parent, const char* name, const QStringList &args); + Plugin_BatchProcessImages(TQObject *tqparent, const char* name, const TQStringList &args); virtual ~Plugin_BatchProcessImages(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* ); + virtual void setup( TQWidget* ); public slots: void slotActivate(); diff --git a/kipi-plugins/batchprocessimages/recompressimagesdialog.cpp b/kipi-plugins/batchprocessimages/recompressimagesdialog.cpp index 7f70474..7f2da05 100644 --- a/kipi-plugins/batchprocessimages/recompressimagesdialog.cpp +++ b/kipi-plugins/batchprocessimages/recompressimagesdialog.cpp @@ -20,14 +20,14 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qgroupbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> // Include files for KDE @@ -53,8 +53,8 @@ namespace KIPIBatchProcessImagesPlugin { -RecompressImagesDialog::RecompressImagesDialog( KURL::List urlList, KIPI::Interface* interface, QWidget *parent ) - : BatchProcessImagesDialog( urlList, interface, i18n("Batch Recompress Images"), parent ) +RecompressImagesDialog::RecompressImagesDialog( KURL::List urlList, KIPI::Interface* interface, TQWidget *tqparent ) + : BatchProcessImagesDialog( urlList, interface, i18n("Batch Recompress Images"), tqparent ) { // About data and help button. @@ -71,7 +71,7 @@ RecompressImagesDialog::RecompressImagesDialog( KURL::List urlList, KIPI::Interf m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); //--------------------------------------------- @@ -174,8 +174,8 @@ void RecompressImagesDialog::saveSettings(void) delete m_config; } -QString RecompressImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode) +TQString RecompressImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode) { *proc << "convert"; @@ -185,7 +185,7 @@ QString RecompressImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesIt m_previewOutput.append( " -crop 300x300+0+0 "); } - QString imageExt = item->nameSrc().section('.', -1 ); + TQString imageExt = item->nameSrc().section('.', -1 ); if (imageExt == "JPEG" || imageExt == "jpeg" || imageExt == "JPG" || imageExt == "jpg") { @@ -196,7 +196,7 @@ QString RecompressImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesIt else { *proc << "-quality"; - QString Temp; + TQString Temp; *proc << Temp.setNum( m_JPEGCompression ); } } @@ -204,7 +204,7 @@ QString RecompressImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesIt else if (imageExt == "PNG" || imageExt == "png") { *proc << "-quality"; - QString Temp; + TQString Temp; *proc << Temp.setNum( m_PNGCompression ); } @@ -249,9 +249,9 @@ QString RecompressImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesIt } bool RecompressImagesDialog::prepareStartProcess(BatchProcessImagesItem *item, - const QString& /*albumDest*/) + const TQString& /*albumDest*/) { - QString imageExt = item->nameSrc().section('.', -1 ); + TQString imageExt = item->nameSrc().section('.', -1 ); if (imageExt != "JPEG" && imageExt != "jpeg" && imageExt != "JPG" && imageExt != "jpg" && diff --git a/kipi-plugins/batchprocessimages/recompressimagesdialog.h b/kipi-plugins/batchprocessimages/recompressimagesdialog.h index 087aa45..4e32135 100644 --- a/kipi-plugins/batchprocessimages/recompressimagesdialog.h +++ b/kipi-plugins/batchprocessimages/recompressimagesdialog.h @@ -36,10 +36,11 @@ class BatchProcessImagesItem; class RecompressImagesDialog : public BatchProcessImagesDialog { Q_OBJECT + TQ_OBJECT public: - RecompressImagesDialog( KURL::List images, KIPI::Interface* interface, QWidget *parent=0 ); + RecompressImagesDialog( KURL::List images, KIPI::Interface* interface, TQWidget *tqparent=0 ); ~RecompressImagesDialog(); private slots: @@ -52,17 +53,17 @@ Q_OBJECT int m_JPEGCompression; int m_PNGCompression; bool m_compressLossLess; - QString m_TIFFCompressionAlgo; - QString m_TGACompressionAlgo; + TQString m_TIFFCompressionAlgo; + TQString m_TGACompressionAlgo; - QString makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode); + TQString makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode); void readSettings(void); void saveSettings(void); bool prepareStartProcess(BatchProcessImagesItem *item, - const QString& albumDest); + const TQString& albumDest); private: diff --git a/kipi-plugins/batchprocessimages/recompressoptionsdialog.cpp b/kipi-plugins/batchprocessimages/recompressoptionsdialog.cpp index fc81e26..ec437a7 100644 --- a/kipi-plugins/batchprocessimages/recompressoptionsdialog.cpp +++ b/kipi-plugins/batchprocessimages/recompressoptionsdialog.cpp @@ -20,17 +20,17 @@ * * ============================================================ */ -// Include files for Qt - -#include <qvbox.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qcombobox.h> -#include <qcheckbox.h> +// Include files for TQt + +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> // Include files for KDE @@ -45,20 +45,20 @@ namespace KIPIBatchProcessImagesPlugin { -RecompressOptionsDialog::RecompressOptionsDialog(QWidget *parent) - : KDialogBase( parent, "RecompressOptionsDialog", true, +RecompressOptionsDialog::RecompressOptionsDialog(TQWidget *tqparent) + : KDialogBase( tqparent, "RecompressOptionsDialog", true, i18n("Recompression Options"), Ok|Cancel, Ok, false) { - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout *dvlay = new QVBoxLayout( box, 10, spacingHint() ); - QString whatsThis; + TQVBoxLayout *dvlay = new TQVBoxLayout( box, 10, spacingHint() ); + TQString whatsThis; // JPEG file format. - QGroupBox * groupBox1 = new QGroupBox( 2, Qt::Horizontal, i18n("JPEG File Format"), box ); + TQGroupBox * groupBox1 = new TQGroupBox( 2, Qt::Horizontal, i18n("JPEG File Format"), box ); - m_label_JPEGimageCompression = new QLabel (i18n("Image compression level:"), groupBox1); + m_label_JPEGimageCompression = new TQLabel (i18n("Image compression level:"), groupBox1); m_JPEGCompression = new KIntNumInput(75, groupBox1); m_JPEGCompression->setRange(1, 100, 1, true ); whatsThis = i18n("<p>The compression value for JPEG target images:<p>"); @@ -68,23 +68,23 @@ RecompressOptionsDialog::RecompressOptionsDialog(QWidget *parent) "<b>75</b>: low compression (default value)<p>" "<b>100</b>: no compression"); - QWhatsThis::add( m_JPEGCompression, whatsThis); + TQWhatsThis::add( m_JPEGCompression, whatsThis); m_label_JPEGimageCompression->setBuddy( m_JPEGCompression ); - m_compressLossLess = new QCheckBox( i18n("Use lossless compression"), groupBox1); - QWhatsThis::add( m_compressLossLess, i18n("<p>If this option is enabled, " + m_compressLossLess = new TQCheckBox( i18n("Use lossless compression"), groupBox1); + TQWhatsThis::add( m_compressLossLess, i18n("<p>If this option is enabled, " "all JPEG operations will use lossless compression.")); - connect(m_compressLossLess, SIGNAL( toggled(bool) ), - this, SLOT( slotCompressLossLessEnabled(bool) ) ); + connect(m_compressLossLess, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( slotCompressLossLessEnabled(bool) ) ); dvlay->addWidget( groupBox1 ); // PNG File format. - QGroupBox * groupBox2 = new QGroupBox( 2, Qt::Horizontal, i18n("PNG File Format"), box ); + TQGroupBox * groupBox2 = new TQGroupBox( 2, Qt::Horizontal, i18n("PNG File Format"), box ); - m_label_PNGimageCompression = new QLabel (i18n("Image compression level:"), groupBox2); + m_label_PNGimageCompression = new TQLabel (i18n("Image compression level:"), groupBox2); m_PNGCompression = new KIntNumInput(75, groupBox2); m_PNGCompression->setRange(1, 100, 1, true ); whatsThis = i18n("<p>The compression value for PNG target images:<p>"); @@ -94,34 +94,34 @@ RecompressOptionsDialog::RecompressOptionsDialog(QWidget *parent) "<b>75</b>: low compression (default value)<p>" "<b>100</b>: no compression"); - QWhatsThis::add( m_PNGCompression, whatsThis); + TQWhatsThis::add( m_PNGCompression, whatsThis); m_label_PNGimageCompression->setBuddy( m_PNGCompression ); dvlay->addWidget( groupBox2 ); // TIFF File format. - QGroupBox * groupBox3 = new QGroupBox( 2, Qt::Horizontal, i18n("TIFF File Format"), box ); + TQGroupBox * groupBox3 = new TQGroupBox( 2, Qt::Horizontal, i18n("TIFF File Format"), box ); - m_label_TIFFimageCompression = new QLabel (i18n("Image compression algorithm:"), groupBox3); - m_TIFFCompressionAlgo = new QComboBox( false, groupBox3 ); + m_label_TIFFimageCompression = new TQLabel (i18n("Image compression algorithm:"), groupBox3); + m_TIFFCompressionAlgo = new TQComboBox( false, groupBox3 ); m_TIFFCompressionAlgo->insertItem("LZW"); m_TIFFCompressionAlgo->insertItem("JPEG"); m_TIFFCompressionAlgo->insertItem(i18n("None")); - QWhatsThis::add( m_TIFFCompressionAlgo, i18n("<p>Select here the TIFF compression algorithm.") ); + TQWhatsThis::add( m_TIFFCompressionAlgo, i18n("<p>Select here the TIFF compression algorithm.") ); m_label_TIFFimageCompression->setBuddy( m_TIFFCompressionAlgo ); dvlay->addWidget( groupBox3 ); // TGA File format. - QGroupBox * groupBox4 = new QGroupBox( 2, Qt::Horizontal, i18n("TGA File Format"), box ); + TQGroupBox * groupBox4 = new TQGroupBox( 2, Qt::Horizontal, i18n("TGA File Format"), box ); - m_label_TGAimageCompression = new QLabel (i18n("Image compression algorithm:"), groupBox4); - m_TGACompressionAlgo = new QComboBox( false, groupBox4 ); + m_label_TGAimageCompression = new TQLabel (i18n("Image compression algorithm:"), groupBox4); + m_TGACompressionAlgo = new TQComboBox( false, groupBox4 ); m_TGACompressionAlgo->insertItem("RLE"); m_TGACompressionAlgo->insertItem(i18n("None")); - QWhatsThis::add( m_TGACompressionAlgo, i18n("<p>Select here the TGA compression algorithm.") ); + TQWhatsThis::add( m_TGACompressionAlgo, i18n("<p>Select here the TGA compression algorithm.") ); m_label_TGAimageCompression->setBuddy( m_TGACompressionAlgo ); dvlay->addWidget( groupBox4 ); diff --git a/kipi-plugins/batchprocessimages/recompressoptionsdialog.h b/kipi-plugins/batchprocessimages/recompressoptionsdialog.h index 4e5828c..8fefb87 100644 --- a/kipi-plugins/batchprocessimages/recompressoptionsdialog.h +++ b/kipi-plugins/batchprocessimages/recompressoptionsdialog.h @@ -23,17 +23,17 @@ #ifndef RECOMPRESSOPTIONSDIALOG_H #define RECOMPRESSOPTIONSDIALOG_H -// Include files for Qt +// Include files for TQt -#include <qstring.h> +#include <tqstring.h> // Include files for KDE #include <kdialogbase.h> -class QLabel; -class QCheckBox; -class QComboBox; +class TQLabel; +class TQCheckBox; +class TQComboBox; class KIntNumInput; @@ -43,20 +43,21 @@ namespace KIPIBatchProcessImagesPlugin class RecompressOptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - RecompressOptionsDialog(QWidget *parent=0); + RecompressOptionsDialog(TQWidget *tqparent=0); ~RecompressOptionsDialog(); - QLabel *m_label_JPEGimageCompression; - QLabel *m_label_PNGimageCompression; - QLabel *m_label_TIFFimageCompression; - QLabel *m_label_TGAimageCompression; + TQLabel *m_label_JPEGimageCompression; + TQLabel *m_label_PNGimageCompression; + TQLabel *m_label_TIFFimageCompression; + TQLabel *m_label_TGAimageCompression; KIntNumInput *m_JPEGCompression; KIntNumInput *m_PNGCompression; - QCheckBox *m_compressLossLess; - QComboBox *m_TIFFCompressionAlgo; - QComboBox *m_TGACompressionAlgo; + TQCheckBox *m_compressLossLess; + TQComboBox *m_TIFFCompressionAlgo; + TQComboBox *m_TGACompressionAlgo; public slots: void slotCompressLossLessEnabled(bool val); diff --git a/kipi-plugins/batchprocessimages/renameimagesbase.ui b/kipi-plugins/batchprocessimages/renameimagesbase.ui index a85fae5..44b9815 100644 --- a/kipi-plugins/batchprocessimages/renameimagesbase.ui +++ b/kipi-plugins/batchprocessimages/renameimagesbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KIPIBatchProcessImagesPlugin::RenameImagesBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>RenameImagesBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_templateGroupBox</cstring> </property> @@ -33,7 +33,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_seqLabel</cstring> </property> @@ -41,12 +41,12 @@ <string>Sequence number start value:</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>m_prefixEdit</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_prefixLabel</cstring> </property> @@ -54,7 +54,7 @@ <string>Prefix string:</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_addFileNameCheck</cstring> </property> @@ -62,7 +62,7 @@ <string>Add original file name</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_addFileDateCheck</cstring> </property> @@ -70,14 +70,14 @@ <string>Add file date</string> </property> </widget> - <widget class="QLineEdit" row="4" column="1"> + <widget class="TQLineEdit" row="4" column="1"> <property name="name"> <cstring>m_formatDateEdit</cstring> </property> </widget> - <widget class="QLayoutWidget" row="4" column="0"> + <widget class="TQLayoutWidget" row="4" column="0"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -93,14 +93,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>12</width> <height>14</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_formatDateCheck</cstring> </property> @@ -110,15 +110,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_seqSpin</cstring> </property> @@ -139,7 +139,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>261</width> <height>21</height> @@ -150,21 +150,21 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_addRemoveBox</cstring> </property> <property name="title"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignHCenter</set> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>m_addButton</cstring> </property> @@ -172,7 +172,7 @@ <string>Add</string> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>m_removeButton</cstring> </property> @@ -251,14 +251,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>175</height> </size> </property> </spacer> - <widget class="QPushButton" row="8" column="1"> + <widget class="TQPushButton" row="8" column="1"> <property name="name"> <cstring>m_reverseList</cstring> </property> @@ -276,14 +276,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>19</height> </size> </property> </spacer> - <widget class="QPushButton" row="7" column="1"> + <widget class="TQPushButton" row="7" column="1"> <property name="name"> <cstring>m_sortButton</cstring> </property> @@ -291,7 +291,7 @@ <string>Sort List</string> </property> </widget> - <widget class="QPushButton" row="5" column="1"> + <widget class="TQPushButton" row="5" column="1"> <property name="name"> <cstring>m_moveDown</cstring> </property> @@ -299,7 +299,7 @@ <string>Move &Down</string> </property> </widget> - <widget class="QPushButton" row="4" column="1"> + <widget class="TQPushButton" row="4" column="1"> <property name="name"> <cstring>m_moveUp</cstring> </property> @@ -307,7 +307,7 @@ <string>Move &Up</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_pixLabel</cstring> </property> @@ -319,7 +319,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>96</width> <height>96</height> @@ -339,7 +339,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>19</height> @@ -352,7 +352,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="6"/> +<tqlayoutdefaults spacing="6" margin="6"/> <includehints> <includehint>klistview.h</includehint> </includehints> diff --git a/kipi-plugins/batchprocessimages/renameimagesdialog.cpp b/kipi-plugins/batchprocessimages/renameimagesdialog.cpp index 059bb4d..543e434 100644 --- a/kipi-plugins/batchprocessimages/renameimagesdialog.cpp +++ b/kipi-plugins/batchprocessimages/renameimagesdialog.cpp @@ -21,10 +21,10 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqpushbutton.h> // KDE includes. @@ -46,9 +46,9 @@ namespace KIPIBatchProcessImagesPlugin RenameImagesDialog::RenameImagesDialog(const KURL::List& images, KIPI::Interface* interface, - QWidget* parent) + TQWidget* tqparent) : KDialogBase( KDialogBase::Plain, "Rename Images", Help|User1|Close, - Close, parent, "RenameImages", + Close, tqparent, "RenameImages", false, false, i18n("&Start")) { // About data and help button. @@ -62,21 +62,21 @@ RenameImagesDialog::RenameImagesDialog(const KURL::List& images, m_about->addAuthor("Gilles Caulier", I18N_NOOP("Author and maintainer"), "caulier dot gilles at gmail dot com"); - QPushButton* helpButton = actionButton( Help ); + TQPushButton* helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); helpButton->setPopup( helpMenu->menu() ); // gui - QWidget* box = plainPage(); - QVBoxLayout* lay = new QVBoxLayout(box); + TQWidget* box = plainPage(); + TQVBoxLayout* lay = new TQVBoxLayout(box); m_widget = new RenameImagesWidget(box, interface, images); lay->addWidget(m_widget); - connect(this, SIGNAL(user1Clicked()), - m_widget, SLOT(slotStart())); + connect(this, TQT_SIGNAL(user1Clicked()), + m_widget, TQT_SLOT(slotStart())); adjustSize(); } diff --git a/kipi-plugins/batchprocessimages/renameimagesdialog.h b/kipi-plugins/batchprocessimages/renameimagesdialog.h index 696dea5..f02ce56 100644 --- a/kipi-plugins/batchprocessimages/renameimagesdialog.h +++ b/kipi-plugins/batchprocessimages/renameimagesdialog.h @@ -46,12 +46,13 @@ class RenameImagesWidget; class RenameImagesDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: RenameImagesDialog(const KURL::List& images, KIPI::Interface* interface, - QWidget* parent); + TQWidget* tqparent); ~RenameImagesDialog(); private: diff --git a/kipi-plugins/batchprocessimages/renameimageswidget.cpp b/kipi-plugins/batchprocessimages/renameimageswidget.cpp index f295239..eee59b1 100644 --- a/kipi-plugins/batchprocessimages/renameimageswidget.cpp +++ b/kipi-plugins/batchprocessimages/renameimageswidget.cpp @@ -35,21 +35,21 @@ extern "C" #include <cstdio> #include <ctime> -// Qt includes. - -#include <qlistview.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qtimer.h> -#include <qprogressdialog.h> -#include <qgroupbox.h> -#include <qpopupmenu.h> +// TQt includes. + +#include <tqlistview.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqtimer.h> +#include <tqprogressdialog.h> +#include <tqgroupbox.h> +#include <tqpopupmenu.h> // KDE includes. @@ -75,10 +75,10 @@ extern "C" namespace KIPIBatchProcessImagesPlugin { -RenameImagesWidget::RenameImagesWidget(QWidget *parent, +RenameImagesWidget::RenameImagesWidget(TQWidget *tqparent, KIPI::Interface* interface, const KURL::List& urlList) - : RenameImagesBase(parent), + : RenameImagesBase(tqparent), m_interface(interface), m_urlList(urlList) { @@ -91,53 +91,53 @@ RenameImagesWidget::RenameImagesWidget(QWidget *parent, readSettings(); - QPopupMenu* sortMenu = new QPopupMenu(this); + TQPopupMenu* sortMenu = new TQPopupMenu(this); sortMenu->insertItem(i18n("Sort by Name"), BYNAME); sortMenu->insertItem(i18n("Sort by Size"), BYSIZE); sortMenu->insertItem(i18n("Sort by Date"), BYDATE); m_sortButton->setPopup(sortMenu); - connect(m_listView, SIGNAL(doubleClicked(QListViewItem*)), - SLOT(slotListViewDoubleClicked(QListViewItem*))); - connect(m_listView, SIGNAL(selectionChanged(QListViewItem*)), - SLOT(slotImageSelected(QListViewItem*))); - - connect(m_prefixEdit, SIGNAL(textChanged(const QString&)), - SLOT(slotOptionsChanged())); - connect(m_seqSpin, SIGNAL(valueChanged(int)), - SLOT(slotOptionsChanged())); - connect(m_addFileNameCheck, SIGNAL(toggled(bool)), - SLOT(slotOptionsChanged())); - connect(m_addFileDateCheck, SIGNAL(toggled(bool)), - SLOT(slotOptionsChanged())); - connect(m_formatDateCheck, SIGNAL(toggled(bool)), - SLOT(slotOptionsChanged())); - connect(m_formatDateEdit, SIGNAL(textChanged(const QString&)), - SLOT(slotOptionsChanged())); - - connect(m_addButton, SIGNAL(clicked()), - SLOT(slotAddImages())); - connect(m_removeButton, SIGNAL(clicked()), - SLOT(slotRemoveImage())); - - connect(sortMenu, SIGNAL(activated(int)), - SLOT(sortList(int)) ); + connect(m_listView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + TQT_SLOT(slotListViewDoubleClicked(TQListViewItem*))); + connect(m_listView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + TQT_SLOT(slotImageSelected(TQListViewItem*))); + + connect(m_prefixEdit, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotOptionsChanged())); + connect(m_seqSpin, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotOptionsChanged())); + connect(m_addFileNameCheck, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotOptionsChanged())); + connect(m_addFileDateCheck, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotOptionsChanged())); + connect(m_formatDateCheck, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotOptionsChanged())); + connect(m_formatDateEdit, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotOptionsChanged())); + + connect(m_addButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotAddImages())); + connect(m_removeButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotRemoveImage())); + + connect(sortMenu, TQT_SIGNAL(activated(int)), + TQT_SLOT(sortList(int)) ); - connect(m_reverseList, SIGNAL(clicked()), - SLOT(reverseList()) ); + connect(m_reverseList, TQT_SIGNAL(clicked()), + TQT_SLOT(reverseList()) ); - connect(m_moveUp, SIGNAL(clicked()), - SLOT(moveCurrentItemUp()) ); + connect(m_moveUp, TQT_SIGNAL(clicked()), + TQT_SLOT(moveCurrentItemUp()) ); - connect(m_moveDown, SIGNAL(clicked()), - SLOT(moveCurrentItemDown()) ); + connect(m_moveDown, TQT_SIGNAL(clicked()), + TQT_SLOT(moveCurrentItemDown()) ); - m_timer = new QTimer(this); - m_progress = new QProgressDialog(this, 0, true); - connect(m_timer, SIGNAL(timeout()), - SLOT(slotNext())); - connect(m_progress, SIGNAL(canceled()), - SLOT(slotAbort())); + m_timer = new TQTimer(this); + m_progress = new TQProgressDialog(this, 0, true); + connect(m_timer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotNext())); + connect(m_progress, TQT_SIGNAL(canceled()), + TQT_SLOT(slotAbort())); for (KURL::List::iterator it = m_urlList.begin(); it != m_urlList.end(); ++it) @@ -145,8 +145,8 @@ RenameImagesWidget::RenameImagesWidget(QWidget *parent, new BatchProcessImagesItem(m_listView, (*it).path().section('/', 0, -1), (*it).filename(), - QString(), - QString()); + TQString(), + TQString()); } updateListing(); @@ -201,12 +201,12 @@ void RenameImagesWidget::slotOptionsChanged() updateListing(); } -void RenameImagesWidget::slotListViewDoubleClicked(QListViewItem*) +void RenameImagesWidget::slotListViewDoubleClicked(TQListViewItem*) { // TODO: Implement } -void RenameImagesWidget::slotImageSelected(QListViewItem* item) +void RenameImagesWidget::slotImageSelected(TQListViewItem* item) { if (!item) { @@ -221,8 +221,8 @@ void RenameImagesWidget::slotImageSelected(QListViewItem* item) KIO::PreviewJob* thumbJob = KIO::filePreview(KURL(it->pathSrc()), m_pixLabel->height() ); - 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&))); } @@ -230,7 +230,7 @@ void RenameImagesWidget::sortList(int intSortOrder) { SortOrder sortOrder = static_cast<SortOrder>(intSortOrder); - for (QListViewItem* it = m_listView->firstChild(); it; + for (TQListViewItem* it = m_listView->firstChild(); it; it = it->nextSibling()) { BatchProcessImagesItem* item = static_cast<BatchProcessImagesItem*>(it); @@ -244,8 +244,8 @@ void RenameImagesWidget::sortList(int intSortOrder) } case(BYSIZE): { - QFileInfo fi(item->pathSrc()); - item->setKey(QString::number(fi.size()), false); + TQFileInfo fi(item->pathSrc()); + item->setKey(TQString::number(fi.size()), false); break; } case(BYDATE): @@ -272,7 +272,7 @@ void RenameImagesWidget::reverseList() { if (m_listView->childCount() < 2) return; - QListViewItem* lastItem = m_listView->lastItem(); + TQListViewItem* lastItem = m_listView->lastItem(); while (m_listView->firstChild() != lastItem) { m_listView->firstChild()->moveItem(lastItem); @@ -283,10 +283,10 @@ void RenameImagesWidget::reverseList() void RenameImagesWidget::moveCurrentItemUp() { - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); if (!currentItem) return; - for (QListViewItem* previousItem = m_listView->firstChild(); previousItem; + for (TQListViewItem* previousItem = m_listView->firstChild(); previousItem; previousItem = previousItem->nextSibling()) { if (previousItem->nextSibling() == currentItem) { @@ -300,10 +300,10 @@ void RenameImagesWidget::moveCurrentItemUp() { void RenameImagesWidget::moveCurrentItemDown() { - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); if (!currentItem) return; - QListViewItem* nextItem = currentItem->nextSibling(); + TQListViewItem* nextItem = currentItem->nextSibling(); if (nextItem) { currentItem->moveItem(nextItem); } @@ -315,29 +315,29 @@ void RenameImagesWidget::moveCurrentItemDown() { void RenameImagesWidget::updateListing() { int pos = 0; - for (QListViewItem* it = m_listView->firstChild(); it; + for (TQListViewItem* it = m_listView->firstChild(); it; it = it->nextSibling()) { BatchProcessImagesItem* item = static_cast<BatchProcessImagesItem*>(it); item->changeNameDest(oldToNewName(item, pos)); - item->changeResult(QString()); - item->changeError(QString()); - item->changeOutputMess(QString()); + item->changeResult(TQString()); + item->changeError(TQString()); + item->changeOutputMess(TQString()); pos++; } } -QString RenameImagesWidget::oldToNewName(BatchProcessImagesItem* item, +TQString RenameImagesWidget::oldToNewName(BatchProcessImagesItem* item, int itemPosition) { KURL url; url.setPath(item->pathSrc()); - QFileInfo fi(item->pathSrc()); + TQFileInfo fi(item->pathSrc()); KIPI::ImageInfo info = m_interface->info(url); - QString newName = m_prefixEdit->text(); + TQString newName = m_prefixEdit->text(); if (m_addFileNameCheck->isChecked()) { @@ -347,18 +347,18 @@ QString RenameImagesWidget::oldToNewName(BatchProcessImagesItem* item, if (m_addFileDateCheck->isChecked()) { - QString format = m_formatDateEdit->text(); + TQString format = m_formatDateEdit->text(); format = format.simplifyWhiteSpace(); - format.replace("%%","%"); - format.replace("%s",""); - format.replace("/", ""); + format.tqreplace("%%","%"); + format.tqreplace("%s",""); + format.tqreplace("/", ""); time_t time = info.time().toTime_t(); struct tm* time_tm = ::localtime(&time); char s[100]; - ::strftime(s, 100, QFile::encodeName(format), time_tm); + ::strftime(s, 100, TQFile::encodeName(format), time_tm); - newName += QString::fromLatin1(s); + newName += TQString::tqfromLatin1(s); newName += "_"; } @@ -370,20 +370,20 @@ QString RenameImagesWidget::oldToNewName(BatchProcessImagesItem* item, count = count / 10; } - QString format; + TQString format; format.sprintf("0%dd", numDigits); format = "%" + format; - QString seq; + TQString seq; seq.sprintf(format.latin1(), itemPosition + m_seqSpin->value()); newName += seq; - newName += QString::fromLatin1(".") + fi.extension(); + newName += TQString::tqfromLatin1(".") + fi.extension(); return newName; } -void RenameImagesWidget::slotGotPreview(const KFileItem*, const QPixmap& pix) +void RenameImagesWidget::slotGotPreview(const KFileItem*, const TQPixmap& pix) { m_pixLabel->setPixmap(pix); } @@ -412,7 +412,7 @@ void RenameImagesWidget::slotAbort() void RenameImagesWidget::slotNext() { - QListViewItem* it = m_listView->selectedItem(); + TQListViewItem* it = m_listView->selectedItem(); if (!it) { slotAbort(); @@ -431,7 +431,7 @@ void RenameImagesWidget::slotNext() if (!m_overwriteAll) { struct stat info; - while (::stat(QFile::encodeName(dst.path()), &info) == 0) + while (::stat(TQFile::encodeName(dst.path()), &info) == 0) { if (m_autoSkip) { @@ -493,8 +493,8 @@ void RenameImagesWidget::slotNext() // Get the src info KIPI::ImageInfo srcInfo = m_interface->info(src); - if (::rename(QFile::encodeName(src.path()), - QFile::encodeName(dst.path())) == 0) + if (::rename(TQFile::encodeName(src.path()), + TQFile::encodeName(dst.path())) == 0) { srcInfo.setTitle(dst.filename()); @@ -522,14 +522,14 @@ void RenameImagesWidget::slotAddImages() for (KURL::List::iterator it = urls.begin(); it != urls.end(); ++it) { - if (m_urlList.contains(*it)) + if (m_urlList.tqcontains(*it)) continue; new BatchProcessImagesItem(m_listView, (*it).path().section('/', 0, -1), (*it).filename(), - QString(), - QString()); + TQString(), + TQString()); m_urlList.append(*it); } diff --git a/kipi-plugins/batchprocessimages/renameimageswidget.h b/kipi-plugins/batchprocessimages/renameimageswidget.h index 9c64013..fb86055 100644 --- a/kipi-plugins/batchprocessimages/renameimageswidget.h +++ b/kipi-plugins/batchprocessimages/renameimageswidget.h @@ -33,8 +33,8 @@ #include "renameimagesbase.h" class KFileItem; -class QTimer; -class QProgressDialog; +class TQTimer; +class TQProgressDialog; namespace KIPI { @@ -49,6 +49,7 @@ class BatchProcessImagesItem; class RenameImagesWidget : public RenameImagesBase { Q_OBJECT + TQ_OBJECT public: @@ -59,7 +60,7 @@ public: BYDATE }; - RenameImagesWidget(QWidget *parent, KIPI::Interface* interface, + RenameImagesWidget(TQWidget *tqparent, KIPI::Interface* interface, const KURL::List& urlList); ~RenameImagesWidget(); @@ -69,13 +70,13 @@ private: void saveSettings(); void reListImages(); void updateListing(); - QString oldToNewName(BatchProcessImagesItem* item, + TQString oldToNewName(BatchProcessImagesItem* item, int itemPosition); KIPI::Interface* m_interface; KURL::List m_urlList; - QTimer* m_timer; - QProgressDialog* m_progress; + TQTimer* m_timer; + TQProgressDialog* m_progress; bool m_overwriteAll; bool m_autoSkip; @@ -87,10 +88,10 @@ public slots: private slots: - void slotListViewDoubleClicked(QListViewItem*); - void slotImageSelected(QListViewItem*); + void slotListViewDoubleClicked(TQListViewItem*); + void slotImageSelected(TQListViewItem*); void slotOptionsChanged(); - void slotGotPreview(const KFileItem*, const QPixmap&); + void slotGotPreview(const KFileItem*, const TQPixmap&); void slotAddImages(); void slotRemoveImage(); diff --git a/kipi-plugins/batchprocessimages/resizeimagesdialog.cpp b/kipi-plugins/batchprocessimages/resizeimagesdialog.cpp index 36b912d..132f528 100644 --- a/kipi-plugins/batchprocessimages/resizeimagesdialog.cpp +++ b/kipi-plugins/batchprocessimages/resizeimagesdialog.cpp @@ -20,15 +20,15 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qgroupbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qimage.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqimage.h> // Include files for KDE @@ -55,8 +55,8 @@ namespace KIPIBatchProcessImagesPlugin { -ResizeImagesDialog::ResizeImagesDialog( KURL::List urlList, KIPI::Interface* interface, QWidget *parent ) - : BatchProcessImagesDialog( urlList, interface, i18n("Batch Resize Images"), parent ) +ResizeImagesDialog::ResizeImagesDialog( KURL::List urlList, KIPI::Interface* interface, TQWidget *tqparent ) + : BatchProcessImagesDialog( urlList, interface, i18n("Batch Resize Images"), tqparent ) { // About data and help button. @@ -73,7 +73,7 @@ ResizeImagesDialog::ResizeImagesDialog( KURL::List urlList, KIPI::Interface* int m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); //--------------------------------------------- @@ -106,7 +106,7 @@ ResizeImagesDialog::ResizeImagesDialog( KURL::List urlList, KIPI::Interface* int "The target images will be adapted to the specified dimensions " "(included the background size, margin size, and background color)."); - QWhatsThis::add( m_Type, whatsThis ); + TQWhatsThis::add( m_Type, whatsThis ); m_previewButton->hide(); m_smallPreview->hide(); @@ -214,8 +214,8 @@ void ResizeImagesDialog::readSettings(void) { // Read all settings from configuration file. - QColor *ColorWhite = new QColor( 255, 255, 255 ); - QColor *ColorBlack = new QColor( 0, 0, 0 ); + TQColor *ColorWhite = new TQColor( 255, 255, 255 ); + TQColor *ColorBlack = new TQColor( 0, 0, 0 ); m_config = new KConfig("kipirc"); m_config->setGroup("ResizeImages Settings"); @@ -294,10 +294,10 @@ void ResizeImagesDialog::saveSettings(void) delete m_config; } -QString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool ) +TQString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool ) { - QImage img; + TQImage img; img.load( item->pathSrc() ); @@ -316,13 +316,13 @@ QString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * IncDec = ResizeImage( w, h, m_size); *proc << "-resize"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( w ) + "x"; Temp2.append(Temp.setNum( h )); *proc << Temp2; *proc << "-quality"; - QString Temp3; + TQString Temp3; Temp3.setNum(m_quality); *proc << Temp3; @@ -338,20 +338,20 @@ QString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * if (Type == 1) // Proportional (2 dim.) { - QString targetBackgroundSize; + TQString targetBackgroundSize; int ResizeCoeff; *proc << "composite"; // Get the target image resizing dimensions with using the target size. - if ( m_Width < m_Height ) // Vertically resizing + if ( m_Width < m_Height ) //Qt::Vertically resizing { if ( w < h ) // Original size vertically oriented. ResizeCoeff = m_Height; else // Original size horizontally oriented. ResizeCoeff = m_Width; } - else // Horizontally resizing + else //Qt::Horizontally resizing { if ( w < h ) // Original size vertically oriented. ResizeCoeff = m_Height; @@ -360,18 +360,18 @@ QString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * } IncDec = ResizeImage( w, h, ResizeCoeff - m_Border); - targetBackgroundSize = QString::number(m_Width) + "x" + QString::number(m_Height); + targetBackgroundSize = TQString::number(m_Width) + "x" + TQString::number(m_Height); *proc << "-verbose" << "-gravity" << "Center"; *proc << "-resize"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( w ) + "x"; Temp2.append(Temp.setNum( h )); *proc << Temp2; *proc << "-quality"; - QString Temp3; + TQString Temp3; Temp3.setNum(m_quality); *proc << Temp3; @@ -402,7 +402,7 @@ QString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * *proc << "convert"; *proc << "-resize"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( m_fixedWidth ) + "x"; Temp2.append(Temp.setNum( m_fixedHeight ) + "!"); *proc << Temp2; @@ -413,7 +413,7 @@ QString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * } *proc << "-quality"; - QString Temp3; + TQString Temp3; Temp3.setNum(m_quality); *proc << Temp3; @@ -441,27 +441,27 @@ QString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * } else { - QString Temp = m_printDpi; + TQString Temp = m_printDpi; int Dpi = Temp.toInt(); MargingSize = (int)((float)(m_marging * Dpi) / (float)(25.4)); if (w < h) // (w < h) because all paper dimensions are vertically given ! { - Temp = m_paperSize.left(m_paperSize.find('x')); + Temp = m_paperSize.left(m_paperSize.tqfind('x')); m_xPixels = (int)( (float)(Temp.toInt() * Dpi) / (float)(2.54) ); - Temp = m_paperSize.right(m_paperSize.find('x')); + Temp = m_paperSize.right(m_paperSize.tqfind('x')); m_yPixels = (int)( (float)(Temp.toInt() * Dpi) / (float)(2.54) ); } else { - Temp = m_paperSize.left(m_paperSize.find('x')); + Temp = m_paperSize.left(m_paperSize.tqfind('x')); m_yPixels = (int)( (float)(Temp.toInt() * Dpi) / (float)(2.54) ); - Temp = m_paperSize.right(m_paperSize.find('x')); + Temp = m_paperSize.right(m_paperSize.tqfind('x')); m_xPixels = (int)( (float)(Temp.toInt() * Dpi) / (float)(2.54) ); } } - QString targetBackgroundSize; + TQString targetBackgroundSize; int ResizeCoeff; float RFactor; *proc << "composite"; @@ -482,18 +482,18 @@ QString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * } IncDec = ResizeImage( w, h, ResizeCoeff - MargingSize); - targetBackgroundSize = QString::number(m_xPixels) + "x" + QString::number(m_yPixels); + targetBackgroundSize = TQString::number(m_xPixels) + "x" + TQString::number(m_yPixels); *proc << "-verbose" << "-gravity" << "Center"; *proc << "-resize"; - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = Temp.setNum( w ) + "x"; Temp2.append(Temp.setNum( h )); *proc << Temp2; *proc << "-quality"; - QString Temp3; + TQString Temp3; Temp3.setNum(m_quality); *proc << Temp3; @@ -517,7 +517,7 @@ QString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * *proc << "-resize" << targetBackgroundSize + "!"; *proc << "-quality"; - QString Temp4; + TQString Temp4; Temp4.setNum(m_quality); *proc << Temp4; @@ -528,9 +528,9 @@ QString ResizeImagesDialog::makeProcess(KProcess* proc, BatchProcessImagesItem * } bool ResizeImagesDialog::prepareStartProcess(BatchProcessImagesItem *item, - const QString& /*albumDest*/) + const TQString& /*albumDest*/) { - QImage img; + TQImage img; if ( img.load( item->pathSrc() ) == false ) { diff --git a/kipi-plugins/batchprocessimages/resizeimagesdialog.h b/kipi-plugins/batchprocessimages/resizeimagesdialog.h index 93cdfd3..2b5e50f 100644 --- a/kipi-plugins/batchprocessimages/resizeimagesdialog.h +++ b/kipi-plugins/batchprocessimages/resizeimagesdialog.h @@ -36,10 +36,11 @@ class BatchProcessImagesItem; class ResizeImagesDialog : public BatchProcessImagesDialog { Q_OBJECT + TQ_OBJECT public: - ResizeImagesDialog( KURL::List images, KIPI::Interface* interface, QWidget *parent=0 ); + ResizeImagesDialog( KURL::List images, KIPI::Interface* interface, TQWidget *tqparent=0 ); ~ResizeImagesDialog(); private slots: @@ -49,12 +50,12 @@ Q_OBJECT protected: - QString m_resizeFilter; - QString m_paperSize; - QString m_printDpi; + TQString m_resizeFilter; + TQString m_paperSize; + TQString m_printDpi; - QColor m_backgroundColor; - QColor m_bgColor; + TQColor m_backgroundColor; + TQColor m_bgColor; bool m_customSettings; @@ -72,13 +73,13 @@ Q_OBJECT int m_fixedHeight; int m_quality; - QString makeProcess(KProcess* proc, BatchProcessImagesItem *item, - const QString& albumDest, bool previewMode); + TQString makeProcess(KProcess* proc, BatchProcessImagesItem *item, + const TQString& albumDest, bool previewMode); void readSettings(void); void saveSettings(void); bool prepareStartProcess(BatchProcessImagesItem *item, - const QString& albumDest); + const TQString& albumDest); bool ResizeImage( int &w, int &h, int SizeFactor); diff --git a/kipi-plugins/batchprocessimages/resizeoptionsdialog.cpp b/kipi-plugins/batchprocessimages/resizeoptionsdialog.cpp index 031cd8e..ad26646 100644 --- a/kipi-plugins/batchprocessimages/resizeoptionsdialog.cpp +++ b/kipi-plugins/batchprocessimages/resizeoptionsdialog.cpp @@ -20,18 +20,18 @@ * * ============================================================ */ -// Include files for Qt - -#include <qvbox.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qcolor.h> +// Include files for TQt + +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqcolor.h> // Include files for KDE @@ -48,33 +48,33 @@ namespace KIPIBatchProcessImagesPlugin { -ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) - : KDialogBase( parent, "ResizeOptionsDialog", true, +ResizeOptionsDialog::ResizeOptionsDialog(TQWidget *tqparent, int ResizeType) + : KDialogBase( tqparent, "ResizeOptionsDialog", true, i18n("Image-Resize Options"), Ok|Cancel, Ok, false) { m_Type = ResizeType; - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout *dvlay = new QVBoxLayout( box, 10, spacingHint() ); - QString whatsThis; + TQVBoxLayout *dvlay = new TQVBoxLayout( box, 10, spacingHint() ); + TQString whatsThis; if (m_Type == 0) // Proportional (1 dim.) { - QGroupBox * groupBox1 = new QGroupBox( 1, Qt::Horizontal, i18n("Resize Options"), box ); + TQGroupBox * groupBox1 = new TQGroupBox( 1, Qt::Horizontal, i18n("Resize Options"), box ); m_size = new KIntNumInput(640, groupBox1); m_size->setRange(10, 10000, 1, true ); m_size->setLabel( i18n("New size (pixels):") ); - QWhatsThis::add( m_size, i18n("<p>The new images' size in pixels.") ); + TQWhatsThis::add( m_size, i18n("<p>The new images' size in pixels.") ); m_quality = new KIntNumInput(75, groupBox1); m_quality->setRange(0, 100, 1, true); m_quality->setLabel( i18n("Image quality (percent):") ); - QWhatsThis::add( m_quality, i18n("<p>Quality for JPEG images.") ); + TQWhatsThis::add( m_quality, i18n("<p>Quality for JPEG images.") ); - m_label_resizeFilter = new QLabel (i18n("Filter name:"), groupBox1); + m_label_resizeFilter = new TQLabel (i18n("Filter name:"), groupBox1); - m_resizeFilter = new QComboBox( false, groupBox1 ); + m_resizeFilter = new TQComboBox( false, groupBox1 ); m_resizeFilter->insertItem(i18n("Filter name","Bessel")); m_resizeFilter->insertItem(i18n("Filter name","Blackman")); m_resizeFilter->insertItem(i18n("Filter name","Box")); @@ -90,7 +90,7 @@ ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) m_resizeFilter->insertItem(i18n("Filter name","Quadratic")); m_resizeFilter->insertItem(i18n("Filter name","Sinc")); m_resizeFilter->insertItem(i18n("Filter name","Triangle")); - QWhatsThis::add( m_resizeFilter, i18n("<p>Select here the filter name for the resize-image process. " + TQWhatsThis::add( m_resizeFilter, i18n("<p>Select here the filter name for the resize-image process. " "This filter will be used like a kernel convolution process " "during the increased image size rendering. The default filter " "is 'Lanczos'.") ); @@ -98,7 +98,7 @@ ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) dvlay->addWidget( groupBox1 ); - m_label_size = new QLabel ( i18n("Note: the images will be resized to\n" + m_label_size = new TQLabel ( i18n("Note: the images will be resized to\n" "this size. The width or the height of the\n" "images will be automatically\n" "selected in depending of the images orientation.\n" @@ -108,39 +108,39 @@ ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) if (m_Type == 1) // Proportional (2 dim.) { - QGroupBox * groupBox1 = new QGroupBox( 2, Qt::Horizontal, i18n("Size Settings"), box ); + TQGroupBox * groupBox1 = new TQGroupBox( 2, Qt::Horizontal, i18n("Size Settings"), box ); - m_label_Width = new QLabel (i18n("Width (pixels):"), groupBox1); + m_label_Width = new TQLabel (i18n("Width (pixels):"), groupBox1); m_Width = new KIntNumInput(1024, groupBox1); m_Width->setRange(100, 10000, 1, true ); - QWhatsThis::add( m_Width, i18n("<p>The new images' width in pixels.")); + TQWhatsThis::add( m_Width, i18n("<p>The new images' width in pixels.")); m_label_Width->setBuddy( m_Width ); - m_label_Height = new QLabel (i18n("Height (pixels):"), groupBox1); + m_label_Height = new TQLabel (i18n("Height (pixels):"), groupBox1); m_Height = new KIntNumInput(768, groupBox1); m_Height->setRange(100, 10000, 1, true ); - QWhatsThis::add( m_Height, i18n("<p>The new images' height in pixels.")); + TQWhatsThis::add( m_Height, i18n("<p>The new images' height in pixels.")); m_label_Height->setBuddy( m_Height ); - m_label_quality = new QLabel (i18n("Image quality (percent):"), groupBox1); + m_label_quality = new TQLabel (i18n("Image quality (percent):"), groupBox1); m_quality = new KIntNumInput(75, groupBox1); m_quality->setRange(0, 100, 1, true); - QWhatsThis::add( m_quality, i18n("<p>Quality for JPEG images.") ); + TQWhatsThis::add( m_quality, i18n("<p>Quality for JPEG images.") ); m_label_quality->setBuddy(m_quality); dvlay->addWidget( groupBox1 ); - QGroupBox * groupBox2 = new QGroupBox( 2, Qt::Horizontal, i18n("Rendering Settings"), box ); + TQGroupBox * groupBox2 = new TQGroupBox( 2, Qt::Horizontal, i18n("Rendering Settings"), box ); - m_label_bgColor = new QLabel(i18n("Background color:"), groupBox2); - QColor bgColor = QColor( 0, 0, 0 ); // Black per default. + m_label_bgColor = new TQLabel(i18n("Background color:"), groupBox2); + TQColor bgColor = TQColor( 0, 0, 0 ); // Black per default. m_button_bgColor = new KColorButton( bgColor, groupBox2 ); - QWhatsThis::add( m_button_bgColor, i18n( "<p>You can select here the background color to " + TQWhatsThis::add( m_button_bgColor, i18n( "<p>You can select here the background color to " "be used when adapting the images' sizes." )); m_label_bgColor->setBuddy( m_button_bgColor ); - m_label_resizeFilter = new QLabel (i18n("Filter name:"), groupBox2); - m_resizeFilter = new QComboBox( false, groupBox2 ); + m_label_resizeFilter = new TQLabel (i18n("Filter name:"), groupBox2); + m_resizeFilter = new TQComboBox( false, groupBox2 ); m_resizeFilter->insertItem(i18n("Filter name","Bessel")); m_resizeFilter->insertItem(i18n("Filter name","Blackman")); m_resizeFilter->insertItem(i18n("Filter name","Box")); @@ -156,16 +156,16 @@ ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) m_resizeFilter->insertItem(i18n("Filter name","Quadratic")); m_resizeFilter->insertItem(i18n("Filter name","Sinc")); m_resizeFilter->insertItem(i18n("Filter name","Triangle")); - QWhatsThis::add( m_resizeFilter, i18n("<p>Select here the filter name for the resize-image process. " + TQWhatsThis::add( m_resizeFilter, i18n("<p>Select here the filter name for the resize-image process. " "This filter will be used like a kernel convolution process " "during the increased image size rendering. The default filter " "is 'Lanczos'.") ); m_label_resizeFilter->setBuddy( m_resizeFilter ); - m_label_border = new QLabel (i18n("Border size (pixels):"), groupBox2); + m_label_border = new TQLabel (i18n("Border size (pixels):"), groupBox2); m_Border = new KIntNumInput(100, groupBox2); m_Border->setRange(0, 1000, 1, true ); - QWhatsThis::add( m_Border, i18n("<p>The border size around the images in pixels.")); + TQWhatsThis::add( m_Border, i18n("<p>The border size around the images in pixels.")); m_label_border->setBuddy( m_Border ); dvlay->addWidget( groupBox2 ); @@ -173,26 +173,26 @@ ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) if (m_Type == 2) // Non proportional { - QGroupBox * groupBox1 = new QGroupBox( 1, Qt::Horizontal, i18n("Resize Options"), box ); + TQGroupBox * groupBox1 = new TQGroupBox( 1, Qt::Horizontal, i18n("Resize Options"), box ); m_fixedWidth = new KIntNumInput(640, groupBox1); m_fixedWidth->setRange(10, 10000, 1, true ); m_fixedWidth->setLabel( i18n("New width (pixels):") ); - QWhatsThis::add( m_fixedWidth, i18n("<p>The new images' width in pixels.") ); + TQWhatsThis::add( m_fixedWidth, i18n("<p>The new images' width in pixels.") ); m_fixedHeight = new KIntNumInput(480, groupBox1); m_fixedHeight->setRange(10, 10000, 1, true ); m_fixedHeight->setLabel( i18n("New height (pixels):") ); - QWhatsThis::add( m_fixedHeight, i18n("<p>The new images' height in pixels.") ); + TQWhatsThis::add( m_fixedHeight, i18n("<p>The new images' height in pixels.") ); m_quality = new KIntNumInput(75, groupBox1); m_quality->setRange(0, 100, 1, true); m_quality->setLabel( i18n("Image quality (percent):") ); - QWhatsThis::add( m_quality, i18n("<p>Quality for JPEG images.") ); + TQWhatsThis::add( m_quality, i18n("<p>Quality for JPEG images.") ); - m_label_resizeFilter = new QLabel (i18n("Filter name:"), groupBox1); + m_label_resizeFilter = new TQLabel (i18n("Filter name:"), groupBox1); - m_resizeFilter = new QComboBox( false, groupBox1 ); + m_resizeFilter = new TQComboBox( false, groupBox1 ); m_resizeFilter->insertItem(i18n("Filter name","Bessel")); m_resizeFilter->insertItem(i18n("Filter name","Blackman")); m_resizeFilter->insertItem(i18n("Filter name","Box")); @@ -208,7 +208,7 @@ ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) m_resizeFilter->insertItem(i18n("Filter name","Quadratic")); m_resizeFilter->insertItem(i18n("Filter name","Sinc")); m_resizeFilter->insertItem(i18n("Filter name","Triangle")); - QWhatsThis::add( m_resizeFilter, i18n("<p>Select here the filter name for the resize-image process. " + TQWhatsThis::add( m_resizeFilter, i18n("<p>Select here the filter name for the resize-image process. " "This filter will be used like a kernel convolution process " "during the increased image size rendering. The default filter " "is 'Lanczos'.") ); @@ -219,15 +219,15 @@ ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) if (m_Type == 3) // Prepare to print { - m_customSettings = new QCheckBox( i18n("Use custom settings"), box); - QWhatsThis::add( m_customSettings, i18n("<p>If this option is enabled, " + m_customSettings = new TQCheckBox( i18n("Use custom settings"), box); + TQWhatsThis::add( m_customSettings, i18n("<p>If this option is enabled, " "all printing settings can be customized.")); dvlay->addWidget( m_customSettings ); - QGroupBox * groupBox1 = new QGroupBox( 2, Qt::Horizontal, i18n("Printing Standard Settings"), box ); + TQGroupBox * groupBox1 = new TQGroupBox( 2, Qt::Horizontal, i18n("Printing Standard Settings"), box ); - m_label_paperSize = new QLabel (i18n("Paper size (cm):"), groupBox1); - m_paperSize = new QComboBox( false, groupBox1 ); + m_label_paperSize = new TQLabel (i18n("Paper size (cm):"), groupBox1); + m_paperSize = new TQComboBox( false, groupBox1 ); m_paperSize->insertItem("9x13"); m_paperSize->insertItem("10x15"); m_paperSize->insertItem("13x19"); @@ -239,11 +239,11 @@ ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) m_paperSize->insertItem("30x45"); m_paperSize->insertItem("40x50"); m_paperSize->insertItem("50x75"); - QWhatsThis::add( m_paperSize, i18n("<p>The standard photographic paper sizes in centimeters.")); + TQWhatsThis::add( m_paperSize, i18n("<p>The standard photographic paper sizes in centimeters.")); m_label_paperSize->setBuddy( m_paperSize ); - m_label_printDpi = new QLabel (i18n("Print resolution (dpi):"), groupBox1); - m_printDpi = new QComboBox( false, groupBox1 ); + m_label_printDpi = new TQLabel (i18n("Print resolution (dpi):"), groupBox1); + m_printDpi = new TQComboBox( false, groupBox1 ); m_printDpi->insertItem("75"); m_printDpi->insertItem("150"); m_printDpi->insertItem("300"); @@ -251,46 +251,46 @@ ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) m_printDpi->insertItem("1200"); m_printDpi->insertItem("1400"); m_printDpi->insertItem("2400"); - QWhatsThis::add( m_printDpi, i18n("<p>The standard print resolutions in dots per inch.")); + TQWhatsThis::add( m_printDpi, i18n("<p>The standard print resolutions in dots per inch.")); m_label_printDpi->setBuddy( m_printDpi ); dvlay->addWidget( groupBox1 ); - QGroupBox * groupBox2 = new QGroupBox( 2, Qt::Horizontal, i18n("Printing Custom Settings"), box ); + TQGroupBox * groupBox2 = new TQGroupBox( 2, Qt::Horizontal, i18n("Printing Custom Settings"), box ); - m_label_customXSize = new QLabel (i18n("Paper width (cm):"), groupBox2); + m_label_customXSize = new TQLabel (i18n("Paper width (cm):"), groupBox2); m_customXSize = new KIntNumInput(10, groupBox2); m_customXSize->setRange(1, 100, 1, true ); - QWhatsThis::add( m_customXSize, i18n("<p>The customized width of the photographic paper size " + TQWhatsThis::add( m_customXSize, i18n("<p>The customized width of the photographic paper size " "in centimeters.")); m_label_customXSize->setBuddy( m_customXSize ); - m_label_customYSize = new QLabel (i18n("Paper height (cm):"), groupBox2); + m_label_customYSize = new TQLabel (i18n("Paper height (cm):"), groupBox2); m_customYSize = new KIntNumInput(15, groupBox2); m_customYSize->setRange(1, 100, 1, true ); - QWhatsThis::add( m_customYSize, i18n("<p>The customized height of the photographic paper size " + TQWhatsThis::add( m_customYSize, i18n("<p>The customized height of the photographic paper size " "in centimeters.")); m_label_customYSize->setBuddy( m_customYSize ); - m_label_customDpi = new QLabel (i18n("Print resolution (dpi):"), groupBox2); + m_label_customDpi = new TQLabel (i18n("Print resolution (dpi):"), groupBox2); m_customDpi = new KIntNumInput(300, groupBox2); m_customDpi->setRange(10, 5000, 10, true ); - QWhatsThis::add( m_customDpi, i18n("<p>The customized print resolution in dots per inch.")); + TQWhatsThis::add( m_customDpi, i18n("<p>The customized print resolution in dots per inch.")); m_label_customDpi->setBuddy( m_customDpi ); dvlay->addWidget( groupBox2 ); - QGroupBox * groupBox3 = new QGroupBox( 2, Qt::Horizontal, i18n("Rendering Settings"), box ); + TQGroupBox * groupBox3 = new TQGroupBox( 2, Qt::Horizontal, i18n("Rendering Settings"), box ); - m_label_backgroundColor = new QLabel(i18n("Background color:"), groupBox3); - QColor backgroundColor = QColor( 255, 255, 255 ); // White per default. + m_label_backgroundColor = new TQLabel(i18n("Background color:"), groupBox3); + TQColor backgroundColor = TQColor( 255, 255, 255 ); // White per default. m_button_backgroundColor = new KColorButton( backgroundColor, groupBox3 ); - QWhatsThis::add( m_button_backgroundColor, i18n( "<p>You can select here the background color to " + TQWhatsThis::add( m_button_backgroundColor, i18n( "<p>You can select here the background color to " "be used when adapting the images' sizes." )); m_label_backgroundColor->setBuddy( m_button_backgroundColor ); - m_label_resizeFilter = new QLabel (i18n("Filter name:"), groupBox3); - m_resizeFilter = new QComboBox( false, groupBox3 ); + m_label_resizeFilter = new TQLabel (i18n("Filter name:"), groupBox3); + m_resizeFilter = new TQComboBox( false, groupBox3 ); m_resizeFilter->insertItem(i18n("Filter name","Bessel")); m_resizeFilter->insertItem(i18n("Filter name","Blackman")); m_resizeFilter->insertItem(i18n("Filter name","Box")); @@ -306,28 +306,28 @@ ResizeOptionsDialog::ResizeOptionsDialog(QWidget *parent, int ResizeType) m_resizeFilter->insertItem(i18n("Filter name","Quadratic")); m_resizeFilter->insertItem(i18n("Filter name","Sinc")); m_resizeFilter->insertItem(i18n("Filter name","Triangle")); - QWhatsThis::add( m_resizeFilter, i18n("<p>Select here the filter name for the resize-image process. " + TQWhatsThis::add( m_resizeFilter, i18n("<p>Select here the filter name for the resize-image process. " "This filter will be used like a kernel convolution process " "during the increased image size rendering. The default filter " "is 'Lanczos'.") ); m_label_resizeFilter->setBuddy( m_resizeFilter ); - m_label_marging = new QLabel (i18n("Margin size (mm):"), groupBox3); + m_label_marging = new TQLabel (i18n("Margin size (mm):"), groupBox3); m_marging = new KIntNumInput(1, groupBox3); m_marging->setRange(0, 80, 1, true ); - QWhatsThis::add( m_marging, i18n("<p>The margin around the images in millimeters.")); + TQWhatsThis::add( m_marging, i18n("<p>The margin around the images in millimeters.")); m_label_marging->setBuddy( m_marging ); - m_label_quality = new QLabel (i18n("Image quality (percent):"), groupBox3); + m_label_quality = new TQLabel (i18n("Image quality (percent):"), groupBox3); m_quality = new KIntNumInput(75, groupBox3); m_quality->setRange(0, 100, 1, true); - QWhatsThis::add( m_quality, i18n("<p>Quality for JPEG images.") ); + TQWhatsThis::add( m_quality, i18n("<p>Quality for JPEG images.") ); m_label_quality->setBuddy(m_quality); dvlay->addWidget( groupBox3 ); - connect(m_customSettings, SIGNAL( toggled(bool) ), - this, SLOT( slotCustomSettingsEnabled(bool) ) ); + connect(m_customSettings, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( slotCustomSettingsEnabled(bool) ) ); slotCustomSettingsEnabled(false); } diff --git a/kipi-plugins/batchprocessimages/resizeoptionsdialog.h b/kipi-plugins/batchprocessimages/resizeoptionsdialog.h index 09a98ed..4a8d5a2 100644 --- a/kipi-plugins/batchprocessimages/resizeoptionsdialog.h +++ b/kipi-plugins/batchprocessimages/resizeoptionsdialog.h @@ -23,17 +23,17 @@ #ifndef RESIZEOPTIONSDIALOG_H #define RESIZEOPTIONSDIALOG_H -// Include files for Qt +// Include files for TQt -#include <qstring.h> +#include <tqstring.h> // Include files for KDE #include <kdialogbase.h> -class QLabel; -class QComboBox; -class QCheckBox; +class TQLabel; +class TQComboBox; +class TQCheckBox; class KIntNumInput; class KColorButton; @@ -44,26 +44,27 @@ namespace KIPIBatchProcessImagesPlugin class ResizeOptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ResizeOptionsDialog(QWidget *parent=0, int ResizeType = 0); + ResizeOptionsDialog(TQWidget *tqparent=0, int ResizeType = 0); ~ResizeOptionsDialog(); - QLabel *m_label_size; - QLabel *m_label_resizeFilter; - QLabel *m_label_paperSize; - QLabel *m_label_printDpi; - QLabel *m_label_customXSize; - QLabel *m_label_customYSize; - QLabel *m_label_customDpi; - QLabel *m_label_backgroundColor; - QLabel *m_label_marging; - QLabel *m_label_Width; - QLabel *m_label_Height; - QLabel *m_label_bgColor; - QLabel *m_label_border; - QLabel *m_label_quality; + TQLabel *m_label_size; + TQLabel *m_label_resizeFilter; + TQLabel *m_label_paperSize; + TQLabel *m_label_printDpi; + TQLabel *m_label_customXSize; + TQLabel *m_label_customYSize; + TQLabel *m_label_customDpi; + TQLabel *m_label_backgroundColor; + TQLabel *m_label_marging; + TQLabel *m_label_Width; + TQLabel *m_label_Height; + TQLabel *m_label_bgColor; + TQLabel *m_label_border; + TQLabel *m_label_quality; KIntNumInput *m_size; KIntNumInput *m_customXSize; @@ -77,14 +78,14 @@ Q_OBJECT KIntNumInput *m_fixedHeight; KIntNumInput *m_quality; - QCheckBox *m_customSettings; + TQCheckBox *m_customSettings; KColorButton *m_button_backgroundColor; KColorButton *m_button_bgColor; - QComboBox *m_resizeFilter; - QComboBox *m_paperSize; - QComboBox *m_printDpi; + TQComboBox *m_resizeFilter; + TQComboBox *m_paperSize; + TQComboBox *m_printDpi; protected slots: diff --git a/kipi-plugins/calendar/calevents.cpp b/kipi-plugins/calendar/calevents.cpp index b34dfb4..7792acb 100644 --- a/kipi-plugins/calendar/calevents.cpp +++ b/kipi-plugins/calendar/calevents.cpp @@ -20,7 +20,7 @@ * * ============================================================ */ -#include <qpushbutton.h> +#include <tqpushbutton.h> #include <kiconloader.h> #include <kfiledialog.h> @@ -32,12 +32,12 @@ namespace KIPICalendarPlugin { -CalEvents::CalEvents(QWidget *parent, const char *name) - : CalEventsBase(parent, name) +CalEvents::CalEvents(TQWidget *tqparent, const char *name) + : CalEventsBase(tqparent, name) { - KIconLoader * icons = new KIconLoader( QString( "MenuDlg" ) ); - ohBtn->setPixmap( icons->loadIcon( QString( "fileopen" ), KIcon::Toolbar ) ); - fhBtn->setPixmap( icons->loadIcon( QString( "fileopen" ), KIcon::Toolbar ) ); + KIconLoader * icons = new KIconLoader( TQString( "MenuDlg" ) ); + ohBtn->setPixmap( icons->loadIcon( TQString( "fileopen" ), KIcon::Toolbar ) ); + fhBtn->setPixmap( icons->loadIcon( TQString( "fileopen" ), KIcon::Toolbar ) ); } @@ -48,10 +48,10 @@ CalEvents::~CalEvents() void CalEvents::ohChooseSlot() { - QString temp; + TQString temp; temp = KFileDialog::getOpenFileName(ohFileEdit->text(), - QString( "*.ics" ), + TQString( "*.ics" ), this, i18n("Select 'Official Holidays' calendar file") ); if( temp.isEmpty() ) @@ -62,10 +62,10 @@ void CalEvents::ohChooseSlot() void CalEvents::fhChooseSlot() { - QString temp; + TQString temp; temp = KFileDialog::getOpenFileName(fhFileEdit->text(), - QString( "*.ics" ), + TQString( "*.ics" ), this, i18n("Select 'Family Holidays' calendar file") ); if( temp.isEmpty() ) diff --git a/kipi-plugins/calendar/calevents.h b/kipi-plugins/calendar/calevents.h index 621574a..92230d3 100644 --- a/kipi-plugins/calendar/calevents.h +++ b/kipi-plugins/calendar/calevents.h @@ -23,7 +23,7 @@ #ifndef KIPICALENDARPLUGINCALEVENTS_H #define KIPICALENDARPLUGINCALEVENTS_H -#include <qwidget.h> +#include <tqwidget.h> #include "caleventsbase.h" @@ -35,8 +35,9 @@ namespace KIPICalendarPlugin { class CalEvents : public CalEventsBase { Q_OBJECT + TQ_OBJECT public: - CalEvents(QWidget *parent = 0, const char *name = 0); + CalEvents(TQWidget *tqparent = 0, const char *name = 0); ~CalEvents(); diff --git a/kipi-plugins/calendar/caleventsbase.ui b/kipi-plugins/calendar/caleventsbase.ui index 99267b0..2c9066d 100644 --- a/kipi-plugins/calendar/caleventsbase.ui +++ b/kipi-plugins/calendar/caleventsbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CalEventsBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Form1</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -32,9 +32,9 @@ <string>Select an optional calendar file with the official holidays</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -44,14 +44,14 @@ <property name="name"> <cstring>ohFileEdit</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>300</width> <height>0</height> </size> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>ohBtn</cstring> </property> @@ -64,7 +64,7 @@ </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -77,7 +77,7 @@ <string>You can download a calendar for your country from http://www.icalshare.com/ or other sites. This is fully optional. All the events from this calendar will be printed red.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -95,7 +95,7 @@ This is fully optional. All the events from this calendar will be printed red.</ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -108,9 +108,9 @@ This is fully optional. All the events from this calendar will be printed red.</ <string>Select an optional calendar file with your "family holidays"</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> @@ -120,14 +120,14 @@ This is fully optional. All the events from this calendar will be printed red.</ <property name="name"> <cstring>fhFileEdit</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>300</width> <height>0</height> </size> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>fhBtn</cstring> </property> @@ -148,7 +148,7 @@ This is fully optional. All the events from this calendar will be printed red.</ </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -161,7 +161,7 @@ This is fully optional. All the events from this calendar will be printed red.</ <string>You can create such a calendar using KOrganizer or any other calendar program. This is fully optional. All the events from this calendar will be printed green.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -175,7 +175,7 @@ This is fully optional. All the events from this calendar will be printed green. <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>140</height> @@ -198,11 +198,11 @@ This is fully optional. All the events from this calendar will be printed green. <slot>ohChooseSlot()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>fhChooseSlot()</slot> <slot>ohChooseSlot()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kipi-plugins/calendar/calformatter.cpp b/kipi-plugins/calendar/calformatter.cpp index fa02c2c..b51d6fd 100644 --- a/kipi-plugins/calendar/calformatter.cpp +++ b/kipi-plugins/calendar/calformatter.cpp @@ -21,9 +21,9 @@ * * ============================================================ */ -#include <qdatetime.h> -#include <qcolor.h> -#include <qmap.h> +#include <tqdatetime.h> +#include <tqcolor.h> +#include <tqmap.h> #include <kdebug.h> #include <kglobal.h> @@ -43,29 +43,29 @@ public: class Day { public: Day(){}; - Day(QColor c, QString d): color(c), description(d) {}; + Day(TQColor c, TQString d): color(c), description(d) {}; - QColor color; - QString description; + TQColor color; + TQString description; }; - QString ohFile; - QString fhFile; + TQString ohFile; + TQString fhFile; - QMap<QDate, Day> oh;//official holidays - QMap<QDate, Day> fh;//family holidays + TQMap<TQDate, Day> oh;//official holidays + TQMap<TQDate, Day> fh;//family holidays Data() { //you define a holiday that way: -oh[QDate(2005, 1, 1)] = Day(Qt::red, "New year!"); -//oh[QDate(2005, 1, 4)] = Day(Qt::red, "Fete Nat"); +oh[TQDate(2005, 1, 1)] = Day(TQt::red, "New year!"); +//oh[TQDate(2005, 1, 4)] = Day(TQt::red, "Fete Nat"); -fh[QDate(2005,1,3)] = Day(Qt::green, "Adam"); -//fh[QDate(2005, 1, 14)] = Day(Qt::green, "Maciek"); +fh[TQDate(2005,1,3)] = Day(TQt::green, "Adam"); +//fh[TQDate(2005, 1, 14)] = Day(TQt::green, "Maciek"); }; @@ -82,7 +82,7 @@ CalFormatter::~CalFormatter() { } -void CalFormatter::init(int year, const QString & ohFile, const QString & fhFile) +void CalFormatter::init(int year, const TQString & ohFile, const TQString & fhFile) { if (initialized) return; @@ -98,7 +98,7 @@ void CalFormatter::init(int year, const QString & ohFile, const QString & fhFile if (not(ohFile.isEmpty())) { calendar = new KCal::CalendarLocal("UTC"); if (calendar->load(ohFile)) { - QDate dtFirst, dtLast; + TQDate dtFirst, dtLast; KGlobal::locale()->calendar()->setYMD(dtFirst, year_, 1, 1); KGlobal::locale()->calendar()->setYMD(dtLast, year_ + 1, 1, 1); dtLast = dtLast.addDays(-1); @@ -107,7 +107,7 @@ void CalFormatter::init(int year, const QString & ohFile, const QString & fhFile KCal::Event::List::iterator it; KCal::Recurrence *recur; - QDateTime dtCurrent; + TQDateTime dtCurrent; int counter = 0; for ( it = list.begin(); it != list.end(); ++it ) { @@ -116,15 +116,15 @@ void CalFormatter::init(int year, const QString & ohFile, const QString & fhFile if ((*it)->doesRecur()) { recur = (*it)->recurrence(); - for (dtCurrent = recur->getNextDateTime(dtFirst.addDays(-1)); (dtCurrent <= dtLast) && dtCurrent.isValid(); dtCurrent = recur->getNextDateTime(dtCurrent)) + for (dtCurrent = recur->getNextDateTime(dtFirst.addDays(-1)); (dtCurrent <= TQDateTime(dtLast)) && dtCurrent.isValid(); dtCurrent = recur->getNextDateTime(dtCurrent)) { kdDebug(51000) << dtCurrent.toString() << endl; - d->oh[dtCurrent.date()] = CalFormatter::Data::Day(Qt::red, (*it)->summary()); + d->oh[dtCurrent.date()] = CalFormatter::Data::Day(TQt::red, (*it)->summary()); } } else - d->oh[(*it)->dtStart().date()] = CalFormatter::Data::Day(Qt::red, (*it)->summary()); + d->oh[(*it)->dtStart().date()] = CalFormatter::Data::Day(TQt::red, (*it)->summary()); } kdDebug(51000) << "Loaded " << counter << " events for year " << year_ << endl; } @@ -135,15 +135,15 @@ void CalFormatter::init(int year, const QString & ohFile, const QString & fhFile calendar = new KCal::CalendarLocal("UTC"); if (calendar->load(fhFile)) { - KCal::Event::List list = calendar->rawEvents(QDate(year_,1,1), QDate(year_,12,31)); + KCal::Event::List list = calendar->rawEvents(TQDate(year_,1,1), TQDate(year_,12,31)); KCal::Event::List::iterator it; - QString eventDate; + TQString eventDate; int counter = 0; for ( it = list.begin(); it != list.end(); ++it ) { counter++; - d->fh[(*it)->dtStart().date()] = CalFormatter::Data::Day(Qt::red, (*it)->summary()); + d->fh[(*it)->dtStart().date()] = CalFormatter::Data::Day(TQt::red, (*it)->summary()); //kdDebug(51000) << eventDate << "----" << (*it)->summary() << endl; } kdDebug(51000) << "Loaded " << counter << " events for year " << year_ << endl; @@ -154,7 +154,7 @@ void CalFormatter::init(int year, const QString & ohFile, const QString & fhFile bool CalFormatter::isPrayDay(int month, int day) { - QDate dt; + TQDate dt; KGlobal::locale()->calendar()->setYMD(dt, year_, month, day); return (dt.dayOfWeek() == KGlobal::locale()->calendar()->weekDayOfPray()); } @@ -164,49 +164,49 @@ bool CalFormatter::isPrayDay(int month, int day) */ bool KIPICalendarPlugin::CalFormatter::isSpecial(int month, int day) { - QDate dt; + TQDate dt; KGlobal::locale()->calendar()->setYMD(dt, year_, month, day); - return (isPrayDay(month,day) || d->oh.contains(dt) || d->fh.contains(dt)); + return (isPrayDay(month,day) || d->oh.tqcontains(dt) || d->fh.tqcontains(dt)); } /*! Returns the color to be used for painting of the day info */ -QColor KIPICalendarPlugin::CalFormatter::getDayColor(int month, int day) +TQColor KIPICalendarPlugin::CalFormatter::getDayColor(int month, int day) { - QDate dt; + TQDate dt; KGlobal::locale()->calendar()->setYMD(dt, year_, month, day); if (isPrayDay(month, day)) - return Qt::red; + return TQt::red; - if (d->oh.contains(dt)) - return Qt::red; + if (d->oh.tqcontains(dt)) + return TQt::red; - if (d->fh.contains(dt)) - return Qt::green; + if (d->fh.tqcontains(dt)) + return TQt::green; //default - return Qt::black; + return TQt::black; } /*! Returns the description of the day to be painted on the calendar. */ -QString KIPICalendarPlugin::CalFormatter::getDayDescr(int month, int day) +TQString KIPICalendarPlugin::CalFormatter::getDayDescr(int month, int day) { - QDate dt; + TQDate dt; KGlobal::locale()->calendar()->setYMD(dt, year_, month, day); - QString ret; + TQString ret; - if (d->oh.contains(dt)) + if (d->oh.tqcontains(dt)) ret = d->oh[dt].description; - if (d->fh.contains(dt)) { + if (d->fh.tqcontains(dt)) { if (ret.isNull()) return d->fh[dt].description; else diff --git a/kipi-plugins/calendar/calformatter.h b/kipi-plugins/calendar/calformatter.h index d66e652..250a70a 100644 --- a/kipi-plugins/calendar/calformatter.h +++ b/kipi-plugins/calendar/calformatter.h @@ -24,16 +24,17 @@ #ifndef KIPICALENDARPLUGINCALFORMATTER_H #define KIPICALENDARPLUGINCALFORMATTER_H -#include <qobject.h> +#include <tqobject.h> namespace KIPICalendarPlugin { /** @author Maciek Borowka */ -class CalFormatter : public QObject +class CalFormatter : public TQObject { Q_OBJECT + TQ_OBJECT public: CalFormatter(); @@ -41,10 +42,10 @@ public: bool isSpecial(int month, int day); - QColor getDayColor(int month, int day); - QString getDayDescr(int month, int day); + TQColor getDayColor(int month, int day); + TQString getDayDescr(int month, int day); - void init(int year, const QString & ohFile, const QString & fhFile); + void init(int year, const TQString & ohFile, const TQString & fhFile); protected: int year_; diff --git a/kipi-plugins/calendar/calpainter.cpp b/kipi-plugins/calendar/calpainter.cpp index 998cb85..d481b96 100644 --- a/kipi-plugins/calendar/calpainter.cpp +++ b/kipi-plugins/calendar/calpainter.cpp @@ -19,17 +19,17 @@ * * ============================================================ */ -// Qt includes. - -#include <qpainter.h> -#include <qrect.h> -#include <qpaintdevice.h> -#include <qdatetime.h> -#include <qpaintdevicemetrics.h> -#include <qstring.h> -#include <qimage.h> -#include <qtimer.h> -#include <qwmatrix.h> +// TQt includes. + +#include <tqpainter.h> +#include <tqrect.h> +#include <tqpaintdevice.h> +#include <tqdatetime.h> +#include <tqpaintdevicemetrics.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqtimer.h> +#include <tqwmatrix.h> // KDE includes. @@ -48,7 +48,7 @@ namespace KIPICalendarPlugin { -CalPainter::CalPainter(QPaintDevice *pd) +CalPainter::CalPainter(TQPaintDevice *pd) { pd_ = pd; } @@ -68,7 +68,7 @@ void CalPainter::paint(bool useDeviceMetrics) { if (!pd_) return; - QPainter *painter = new QPainter(); + TQPainter *painter = new TQPainter(); painter->begin(pd_); int width = 0; @@ -80,7 +80,7 @@ void CalPainter::paint(bool useDeviceMetrics) height = params.height; } else { - QPaintDeviceMetrics metrics( painter->device()); + TQPaintDeviceMetrics metrics( painter->device()); width = metrics.width(); height = metrics.height(); } @@ -93,7 +93,7 @@ void CalPainter::paint(bool useDeviceMetrics) for (int i=0; i<42; i++) days[i] = -1; - QDate d; + TQDate d; KGlobal::locale()->calendar()->setYMD(d, year_, month_, 1); int s = d.dayOfWeek(); @@ -106,7 +106,7 @@ void CalPainter::paint(bool useDeviceMetrics) // ----------------------------------------------- - QRect rCal, rImage, rCalHeader; + TQRect rCal, rImage, rCalHeader; int cellSizeX; int cellSizeY; @@ -114,7 +114,7 @@ void CalPainter::paint(bool useDeviceMetrics) case(CalParams::Top): { - rImage = QRect(0,0,0,0); + rImage = TQRect(0,0,0,0); rImage.setWidth(width); rImage.setHeight((int)(height * (params.ratio)/(params.ratio + 100))); @@ -123,11 +123,11 @@ void CalPainter::paint(bool useDeviceMetrics) cellSizeX = (width - 20)/7; cellSizeY = remainingHeight/8; - rCal = QRect(0,0,0,0); + rCal = TQRect(0,0,0,0); rCal.setWidth(cellSizeX*7); rCal.setHeight((int)(cellSizeY*7)); - rCalHeader = QRect(0,0,0,0); + rCalHeader = TQRect(0,0,0,0); rCalHeader.setWidth(rCal.width()); rCalHeader.setHeight((int)(cellSizeY)); rCalHeader.moveTop(rImage.bottom()); @@ -141,7 +141,7 @@ void CalPainter::paint(bool useDeviceMetrics) case(CalParams::Left): { - rImage = QRect(0,0,0,0); + rImage = TQRect(0,0,0,0); rImage.setHeight(height); rImage.setWidth((int)(width * (params.ratio)/(params.ratio + 100))); @@ -150,11 +150,11 @@ void CalPainter::paint(bool useDeviceMetrics) cellSizeX = remainingWidth/8; cellSizeY = (height - 20)/7; - rCal = QRect(0,0,0,0); + rCal = TQRect(0,0,0,0); rCal.setWidth(cellSizeX*7); rCal.setHeight(cellSizeY*7); - rCalHeader = QRect(0,0,0,0); + rCalHeader = TQRect(0,0,0,0); rCalHeader.setWidth(rCal.width()); rCalHeader.setHeight(cellSizeY); rCalHeader.moveLeft(rImage.right() + cellSizeX); @@ -168,7 +168,7 @@ void CalPainter::paint(bool useDeviceMetrics) case(CalParams::Right): { - rImage = QRect(0,0,0,0); + rImage = TQRect(0,0,0,0); rImage.setHeight(height); rImage.setWidth((int)(width * (params.ratio)/(params.ratio + 100))); @@ -177,11 +177,11 @@ void CalPainter::paint(bool useDeviceMetrics) cellSizeX = remainingWidth/8; cellSizeY = (height - 20)/7; - rCal = QRect(0,0,0,0); + rCal = TQRect(0,0,0,0); rCal.setWidth(cellSizeX*7); rCal.setHeight(cellSizeY*7); - rCalHeader = QRect(0,0,0,0); + rCalHeader = TQRect(0,0,0,0); rCalHeader.setWidth(rCal.width()); rCalHeader.setHeight(cellSizeY); rCalHeader.moveTop(height/2 - @@ -202,24 +202,24 @@ void CalPainter::paint(bool useDeviceMetrics) // --------------------------------------------------------------- - painter->fillRect(0,0,width, height, Qt::white); - painter->fillRect(rImage, Qt::black); + painter->fillRect(0,0,width, height, TQt::white); + painter->fillRect(rImage, TQt::black); painter->setFont(params.baseFont); // --------------------------------------------------------------- painter->save(); - QFont f(params.baseFont); + TQFont f(params.baseFont); f.setBold(true); f.setPixelSize(f.pixelSize() + 5); painter->setFont(f); - painter->drawText(rCalHeader, Qt::AlignLeft|Qt::AlignVCenter, - QString::number(year_)); + painter->drawText(rCalHeader, TQt::AlignLeft|TQt::AlignVCenter, + TQString::number(year_)); #if KDE_IS_VERSION(3,2,0) - painter->drawText(rCalHeader, Qt::AlignRight|Qt::AlignVCenter, + painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter, KGlobal::locale()->calendar()->monthName(month_, year_)); #else - painter->drawText(rCalHeader, Qt::AlignRight|Qt::AlignVCenter, + painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter, KGlobal::locale()->monthName(month_)); #endif painter->restore(); @@ -227,7 +227,7 @@ void CalPainter::paint(bool useDeviceMetrics) // --------------------------------------------------------------- int sx, sy; - QRect r, rsmall; + TQRect r, rsmall; r.setWidth(cellSizeX); r.setHeight(cellSizeY); @@ -236,7 +236,7 @@ void CalPainter::paint(bool useDeviceMetrics) painter->save(); - painter->setPen(Qt::red); + painter->setPen(TQt::red); sy = rCal.top(); for (int i=0; i<7; i++) { @@ -245,15 +245,15 @@ void CalPainter::paint(bool useDeviceMetrics) dayname = dayname-7; sx = cellSizeX * i + rCal.left(); - r.moveTopLeft(QPoint(sx,sy)); + r.moveTopLeft(TQPoint(sx,sy)); rsmall = r; rsmall.setWidth(r.width() - 2); rsmall.setHeight(r.height() - 2); #if KDE_IS_VERSION(3,2,0) - painter->drawText(rsmall, Qt::AlignRight|Qt::AlignBottom, + painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, KGlobal::locale()->calendar()->weekDayName(dayname, true)); #else - painter->drawText(rsmall, Qt::AlignRight|Qt::AlignBottom, + painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, KGlobal::locale()->weekDayName(dayname, true)); #endif @@ -265,13 +265,13 @@ void CalPainter::paint(bool useDeviceMetrics) sy = cellSizeY * (j + 1) + rCal.top(); for (int i=0; i<7; i++) { sx = cellSizeX * i + rCal.left(); - r.moveTopLeft(QPoint(sx,sy)); + r.moveTopLeft(TQPoint(sx,sy)); rsmall = r; rsmall.setWidth(r.width() - 2); rsmall.setHeight(r.height() - 2); if (days[index] != -1) - painter->drawText(rsmall, Qt::AlignRight|Qt::AlignBottom, - QString::number(days[index])); + painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, + TQString::number(days[index])); index++; } } @@ -299,16 +299,16 @@ void CalPainter::paint(bool useDeviceMetrics) delete painter; } -CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, - const KURL& imagePath, int angle, CalFormatter *formatter, QPainter *painter) - : QObject(parent), painter_(painter) +CalBlockPainter::CalBlockPainter(TQObject *tqparent, int year, int month, + const KURL& imagePath, int angle, CalFormatter *formatter, TQPainter *painter) + : TQObject(tqparent), painter_(painter) { int width = 0; int height = 0; CalParams& params = CalSettings::instance()->calParams; - QPaintDeviceMetrics metrics( painter->device()); + TQPaintDeviceMetrics metrics( painter->device()); width = metrics.width(); height = metrics.height(); @@ -320,7 +320,7 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, for (int i=0; i<42; i++) days[i] = -1; - QDate d; + TQDate d; KGlobal::locale()->calendar()->setYMD(d, year, month, 1); int s = d.dayOfWeek(); @@ -333,7 +333,7 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, // ----------------------------------------------- - QRect rCal, rImage, rCalHeader; + TQRect rCal, rImage, rCalHeader; int cellSizeX; int cellSizeY; @@ -341,7 +341,7 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, case(CalParams::Top): { - rImage = QRect(0,0,0,0); + rImage = TQRect(0,0,0,0); rImage.setWidth(width); rImage.setHeight((int)(height * (params.ratio)/(params.ratio + 100))); @@ -350,11 +350,11 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, cellSizeX = (width - 20)/7; cellSizeY = remainingHeight/8; - rCal = QRect(0,0,0,0); + rCal = TQRect(0,0,0,0); rCal.setWidth(cellSizeX*7); rCal.setHeight((int)(cellSizeY*7)); - rCalHeader = QRect(0,0,0,0); + rCalHeader = TQRect(0,0,0,0); rCalHeader.setWidth(rCal.width()); rCalHeader.setHeight((int)(cellSizeY)); rCalHeader.moveTop(rImage.bottom()); @@ -368,7 +368,7 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, case(CalParams::Left): { - rImage = QRect(0,0,0,0); + rImage = TQRect(0,0,0,0); rImage.setHeight(height); rImage.setWidth((int)(width * (params.ratio)/(params.ratio + 100))); @@ -377,11 +377,11 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, cellSizeX = remainingWidth/8; cellSizeY = (height - 20)/7; - rCal = QRect(0,0,0,0); + rCal = TQRect(0,0,0,0); rCal.setWidth(cellSizeX*7); rCal.setHeight(cellSizeY*7); - rCalHeader = QRect(0,0,0,0); + rCalHeader = TQRect(0,0,0,0); rCalHeader.setWidth(rCal.width()); rCalHeader.setHeight(cellSizeY); rCalHeader.moveLeft(rImage.right() + cellSizeX); @@ -395,7 +395,7 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, case(CalParams::Right): { - rImage = QRect(0,0,0,0); + rImage = TQRect(0,0,0,0); rImage.setHeight(height); rImage.setWidth((int)(width * (params.ratio)/(params.ratio + 100))); @@ -404,11 +404,11 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, cellSizeX = remainingWidth/8; cellSizeY = (height - 20)/7; - rCal = QRect(0,0,0,0); + rCal = TQRect(0,0,0,0); rCal.setWidth(cellSizeX*7); rCal.setHeight(cellSizeY*7); - rCalHeader = QRect(0,0,0,0); + rCalHeader = TQRect(0,0,0,0); rCalHeader.setWidth(rCal.width()); rCalHeader.setHeight(cellSizeY); rCalHeader.moveTop(height/2 - @@ -429,23 +429,23 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, // --------------------------------------------------------------- - painter->fillRect(0,0,width, height, Qt::white); + painter->fillRect(0,0,width, height, TQt::white); painter->setFont(params.baseFont); // --------------------------------------------------------------- painter->save(); - QFont f(params.baseFont); + TQFont f(params.baseFont); f.setBold(true); f.setPixelSize(f.pixelSize() + 5); painter->setFont(f); - painter->drawText(rCalHeader, Qt::AlignLeft|Qt::AlignVCenter, - QString::number(year)); + painter->drawText(rCalHeader, TQt::AlignLeft|TQt::AlignVCenter, + TQString::number(year)); #if KDE_IS_VERSION(3,2,0) - painter->drawText(rCalHeader, Qt::AlignRight|Qt::AlignVCenter, + painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter, KGlobal::locale()->calendar()->monthName(month, year)); #else - painter->drawText(rCalHeader, Qt::AlignRight|Qt::AlignVCenter, + painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter, KGlobal::locale()->monthName(month)); #endif painter->restore(); @@ -453,7 +453,7 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, // --------------------------------------------------------------- int sx, sy; - QRect r, rsmall, rSpecial; + TQRect r, rsmall, rSpecial; r.setWidth(cellSizeX); r.setHeight(cellSizeY); @@ -462,7 +462,7 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, painter->save(); - painter->setPen(Qt::red); + painter->setPen(TQt::red); sy = rCal.top(); for (int i=0; i<7; i++) { @@ -471,15 +471,15 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, dayname = dayname-7; sx = cellSizeX * i + rCal.left(); - r.moveTopLeft(QPoint(sx,sy)); + r.moveTopLeft(TQPoint(sx,sy)); rsmall = r; rsmall.setWidth(r.width() - 2); rsmall.setHeight(r.height() - 2); #if KDE_IS_VERSION(3,2,0) - painter->drawText(rsmall, Qt::AlignRight|Qt::AlignBottom, + painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, KGlobal::locale()->calendar()->weekDayName(dayname, true)); #else - painter->drawText(rsmall, Qt::AlignRight|Qt::AlignBottom, + painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, KGlobal::locale()->weekDayName(dayname, true)); #endif } @@ -490,7 +490,7 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, sy = cellSizeY * (j + 1) + rCal.top(); for (int i=0; i<7; i++) { sx = cellSizeX * i + rCal.left(); - r.moveTopLeft(QPoint(sx,sy)); + r.moveTopLeft(TQPoint(sx,sy)); rsmall = r; rsmall.setWidth(r.width() - 2); rsmall.setHeight(r.height() - 2); @@ -499,25 +499,25 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, painter->save(); painter->setPen( formatter->getDayColor(month, days[index]) ); - painter->drawText(rsmall, Qt::AlignRight|Qt::AlignBottom, - QString::number(days[index])); + painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, + TQString::number(days[index])); - QString descr = formatter->getDayDescr(month, days[index]); + TQString descr = formatter->getDayDescr(month, days[index]); kdDebug(51000) << "Painting special info: '" << descr << "' for date " << days[index] << "/" << month << endl; rSpecial = rsmall; rSpecial.moveBy(2,0); - QFont f(params.baseFont); + TQFont f(params.baseFont); f.setPixelSize(f.pixelSize() / 3); painter->setFont(f); - painter->drawText(rSpecial, Qt::AlignLeft|Qt::AlignTop, descr); + painter->drawText(rSpecial, TQt::AlignLeft|TQt::AlignTop, descr); painter->restore(); } else { - painter->drawText(rsmall, Qt::AlignRight|Qt::AlignBottom, - QString::number(days[index])); + painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, + TQString::number(days[index])); } } index++; @@ -544,16 +544,16 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, // --------------------------------------------------------------- - QImage img = QImage(imagePath.path()); // PENDING(blackie) handle general URLS. + TQImage img = TQImage(imagePath.path()); // PENDING(blackie) handle general URLS. if (!img.isNull()) { if ( angle != 0 ) { - QWMatrix matrix; + TQWMatrix matrix; matrix.rotate( angle ); img = img.xForm( matrix ); } - image_ = new QImage(img.smoothScale(rImage.width(), rImage.height(), - QImage::ScaleMin)); + image_ = new TQImage(img.smoothScale(rImage.width(), rImage.height(), + TQ_ScaleMin)); // Center the image int x = rImage.x() + rImage.width()/2 - image_->width()/2; int y = rImage.y() + rImage.height()/2 - image_->height()/2; @@ -587,13 +587,13 @@ CalBlockPainter::CalBlockPainter(QObject *parent, int year, int month, pb->h = image_->height() - pb->y; currBlock_ = 0; - QTimer::singleShot(10, this, SLOT(slotPaintNextBlock())); + TQTimer::singleShot(10, this, TQT_SLOT(slotPaintNextBlock())); } else { image_ = 0; blocks_ = 0; - painter->fillRect(rImage, Qt::blue); + painter->fillRect(rImage, TQt::blue); } } @@ -610,7 +610,7 @@ void CalBlockPainter::slotPaintNextBlock() b.w, b.h); currBlock_++; if (currBlock_ < numBlocks_) { - QTimer::singleShot(10, this, SLOT(slotPaintNextBlock())); + TQTimer::singleShot(10, this, TQT_SLOT(slotPaintNextBlock())); emit signalProgress(currBlock_+1, numBlocks_); } else { diff --git a/kipi-plugins/calendar/calpainter.h b/kipi-plugins/calendar/calpainter.h index 3d0a89a..7a4a4e4 100644 --- a/kipi-plugins/calendar/calpainter.h +++ b/kipi-plugins/calendar/calpainter.h @@ -22,10 +22,10 @@ #ifndef CALPAINTER_H #define CALPAINTER_H -// Qt includes. +// TQt includes. -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> // KDE includes. @@ -36,11 +36,11 @@ #include "calformatter.h" -class QPaintDevice; -class QPainter; -class QString; -class QTimer; -class QImage; +class TQPaintDevice; +class TQPainter; +class TQString; +class TQTimer; +class TQImage; namespace KIPICalendarPlugin { @@ -49,7 +49,7 @@ class CalPainter { public: - CalPainter(QPaintDevice *pd); + CalPainter(TQPaintDevice *pd); ~CalPainter(); void setYearMonth(int year, int month); @@ -57,19 +57,20 @@ public: private: - QPaintDevice *pd_; + TQPaintDevice *pd_; int year_; int month_; }; -class CalBlockPainter : public QObject +class CalBlockPainter : public TQObject { Q_OBJECT + TQ_OBJECT public: - CalBlockPainter(QObject *parent, int year, int month, - const KURL& imagePath, int angle, CalFormatter* formatter, QPainter *painter); + CalBlockPainter(TQObject *tqparent, int year, int month, + const KURL& imagePath, int angle, CalFormatter* formatter, TQPainter *painter); ~CalBlockPainter(); signals: @@ -88,9 +89,9 @@ private: struct Block *blocks_; int numBlocks_; int currBlock_; - QTimer *timer_; - QPainter *painter_; - QImage *image_; + TQTimer *timer_; + TQPainter *painter_; + TQImage *image_; private slots: diff --git a/kipi-plugins/calendar/calprint.h b/kipi-plugins/calendar/calprint.h index 19349dc..cdc33c5 100644 --- a/kipi-plugins/calendar/calprint.h +++ b/kipi-plugins/calendar/calprint.h @@ -22,7 +22,7 @@ #ifndef CALPRINT_H #define CALPRINT_H -#include <qwidget.h> +#include <tqwidget.h> #endif /* CALPRINT_H */ diff --git a/kipi-plugins/calendar/calselect.cpp b/kipi-plugins/calendar/calselect.cpp index ea0d17c..20058d4 100644 --- a/kipi-plugins/calendar/calselect.cpp +++ b/kipi-plugins/calendar/calselect.cpp @@ -19,15 +19,15 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qhgroupbox.h> -#include <qlayout.h> -#include <qspinbox.h> -#include <qdatetime.h> -#include <qlabel.h> -#include <qframe.h> -#include <qpixmap.h> +#include <tqhgroupbox.h> +#include <tqlayout.h> +#include <tqspinbox.h> +#include <tqdatetime.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqpixmap.h> // KDE includes. @@ -47,10 +47,10 @@ namespace KIPICalendarPlugin { -CalSelect::CalSelect(KIPI::Interface* interface, QWidget *parent, const char* name) - : QWidget(parent, name) +CalSelect::CalSelect(KIPI::Interface* interface, TQWidget *tqparent, const char* name) + : TQWidget(tqparent, name) { - mwVector_ = new QPtrVector<MonthWidget>(MAX_MONTHS); + mwVector_ = new TQPtrVector<MonthWidget>(MAX_MONTHS); monthBoxLayout_ = NULL; setupView( interface ); } @@ -62,42 +62,42 @@ CalSelect::~CalSelect() void CalSelect::setupView( KIPI::Interface* interface ) { - QVBoxLayout *mainLayout = new QVBoxLayout(this, 6, 11); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 6, 11); // ---------------------------------------------------------------- setCaption(i18n("Create Calendar")); - QHGroupBox *yearBox = new QHGroupBox(i18n("Select Year"), this); - yearBox->layout()->addItem(new QSpacerItem(5,5, - QSizePolicy::Expanding, - QSizePolicy::Minimum)); - yearSpin_ = new QSpinBox(KGlobal::locale()->calendar()->minValidYear(), + TQHGroupBox *yearBox = new TQHGroupBox(i18n("Select Year"), this); + yearBox->tqlayout()->addItem(new TQSpacerItem(5,5, + TQSizePolicy::Expanding, + TQSizePolicy::Minimum)); + yearSpin_ = new TQSpinBox(KGlobal::locale()->calendar()->minValidYear(), KGlobal::locale()->calendar()->maxValidYear(), 1,yearBox); - yearSpin_->setValue(KGlobal::locale()->calendar()->year(QDate::currentDate())); + yearSpin_->setValue(KGlobal::locale()->calendar()->year(TQDate::tqcurrentDate())); slotYearChanged(yearSpin_->value()); - connect(yearSpin_, SIGNAL(valueChanged(int)), - SLOT(slotYearChanged(int))); + connect(yearSpin_, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotYearChanged(int))); mainLayout->addWidget(yearBox); // ---------------------------------------------------------------- - QGroupBox *monthBox = new QGroupBox(i18n("Select Images"), this); + TQGroupBox *monthBox = new TQGroupBox(i18n("Select Images"), this); monthBox->setColumnLayout(0, Qt::Vertical ); - monthBox->layout()->setSpacing( 6 ); - monthBox->layout()->setMargin( 11 ); + monthBox->tqlayout()->setSpacing( 6 ); + monthBox->tqlayout()->setMargin( 11 ); - monthBoxLayout_ = new QGridLayout(monthBox->layout()); - monthBoxLayout_->setAlignment( Qt::AlignCenter ); + monthBoxLayout_ = new TQGridLayout(monthBox->tqlayout()); + monthBoxLayout_->tqsetAlignment( TQt::AlignCenter ); KURL::List urlList; KIPI::ImageCollection images = interface->currentSelection(); if ( images.isValid() && !images.images().isEmpty()) urlList = images.images(); - QDate d; + TQDate d; KGlobal::locale()->calendar()->setYMD(d, yearSpin_->value(), 1, 1); unsigned int months = KGlobal::locale()->calendar()->monthsInYear(d); // span the monthWidgets over 2 rows. inRow should usually be 6 or 7 (for 12 or 13 months) @@ -115,8 +115,8 @@ void CalSelect::setupView( KIPI::Interface* interface ) mwVector_->insert(i, w); } - QLabel* tLabel = - new QLabel(i18n("Left click on Months to Select Images. " + TQLabel* tLabel = + new TQLabel(i18n("Left click on Months to Select Images. " "Right click to Clear Month.\n" "You can also drag and drop images onto the Months"), monthBox); @@ -127,14 +127,14 @@ void CalSelect::setupView( KIPI::Interface* interface ) // ---------------------------------------------------------------- - mainLayout->addItem(new QSpacerItem(5,5,QSizePolicy::Minimum, - QSizePolicy::Expanding)); + mainLayout->addItem(new TQSpacerItem(5,5,TQSizePolicy::Minimum, + TQSizePolicy::Expanding)); } void CalSelect::slotYearChanged(int year) { int i, months; - QDate d, oldD; + TQDate d, oldD; KGlobal::locale()->calendar()->setYMD(d, year, 1, 1); KGlobal::locale()->calendar()->setYMD(oldD, CalSettings::instance()->getYear(), 1, 1); months = KGlobal::locale()->calendar()->monthsInYear(d); diff --git a/kipi-plugins/calendar/calselect.h b/kipi-plugins/calendar/calselect.h index 2038392..d0636b9 100644 --- a/kipi-plugins/calendar/calselect.h +++ b/kipi-plugins/calendar/calselect.h @@ -22,38 +22,39 @@ #ifndef CALSELECT_H #define CALSELECT_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qptrvector.h> +#include <tqwidget.h> +#include <tqptrvector.h> // LibKIPi includes. #include <libkipi/interface.h> -class QSpinBox; +class TQSpinBox; namespace KIPICalendarPlugin { class MonthWidget; -class CalSelect : public QWidget +class CalSelect : public TQWidget { Q_OBJECT + TQ_OBJECT public: - CalSelect( KIPI::Interface* interface, QWidget *parent, const char* name=0); + CalSelect( KIPI::Interface* interface, TQWidget *tqparent, const char* name=0); ~CalSelect(); private: void setupView( KIPI::Interface* interface ); - QPtrVector<MonthWidget> *mwVector_; - QSpinBox *yearSpin_; - QGridLayout *monthBoxLayout_; + TQPtrVector<MonthWidget> *mwVector_; + TQSpinBox *yearSpin_; + TQGridLayout *monthBoxLayout_; private slots: diff --git a/kipi-plugins/calendar/calsettings.cpp b/kipi-plugins/calendar/calsettings.cpp index 2c5f112..bf008c0 100644 --- a/kipi-plugins/calendar/calsettings.cpp +++ b/kipi-plugins/calendar/calsettings.cpp @@ -67,7 +67,7 @@ void CalSettings::setImage(int month, const KURL& path) KURL CalSettings::getImage(int month) const { - return monthMap_.contains(month) ? monthMap_[month] : KURL(); + return monthMap_.tqcontains(month) ? monthMap_[month] : KURL(); } } // NameSpace KIPICalendarPlugin diff --git a/kipi-plugins/calendar/calsettings.h b/kipi-plugins/calendar/calsettings.h index 6b6dd70..e2e2b92 100644 --- a/kipi-plugins/calendar/calsettings.h +++ b/kipi-plugins/calendar/calsettings.h @@ -22,11 +22,11 @@ #ifndef CALSETTINGS_H #define CALSETTINGS_H -// Qt includes. +// TQt includes. -#include <qmap.h> -#include <qstring.h> -#include <qfont.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqfont.h> // KDE includes. @@ -55,7 +55,7 @@ public: bool drawLines; float ratio; ImagePosition imgPos; - QFont baseFont; + TQFont baseFont; }; class CalSettings @@ -78,7 +78,7 @@ private: static CalSettings* instance_; - QMap<int,KURL> monthMap_; + TQMap<int,KURL> monthMap_; int year_; }; diff --git a/kipi-plugins/calendar/caltemplate.cpp b/kipi-plugins/calendar/caltemplate.cpp index 238e2a5..6f54541 100644 --- a/kipi-plugins/calendar/caltemplate.cpp +++ b/kipi-plugins/calendar/caltemplate.cpp @@ -19,25 +19,25 @@ * * ============================================================ */ -// Qt includes. - -#include <qvariant.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qbuttongroup.h> -#include <qvbuttongroup.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qslider.h> -#include <qlayout.h> -#include <qtimer.h> -#include <qfontdatabase.h> -#include <qpaintdevicemetrics.h> -#include <qpixmap.h> -#include <qpainter.h> -#include <qprinter.h> +// TQt includes. + +#include <tqvariant.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqbuttongroup.h> +#include <tqvbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqslider.h> +#include <tqlayout.h> +#include <tqtimer.h> +#include <tqfontdatabase.h> +#include <tqpaintdevicemetrics.h> +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqprinter.h> // KDE includes. @@ -54,108 +54,108 @@ namespace KIPICalendarPlugin { -CalTemplate::CalTemplate(QWidget* parent, const char* name) - : QWidget(parent, name) +CalTemplate::CalTemplate(TQWidget* tqparent, const char* name) + : TQWidget(tqparent, name) { - QGridLayout *mainLayout = new QGridLayout(this, 1, 1, 5, 5); + TQGridLayout *mainLayout = new TQGridLayout(this, 1, 1, 5, 5); // ---------------------------------------------------------------- previewSize_ = 300; - QGroupBox *boxPreview_ = new QGroupBox( i18n("Preview"), this ); + TQGroupBox *boxPreview_ = new TQGroupBox( i18n("Preview"), this ); boxPreview_->setColumnLayout(0, Qt::Vertical); - boxPreview_->layout()->setMargin( 5 ); + boxPreview_->tqlayout()->setMargin( 5 ); - QVBoxLayout *previewLayout = new QVBoxLayout(boxPreview_->layout()); + TQVBoxLayout *previewLayout = new TQVBoxLayout(boxPreview_->tqlayout()); calWidget_ = new CalWidget(boxPreview_); - previewLayout->addWidget(calWidget_, 0, Qt::AlignCenter); + previewLayout->addWidget(calWidget_, 0, TQt::AlignCenter); mainLayout->addWidget( boxPreview_, 0, 0 ); // --------------------------------------------------------------- - QGroupBox *gbox = new QGroupBox( i18n("Settings"), this ); + TQGroupBox *gbox = new TQGroupBox( i18n("Settings"), this ); gbox->setColumnLayout(0, Qt::Vertical ); - gbox->layout()->setSpacing( 11 ); - gbox->layout()->setMargin( 6 ); - QVBoxLayout* gboxLayout = new QVBoxLayout( gbox->layout() ); + gbox->tqlayout()->setSpacing( 11 ); + gbox->tqlayout()->setMargin( 6 ); + TQVBoxLayout* gboxLayout = new TQVBoxLayout( gbox->tqlayout() ); // --------------------------------------------------------------- - QHBoxLayout *hlayout = new QHBoxLayout( 0, 0, 5 ); - hlayout->addWidget( new QLabel(i18n("Paper size:"), gbox) ); + TQHBoxLayout *htqlayout = new TQHBoxLayout( 0, 0, 5 ); + htqlayout->addWidget( new TQLabel(i18n("Paper size:"), gbox) ); - comboPaperSize_ = new QComboBox(false, gbox); - hlayout->addWidget(comboPaperSize_); - gboxLayout->addLayout( hlayout ); + comboPaperSize_ = new TQComboBox(false, gbox); + htqlayout->addWidget(comboPaperSize_); + gboxLayout->addLayout( htqlayout ); - QStringList paperSizes; + TQStringList paperSizes; paperSizes << "A4"; paperSizes << "US Letter"; comboPaperSize_->insertStringList(paperSizes); - connect(comboPaperSize_, SIGNAL(activated(int)), - SLOT(slotParamsChanged())); + connect(comboPaperSize_, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotParamsChanged())); // --------------------------------------------------------------- - btnGroupImagePos_ = new QVButtonGroup(i18n("Image Position"), gbox); + btnGroupImagePos_ = new TQVButtonGroup(i18n("Image Position"), gbox); btnGroupImagePos_->setRadioButtonExclusive(true); // Insert the buttons in the order Top, Left, Right so that they // get the corresponding ids - QRadioButton* radioBtn = new QRadioButton(i18n("Top"), btnGroupImagePos_); + TQRadioButton* radioBtn = new TQRadioButton(i18n("Top"), btnGroupImagePos_); radioBtn->setChecked(true); Q_ASSERT(btnGroupImagePos_->id( radioBtn ) == CalParams::Top); - radioBtn = new QRadioButton(i18n("Left"), btnGroupImagePos_); + radioBtn = new TQRadioButton(i18n("Left"), btnGroupImagePos_); Q_ASSERT(btnGroupImagePos_->id( radioBtn ) == CalParams::Left); - radioBtn = new QRadioButton(i18n("Right"), btnGroupImagePos_); + radioBtn = new TQRadioButton(i18n("Right"), btnGroupImagePos_); Q_ASSERT(btnGroupImagePos_->id( radioBtn ) == CalParams::Right); gboxLayout->addWidget( btnGroupImagePos_ ); - connect(btnGroupImagePos_, SIGNAL(clicked(int)), - SLOT(slotParamsChanged())); + connect(btnGroupImagePos_, TQT_SIGNAL(clicked(int)), + TQT_SLOT(slotParamsChanged())); // --------------------------------------------------------------- - checkBoxDrawLines_ = new QCheckBox(i18n("Draw lines in calendar"), gbox); + checkBoxDrawLines_ = new TQCheckBox(i18n("Draw lines in calendar"), gbox); gboxLayout->addWidget( checkBoxDrawLines_ ); checkBoxDrawLines_->setChecked(true); - connect(checkBoxDrawLines_, SIGNAL(toggled(bool)), - SLOT(slotParamsChanged())); + connect(checkBoxDrawLines_, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotParamsChanged())); // --------------------------------------------------------------- - hlayout = new QHBoxLayout( 0, 0, 5 ); + htqlayout = new TQHBoxLayout( 0, 0, 5 ); - hlayout->addWidget(new QLabel(i18n("Image to text ratio:"), gbox)); + htqlayout->addWidget(new TQLabel(i18n("Image to text ratio:"), gbox)); - sliderRatio_ = new QSlider(50,300,5,100,Qt::Horizontal,gbox); - hlayout->addWidget( sliderRatio_ ); + sliderRatio_ = new TQSlider(50,300,5,100,Qt::Horizontal,gbox); + htqlayout->addWidget( sliderRatio_ ); - gboxLayout->addLayout( hlayout ); + gboxLayout->addLayout( htqlayout ); - connect(sliderRatio_, SIGNAL(valueChanged(int)), - SLOT(slotParamsChanged())); + connect(sliderRatio_, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotParamsChanged())); // --------------------------------------------------------------- - hlayout = new QHBoxLayout( 0, 0, 5 ); + htqlayout = new TQHBoxLayout( 0, 0, 5 ); - hlayout->addWidget(new QLabel(i18n("Font:"), gbox)); + htqlayout->addWidget(new TQLabel(i18n("Font:"), gbox)); - comboFont_ = new QComboBox(false, gbox); - hlayout->addWidget( comboFont_ ); + comboFont_ = new TQComboBox(false, gbox); + htqlayout->addWidget( comboFont_ ); - QFontDatabase fontDB; - QStringList families(fontDB.families()); - QStringList smoothScalableFamilies; - for (QStringList::iterator it=families.begin(); it != families.end(); + TQFontDatabase fontDB; + TQStringList families(fontDB.tqfamilies()); + TQStringList smoothScalableFamilies; + for (TQStringList::iterator it=families.begin(); it != families.end(); ++it) { smoothScalableFamilies.append(*it); @@ -163,29 +163,29 @@ CalTemplate::CalTemplate(QWidget* parent, const char* name) comboFont_->insertStringList(smoothScalableFamilies); // fetch and set the default font selected in the combo. - QFont f; + TQFont f; comboFont_->setCurrentText( f.family() ); - gboxLayout->addLayout( hlayout ); + gboxLayout->addLayout( htqlayout ); - connect(comboFont_, SIGNAL(activated(int)), - SLOT(slotParamsChanged())); + connect(comboFont_, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotParamsChanged())); // --------------------------------------------------------------- - gboxLayout->addItem(new QSpacerItem(5,10,QSizePolicy::Minimum, - QSizePolicy::Expanding)); + gboxLayout->addItem(new TQSpacerItem(5,10,TQSizePolicy::Minimum, + TQSizePolicy::Expanding)); mainLayout->addWidget( gbox, 0, 1 ); // --------------------------------------------------------------- - timer_ = new QTimer(this); + timer_ = new TQTimer(this); - connect(timer_, SIGNAL(timeout()), - SLOT(slotUpdatePreview())); + connect(timer_, TQT_SIGNAL(timeout()), + TQT_SLOT(slotUpdatePreview())); timer_->start(0,true); } @@ -207,7 +207,7 @@ void CalTemplate::slotUpdatePreview() CalParams& params = CalSettings::instance()->calParams; - QString paperSize = comboPaperSize_->currentText(); + TQString paperSize = comboPaperSize_->currentText(); if (paperSize == "A4") { params.paperWidth = 210; params.paperHeight = 297; @@ -224,7 +224,7 @@ void CalTemplate::slotUpdatePreview() if (imgPos == CalParams::Top) { params.imgPos = CalParams::Top; - float zoom = QMIN((float)previewSize_/params.paperWidth, + float zoom = TQMIN((float)previewSize_/params.paperWidth, (float)previewSize_/params.paperHeight); params.width = (int)(params.paperWidth * zoom); params.height = (int)(params.paperHeight * zoom); @@ -233,7 +233,7 @@ void CalTemplate::slotUpdatePreview() else if (imgPos == CalParams::Left) { params.imgPos = CalParams::Left; - float zoom = QMIN((float)previewSize_/params.paperWidth, + float zoom = TQMIN((float)previewSize_/params.paperWidth, (float)previewSize_/params.paperHeight); params.width = (int)(params.paperHeight * zoom); params.height = (int)(params.paperWidth * zoom); @@ -242,7 +242,7 @@ void CalTemplate::slotUpdatePreview() else { params.imgPos = CalParams::Right; - float zoom = QMIN((float)previewSize_/params.paperWidth, + float zoom = TQMIN((float)previewSize_/params.paperWidth, (float)previewSize_/params.paperHeight); params.width = (int)(params.paperHeight * zoom); params.height = (int)(params.paperWidth * zoom); @@ -250,7 +250,7 @@ void CalTemplate::slotUpdatePreview() params.drawLines = checkBoxDrawLines_->isChecked(); params.ratio = sliderRatio_->value(); - params.baseFont = QFont(comboFont_->currentText()); + params.baseFont = TQFont(comboFont_->currentText()); calWidget_->recreate(); } diff --git a/kipi-plugins/calendar/caltemplate.h b/kipi-plugins/calendar/caltemplate.h index 36b56ec..8208580 100644 --- a/kipi-plugins/calendar/caltemplate.h +++ b/kipi-plugins/calendar/caltemplate.h @@ -22,45 +22,46 @@ #ifndef CALTEMPLATE_H #define CALTEMPLATE_H -// Qt includes. +// TQt includes. -#include <qwidget.h> +#include <tqwidget.h> -class QFrame; -class QComboBox; -class QVButtonGroup; -class QRadioButton; -class QCheckBox; -class QSlider; -class QSpinBox; -class QLabel; -class QTimer; +class TQFrame; +class TQComboBox; +class TQVButtonGroup; +class TQRadioButton; +class TQCheckBox; +class TQSlider; +class TQSpinBox; +class TQLabel; +class TQTimer; namespace KIPICalendarPlugin { class CalWidget; -class CalTemplate : public QWidget +class CalTemplate : public TQWidget { Q_OBJECT + TQ_OBJECT public: - CalTemplate(QWidget* parent, const char* name=0); + CalTemplate(TQWidget* tqparent, const char* name=0); ~CalTemplate(); private: - QComboBox* comboPaperSize_; - QVButtonGroup* btnGroupImagePos_; - QCheckBox* checkBoxDrawLines_; - QSlider* sliderSpacing_; - QSlider* sliderRatio_; - QComboBox* comboFont_; + TQComboBox* comboPaperSize_; + TQVButtonGroup* btnGroupImagePos_; + TQCheckBox* checkBoxDrawLines_; + TQSlider* sliderSpacing_; + TQSlider* sliderRatio_; + TQComboBox* comboFont_; CalWidget* calWidget_; - QTimer* timer_; + TQTimer* timer_; int previewSize_; private slots: diff --git a/kipi-plugins/calendar/calwidget.cpp b/kipi-plugins/calendar/calwidget.cpp index ff9017c..10bf19c 100644 --- a/kipi-plugins/calendar/calwidget.cpp +++ b/kipi-plugins/calendar/calwidget.cpp @@ -23,12 +23,12 @@ #include <iostream> -// Qt includes. +// TQt includes. -#include <qdatetime.h> -#include <qpixmap.h> -#include <qimage.h> -#include <qpainter.h> +#include <tqdatetime.h> +#include <tqpixmap.h> +#include <tqimage.h> +#include <tqpainter.h> // KDE includes. @@ -45,12 +45,12 @@ namespace KIPICalendarPlugin { -CalWidget::CalWidget(QWidget *parent) - : QWidget(parent,0,Qt::WRepaintNoErase|Qt::WResizeNoErase) +CalWidget::CalWidget(TQWidget *tqparent) + : TQWidget(tqparent,0,TQt::WRepaintNoErase|TQt::WResizeNoErase) { - setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); calPainter_ = 0; - pix_ = new QPixmap(); + pix_ = new TQPixmap(); } CalWidget::~CalWidget() @@ -60,26 +60,26 @@ CalWidget::~CalWidget() delete calPainter_; } -void CalWidget::paintEvent(QPaintEvent *e) +void CalWidget::paintEvent(TQPaintEvent *e) { if (!e || pix_->isNull()) return; - bitBlt(this, 0, 0, pix_, 0, 0, width(), height(), Qt::CopyROP); + bitBlt(this, 0, 0, pix_, 0, 0, width(), height(), TQt::CopyROP); } void CalWidget::recreate() { CalParams& params = CalSettings::instance()->calParams; - setFixedSize(QSize(params.width,params.height)); - resize(QSize(params.width,params.height)); + setFixedSize(TQSize(params.width,params.height)); + resize(TQSize(params.width,params.height)); pix_->resize(params.width,params.height); if (!calPainter_) - calPainter_ = new CalPainter(pix_); + calPainter_ = new CalPainter(TQT_TQPAINTDEVICE(pix_)); - calPainter_->setYearMonth(KGlobal::locale()->calendar()->year(QDate::currentDate()), - KGlobal::locale()->calendar()->month(QDate::currentDate())); + calPainter_->setYearMonth(KGlobal::locale()->calendar()->year(TQDate::tqcurrentDate()), + KGlobal::locale()->calendar()->month(TQDate::tqcurrentDate())); calPainter_->paint(); update(); } diff --git a/kipi-plugins/calendar/calwidget.h b/kipi-plugins/calendar/calwidget.h index 1448090..54cb0fe 100644 --- a/kipi-plugins/calendar/calwidget.h +++ b/kipi-plugins/calendar/calwidget.h @@ -22,35 +22,35 @@ #ifndef CALWIDGET_H #define CALWIDGET_H -// Qt includes. +// TQt includes. -#include <qwidget.h> +#include <tqwidget.h> -class QPaintEvent; -class QPixmap; +class TQPaintEvent; +class TQPixmap; namespace KIPICalendarPlugin { class CalPainter; -class CalWidget : public QWidget +class CalWidget : public TQWidget { public: - CalWidget(QWidget *parent); + CalWidget(TQWidget *tqparent); ~CalWidget(); void recreate(); protected: - void paintEvent(QPaintEvent *e); + void paintEvent(TQPaintEvent *e); private: CalPainter *calPainter_; - QPixmap *pix_; + TQPixmap *pix_; }; diff --git a/kipi-plugins/calendar/calwizard.cpp b/kipi-plugins/calendar/calwizard.cpp index 1f02b6f..d0b20c7 100644 --- a/kipi-plugins/calendar/calwizard.cpp +++ b/kipi-plugins/calendar/calwizard.cpp @@ -21,19 +21,19 @@ * * ============================================================ */ -// Qt includes. - -#include <qlabel.h> -#include <qdatetime.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qpainter.h> -#include <qprogressbar.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qframe.h> -#include <qpixmap.h> -#include <qvbox.h> +// TQt includes. + +#include <tqlabel.h> +#include <tqdatetime.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqpainter.h> +#include <tqprogressbar.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqframe.h> +#include <tqpixmap.h> +#include <tqvbox.h> // KDE includes. @@ -68,8 +68,8 @@ namespace KIPICalendarPlugin { -CalWizard::CalWizard( KIPI::Interface* interface, QWidget *parent ) - : KWizard(parent, 0, false, Qt::WDestructiveClose), +CalWizard::CalWizard( KIPI::Interface* interface, TQWidget *tqparent ) + : KWizard(tqparent, 0, false, TQt::WDestructiveClose), interface_( interface ) { cSettings_ = new CalSettings(); @@ -94,9 +94,9 @@ CalWizard::CalWizard( KIPI::Interface* interface, QWidget *parent ) // --------------------------------------------------------------- - wPrint_ = new QVBox(this, "wPrint"); + wPrint_ = new TQVBox(this, "wPrint"); - wPrintLabel_ = new QLabel(wPrint_, "wPrint"); + wPrintLabel_ = new TQLabel(wPrint_, "wPrint"); wPrintLabel_->setIndent(20); wPrint_->setStretchFactor(wPrintLabel_, 2); @@ -106,24 +106,24 @@ CalWizard::CalWizard( KIPI::Interface* interface, QWidget *parent ) // --------------------------------------------------------------- - wFinish_ = new QWidget(this, "wFinish"); + wFinish_ = new TQWidget(this, "wFinish"); - QVBoxLayout *wFinishLayout = new QVBoxLayout(wFinish_, 6, 11); + TQVBoxLayout *wFinishLayout = new TQVBoxLayout(wFinish_, 6, 11); - wFinishLabel_ = new QLabel(wFinish_); + wFinishLabel_ = new TQLabel(wFinish_); wFinishLayout->addWidget(wFinishLabel_); - QHBoxLayout *hboxlayout = new QHBoxLayout(0, 5, 5); - hboxlayout->addWidget(new QLabel(i18n("Current Page"), wFinish_)); - wFinishProgressCurrent_ = new QProgressBar(wFinish_); - hboxlayout->addWidget(wFinishProgressCurrent_); - wFinishLayout->addLayout(hboxlayout); + TQHBoxLayout *hboxtqlayout = new TQHBoxLayout(0, 5, 5); + hboxtqlayout->addWidget(new TQLabel(i18n("Current Page"), wFinish_)); + wFinishProgressCurrent_ = new TQProgressBar(wFinish_); + hboxtqlayout->addWidget(wFinishProgressCurrent_); + wFinishLayout->addLayout(hboxtqlayout); - hboxlayout = new QHBoxLayout(0, 5, 5); - hboxlayout->addWidget(new QLabel(i18n("Total Pages"), wFinish_)); - wFinishProgressTotal_ = new QProgressBar(wFinish_); - hboxlayout->addWidget(wFinishProgressTotal_); - wFinishLayout->addLayout(hboxlayout); + hboxtqlayout = new TQHBoxLayout(0, 5, 5); + hboxtqlayout->addWidget(new TQLabel(i18n("Total Pages"), wFinish_)); + wFinishProgressTotal_ = new TQProgressBar(wFinish_); + hboxtqlayout->addWidget(wFinishProgressTotal_); + wFinishLayout->addLayout(hboxtqlayout); wFinishLayout->addStretch(); @@ -149,7 +149,7 @@ CalWizard::CalWizard( KIPI::Interface* interface, QWidget *parent ) m_helpButton = helpButton(); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); // ------------------------------------------ @@ -159,8 +159,8 @@ CalWizard::CalWizard( KIPI::Interface* interface, QWidget *parent ) formatter_ = new CalFormatter(); - connect(this, SIGNAL(selected(const QString&)), - SLOT(slotPageSelected(const QString&))); + connect(this, TQT_SIGNAL(selected(const TQString&)), + TQT_SLOT(slotPageSelected(const TQString&))); setCaption(i18n("Create Calendar")); } @@ -183,7 +183,7 @@ void CalWizard::slotHelp() KApplication::kApplication()->invokeHelp("calendar", "kipi-plugins"); } -void CalWizard::slotPageSelected(const QString&) +void CalWizard::slotPageSelected(const TQString&) { if (currentPage() == wPrint_) { @@ -193,9 +193,9 @@ void CalWizard::slotPageSelected(const QString&) monthNumbers_.clear(); monthImages_.clear(); KURL image; - QString month; - QStringList printList; - QDate d; + TQString month; + TQStringList printList; + TQDate d; KGlobal::locale()->calendar()->setYMD(d, cSettings_->getYear(), 1, 1); for (int i=1; i<=KGlobal::locale()->calendar()->monthsInYear(d); i++) { #if KDE_IS_VERSION(3,2,0) @@ -212,27 +212,27 @@ void CalWizard::slotPageSelected(const QString&) } if (!monthNumbers_.empty()) { - QString year = QString::number(cSettings_->getYear()); + TQString year = TQString::number(cSettings_->getYear()); - QString extra; - if ((KGlobal::locale()->calendar()->month(QDate::currentDate()) >= 6 && - KGlobal::locale()->calendar()->year(QDate::currentDate()) == cSettings_->getYear()) || - KGlobal::locale()->calendar()->year(QDate::currentDate()) > cSettings_->getYear()) + TQString extra; + if ((KGlobal::locale()->calendar()->month(TQDate::tqcurrentDate()) >= 6 && + KGlobal::locale()->calendar()->year(TQDate::tqcurrentDate()) == cSettings_->getYear()) || + KGlobal::locale()->calendar()->year(TQDate::tqcurrentDate()) > cSettings_->getYear()) extra = "<br><br><b>"+i18n("Please note that you are making a " "calendar for<br>the current year or a year in the " "past.")+"</b>"; KApplication::startServiceByName("KJobViewer"); - QString extra2 = i18n("<br><br>You can see KJobViewer is already started. " + TQString extra2 = i18n("<br><br>You can see KJobViewer is already started. " "After the plugin has prepared the calendar, it is passed to " "the PDF printer. In the KJobViewer you can see the progress " "of that part of the generation of the calendar."); wPrintLabel_->setText(i18n("Click Next to start Printing<br><br>" - "Following months will be printed for year %1:").arg(year) - + QString("<br>") + "Following months will be printed for year %1:").tqarg(year) + + TQString("<br>") + printList.join(" - ") + extra + extra2); - wPrintLabel_->setTextFormat(Qt::RichText); + wPrintLabel_->setTextFormat(TQt::RichText); setNextEnabled(wPrint_, true); } @@ -261,11 +261,11 @@ void CalWizard::slotPageSelected(const QString&) #endif // TODO: Let user choose resolutions - //, QPrinter::HighResolution); + //, TQPrinter::HighResolution); CalParams& params = cSettings_->calParams; - // Orientation + // Qt::Orientation switch (params.imgPos) { case(CalParams::Top): { printer_->setOrientation(KPrinter::Portrait); @@ -282,7 +282,7 @@ void CalWizard::slotPageSelected(const QString&) // Start printing -------------------------------------------- - painter_ = new QPainter(printer_); + painter_ = new TQPainter(printer_); totPages_ = monthImages_.count(); currPage_ = -1; formatter_->init(cSettings_->getYear(), wEvents_->ohFileEdit->text(), wEvents_->fhFileEdit->text()); @@ -316,16 +316,16 @@ void CalWizard::slotPrintOnePage() monthNumbers_.pop_front(); monthImages_.pop_front(); - QString yearName = QString::number(cSettings_->getYear()); + TQString yearName = TQString::number(cSettings_->getYear()); #if KDE_IS_VERSION(3,2,0) wFinishLabel_->setText(i18n("Printing Calendar Page for %1 of %2") - .arg(KGlobal::locale()->calendar()->monthName(month, cSettings_->getYear(), false)) - .arg(yearName)); + .tqarg(KGlobal::locale()->calendar()->monthName(month, cSettings_->getYear(), false)) + .tqarg(yearName)); #else wFinishLabel_->setText(i18n("Printing Calendar Page for %1 of %2") - .arg(KGlobal::locale()->monthName(month)). - .arg(yearName)); + .tqarg(KGlobal::locale()->monthName(month)). + .tqarg(yearName)); #endif currPage_++; @@ -335,13 +335,13 @@ void CalWizard::slotPrintOnePage() int angle = interface_->info( image ).angle(); - cb_ = new CalBlockPainter(this, cSettings_->getYear(), month, + cb_ = new CalBlockPainter(TQT_TQOBJECT(this), cSettings_->getYear(), month, image, angle, formatter_, painter_); - connect(cb_, SIGNAL(signalCompleted()), - SLOT(slotPrintOnePage())); - connect(cb_, SIGNAL(signalProgress(int,int)), - wFinishProgressCurrent_, SLOT(setProgress(int,int))); + connect(cb_, TQT_SIGNAL(signalCompleted()), + TQT_SLOT(slotPrintOnePage())); + connect(cb_, TQT_SIGNAL(signalProgress(int,int)), + wFinishProgressCurrent_, TQT_SLOT(setProgress(int,int))); } } // NameSpace KIPICalendarPlugin diff --git a/kipi-plugins/calendar/calwizard.h b/kipi-plugins/calendar/calwizard.h index 439292a..5de9bca 100644 --- a/kipi-plugins/calendar/calwizard.h +++ b/kipi-plugins/calendar/calwizard.h @@ -22,10 +22,10 @@ #ifndef CALWIZARD_H #define CALWIZARD_H -// Qt includes. +// TQt includes. -#include <qstringlist.h> -#include <qguardedptr.h> +#include <tqstringlist.h> +#include <tqguardedptr.h> // KDE includes. @@ -39,11 +39,11 @@ #include "kpaboutdata.h" -class QLabel; -class QVBox; -class QPainter; -class QProgressBar; -class QPushButton; +class TQLabel; +class TQVBox; +class TQPainter; +class TQProgressBar; +class TQPushButton; class KPrinter; @@ -60,10 +60,11 @@ class CalBlockPainter; class CalWizard : public KWizard { Q_OBJECT + TQ_OBJECT public: - CalWizard( KIPI::Interface* interface, QWidget *parent=0L ); + CalWizard( KIPI::Interface* interface, TQWidget *tqparent=0L ); ~CalWizard(); private: @@ -72,32 +73,32 @@ private: CalTemplate *wTemplate_; CalSelect *wSelect_; CalEvents *wEvents_; - QVBox *wPrint_; - QLabel *wPrintLabel_; - QWidget *wFinish_; - QLabel *wFinishLabel_; - QProgressBar *wFinishProgressTotal_; - QProgressBar *wFinishProgressCurrent_; - - QPushButton *m_helpButton; + TQVBox *wPrint_; + TQLabel *wPrintLabel_; + TQWidget *wFinish_; + TQLabel *wFinishLabel_; + TQProgressBar *wFinishProgressTotal_; + TQProgressBar *wFinishProgressCurrent_; + + TQPushButton *m_helpButton; KPrinter *printer_; - QPainter *painter_; + TQPainter *painter_; CalFormatter *formatter_; - QValueList<int> monthNumbers_; + TQValueList<int> monthNumbers_; KURL::List monthImages_; int totPages_; int currPage_; - QGuardedPtr<CalBlockPainter> cb_; + TQGuardedPtr<CalBlockPainter> cb_; KIPI::Interface* interface_; KIPIPlugins::KPAboutData *m_about; private slots: - void slotPageSelected(const QString& name); + void slotPageSelected(const TQString& name); void slotPrintOnePage(); void slotHelp(); }; diff --git a/kipi-plugins/calendar/monthwidget.cpp b/kipi-plugins/calendar/monthwidget.cpp index abe2c87..411affe 100644 --- a/kipi-plugins/calendar/monthwidget.cpp +++ b/kipi-plugins/calendar/monthwidget.cpp @@ -21,15 +21,15 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qdatetime.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qevent.h> -#include <qdragobject.h> -#include <qstrlist.h> -#include <qimage.h> +#include <tqdatetime.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqevent.h> +#include <tqdragobject.h> +#include <tqstrlist.h> +#include <tqimage.h> // KDE includes. @@ -59,17 +59,17 @@ namespace KIPICalendarPlugin { -MonthWidget::MonthWidget( KIPI::Interface* interface, QWidget *parent, int month) - : QFrame(parent), interface_( interface ) +MonthWidget::MonthWidget( KIPI::Interface* interface, TQWidget *tqparent, int month) + : TQFrame(tqparent), interface_( interface ) { setAcceptDrops(true); month_ = month; - imagePath_ = QString(""); - pixmap_ = new QPixmap(SmallIcon("file_broken", + imagePath_ = TQString(""); + pixmap_ = new TQPixmap(SmallIcon("file_broken", KIcon::SizeMedium, KIcon::DisabledState)); - setFixedSize(QSize(70,90)); - setFrameStyle(QFrame::Panel|QFrame::Raised); + setFixedSize(TQSize(70,90)); + setFrameStyle(TQFrame::Panel|TQFrame::Raised); } MonthWidget::~MonthWidget() @@ -82,16 +82,16 @@ KURL MonthWidget::imagePath() return imagePath_; } -void MonthWidget::drawContents(QPainter *p) +void MonthWidget::drawContents(TQPainter *p) { #if KDE_IS_VERSION(3,2,0) - QString name = KGlobal::locale()->calendar()->monthName(month_, CalSettings::instance()->getYear(), true); + TQString name = KGlobal::locale()->calendar()->monthName(month_, CalSettings::instance()->getYear(), true); #else - QString name = KGlobal::locale()->monthName(month_, true); + TQString name = KGlobal::locale()->monthName(month_, true); #endif - QRect cr; + TQRect cr; cr = contentsRect(); cr.setBottom(70); @@ -101,12 +101,12 @@ void MonthWidget::drawContents(QPainter *p) cr = contentsRect(); cr.setTop(70); - p->drawText(cr,Qt::AlignHCenter,name); + p->drawText(cr,TQt::AlignHCenter,name); } -void MonthWidget::dragEnterEvent(QDragEnterEvent* event) +void MonthWidget::dragEnterEvent(TQDragEnterEvent* event) { - event->accept(QUriDrag::canDecode(event)); + event->accept(TQUriDrag::canDecode(event)); } void MonthWidget::setImage( const KURL &url ) @@ -115,7 +115,7 @@ void MonthWidget::setImage( const KURL &url ) return; // check if the file is an image - if ( ! QImageIO::imageFormat( url.path() ) ) + if ( ! TQImageIO::imageFormat( url.path() ) ) { kdWarning( 51001 ) << "Unknown image format for: " << url.prettyURL() << endl; @@ -126,10 +126,10 @@ void MonthWidget::setImage( const KURL &url ) CalSettings::instance()->setImage(month_, imagePath_); KIconLoader* iconLoader = KApplication::kApplication()->iconLoader(); - QPixmap pix = iconLoader->loadIcon("image", KIcon::NoGroup, 64 ); + TQPixmap pix = iconLoader->loadIcon("image", KIcon::NoGroup, 64 ); if ( pixmap_ ) delete pixmap_; - pixmap_ = new QPixmap( pix ); + pixmap_ = new TQPixmap( pix ); update(); KURL::List urls; @@ -137,11 +137,11 @@ void MonthWidget::setImage( const KURL &url ) KIO::PreviewJob* thumbJob_ = KIO::filePreview( urls,64); - connect(thumbJob_, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), - SLOT(slotGotThumbnaiL(const KFileItem*, const QPixmap&))); + connect(thumbJob_, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), + TQT_SLOT(slotGotThumbnaiL(const KFileItem*, const TQPixmap&))); } -void MonthWidget::dropEvent(QDropEvent* event) +void MonthWidget::dropEvent(TQDropEvent* event) { KURL::List srcURLs; if ( !KURLDrag::decode(event, srcURLs) ) @@ -154,25 +154,25 @@ void MonthWidget::dropEvent(QDropEvent* event) setImage( url ); } -void MonthWidget::slotGotThumbnaiL(const KFileItem* , const QPixmap& pix) +void MonthWidget::slotGotThumbnaiL(const KFileItem* , const TQPixmap& pix) { if ( pixmap_ ) delete pixmap_; - QPixmap image = pix; + TQPixmap image = pix; int angle = interface_->info( imagePath_ ).angle(); if ( angle != 0 ) { - QWMatrix matrix; + TQWMatrix matrix; matrix.rotate( angle ); image = image.xForm( matrix ); } - pixmap_ = new QPixmap(image); + pixmap_ = new TQPixmap(image); update(); } -void MonthWidget::mouseReleaseEvent(QMouseEvent* e) +void MonthWidget::mouseReleaseEvent(TQMouseEvent* e) { - if (!contentsRect().contains(e->pos())) return; + if (!contentsRect().tqcontains(e->pos())) return; if (e->button() == Qt::LeftButton) { @@ -180,10 +180,10 @@ void MonthWidget::mouseReleaseEvent(QMouseEvent* e) setImage(url); } else if (e->button() == Qt::RightButton) { - imagePath_ = QString(""); + imagePath_ = TQString(""); CalSettings::instance()->setImage(month_,imagePath_); delete pixmap_; - pixmap_ = new QPixmap(SmallIcon("file_broken", + pixmap_ = new TQPixmap(SmallIcon("file_broken", KIcon::SizeMedium, KIcon::DisabledState)); update(); diff --git a/kipi-plugins/calendar/monthwidget.h b/kipi-plugins/calendar/monthwidget.h index 1a79d24..5a6d475 100644 --- a/kipi-plugins/calendar/monthwidget.h +++ b/kipi-plugins/calendar/monthwidget.h @@ -22,19 +22,19 @@ #ifndef MONTHWIDGET_H #define MONTHWIDGET_H -// Qt includes. +// TQt includes. -#include <qframe.h> +#include <tqframe.h> // LibKipi includes #include <libkipi/interface.h> -class QPainter; -class QPixmap; -class QDragEnterEvent; -class QDropEvent; -class QMouseEvent; +class TQPainter; +class TQPixmap; +class TQDragEnterEvent; +class TQDropEvent; +class TQMouseEvent; class KURL; class KFileItem; @@ -42,13 +42,14 @@ class KFileItem; namespace KIPICalendarPlugin { -class MonthWidget : public QFrame +class MonthWidget : public TQFrame { Q_OBJECT + TQ_OBJECT public: - MonthWidget( KIPI::Interface* interface, QWidget *parent, int month); + MonthWidget( KIPI::Interface* interface, TQWidget *tqparent, int month); ~MonthWidget(); KURL imagePath(); @@ -56,20 +57,20 @@ public: protected: - void drawContents(QPainter *p); - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - void mouseReleaseEvent(QMouseEvent* e); + void drawContents(TQPainter *p); + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); + void mouseReleaseEvent(TQMouseEvent* e); private: int month_; KURL imagePath_; - QPixmap *pixmap_; + TQPixmap *pixmap_; KIPI::Interface* interface_; private slots: - void slotGotThumbnaiL(const KFileItem* url, const QPixmap& pix); + void slotGotThumbnaiL(const KFileItem* url, const TQPixmap& pix); }; } // NameSpace KIPICalendarPlugin diff --git a/kipi-plugins/calendar/plugin_calendar.cpp b/kipi-plugins/calendar/plugin_calendar.cpp index 8ca7113..30311c7 100644 --- a/kipi-plugins/calendar/plugin_calendar.cpp +++ b/kipi-plugins/calendar/plugin_calendar.cpp @@ -19,10 +19,10 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qprogressdialog.h> -#include <qtimer.h> +#include <tqprogressdialog.h> +#include <tqtimer.h> // KDE includes. @@ -45,15 +45,15 @@ typedef KGenericFactory<Plugin_Calendar> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_calendar, Factory("kipiplugin_calendar")) -Plugin_Calendar::Plugin_Calendar(QObject *parent, +Plugin_Calendar::Plugin_Calendar(TQObject *tqparent, const char*, - const QStringList &) - : KIPI::Plugin(Factory::instance(), parent, "Calendar") + const TQStringList &) + : KIPI::Plugin(Factory::instance(), tqparent, "Calendar") { kdDebug( 51001 ) << "Loaded Plugin_Calendar" << endl; } -void Plugin_Calendar::setup( QWidget* widget ) +void Plugin_Calendar::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -61,7 +61,7 @@ void Plugin_Calendar::setup( QWidget* widget ) "date", 0, this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "calendar"); @@ -74,7 +74,7 @@ Plugin_Calendar::~Plugin_Calendar() void Plugin_Calendar::slotActivate() { - KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( parent() ); + KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( tqparent() ); if ( !interface ) { @@ -82,7 +82,7 @@ void Plugin_Calendar::slotActivate() return; } - KIPICalendarPlugin::CalWizard* w = new KIPICalendarPlugin::CalWizard( interface, kapp->activeWindow() ); + KIPICalendarPlugin::CalWizard* w = new KIPICalendarPlugin::CalWizard( interface, TQT_TQWIDGET(kapp->activeWindow()) ); w->show(); } diff --git a/kipi-plugins/calendar/plugin_calendar.h b/kipi-plugins/calendar/plugin_calendar.h index e11abae..d70f7aa 100644 --- a/kipi-plugins/calendar/plugin_calendar.h +++ b/kipi-plugins/calendar/plugin_calendar.h @@ -26,23 +26,24 @@ #include <libkipi/plugin.h> -class QProgressDialog; -class QTimer; +class TQProgressDialog; +class TQTimer; class KAction; class Plugin_Calendar : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_Calendar(QObject *parent, + Plugin_Calendar(TQObject *tqparent, const char* name, - const QStringList &args); + const TQStringList &args); ~Plugin_Calendar(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); private: diff --git a/kipi-plugins/cdarchiving/actions.h b/kipi-plugins/cdarchiving/actions.h index bf00289..77cd39e 100644 --- a/kipi-plugins/cdarchiving/actions.h +++ b/kipi-plugins/cdarchiving/actions.h @@ -51,9 +51,9 @@ public: Action action; - QString albumName; - QString fileName; - QString message; + TQString albumName; + TQString fileName; + TQString message; bool starting; bool success; diff --git a/kipi-plugins/cdarchiving/cdarchiving.cpp b/kipi-plugins/cdarchiving/cdarchiving.cpp index 1d93aad..5e2d8d7 100644 --- a/kipi-plugins/cdarchiving/cdarchiving.cpp +++ b/kipi-plugins/cdarchiving/cdarchiving.cpp @@ -29,16 +29,16 @@ extern "C" #include <sys/types.h> } -// Include files for Qt +// Include files for TQt -#include <qfile.h> -#include <qfileinfo.h> -#include <qfont.h> -#include <qimage.h> -#include <qregexp.h> -#include <qtextcodec.h> -#include <qtextstream.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqfont.h> +#include <tqimage.h> +#include <tqregexp.h> +#include <tqtextcodec.h> +#include <tqtextstream.h> +#include <tqtimer.h> // Include files for KDE @@ -69,12 +69,12 @@ extern "C" namespace KIPICDArchivingPlugin { -CDArchiving::CDArchiving( KIPI::Interface* interface, QObject *parent, KAction *action_cdarchiving ) - : QObject(parent) +CDArchiving::CDArchiving( KIPI::Interface* interface, TQObject *tqparent, KAction *action_cdarchiving ) + : TQObject(tqparent) { KImageIO::registerFormats(); const KAboutData *data = KApplication::kApplication()->aboutData(); - m_hostName = QString::QString( data->appName() ); + m_hostName = TQString::TQString( data->appName() ); m_hostURL = data->homepage(); @@ -86,7 +86,7 @@ CDArchiving::CDArchiving( KIPI::Interface* interface, QObject *parent, KAction * m_actionCDArchiving = action_cdarchiving; m_interface = interface; - m_parent = parent; + m_parent = tqparent; } @@ -164,14 +164,14 @@ void CDArchiving::readSettings(void) m_configDlg->setImagesPerRow( config.readEntry("ImagesPerRow", "4").toInt() ); m_configDlg->setFontName( config.readEntry("FontName", "Helvetica") ); m_configDlg->setFontSize( config.readEntry("FontSize", "14").toInt() ); - QColor ColorFont( 208, 255, 208 ); + TQColor ColorFont( 208, 255, 208 ); m_configDlg->setForegroundColor( config.readColorEntry("FontColor", &ColorFont)); - QColor ColorBackground( 51, 51, 51 ); + TQColor ColorBackground( 51, 51, 51 ); m_configDlg->setBackgroundColor( config.readColorEntry("BackgroundColor", &ColorBackground)); m_configDlg->setThumbnailsSize( config.readEntry("ThumbnailsSize", "140").toInt() ); m_configDlg->setImageFormat( config.readEntry("ThumbnailsFormat", "JPEG") ); m_configDlg->setBordersImagesSize( config.readEntry("BordersImagesSize", "1").toInt() ); - QColor ColorBordersImages( 208, 255, 208 ); + TQColor ColorBordersImages( 208, 255, 208 ); m_configDlg->setBordersImagesColor( config.readColorEntry("BordersImagesColor", &ColorBordersImages)); // CD Informations setup tab @@ -202,17 +202,17 @@ void CDArchiving::readSettings(void) bool CDArchiving::showDialog() { KStandardDirs dir; - m_tmpFolder = dir.saveLocation("tmp", "kipi-cdarchivingplugin-" + QString::number(getpid()) + "/"); + m_tmpFolder = dir.saveLocation("tmp", "kipi-cdarchivingplugin-" + TQString::number(getpid()) + "/"); m_HTMLInterfaceFolder = ""; m_HTMLInterfaceIndex = ""; m_HTMLInterfaceAutoRunInf = ""; m_HTMLInterfaceAutoRunFolder = ""; - m_configDlg = new CDArchivingDialog( m_interface, kapp->activeWindow() ); + m_configDlg = new CDArchivingDialog( m_interface, TQT_TQWIDGET(kapp->activeWindow()) ); readSettings(); - if ( m_configDlg->exec() == QDialog::Accepted ) + if ( m_configDlg->exec() == TQDialog::Accepted ) { writeSettings(); return true; @@ -225,7 +225,7 @@ bool CDArchiving::showDialog() bool CDArchiving::prepare(void) { - QValueList<KIPI::ImageCollection> albumsList; + TQValueList<KIPI::ImageCollection> albumsList; KIPICDArchivingPlugin::EventData *d; m_cancelled = false; @@ -267,7 +267,7 @@ bool CDArchiving::prepare(void) if ( m_useHTMLInterface == true ) { - QValueList<KIPI::ImageCollection>::Iterator it; + TQValueList<KIPI::ImageCollection>::Iterator it; for (it = albumsList.begin(); it != albumsList.end(); ++it) { KIPI::ImageCollection col = (KIPI::ImageCollection)(*it); @@ -284,7 +284,7 @@ bool CDArchiving::prepare(void) d->starting = true; d->success = false; d->total = nbActions; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); return(true); @@ -314,13 +314,13 @@ void CDArchiving::run() d->action = KIPICDArchivingPlugin::BuildHTMLiface; d->starting = true; d->success = false; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); if ( buildHTMLInterface() == true ) { m_HTMLInterfaceFolder = m_tmpFolder + "/HTMLInterface"; - QString dir; + TQString dir; KGlobal::dirs()->addResourceType("kipi_autorun", KGlobal::dirs()->kde_default("data") + "kipi/data"); dir = KGlobal::dirs()->findResourceDir("kipi_autorun", "index.htm"); @@ -330,7 +330,7 @@ void CDArchiving::run() d->action = KIPICDArchivingPlugin::BuildHTMLiface; d->success = true; d->starting = false; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); // Making AutoRun options. @@ -341,7 +341,7 @@ void CDArchiving::run() d->action = KIPICDArchivingPlugin::BuildAutoRuniface; d->starting = true; d->success = false; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); CreateAutoRunInfFile(); @@ -352,7 +352,7 @@ void CDArchiving::run() d->action = KIPICDArchivingPlugin::BuildAutoRuniface; d->starting = false; d->success = true; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); } } @@ -364,7 +364,7 @@ void CDArchiving::run() d->action = KIPICDArchivingPlugin::BuildK3bProject; d->starting = true; d->success = false; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); if ( BuildK3bXMLprojectfile(m_HTMLInterfaceFolder, m_HTMLInterfaceIndex, @@ -374,7 +374,7 @@ void CDArchiving::run() d->action = KIPICDArchivingPlugin::BuildK3bProject; d->starting = false; d->success = false; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); return; } @@ -384,7 +384,7 @@ void CDArchiving::run() d->action = KIPICDArchivingPlugin::BuildK3bProject; d->starting = false; d->success = true; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); } } @@ -401,13 +401,13 @@ void CDArchiving::invokeK3b() *m_Proc << m_K3bBinPathName << m_K3bParameters; *m_Proc << m_tmpFolder + "/KIPICDArchiving.xml"; - QString K3bCommandLine = m_K3bBinPathName + " " + + TQString K3bCommandLine = m_K3bBinPathName + " " + m_K3bParameters + " " + m_tmpFolder + "/KIPICDArchiving.xml"; kdDebug(51000) << "K3b is started : " << K3bCommandLine.ascii() << endl; - connect(m_Proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotK3bDone(KProcess*))); + connect(m_Proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotK3bDone(KProcess*))); if ( !m_Proc->start(KProcess::NotifyOnExit, KProcess::All ) ) { @@ -416,7 +416,7 @@ void CDArchiving::invokeK3b() d->starting = false; d->success = false; d->message = i18n("Cannot start K3b program : fork failed."); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); return; } @@ -425,8 +425,8 @@ void CDArchiving::invokeK3b() if ( m_useStartBurningProcess == true ) { - QTimer::singleShot(10000, - this, SLOT(slotK3bStartBurningProcess())); + TQTimer::singleShot(10000, + this, TQT_SLOT(slotK3bStartBurningProcess())); m_k3bPid = m_Proc->pid(); } } @@ -436,7 +436,7 @@ void CDArchiving::invokeK3b() void CDArchiving::slotK3bStartBurningProcess(void) { - QString temp, cmd; + TQString temp, cmd; temp.setNum(m_k3bPid); cmd = "dcop k3b-" + temp + " K3bProject-0 burn"; @@ -455,7 +455,7 @@ void CDArchiving::slotK3bDone(KProcess*) d->starting = true; d->success = true; d->message = i18n("K3b is done; removing temporary folder...."); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); if (DeleteDir(m_tmpFolder) == false) @@ -464,8 +464,8 @@ void CDArchiving::slotK3bDone(KProcess*) d->action = KIPICDArchivingPlugin::Error; d->starting = false; d->success = false; - d->message = i18n("Cannot remove temporary folder '%1'.").arg(m_tmpFolder); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + d->message = i18n("Cannot remove temporary folder '%1'.").tqarg(m_tmpFolder); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); } @@ -477,14 +477,14 @@ void CDArchiving::slotK3bDone(KProcess*) bool CDArchiving::buildHTMLInterface (void) { - QString Path; + TQString Path; KIPICDArchivingPlugin::EventData *d; KURL MainUrl; // Create the main target folder. - QDir TargetDir; - QString MainTPath= m_tmpFolder + "/HTMLInterface"; + TQDir TargetDir; + TQString MainTPath= m_tmpFolder + "/HTMLInterface"; if (TargetDir.exists (MainTPath) == true) { @@ -494,8 +494,8 @@ bool CDArchiving::buildHTMLInterface (void) d->action = KIPICDArchivingPlugin::Error; d->starting = false; d->success = false; - d->message = i18n("Cannot remove folder '%1'.").arg(MainTPath); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + d->message = i18n("Cannot remove folder '%1'.").tqarg(MainTPath); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); return false; } @@ -507,8 +507,8 @@ bool CDArchiving::buildHTMLInterface (void) d->action = KIPICDArchivingPlugin::Error; d->starting = false; d->success = false; - d->message = i18n("Could not create folder '%1'.").arg(MainTPath); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + d->message = i18n("Could not create folder '%1'.").tqarg(MainTPath); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); return false; } @@ -517,7 +517,7 @@ bool CDArchiving::buildHTMLInterface (void) // Adding go home icon if there is more than KGlobal::dirs()->addResourceType("kipi_data", KGlobal::dirs()->kde_default("data") + "kipi"); - QString dir = KGlobal::dirs()->findResourceDir("kipi_data", "gohome.png"); + TQString dir = KGlobal::dirs()->findResourceDir("kipi_data", "gohome.png"); dir = dir + "gohome.png"; KURL srcURL(dir); KURL destURL( MainTPath + "/gohome.png"); @@ -528,12 +528,12 @@ bool CDArchiving::buildHTMLInterface (void) dir = KGlobal::dirs()->findResourceDir("kipi_data", "up.png"); dir = dir + "up.png"; srcURL = dir; - destURL = MainTPath + QString::fromLatin1("/up.png"); + destURL = MainTPath + TQString::tqfromLatin1("/up.png"); KIO::file_copy(srcURL, destURL, -1, true, false, false); //clear the temporary list for unique names m_collection_name_list.clear(); - for (QValueList<KIPI::ImageCollection>::iterator it = m_albumsList.begin(); + for (TQValueList<KIPI::ImageCollection>::iterator it = m_albumsList.begin(); it != m_albumsList.end(); ++it) { KIPI::ImageCollection album = *it; @@ -541,14 +541,14 @@ bool CDArchiving::buildHTMLInterface (void) m_AlbumTitle = makeFileNameUnique(m_collection_name_list, webifyFileName(album.name())); //webifyFileName(album.name()); m_AlbumComments = m_interface->hasFeature(KIPI::AlbumsHaveComments) ? - album.comment() : QString(); + album.comment() : TQString(); m_AlbumCollection = m_interface->hasFeature(KIPI::AlbumsHaveCategory) ? - album.category() : QString(); + album.category() : TQString(); m_AlbumDate = m_interface->hasFeature(KIPI::AlbumsHaveCreationDate) ? - album.date().toString() : QString(); + album.date().toString() : TQString(); // Create the target sub folder for the current album. - QString SubTPath = m_tmpFolder + "/HTMLInterface/" + m_AlbumTitle; + TQString SubTPath = m_tmpFolder + "/HTMLInterface/" + m_AlbumTitle; KURL SubURL = SubTPath + "/index.htm"; if (TargetDir.mkdir( SubTPath ) == false) { @@ -556,8 +556,8 @@ bool CDArchiving::buildHTMLInterface (void) d->action = KIPICDArchivingPlugin::Error; d->starting = false; d->success = false; - d->message = i18n("Could not create folder '%1'.").arg(SubTPath); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + d->message = i18n("Could not create folder '%1'.").tqarg(SubTPath); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); return false; } @@ -567,7 +567,7 @@ bool CDArchiving::buildHTMLInterface (void) d->starting = true; d->success = false; d->albumName = m_AlbumTitle; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); if ( createHtml( album, SubURL, m_imageFormat ) == false) @@ -577,7 +577,7 @@ bool CDArchiving::buildHTMLInterface (void) d->starting = false; d->success = false; d->albumName = m_AlbumTitle; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); if (DeleteDir (MainTPath) == false) @@ -586,8 +586,8 @@ bool CDArchiving::buildHTMLInterface (void) d->action = KIPICDArchivingPlugin::Error; d->starting = false; d->success = false; - d->message = i18n("Cannot remove folder '%1'.").arg(MainTPath); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + d->message = i18n("Cannot remove folder '%1'.").tqarg(MainTPath); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); return false; } @@ -600,19 +600,19 @@ bool CDArchiving::buildHTMLInterface (void) d->starting = false; d->success = true; d->albumName = m_AlbumTitle; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); } // Create the main interface HTML page. MainUrl = m_tmpFolder + "/HTMLInterface/" + "index.htm"; - QFile MainPageFile( MainUrl.path() ); + TQFile MainPageFile( MainUrl.path() ); if ( MainPageFile.open(IO_WriteOnly) ) { - QTextStream stream(&MainPageFile); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&MainPageFile); + stream.setEncoding(TQTextStream::UnicodeUTF8); createHead(stream); createBodyMainPage(stream, MainUrl); MainPageFile.close(); @@ -623,8 +623,8 @@ bool CDArchiving::buildHTMLInterface (void) d->action = KIPICDArchivingPlugin::Error; d->starting = false; d->success = false; - d->message = i18n("Could not open file '%1'.").arg(MainUrl.path(+1)); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + d->message = i18n("Could not open file '%1'.").tqarg(MainUrl.path(+1)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); return false; } @@ -635,7 +635,7 @@ bool CDArchiving::buildHTMLInterface (void) ///////////////////////////////////////////////////////////////////////////////////////////////////// -bool CDArchiving::createDirectory(QDir thumb_dir, QString imgGalleryDir, QString dirName) +bool CDArchiving::createDirectory(TQDir thumb_dir, TQString imgGalleryDir, TQString dirName) { if (!thumb_dir.exists()) @@ -649,8 +649,8 @@ bool CDArchiving::createDirectory(QDir thumb_dir, QString imgGalleryDir, QString d->starting = false; d->success = false; d->message = i18n("Could not create folder '%1' in '%2'.") - .arg(dirName).arg(imgGalleryDir); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + .tqarg(dirName).tqarg(imgGalleryDir); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); return false; } @@ -667,9 +667,9 @@ bool CDArchiving::createDirectory(QDir thumb_dir, QString imgGalleryDir, QString ///////////////////////////////////////////////////////////////////////////////////////////////////// -void CDArchiving::createHead(QTextStream& stream) +void CDArchiving::createHead(TQTextStream& stream) { - QString chsetName = QTextCodec::codecForLocale()->mimeName(); + TQString chsetName = TQTextCodec::codecForLocale()->mimeName(); stream << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">" << endl; @@ -678,7 +678,7 @@ void CDArchiving::createHead(QTextStream& stream) stream << "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">" << endl; stream << "<meta name=\"Generator\" content=\"Albums HTML interface for CD archiving generated by " << m_hostName << " [" << m_hostURL << "]\">" << endl; - stream << "<meta name=\"date\" content=\"" + KGlobal::locale()->formatDate(QDate::currentDate()) + stream << "<meta name=\"date\" content=\"" + KGlobal::locale()->formatDate(TQDate::tqcurrentDate()) + "\">" << endl; stream << "<title>" << m_mainTitle << "</title>" << endl; createCSSSection(stream); @@ -688,11 +688,11 @@ void CDArchiving::createHead(QTextStream& stream) ///////////////////////////////////////////////////////////////////////////////////////////////////// -void CDArchiving::createCSSSection(QTextStream& stream) +void CDArchiving::createCSSSection(TQTextStream& stream) { - QString backgroundColor = m_backgroundColor.name(); - QString foregroundColor = m_foregroundColor.name(); - QString bordersImagesColor = m_bordersImagesColor.name(); + TQString backgroundColor = m_backgroundColor.name(); + TQString foregroundColor = m_foregroundColor.name(); + TQString bordersImagesColor = m_bordersImagesColor.name(); // Adding a touch of style @@ -712,7 +712,7 @@ void CDArchiving::createCSSSection(QTextStream& stream) ///////////////////////////////////////////////////////////////////////////////////////////////////// -QString CDArchiving::extension(const QString& imageFormat) +TQString CDArchiving::extension(const TQString& imageFormat) { if (imageFormat == "PNG") return ".png"; @@ -727,16 +727,16 @@ QString CDArchiving::extension(const QString& imageFormat) ///////////////////////////////////////////////////////////////////////////////////////////////////// -void CDArchiving::createBody(QTextStream& stream, +void CDArchiving::createBody(TQTextStream& stream, const KIPI::ImageCollection& album, const KURL& targetURL, - const QString& imageFormat) + const TQString& imageFormat) { KURL::List images = album.images(); int numOfImages = images.count(); - const QString imgGalleryDir = targetURL.directory(); - const QString today(KGlobal::locale()->formatDate(QDate::currentDate())); + const TQString imgGalleryDir = targetURL.directory(); + const TQString today(KGlobal::locale()->formatDate(TQDate::tqcurrentDate())); stream << "<body>\n" << endl; @@ -769,7 +769,7 @@ void CDArchiving::createBody(QTextStream& stream, stream << "</td><td align=left>\n" << endl; if (m_interface->hasFeature(KIPI::AlbumsHaveComments)) - stream << EscapeSgmlText(QTextCodec::codecForLocale(), + stream << EscapeSgmlText(TQTextCodec::codecForLocale(), m_AlbumComments, true, true) << "<br>\n" << endl; @@ -791,13 +791,13 @@ void CDArchiving::createBody(QTextStream& stream, EventData* d = 0; // preliminary unique name generation - QStringList fileNameList; + TQStringList fileNameList; for ( KURL::List::iterator urlIt = images.begin() ; !m_cancelled && (urlIt != images.end()); ++urlIt) { - QFileInfo imInfo( (*urlIt).fileName()); - QString imgName = makeFileNameUnique(fileNameList, webifyFileName(imInfo.baseName(TRUE))); + TQFileInfo imInfo( (*urlIt).fileName()); + TQString imgName = makeFileNameUnique(fileNameList, webifyFileName(imInfo.baseName(TRUE))); } for ( KURL::List::iterator urlIt = images.begin() ; !m_cancelled && (urlIt != images.end()); @@ -809,10 +809,10 @@ void CDArchiving::createBody(QTextStream& stream, stream << "<tr>" << endl; } - QString imgName = fileNameList[imgIndex]; - QString imgPath = (*urlIt).path(); - QFileInfo imgInfo(imgPath); - QImage imgProp = QImage(imgPath); + TQString imgName = fileNameList[imgIndex]; + TQString imgPath = (*urlIt).path(); + TQFileInfo imgInfo(imgPath); + TQImage imgProp = TQImage(imgPath); stream << "<td align='center'>\n<a href=\"pages/" << webifyFileName(imgName) << ".htm\">"; @@ -823,7 +823,7 @@ void CDArchiving::createBody(QTextStream& stream, d->starting = true; d->success = false; d->fileName = imgName; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); int valRet = createThumb((*urlIt).fileName(), (*urlIt).directory(), imgName, @@ -831,7 +831,7 @@ void CDArchiving::createBody(QTextStream& stream, if ( valRet != -1 ) { - QString thumbPath("thumbs/" + webifyFileName(imgName) + TQString thumbPath("thumbs/" + webifyFileName(imgName) + extension(imageFormat)); stream << "<img class=\"photo\" src=\"" << thumbPath << "\" width=\"" << m_imgWidth @@ -839,7 +839,7 @@ void CDArchiving::createBody(QTextStream& stream, << "height=\"" << m_imgHeight << "\" alt=\"" << imgPath; - QString sep = "\" title=\""; + TQString sep = "\" title=\""; stream << sep << imgName; sep = ", "; @@ -850,19 +850,19 @@ void CDArchiving::createBody(QTextStream& stream, stream << sep << (imgInfo.size() / 1024) << " " << i18n("KB"); sep = ", "; - QString imgPageComment = m_interface->info(*urlIt).description(); + TQString imgPageComment = m_interface->info(*urlIt).description(); if ( !imgPageComment.isEmpty() ) { stream << sep - << EscapeSgmlText(QTextCodec::codecForLocale(), + << EscapeSgmlText(TQTextCodec::codecForLocale(), imgPageComment, true, true); } stream << "\">" << endl; - QString prevImgName = ""; - QString nextImgName = ""; + TQString prevImgName = ""; + TQString nextImgName = ""; if (imgIndex != 0) prevImgName = images[imgIndex].fileName(); @@ -873,17 +873,17 @@ void CDArchiving::createBody(QTextStream& stream, createPage(imgGalleryDir, (*urlIt), imgName, (imgIndex > 0) ? images[imgIndex-1] : KURL(), - (imgIndex > 0) ? fileNameList[imgIndex-1] : QString(""), + (imgIndex > 0) ? fileNameList[imgIndex-1] : TQString(""), (imgIndex < (int)(images.count()-1)) ? images[imgIndex+1] : KURL(), (imgIndex < (int)(fileNameList.count()-1)) ? - fileNameList[imgIndex+1] : QString(""), + fileNameList[imgIndex+1] : TQString(""), imgPageComment); // For each first image of current Album we add a preview in main HTML page. if ( imgIndex == 0) { - QString Temp, Temp2; + TQString Temp, Temp2; Temp2 = "<a href=\"./" + m_AlbumTitle + "/" + "index.htm" + "\">"; m_StreamMainPageAlbumPreview.append ( Temp2 ); Temp2 = "<img class=\"photo\" src=\"./" + m_AlbumTitle + "/" @@ -911,7 +911,7 @@ void CDArchiving::createBody(QTextStream& stream, d->starting = false; d->success = false; d->fileName = imgName; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); } else @@ -921,7 +921,7 @@ void CDArchiving::createBody(QTextStream& stream, d->starting = false; d->success = true; d->fileName = imgName; - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); } @@ -946,13 +946,13 @@ void CDArchiving::createBody(QTextStream& stream, stream << "</table>\n<hr>\n" << endl; - QString Temp; + TQString Temp; KGlobal::dirs()->addResourceType("kipi_data", KGlobal::dirs()->kde_default("data") + "kipi"); - QString dir = KGlobal::dirs()->findResourceDir("kipi_data", "valid-html401.png"); + TQString dir = KGlobal::dirs()->findResourceDir("kipi_data", "valid-html401.png"); dir = dir + "valid-html401.png"; KURL srcURL(dir); - KURL destURL(imgGalleryDir + QString::fromLatin1("/thumbs/valid-html401.png")); + KURL destURL(imgGalleryDir + TQString::tqfromLatin1("/thumbs/valid-html401.png")); KIO::file_copy(srcURL, destURL, -1, true, false, false); stream << "<p>" << endl; @@ -961,7 +961,7 @@ void CDArchiving::createBody(QTextStream& stream, << "\" height=\"31\" width=\"88\" title=\"" << Temp << "\" />" << endl; Temp = i18n("Album archive created with " - "<a href=\"%1\">%2</a> on %3").arg(m_hostURL).arg(m_hostName).arg(today); + "<a href=\"%1\">%2</a> on %3").tqarg(m_hostURL).tqarg(m_hostName).tqarg(today); stream << Temp << endl; stream << "</p>" << endl; @@ -971,10 +971,10 @@ void CDArchiving::createBody(QTextStream& stream, ///////////////////////////////////////////////////////////////////////////////////////////////////// -void CDArchiving::createBodyMainPage(QTextStream& stream, KURL& url) +void CDArchiving::createBodyMainPage(TQTextStream& stream, KURL& url) { - QString Temp; - const QString today(KGlobal::locale()->formatDate(QDate::currentDate())); + TQString Temp; + const TQString today(KGlobal::locale()->formatDate(TQDate::tqcurrentDate())); Temp = m_mainTitle; stream << "<body>\n<h1>" << Temp << "</h1><p>\n" << endl; @@ -988,11 +988,11 @@ void CDArchiving::createBodyMainPage(QTextStream& stream, KURL& url) stream << "<hr>" << endl; KGlobal::dirs()->addResourceType("kipi_data", KGlobal::dirs()->kde_default("data") + "kipi"); - QString dir = KGlobal::dirs()->findResourceDir("kipi_data", "valid-html401.png"); + TQString dir = KGlobal::dirs()->findResourceDir("kipi_data", "valid-html401.png"); dir = dir + "valid-html401.png"; KURL srcURL(dir); - KURL destURL(url.directory() + QString::fromLatin1("/valid-html401.png")); + KURL destURL(url.directory() + TQString::tqfromLatin1("/valid-html401.png")); KIO::file_copy(srcURL, destURL, -1, true, false, false); stream << "<p>" << endl; @@ -1001,7 +1001,7 @@ void CDArchiving::createBodyMainPage(QTextStream& stream, KURL& url) << Temp << "\" />" << endl; Temp = i18n("Album archive created with " - "<a href=\"%1\">%2</a> on %3").arg(m_hostURL).arg(m_hostName).arg(today); + "<a href=\"%1\">%2</a> on %3").tqarg(m_hostURL).tqarg(m_hostName).tqarg(today); stream << Temp << endl; stream << "</p>" << endl; stream << "</body>\n</html>\n" << endl; @@ -1012,35 +1012,35 @@ void CDArchiving::createBodyMainPage(QTextStream& stream, KURL& url) bool CDArchiving::createHtml( const KIPI::ImageCollection& album, const KURL& targetURL, - const QString& imageFormat ) + const TQString& imageFormat ) { if (m_cancelled) return false; // Sort the images files formats running with thumbnails construction. - const QString imgGalleryDir = targetURL.directory(); + const TQString imgGalleryDir = targetURL.directory(); // Create the "thumbs" subdirectory - QDir thumb_dir( imgGalleryDir + QString::fromLatin1("/thumbs/")); + TQDir thumb_dir( imgGalleryDir + TQString::tqfromLatin1("/thumbs/")); if (createDirectory(thumb_dir, imgGalleryDir, "thumbs") == false) return false; - QDir pages_dir( imgGalleryDir + QString::fromLatin1("/pages/")); + TQDir pages_dir( imgGalleryDir + TQString::tqfromLatin1("/pages/")); if (createDirectory(pages_dir, imgGalleryDir, "pages") == false) return false; // Create HTML page. - QFile file( targetURL.path() ); + TQFile file( targetURL.path() ); if ( file.open(IO_WriteOnly) ) { - QTextStream stream(&file); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&file); + stream.setEncoding(TQTextStream::UnicodeUTF8); createHead(stream); createBody(stream, album, targetURL, imageFormat); file.close(); @@ -1053,8 +1053,8 @@ bool CDArchiving::createHtml( const KIPI::ImageCollection& album, d->action = KIPICDArchivingPlugin::Error; d->starting = false; d->success = false; - d->message = i18n("Could not open file '%1'.").arg(targetURL.path(+1)); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + d->message = i18n("Could not open file '%1'.").tqarg(targetURL.path(+1)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); return false; } @@ -1063,20 +1063,20 @@ bool CDArchiving::createHtml( const KIPI::ImageCollection& album, ///////////////////////////////////////////////////////////////////////////////////////////////////// -bool CDArchiving::createPage(const QString& imgGalleryDir, +bool CDArchiving::createPage(const TQString& imgGalleryDir, const KURL& imgURL, - const QString& uniqueImgName, + const TQString& uniqueImgName, const KURL& prevImgURL, - const QString& prevUniqueImgName, + const TQString& prevUniqueImgName, const KURL& nextImgURL, - const QString& nextUniqueImgName, - const QString& comment) + const TQString& nextUniqueImgName, + const TQString& comment) { - const QDir pagesDir(imgGalleryDir + QString::fromLatin1("/pages/")); - const QDir thumbsDir(imgGalleryDir + QString::fromLatin1("/thumbs/")); - const QFileInfo fi (imgURL.fileName()); - const QString imgName = uniqueImgName + "." + fi.extension(FALSE); + const TQDir pagesDir(imgGalleryDir + TQString::tqfromLatin1("/pages/")); + const TQDir thumbsDir(imgGalleryDir + TQString::tqfromLatin1("/thumbs/")); + const TQFileInfo fi (imgURL.fileName()); + const TQString imgName = uniqueImgName + "." + fi.extension(FALSE); kdDebug( 51000 ) << "CreatePage: FileName: " << imgURL.fileName() << endl; kdDebug( 51000 ) << "CreatePage: uniqueFileName: " << imgName << endl; kdDebug( 51000 ) << "CreatePage: uniquePrevFileName: " << prevUniqueImgName << endl; @@ -1085,33 +1085,33 @@ bool CDArchiving::createPage(const QString& imgGalleryDir, // Html pages filenames - const QString pageFilename = pagesDir.path() + - QString::fromLatin1("/") + + const TQString pageFilename = pagesDir.path() + + TQString::tqfromLatin1("/") + webifyFileName(uniqueImgName)+ - QString::fromLatin1(".htm"); - const QString nextPageFilename = webifyFileName(nextUniqueImgName) + - QString::fromLatin1(".htm"); - const QString prevPageFilename = webifyFileName(prevUniqueImgName) + - QString::fromLatin1(".htm"); + TQString::tqfromLatin1(".htm"); + const TQString nextPageFilename = webifyFileName(nextUniqueImgName) + + TQString::tqfromLatin1(".htm"); + const TQString prevPageFilename = webifyFileName(prevUniqueImgName) + + TQString::tqfromLatin1(".htm"); // Thumbs filenames - const QString prevThumb = QString::fromLatin1("../thumbs/") + + const TQString prevThumb = TQString::tqfromLatin1("../thumbs/") + webifyFileName(prevUniqueImgName) + extension(m_imageFormat); - const QString nextThumb = QString::fromLatin1("../thumbs/") + + const TQString nextThumb = TQString::tqfromLatin1("../thumbs/") + webifyFileName(nextUniqueImgName) + extension(m_imageFormat); - QFile file( pageFilename ); + TQFile file( pageFilename ); if ( pagesDir.exists() && file.open(IO_WriteOnly) ) { - QTextStream stream(&file); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&file); + stream.setEncoding(TQTextStream::UnicodeUTF8); - QString chsetName = QTextCodec::codecForLocale()->mimeName(); + TQString chsetName = TQTextCodec::codecForLocale()->mimeName(); stream << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"" " \"http://www.w3.org/TR/html4/loose.dtd\">" << endl; stream << "<html>" << endl; @@ -1122,7 +1122,7 @@ bool CDArchiving::createPage(const QString& imgGalleryDir, << m_hostName << " [" << m_hostURL << "]\">" << endl; stream << "<meta name=\"date\" content=\"" - << KGlobal::locale()->formatDate(QDate::currentDate()) + << KGlobal::locale()->formatDate(TQDate::tqcurrentDate()) << "\">" << endl; stream << "<title>" << m_mainTitle << " : "<< imgName/*imgURL.fileName()*/ <<"</title>" << endl; @@ -1132,7 +1132,7 @@ bool CDArchiving::createPage(const QString& imgGalleryDir, stream<<"<body>" << endl;; stream << "<div align=\"center\">"<< endl; - QImage imgProp; + TQImage imgProp; int prevW = 0; int prevH = 0; int nextW = 0; @@ -1210,7 +1210,7 @@ bool CDArchiving::createPage(const QString& imgGalleryDir, if ( !comment.isEmpty() ) { stream << "<div align=\"center\">" - << EscapeSgmlText(QTextCodec::codecForLocale(), comment, true, true) + << EscapeSgmlText(TQTextCodec::codecForLocale(), comment, true, true) << "</div>" << endl; } @@ -1221,8 +1221,8 @@ bool CDArchiving::createPage(const QString& imgGalleryDir, // Add info about image if requested - QString sep="\" title=\""; - QFileInfo imgInfo; + TQString sep="\" title=\""; + TQFileInfo imgInfo; stream << sep << imgName; sep = ", "; @@ -1238,14 +1238,14 @@ bool CDArchiving::createPage(const QString& imgGalleryDir, // Footer - QString valid = i18n("Valid HTML 4.01."); - const QString today(KGlobal::locale()->formatDate(QDate::currentDate())); + TQString valid = i18n("Valid HTML 4.01."); + const TQString today(KGlobal::locale()->formatDate(TQDate::tqcurrentDate())); stream << "<div align=\"center\"><hr><img src=\"../thumbs/valid-html401.png\" alt=\"" << valid << "\" height=\"31\" width=\"88\" title=\"" << valid << "\" />" << endl; valid = i18n("Image gallery created with " - "<a href=\"%1\">%2</a> on %3").arg(m_hostURL).arg(m_hostName).arg(today); + "<a href=\"%1\">%2</a> on %3").tqarg(m_hostURL).tqarg(m_hostName).tqarg(today); stream << valid << "</div>" << endl; @@ -1261,16 +1261,16 @@ bool CDArchiving::createPage(const QString& imgGalleryDir, ///////////////////////////////////////////////////////////////////////////////////////////////////// -int CDArchiving::createThumb( const QString& imgName, const QString& sourceDirName, - const QString& uniqueFileName, - const QString& imgGalleryDir, const QString& imageFormat) +int CDArchiving::createThumb( const TQString& imgName, const TQString& sourceDirName, + const TQString& uniqueFileName, + const TQString& imgGalleryDir, const TQString& imageFormat) { - const QString pixPath = sourceDirName + "/" + imgName; + const TQString pixPath = sourceDirName + "/" + imgName; // Create the thumbnails for the HTML interface. - const QString ImageNameFormat = webifyFileName(uniqueFileName) + extension(imageFormat); - const QString thumbDir = imgGalleryDir + QString::fromLatin1("/thumbs/"); + const TQString ImageNameFormat = webifyFileName(uniqueFileName) + extension(imageFormat); + const TQString thumbDir = imgGalleryDir + TQString::tqfromLatin1("/thumbs/"); int extent = m_thumbnailsSize; m_imgWidth = 120; // Setting the size of the images is @@ -1283,12 +1283,12 @@ int CDArchiving::createThumb( const QString& imgName, const QString& sourceDirNa ///////////////////////////////////////////////////////////////////////////////////////////////////// -int CDArchiving::ResizeImage( const QString Path, const QString Directory, const QString ImageFormat, - const QString ImageNameFormat, int *Width, int *Height, int SizeFactor, +int CDArchiving::ResizeImage( const TQString Path, const TQString Directory, const TQString ImageFormat, + const TQString ImageNameFormat, int *Width, int *Height, int SizeFactor, bool ColorDepthChange, int ColorDepthValue, bool CompressionSet, int ImageCompression) { - QImage img; + TQImage img; bool ValRet; bool usingBrokenImage = false; @@ -1297,7 +1297,7 @@ int CDArchiving::ResizeImage( const QString Path, const QString Directory, const if ( ValRet == false ) // Cannot load the src image. { KGlobal::dirs()->addResourceType("kipi_imagebroken", KGlobal::dirs()->kde_default("data") + "kipi/data"); - QString dir = KGlobal::dirs()->findResourceDir("kipi_imagebroken", "image_broken.png"); + TQString dir = KGlobal::dirs()->findResourceDir("kipi_imagebroken", "image_broken.png"); dir = dir + "image_broken.png"; kdDebug ( 51000 ) << "Loading " << Path.ascii() << " failed ! Using " << dir.ascii() << " instead..." << endl; @@ -1337,7 +1337,7 @@ int CDArchiving::ResizeImage( const QString Path, const QString Directory, const Q_ASSERT( w <= SizeFactor ); } - const QImage scaleImg(img.smoothScale( w, h )); + const TQImage scaleImg(img.smoothScale( w, h )); if ( scaleImg.width() != w || scaleImg.height() != h ) { @@ -1350,7 +1350,7 @@ int CDArchiving::ResizeImage( const QString Path, const QString Directory, const if ( ColorDepthChange == true ) { - const QImage depthImg(img.convertDepth( ColorDepthValue )); + const TQImage depthImg(img.convertDepth( ColorDepthValue )); img = depthImg; } } @@ -1389,12 +1389,12 @@ int CDArchiving::ResizeImage( const QString Path, const QString Directory, const ///////////////////////////////////////////////////////////////////////////////////////////////////// -bool CDArchiving::BuildK3bXMLprojectfile (QString HTMLinterfaceFolder, QString IndexHtm, - QString AutoRunInf, QString AutorunFolder) +bool CDArchiving::BuildK3bXMLprojectfile (TQString HTMLinterfaceFolder, TQString IndexHtm, + TQString AutoRunInf, TQString AutorunFolder) { - QString Temp; + TQString Temp; KIPICDArchivingPlugin::EventData *d; - QFile XMLK3bProjectFile; + TQFile XMLK3bProjectFile; // open the K3b XML project file. @@ -1408,13 +1408,13 @@ bool CDArchiving::BuildK3bXMLprojectfile (QString HTMLinterfaceFolder, QString I d->starting = true; d->success = false; d->message = i18n("Creating project header..."); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); // Build K3b XML project File. - QTextStream stream( &XMLK3bProjectFile ); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream( &XMLK3bProjectFile ); + stream.setEncoding(TQTextStream::UnicodeUTF8); // XML Header. @@ -1508,24 +1508,24 @@ bool CDArchiving::BuildK3bXMLprojectfile (QString HTMLinterfaceFolder, QString I Temp = "<header>\n" "<volume_id>" - + EscapeSgmlText(QTextCodec::codecForLocale(), m_volumeID, true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), m_volumeID, true, true) + "</volume_id>\n" "<volume_set_id>" - + EscapeSgmlText(QTextCodec::codecForLocale(), m_volumeSetID, true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), m_volumeSetID, true, true) + "</volume_set_id>\n" "<volume_set_size>1</volume_set_size>\n" "<volume_set_number>1</volume_set_number>\n" "<system_id>" - + EscapeSgmlText(QTextCodec::codecForLocale(), m_systemID, true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), m_systemID, true, true) + "</system_id>\n" "<application_id>" - + EscapeSgmlText(QTextCodec::codecForLocale(), m_applicationID, true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), m_applicationID, true, true) + "</application_id>\n" "<publisher>" - + EscapeSgmlText(QTextCodec::codecForLocale(), m_publisher, true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), m_publisher, true, true) + "</publisher>\n" "<preparer>" - + EscapeSgmlText(QTextCodec::codecForLocale(), m_preparer, true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), m_preparer, true, true) + "</preparer>\n" "</header>\n"; @@ -1541,7 +1541,7 @@ bool CDArchiving::BuildK3bXMLprojectfile (QString HTMLinterfaceFolder, QString I { Temp = "<file name=\"index.htm\" >\n" "<url>" - + EscapeSgmlText(QTextCodec::codecForLocale(), IndexHtm, true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), IndexHtm, true, true) + "</url>\n" "</file>\n"; @@ -1552,7 +1552,7 @@ bool CDArchiving::BuildK3bXMLprojectfile (QString HTMLinterfaceFolder, QString I { Temp = "<file name=\"autorun.inf\" >\n" "<url>" - + EscapeSgmlText(QTextCodec::codecForLocale(), AutoRunInf, true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), AutoRunInf, true, true) + "</url>\n" "</file>\n"; @@ -1572,7 +1572,7 @@ bool CDArchiving::BuildK3bXMLprojectfile (QString HTMLinterfaceFolder, QString I //clear the temporary list for unique names m_collection_name_list.clear(); - for (QValueList<KIPI::ImageCollection>::iterator it = m_albumsList.begin(); + for (TQValueList<KIPI::ImageCollection>::iterator it = m_albumsList.begin(); !m_cancelled && (it != m_albumsList.end()); ++it) { @@ -1580,8 +1580,8 @@ bool CDArchiving::BuildK3bXMLprojectfile (QString HTMLinterfaceFolder, QString I d->action = KIPICDArchivingPlugin::Progress; d->starting = true; d->success = false; - d->message = i18n("Adding Album '%1' into project...").arg( (*it).name() ); - QApplication::sendEvent(m_parent, new QCustomEvent(QEvent::User, d)); + d->message = i18n("Adding Album '%1' into project...").tqarg( (*it).name() ); + TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); usleep(1000); addCollectionToK3bXMLProjectFile( *it, &stream); } @@ -1606,25 +1606,25 @@ bool CDArchiving::BuildK3bXMLprojectfile (QString HTMLinterfaceFolder, QString I ///////////////////////////////////////////////////////////////////////////////////////////////////// -bool CDArchiving::AddFolderTreeToK3bXMLProjectFile (QString dirname, QTextStream* stream) +bool CDArchiving::AddFolderTreeToK3bXMLProjectFile (TQString dirname, TQTextStream* stream) { - QString Temp; + TQString Temp; - QDir dir(dirname); - dir.setFilter ( QDir::Dirs | QDir::Files | QDir::NoSymLinks ); + TQDir dir(dirname); + dir.setFilter ( TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks ); Temp = "<directory name=\"" - + EscapeSgmlText(QTextCodec::codecForLocale(), dir.dirName(), true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), dir.dirName(), true, true) + "\" >\n"; *stream << Temp; kdDebug( 51000 ) << "Directory: " << dir.dirName().latin1 () << endl; - const QFileInfoList* fileinfolist = dir.entryInfoList(); - QFileInfoListIterator it_files(*fileinfolist); - QFileInfoListIterator it_folders(*fileinfolist); - QFileInfo* fi_files; - QFileInfo* fi_folders; + const TQFileInfoList* fileinfolist = dir.entryInfoList(); + TQFileInfoListIterator it_files(*fileinfolist); + TQFileInfoListIterator it_folders(*fileinfolist); + TQFileInfo* fi_files; + TQFileInfo* fi_folders; while ( (fi_files = it_files.current()) && !m_cancelled ) // Check all files in folder. { @@ -1639,10 +1639,10 @@ bool CDArchiving::AddFolderTreeToK3bXMLProjectFile (QString dirname, QTextStream kdDebug( 51000 ) << " Filename: " << fi_files->fileName().latin1() << endl; Temp = "<file name=\"" - + EscapeSgmlText(QTextCodec::codecForLocale(), fi_files->fileName(), true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), fi_files->fileName(), true, true) + "\" >\n" "<url>" - + EscapeSgmlText(QTextCodec::codecForLocale(), fi_files->absFilePath(), true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), fi_files->absFilePath(), true, true) + "</url>\n" "</file>\n"; @@ -1677,12 +1677,12 @@ bool CDArchiving::AddFolderTreeToK3bXMLProjectFile (QString dirname, QTextStream } bool CDArchiving::addCollectionToK3bXMLProjectFile(const KIPI::ImageCollection& collection, - QTextStream* stream) + TQTextStream* stream) { kdDebug( 51000 ) << "Adding Collection: " << collection.name() << endl; - QString Temp; - QString collection_name; + TQString Temp; + TQString collection_name; if (m_useHTMLInterface) collection_name = makeFileNameUnique(m_collection_name_list, webifyFileName(collection.name())); else @@ -1690,21 +1690,21 @@ bool CDArchiving::addCollectionToK3bXMLProjectFile(const KIPI::ImageCollection& kdDebug( 51000 ) << "num of unique collections: "<< m_collection_name_list.size() << endl; Temp = "<directory name=\"" - + EscapeSgmlText(QTextCodec::codecForLocale(), collection_name, true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), collection_name, true, true) + "\" >\n"; *stream << Temp; KURL::List images = collection.images(); kdDebug( 51000 ) << " Files: " << images.size() << endl; - QStringList fileNameList; - QString fName; + TQStringList fileNameList; + TQString fName; for (KURL::List::iterator it = images.begin(); (it != images.end()) && !m_cancelled; ++it) { kdDebug( 51000 ) << " Filename: " << (*it).fileName() << endl; - QFileInfo fInfo((*it).fileName()); + TQFileInfo fInfo((*it).fileName()); if (m_useHTMLInterface) fName = makeFileNameUnique(fileNameList, webifyFileName(fInfo.baseName(TRUE))) + "." + fInfo.extension( FALSE ); @@ -1715,10 +1715,10 @@ bool CDArchiving::addCollectionToK3bXMLProjectFile(const KIPI::ImageCollection& kdDebug( 51000 ) << "num of unique files: "<< fileNameList.size() << endl; Temp = "<file name=\"" - + EscapeSgmlText(QTextCodec::codecForLocale(), fName, true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), fName, true, true) + "\" >\n" "<url>" - + EscapeSgmlText(QTextCodec::codecForLocale(), (*it).path(), true, true) + + EscapeSgmlText(TQTextCodec::codecForLocale(), (*it).path(), true, true) + "</url>\n" "</file>\n"; @@ -1736,15 +1736,15 @@ bool CDArchiving::addCollectionToK3bXMLProjectFile(const KIPI::ImageCollection& bool CDArchiving::CreateAutoRunInfFile(void) { - QString Temp; - QFile AutoRunInf; + TQString Temp; + TQFile AutoRunInf; AutoRunInf.setName ( m_tmpFolder + "/autorun.inf" ); if ( AutoRunInf.open ( IO_WriteOnly | IO_Truncate ) == false ) return false; - QTextStream stream( &AutoRunInf ); + TQTextStream stream( &AutoRunInf ); Temp = "[autorun]\r\n" "OPEN=autorun\\ShellExecute.bat HTMLInterface\\index.htm\r\n" @@ -1770,11 +1770,11 @@ void CDArchiving::removeTmpFiles(void) ///////////////////////////////////////////////////////////////////////////////////////////////////// // This code can be multithreaded (in opposite to KIO::netaccess::delete(). -bool CDArchiving::DeleteDir(QString dirname) +bool CDArchiving::DeleteDir(TQString dirname) { if ( !dirname.isEmpty() ) { - QDir dir; + TQDir dir; if (dir.exists ( dirname ) == true) { @@ -1797,14 +1797,14 @@ bool CDArchiving::DeleteDir(QString dirname) ///////////////////////////////////////////////////////////////////////////////////////////////////// // This code can be multithreaded (in opposite to KIO::netaccess::delete(). -bool CDArchiving::deldir(QString dirname) +bool CDArchiving::deldir(TQString dirname) { - QDir dir(dirname); - dir.setFilter ( QDir::Dirs | QDir::Files | QDir::NoSymLinks ); + TQDir dir(dirname); + dir.setFilter ( TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks ); - const QFileInfoList* fileinfolist = dir.entryInfoList(); - QFileInfoListIterator it(*fileinfolist); - QFileInfo* fi; + const TQFileInfoList* fileinfolist = dir.entryInfoList(); + TQFileInfoListIterator it(*fileinfolist); + TQFileInfo* fi; while ( (fi = it.current() ) ) { @@ -1836,18 +1836,18 @@ bool CDArchiving::deldir(QString dirname) ///////////////////////////////////////////////////////////////////////////////////////////////////// // Source code from Koffice 1.3 -QString CDArchiving::EscapeSgmlText(const QTextCodec* codec, - const QString& strIn, +TQString CDArchiving::EscapeSgmlText(const TQTextCodec* codec, + const TQString& strIn, const bool quot /* = false */ , const bool apos /* = false */ ) { - QString strReturn; - QChar ch; + TQString strReturn; + TQChar ch; for (uint i = 0 ; i < strIn.length() ; ++i) { ch=strIn[i]; - switch (ch.unicode()) + switch (ch.tqunicode()) { case 38: // & { @@ -1889,7 +1889,7 @@ QString CDArchiving::EscapeSgmlText(const QTextCodec* codec, { if (!codec->canEncode(ch)) { - strReturn += QString("&#%1;").arg(ch.unicode()); + strReturn += TQString("&#%1;").tqarg(ch.tqunicode()); break; } } @@ -1907,12 +1907,12 @@ QString CDArchiving::EscapeSgmlText(const QTextCodec* codec, * Produce a web-friendly file name */ -QString CDArchiving::webifyFileName(QString fileName) +TQString CDArchiving::webifyFileName(TQString fileName) { fileName=fileName.lower(); // Remove potentially troublesome chars - fileName=fileName.replace(QRegExp("[^-0-9a-zA-Z]+"), "_"); + fileName=fileName.tqreplace(TQRegExp("[^-0-9a-zA-Z]+"), "_"); return fileName; } @@ -1920,14 +1920,14 @@ QString CDArchiving::webifyFileName(QString fileName) /** * Make sure a file name is unique in list */ -QString CDArchiving::makeFileNameUnique(QStringList& list, QString fileName) +TQString CDArchiving::makeFileNameUnique(TQStringList& list, TQString fileName) { // Make sure the file name is unique - QString fileNameBase=fileName; + TQString fileNameBase=fileName; int count=1; - while (list.findIndex(fileName)!=-1) + while (list.tqfindIndex(fileName)!=-1) { - fileName=fileNameBase + "-" + QString::number(count); + fileName=fileNameBase + "-" + TQString::number(count); ++count; }; diff --git a/kipi-plugins/cdarchiving/cdarchiving.h b/kipi-plugins/cdarchiving/cdarchiving.h index d87bb9d..0da9e0a 100644 --- a/kipi-plugins/cdarchiving/cdarchiving.h +++ b/kipi-plugins/cdarchiving/cdarchiving.h @@ -32,14 +32,14 @@ extern "C" #include <unistd.h> } -// Qt includes +// TQt includes -#include <qcolor.h> -#include <qdatetime.h> -#include <qdir.h> -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqcolor.h> +#include <tqdatetime.h> +#include <tqdir.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> // KDE includes @@ -63,13 +63,14 @@ const int NAV_THUMB_MAX_SIZE = 64; // First field is the URL, represented with KURL::prettyURL. We can't use KURL // directly because operator<(KURL,KURL) is not defined in KDE 3.1 -class CDArchiving : public QObject +class CDArchiving : public TQObject { Q_OBJECT + TQ_OBJECT public: - CDArchiving( KIPI::Interface* interface, QObject *parent=0, + CDArchiving( KIPI::Interface* interface, TQObject *tqparent=0, KAction *action_cdarchiving=0 ); ~CDArchiving(); @@ -101,43 +102,43 @@ private: KURL m_albumUrl; // Current album Url use in the thread. KURL::List m_albumUrlList; // Urls of Albums list from setup dialog. - QColor m_backgroundColor; - QColor m_bordersImagesColor; - QColor m_foregroundColor; - - QObject *m_parent; - - QString m_AlbumCollection; - QString m_AlbumComments; - QString m_AlbumDate; - QString m_AlbumTitle; - QString m_HTMLInterfaceAutoRunFolder; - QString m_HTMLInterfaceAutoRunInf; - QString m_HTMLInterfaceFolder; - QString m_HTMLInterfaceIndex; - QString m_K3bBinPathName; - QString m_K3bParameters; - QString m_StreamMainPageAlbumPreview; - QString m_applicationID; - QString m_bordersImagesSize; - QString m_fontName; - QString m_fontSize; - QString m_hostName; - QString m_hostURL; - QString m_imageFormat; - QString m_imagesFileFilter; - QString m_mainTitle; - QString m_mediaFormat; - QString m_preparer; - QString m_publisher; - QString m_systemID; - QString m_tmpFolder; - QString m_volumeID; - QString m_volumeSetID; - - QStringList m_collection_name_list; - - QValueList<KIPI::ImageCollection> m_albumsList; + TQColor m_backgroundColor; + TQColor m_bordersImagesColor; + TQColor m_foregroundColor; + + TQObject *m_parent; + + TQString m_AlbumCollection; + TQString m_AlbumComments; + TQString m_AlbumDate; + TQString m_AlbumTitle; + TQString m_HTMLInterfaceAutoRunFolder; + TQString m_HTMLInterfaceAutoRunInf; + TQString m_HTMLInterfaceFolder; + TQString m_HTMLInterfaceIndex; + TQString m_K3bBinPathName; + TQString m_K3bParameters; + TQString m_StreamMainPageAlbumPreview; + TQString m_applicationID; + TQString m_bordersImagesSize; + TQString m_fontName; + TQString m_fontSize; + TQString m_hostName; + TQString m_hostURL; + TQString m_imageFormat; + TQString m_imagesFileFilter; + TQString m_mainTitle; + TQString m_mediaFormat; + TQString m_preparer; + TQString m_publisher; + TQString m_systemID; + TQString m_tmpFolder; + TQString m_volumeID; + TQString m_volumeSetID; + + TQStringList m_collection_name_list; + + TQValueList<KIPI::ImageCollection> m_albumsList; bool m_cancelled; bool m_copyFiles; @@ -161,57 +162,57 @@ private: bool buildHTMLInterface (void); - bool createDirectory(QDir thumb_dir, QString imgGalleryDir, QString dirName); + bool createDirectory(TQDir thumb_dir, TQString imgGalleryDir, TQString dirName); - void createHead(QTextStream& stream); - void createCSSSection(QTextStream& stream); + void createHead(TQTextStream& stream); + void createCSSSection(TQTextStream& stream); - void createBody(QTextStream& stream, + void createBody(TQTextStream& stream, const KIPI::ImageCollection& album, const KURL& targetURL, - const QString& imageFormat); + const TQString& imageFormat); - int createThumb( const QString& imgName, const QString& sourceDirName, const QString& uniqueFileName, - const QString& imgGalleryDir, const QString& imageFormat); + int createThumb( const TQString& imgName, const TQString& sourceDirName, const TQString& uniqueFileName, + const TQString& imgGalleryDir, const TQString& imageFormat); - int ResizeImage( const QString Path, const QString Directory, const QString ImageFormat, - const QString ImageNameFormat, int *Width, int *Height, int SizeFactor, + int ResizeImage( const TQString Path, const TQString Directory, const TQString ImageFormat, + const TQString ImageNameFormat, int *Width, int *Height, int SizeFactor, bool ColorDepthChange, int ColorDepthValue, bool CompressionSet, int ImageCompression); bool createHtml( const KIPI::ImageCollection& album, const KURL& targetURL, - const QString& imageFormat ); + const TQString& imageFormat ); - bool createPage(const QString& imgGalleryDir, + bool createPage(const TQString& imgGalleryDir, const KURL& imgURL, - const QString& uniqueImgName, + const TQString& uniqueImgName, const KURL& prevImgURL, - const QString& prevUniqueImgName, + const TQString& prevUniqueImgName, const KURL& nextImgURL, - const QString& nextUniqueImgName, - const QString& comment); + const TQString& nextUniqueImgName, + const TQString& comment); - void createBodyMainPage(QTextStream& stream, KURL& url); + void createBodyMainPage(TQTextStream& stream, KURL& url); - static QString extension(const QString& imageFormat); + static TQString extension(const TQString& imageFormat); - bool BuildK3bXMLprojectfile (QString HTMLinterfaceFolder, QString IndexHtm, - QString AutoRunInf, QString AutorunFolder); + bool BuildK3bXMLprojectfile (TQString HTMLinterfaceFolder, TQString IndexHtm, + TQString AutoRunInf, TQString AutorunFolder); - bool AddFolderTreeToK3bXMLProjectFile (QString dirname, QTextStream* stream); - bool addCollectionToK3bXMLProjectFile(const KIPI::ImageCollection& collection, QTextStream* stream); + bool AddFolderTreeToK3bXMLProjectFile (TQString dirname, TQTextStream* stream); + bool addCollectionToK3bXMLProjectFile(const KIPI::ImageCollection& collection, TQTextStream* stream); bool CreateAutoRunInfFile(void); - bool DeleteDir(QString dirname); - bool deldir(QString dirname); + bool DeleteDir(TQString dirname); + bool deldir(TQString dirname); - QString EscapeSgmlText(const QTextCodec* codec, const QString& strIn, + TQString EscapeSgmlText(const TQTextCodec* codec, const TQString& strIn, const bool quot = false, const bool apos = false ); void writeSettings(void); void readSettings(void); - QString webifyFileName(QString fileName); - QString makeFileNameUnique(QStringList& list, QString fileName); + TQString webifyFileName(TQString fileName); + TQString makeFileNameUnique(TQStringList& list, TQString fileName); }; diff --git a/kipi-plugins/cdarchiving/cdarchivingdialog.cpp b/kipi-plugins/cdarchiving/cdarchivingdialog.cpp index 7a61cda..540c82f 100644 --- a/kipi-plugins/cdarchiving/cdarchivingdialog.cpp +++ b/kipi-plugins/cdarchiving/cdarchivingdialog.cpp @@ -25,22 +25,22 @@ * * ============================================================ */ -// Qt includes - -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qfileinfo.h> -#include <qgroupbox.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qprogressdialog.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qvbox.h> -#include <qwhatsthis.h> +// TQt includes + +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqfileinfo.h> +#include <tqgroupbox.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqprogressdialog.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqvbox.h> +#include <tqwhatsthis.h> // KDE includes @@ -84,9 +84,9 @@ namespace KIPICDArchivingPlugin KIO::filesize_t TargetMediaSize; -CDArchivingDialog::CDArchivingDialog( KIPI::Interface* interface, QWidget *parent) +CDArchivingDialog::CDArchivingDialog( KIPI::Interface* interface, TQWidget *tqparent) : KDialogBase( IconList, i18n("Configure Archive to CD"), Help|Ok|Cancel, Ok, - parent, "CDArchivingDialog", true, false ), m_interface( interface ) + tqparent, "CDArchivingDialog", true, false ), m_interface( interface ) { setCaption(i18n("Create CD/DVD Archive")); setupSelection(); @@ -121,7 +121,7 @@ CDArchivingDialog::CDArchivingDialog( KIPI::Interface* interface, QWidget *paren m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); } @@ -140,86 +140,86 @@ void CDArchivingDialog::setupSelection(void) page_setupSelection = addPage(i18n("Selection"), i18n("Album Selection"), BarIcon("folder_image", KIcon::SizeMedium)); - QVBoxLayout *layout = new QVBoxLayout(page_setupSelection, 0, spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout(page_setupSelection, 0, spacingHint() ); m_imageCollectionSelector = new KIPI::ImageCollectionSelector(page_setupSelection, m_interface); - layout->addWidget(m_imageCollectionSelector); + tqlayout->addWidget(m_imageCollectionSelector); //--------------------------------------------- - QGroupBox * groupBox3 = new QGroupBox( 2, Qt::Horizontal, + TQGroupBox * groupBox3 = new TQGroupBox( 2, Qt::Horizontal, i18n("Target Media Information"), page_setupSelection ); - groupBox3->layout()->setSpacing( 6 ); - groupBox3->layout()->setMargin( 11 ); - QWhatsThis::add( groupBox3, i18n("<p>Information about the backup medium.") ); + groupBox3->tqlayout()->setSpacing( 6 ); + groupBox3->tqlayout()->setMargin( 11 ); + TQWhatsThis::add( groupBox3, i18n("<p>Information about the backup medium.") ); - m_mediaSize = new QLabel( groupBox3 ); - m_mediaSize->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + m_mediaSize = new TQLabel( groupBox3 ); + m_mediaSize->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); - m_mediaFormat = new QComboBox(false, groupBox3); + m_mediaFormat = new TQComboBox(false, groupBox3); m_mediaFormat->insertItem(i18n("CD (650Mb)")); m_mediaFormat->insertItem(i18n("CD (700Mb)")); m_mediaFormat->insertItem(i18n("CD (880Mb)")); m_mediaFormat->insertItem(i18n("DVD (4,7Gb)")); m_mediaFormat->setCurrentText (i18n("CD (650Mb)")); mediaFormatActived(m_mediaFormat->currentText()); - QWhatsThis::add( m_mediaFormat, i18n("<p>Select here the backup media format.")); + TQWhatsThis::add( m_mediaFormat, i18n("<p>Select here the backup media format.")); - layout->addWidget( groupBox3 ); + tqlayout->addWidget( groupBox3 ); //--------------------------------------------- - connect( m_mediaFormat, SIGNAL( highlighted( const QString & ) ), - this, SLOT( mediaFormatActived( const QString & ) ) ); + connect( m_mediaFormat, TQT_SIGNAL( highlighted( const TQString & ) ), + this, TQT_SLOT( mediaFormatActived( const TQString & ) ) ); - connect( m_imageCollectionSelector, SIGNAL( selectionChanged() ), - this, SLOT( slotAlbumSelected() ) ); + connect( m_imageCollectionSelector, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( slotAlbumSelected() ) ); } void CDArchivingDialog::setupLookPage(void) { - QString whatsThis; + TQString whatsThis; page_setupLook = addPage( i18n("HTML Interface"), i18n("HTML Interface Look"), BarIcon("html", KIcon::SizeMedium ) ); - QVBoxLayout *vlay = new QVBoxLayout( page_setupLook, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page_setupLook, 0, spacingHint() ); //--------------------------------------------- - m_useHTMLInterface = new QCheckBox( i18n("Build CD HTML interface"), page_setupLook); + m_useHTMLInterface = new TQCheckBox( i18n("Build CD HTML interface"), page_setupLook); m_useHTMLInterface->setChecked( true ); vlay->addWidget( m_useHTMLInterface ); - QWhatsThis::add( m_useHTMLInterface, + TQWhatsThis::add( m_useHTMLInterface, i18n("<p>This option adds a HTML interface to browse the CD's contents.") ); //--------------------------------------------- - m_useAutoRunWin32 = new QCheckBox( i18n("Add \"autorun\" functionality"), page_setupLook); + m_useAutoRunWin32 = new TQCheckBox( i18n("Add \"autorun\" functionality"), page_setupLook); m_useAutoRunWin32->setChecked( true ); vlay->addWidget( m_useAutoRunWin32 ); - QWhatsThis::add( m_useAutoRunWin32, + TQWhatsThis::add( m_useAutoRunWin32, i18n("<p>This option adds MS Windows(tm) autorunning capability to the CD.") ); //--------------------------------------------- - m_labelTitle = new QLabel( i18n("Archive title:"), page_setupLook); + m_labelTitle = new TQLabel( i18n("Archive title:"), page_setupLook); vlay->addWidget( m_labelTitle ); - m_title = new QLineEdit(i18n("Album Archiving"), page_setupLook); + m_title = new TQLineEdit(i18n("Album Archiving"), page_setupLook); vlay->addWidget( m_title ); m_labelTitle->setBuddy(m_title); - QWhatsThis::add( m_title, i18n("<p>Enter here the title of the CD archive.") ); + TQWhatsThis::add( m_title, i18n("<p>Enter here the title of the CD archive.") ); //--------------------------------------------- m_imagesPerRow = new KIntNumInput(4, page_setupLook); m_imagesPerRow->setRange(1, 8, 1, true ); m_imagesPerRow->setLabel( i18n("I&mages per row:") ); - QWhatsThis::add( m_imagesPerRow, i18n("<p>Enter here the number of images per row on the album page. " + TQWhatsThis::add( m_imagesPerRow, i18n("<p>Enter here the number of images per row on the album page. " "A good value is '4'.") ); vlay->addWidget( m_imagesPerRow ); - QGridLayout *grid = new QGridLayout( 2, 2 ); + TQGridLayout *grid = new TQGridLayout( 2, 2 ); vlay->addLayout( grid ); //--------------------------------------------- @@ -228,13 +228,13 @@ void CDArchivingDialog::setupLookPage(void) m_thumbnailsSize->setRange(10, 1000, 1, true ); m_thumbnailsSize->setLabel( i18n("Thumbnail size:") ); vlay->addWidget( m_thumbnailsSize ); - QWhatsThis::add( m_thumbnailsSize, i18n("<p>The new size of thumbnails in pixels") ); + TQWhatsThis::add( m_thumbnailsSize, i18n("<p>The new size of thumbnails in pixels") ); //--------------------------------------------- - QHBoxLayout *hlay3 = new QHBoxLayout( spacingHint() ); + TQHBoxLayout *hlay3 = new TQHBoxLayout( spacingHint() ); vlay->addLayout( hlay3 ); - m_imageFormat = new QComboBox(false, page_setupLook); + m_imageFormat = new TQComboBox(false, page_setupLook); m_imageFormat->insertItem("JPEG"); m_imageFormat->insertItem("PNG"); m_imageFormat->setCurrentText ("JPEG"); @@ -248,9 +248,9 @@ void CDArchivingDialog::setupLookPage(void) "Wide Web, so it is fully streamable with a progressive display option. Also, " "PNG can store gamma and chromaticity data for improved color matching on " "heterogeneous platforms."); - QWhatsThis::add( m_imageFormat, whatsThis ); + TQWhatsThis::add( m_imageFormat, whatsThis ); - m_labelThumbsFileFormat = new QLabel( i18n("Thumbnail file format:"), page_setupLook); + m_labelThumbsFileFormat = new TQLabel( i18n("Thumbnail file format:"), page_setupLook); hlay3->addWidget( m_labelThumbsFileFormat ); m_labelThumbsFileFormat->setBuddy( m_imageFormat ); hlay3->addStretch( 1 ); @@ -258,17 +258,17 @@ void CDArchivingDialog::setupLookPage(void) //--------------------------------------------- - QHBoxLayout *hlay11 = new QHBoxLayout( ); + TQHBoxLayout *hlay11 = new TQHBoxLayout( ); vlay->addLayout( hlay11 ); - m_fontName = new QComboBox( false, page_setupLook ); - QStringList standardFonts; + m_fontName = new TQComboBox( false, page_setupLook ); + TQStringList standardFonts; KFontChooser::getFontList(standardFonts, 0); m_fontName->insertStringList( standardFonts ); m_fontName->setCurrentText( KGlobalSettings::generalFont().family()); - QWhatsThis::add( m_fontName, i18n("<p>Select here the font name used for the pages.") ); + TQWhatsThis::add( m_fontName, i18n("<p>Select here the font name used for the pages.") ); - m_labelFontName = new QLabel( i18n("Fon&t name:"), page_setupLook ); + m_labelFontName = new TQLabel( i18n("Fon&t name:"), page_setupLook ); m_labelFontName->setBuddy( m_fontName ); hlay11->addWidget( m_labelFontName ); hlay11->addStretch( 1 ); @@ -276,14 +276,14 @@ void CDArchivingDialog::setupLookPage(void) //--------------------------------------------- - QHBoxLayout *hlay12 = new QHBoxLayout( ); + TQHBoxLayout *hlay12 = new TQHBoxLayout( ); vlay->addLayout( hlay12 ); - m_fontSize = new QSpinBox( 6, 15, 1, page_setupLook ); + m_fontSize = new TQSpinBox( 6, 15, 1, page_setupLook ); m_fontSize->setValue( 14 ); - QWhatsThis::add( m_fontSize, i18n("<p>Select here the font size used for the pages.") ); + TQWhatsThis::add( m_fontSize, i18n("<p>Select here the font size used for the pages.") ); - m_labelFontSize = new QLabel( i18n("Font si&ze:"), page_setupLook ); + m_labelFontSize = new TQLabel( i18n("Font si&ze:"), page_setupLook ); m_labelFontSize->setBuddy( m_fontSize ); hlay12->addWidget( m_labelFontSize ); hlay12->addStretch( 1 ); @@ -291,14 +291,14 @@ void CDArchivingDialog::setupLookPage(void) //--------------------------------------------- - QHBoxLayout *hlay1 = new QHBoxLayout( spacingHint() ); + TQHBoxLayout *hlay1 = new TQHBoxLayout( spacingHint() ); vlay->addLayout( hlay1 ); m_foregroundColor = new KColorButton(page_setupLook); - m_foregroundColor->setColor(QColor("#d0ffd0")); - QWhatsThis::add( m_foregroundColor, i18n("<p>Select here the foreground color used for the pages.") ); + m_foregroundColor->setColor(TQColor("#d0ffd0")); + TQWhatsThis::add( m_foregroundColor, i18n("<p>Select here the foreground color used for the pages.") ); - m_labelForegroundColor = new QLabel( i18n("&Foreground color:"), page_setupLook); + m_labelForegroundColor = new TQLabel( i18n("&Foreground color:"), page_setupLook); m_labelForegroundColor->setBuddy( m_foregroundColor ); hlay1->addWidget( m_labelForegroundColor ); hlay1->addStretch( 1 ); @@ -306,14 +306,14 @@ void CDArchivingDialog::setupLookPage(void) //--------------------------------------------- - QHBoxLayout *hlay2 = new QHBoxLayout( spacingHint() ); + TQHBoxLayout *hlay2 = new TQHBoxLayout( spacingHint() ); vlay->addLayout( hlay2 ); m_backgroundColor = new KColorButton(page_setupLook); - m_backgroundColor->setColor(QColor("#333333")); - QWhatsThis::add( m_backgroundColor, i18n("<p>Select here the background color used for the pages.") ); + m_backgroundColor->setColor(TQColor("#333333")); + TQWhatsThis::add( m_backgroundColor, i18n("<p>Select here the background color used for the pages.") ); - m_labelBackgroundColor = new QLabel( i18n("&Background color:"), page_setupLook); + m_labelBackgroundColor = new TQLabel( i18n("&Background color:"), page_setupLook); hlay2->addWidget( m_labelBackgroundColor ); m_labelBackgroundColor->setBuddy( m_backgroundColor ); hlay2->addStretch( 1 ); @@ -321,14 +321,14 @@ void CDArchivingDialog::setupLookPage(void) //--------------------------------------------- - QHBoxLayout *hlay13 = new QHBoxLayout( ); + TQHBoxLayout *hlay13 = new TQHBoxLayout( ); vlay->addLayout( hlay13 ); - m_bordersImagesSize = new QSpinBox( 1, 20, 1, page_setupLook ); + m_bordersImagesSize = new TQSpinBox( 1, 20, 1, page_setupLook ); m_bordersImagesSize->setValue( 1 ); - QWhatsThis::add( m_bordersImagesSize, i18n("<p>Select here the image border's size in pixels.") ); + TQWhatsThis::add( m_bordersImagesSize, i18n("<p>Select here the image border's size in pixels.") ); - m_labelImageBorderSize = new QLabel( i18n("Image border s&ize:"), page_setupLook ); + m_labelImageBorderSize = new TQLabel( i18n("Image border s&ize:"), page_setupLook ); m_labelImageBorderSize->setBuddy( m_bordersImagesSize ); hlay13->addWidget( m_labelImageBorderSize ); hlay13->addStretch( 1 ); @@ -336,15 +336,15 @@ void CDArchivingDialog::setupLookPage(void) //--------------------------------------------- - QHBoxLayout *hlay4 = new QHBoxLayout( spacingHint() ); + TQHBoxLayout *hlay4 = new TQHBoxLayout( spacingHint() ); vlay->addLayout( hlay4 ); m_bordersImagesColor = new KColorButton(page_setupLook); - m_bordersImagesColor->setColor(QColor("#d0ffd0")); - QWhatsThis::add( m_bordersImagesColor, i18n("<p>Select here the color used " + m_bordersImagesColor->setColor(TQColor("#d0ffd0")); + TQWhatsThis::add( m_bordersImagesColor, i18n("<p>Select here the color used " "for the image borders.") ); - m_labelImageBorderSizeColor = new QLabel( i18n("Image bo&rder color:"), page_setupLook); + m_labelImageBorderSizeColor = new TQLabel( i18n("Image bo&rder color:"), page_setupLook); hlay4->addWidget( m_labelImageBorderSizeColor ); m_labelImageBorderSizeColor->setBuddy( m_bordersImagesColor ); hlay4->addStretch( 1 ); @@ -354,62 +354,62 @@ void CDArchivingDialog::setupLookPage(void) vlay->addStretch(1); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_useAutoRunWin32, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_useAutoRunWin32, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_labelTitle, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_labelTitle, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_labelThumbsFileFormat, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_labelThumbsFileFormat, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_labelFontName, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_labelFontName, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_labelFontSize, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_labelFontSize, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_labelForegroundColor, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_labelForegroundColor, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_labelBackgroundColor, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_labelBackgroundColor, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_title, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_title, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_imagesPerRow, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_imagesPerRow, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_fontSize, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_fontSize, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_fontName, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_fontName, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_imageFormat, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_imageFormat, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_thumbnailsSize, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_thumbnailsSize, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_foregroundColor, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_foregroundColor, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_backgroundColor, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_backgroundColor, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_bordersImagesSize, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_bordersImagesSize, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_labelImageBorderSize, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_labelImageBorderSize, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_bordersImagesColor, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_bordersImagesColor, TQT_SLOT(setEnabled(bool))); - connect(m_useHTMLInterface, SIGNAL(toggled(bool)), - m_labelImageBorderSizeColor, SLOT(setEnabled(bool))); + connect(m_useHTMLInterface, TQT_SIGNAL(toggled(bool)), + m_labelImageBorderSizeColor, TQT_SLOT(setEnabled(bool))); } @@ -418,80 +418,80 @@ void CDArchivingDialog::setupCDInfos(void) page_CDInfos = addPage( i18n("Volume Descriptor"), i18n("Media Volume Descriptor"), BarIcon("cd", KIcon::SizeMedium ) ); - QVBoxLayout *vlay = new QVBoxLayout( page_CDInfos, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page_CDInfos, 0, spacingHint() ); - QLabel *label; + TQLabel *label; //--------------------------------------------- - label = new QLabel( i18n("Volume name:"), page_CDInfos); + label = new TQLabel( i18n("Volume name:"), page_CDInfos); vlay->addWidget( label ); - m_volume_id = new QLineEdit(i18n("CD Album"), page_CDInfos); + m_volume_id = new TQLineEdit(i18n("CD Album"), page_CDInfos); vlay->addWidget( m_volume_id ); m_labelTitle->setBuddy(m_volume_id); m_volume_id->setMaxLength(32); - QWhatsThis::add( m_volume_id, i18n("<p>Enter here the media volume name (32 characters max.)") ); + TQWhatsThis::add( m_volume_id, i18n("<p>Enter here the media volume name (32 characters max.)") ); //--------------------------------------------- - label = new QLabel( i18n("Volume set name:"), page_CDInfos); + label = new TQLabel( i18n("Volume set name:"), page_CDInfos); vlay->addWidget( label ); - m_volume_set_id = new QLineEdit(i18n("Album CD archive"), page_CDInfos); + m_volume_set_id = new TQLineEdit(i18n("Album CD archive"), page_CDInfos); vlay->addWidget( m_volume_set_id ); m_labelTitle->setBuddy(m_volume_set_id); m_volume_set_id->setMaxLength(128); - QWhatsThis::add( m_volume_set_id, + TQWhatsThis::add( m_volume_set_id, i18n("<p>Enter here the media volume global name (128 characters max.)") ); //--------------------------------------------- - label = new QLabel( i18n("System:"), page_CDInfos); + label = new TQLabel( i18n("System:"), page_CDInfos); vlay->addWidget( label ); - m_system_id = new QLineEdit(i18n("LINUX"), page_CDInfos); + m_system_id = new TQLineEdit(i18n("LINUX"), page_CDInfos); vlay->addWidget( m_system_id ); m_labelTitle->setBuddy(m_system_id); m_system_id->setMaxLength(32); - QWhatsThis::add( m_system_id, + TQWhatsThis::add( m_system_id, i18n("<p>Enter here the media burning system name (32 characters max.)") ); //--------------------------------------------- - label = new QLabel( i18n("Application:"), page_CDInfos); + label = new TQLabel( i18n("Application:"), page_CDInfos); vlay->addWidget( label ); - m_application_id = new QLineEdit(i18n("K3b CD-DVD Burning application"), page_CDInfos); + m_application_id = new TQLineEdit(i18n("K3b CD-DVD Burning application"), page_CDInfos); vlay->addWidget( m_application_id ); m_labelTitle->setBuddy(m_application_id); m_application_id->setMaxLength(128); - QWhatsThis::add( m_application_id, + TQWhatsThis::add( m_application_id, i18n("<p>Enter here the media burning application name (128 characters max.).") ); //--------------------------------------------- - label = new QLabel( i18n("Publisher:"), page_CDInfos); + label = new TQLabel( i18n("Publisher:"), page_CDInfos); vlay->addWidget( label ); - m_publisher = new QLineEdit(i18n("KIPI [KDE Images Program Interface]"), page_CDInfos); + m_publisher = new TQLineEdit(i18n("KIPI [KDE Images Program Interface]"), page_CDInfos); vlay->addWidget( m_publisher ); m_labelTitle->setBuddy(m_publisher); m_publisher->setMaxLength(128); - QWhatsThis::add( m_publisher, + TQWhatsThis::add( m_publisher, i18n("<p>Enter here the media publisher name (128 characters max.).") ); //--------------------------------------------- - label = new QLabel( i18n("Preparer:"), page_CDInfos); + label = new TQLabel( i18n("Preparer:"), page_CDInfos); vlay->addWidget( label ); - m_preparer = new QLineEdit(i18n("KIPI CD Archiving plugin"), page_CDInfos); + m_preparer = new TQLineEdit(i18n("KIPI CD Archiving plugin"), page_CDInfos); vlay->addWidget( m_preparer ); m_labelTitle->setBuddy(m_preparer); m_preparer->setMaxLength(128); - QWhatsThis::add( m_preparer, i18n("<p>Enter here the media preparer name (128 characters max.).") ); + TQWhatsThis::add( m_preparer, i18n("<p>Enter here the media preparer name (128 characters max.).") ); vlay->addStretch(1); } @@ -502,34 +502,34 @@ void CDArchivingDialog::setupBurning(void) i18n("CD/DVD Burning Setup"), BarIcon("cdwriter_unmount", KIcon::SizeMedium ) ); - QVBoxLayout *vlay = new QVBoxLayout( page_burning, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page_burning, 0, spacingHint() ); - QLabel *label; + TQLabel *label; //--------------------------------------------- - label = new QLabel(i18n("&K3b binary path:"), page_burning); + label = new TQLabel(i18n("&K3b binary path:"), page_burning); vlay->addWidget( label ); m_K3bBinPath = new KURLRequester( "k3b", page_burning); label->setBuddy( m_K3bBinPath ); vlay->addWidget(m_K3bBinPath); - connect( m_K3bBinPath, SIGNAL(textChanged(const QString&)), - this, SLOT(UrlChanged(const QString&))); + connect( m_K3bBinPath, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(UrlChanged(const TQString&))); - QWhatsThis::add( m_K3bBinPath, i18n("<p>The path name to the K3b binary program.") ); + TQWhatsThis::add( m_K3bBinPath, i18n("<p>The path name to the K3b binary program.") ); //--------------------------------------------- - label = new QLabel( i18n("Application parameters:"), page_burning); + label = new TQLabel( i18n("Application parameters:"), page_burning); vlay->addWidget( label ); - m_K3bParameters = new QLineEdit("--nofork", page_burning); + m_K3bParameters = new TQLineEdit("--nofork", page_burning); vlay->addWidget( m_K3bParameters ); m_labelTitle->setBuddy(m_K3bParameters); m_K3bParameters->setMaxLength(128); - QWhatsThis::add( m_K3bParameters, + TQWhatsThis::add( m_K3bParameters, i18n("<p>Enter parameters which will be used when starting the " "burning application. Newer versions of K3b might need " "--nofork, older versions might not need it. " @@ -537,30 +537,30 @@ void CDArchivingDialog::setupBurning(void) //--------------------------------------------- - QGroupBox * groupBoxAdvancedOptions = new QGroupBox( i18n("Advanced Burning Options"), page_burning ); + TQGroupBox * groupBoxAdvancedOptions = new TQGroupBox( i18n("Advanced Burning Options"), page_burning ); groupBoxAdvancedOptions->setColumnLayout(0, Qt::Vertical ); - groupBoxAdvancedOptions->layout()->setSpacing( 6 ); - groupBoxAdvancedOptions->layout()->setMargin( 11 ); + groupBoxAdvancedOptions->tqlayout()->setSpacing( 6 ); + groupBoxAdvancedOptions->tqlayout()->setMargin( 11 ); - QVBoxLayout * groupBoxAOLayout = new QVBoxLayout( groupBoxAdvancedOptions->layout() ); - groupBoxAOLayout->setAlignment( Qt::AlignTop ); + TQVBoxLayout * groupBoxAOLayout = new TQVBoxLayout( groupBoxAdvancedOptions->tqlayout() ); + groupBoxAOLayout->tqsetAlignment( TQt::AlignTop ); - m_burnOnTheFly = new QCheckBox( i18n("Media burning On-The-Fly"), groupBoxAdvancedOptions); + m_burnOnTheFly = new TQCheckBox( i18n("Media burning On-The-Fly"), groupBoxAdvancedOptions); m_burnOnTheFly->setChecked( false ); - QWhatsThis::add( m_burnOnTheFly, i18n("<p>This option uses the \"On-The-Fly\" " + TQWhatsThis::add( m_burnOnTheFly, i18n("<p>This option uses the \"On-The-Fly\" " "media burning capability; this does not use a media image.") ); groupBoxAOLayout->addWidget( m_burnOnTheFly ); - m_checkCDBurn = new QCheckBox( i18n("Check media"), groupBoxAdvancedOptions); + m_checkCDBurn = new TQCheckBox( i18n("Check media"), groupBoxAdvancedOptions); m_checkCDBurn->setChecked( false ); - QWhatsThis::add( m_checkCDBurn, i18n("<p>This option verifies the media after the burning process. " + TQWhatsThis::add( m_checkCDBurn, i18n("<p>This option verifies the media after the burning process. " "You must use K3b release >= 0.10.0") ); groupBoxAOLayout->addWidget( m_checkCDBurn ); - m_startBurningProcess = new QCheckBox( i18n("Start burning process automatically"), groupBoxAdvancedOptions); + m_startBurningProcess = new TQCheckBox( i18n("Start burning process automatically"), groupBoxAdvancedOptions); m_startBurningProcess->setChecked( false ); m_startBurningProcess->hide(); - QWhatsThis::add( m_startBurningProcess, i18n("<p>This option start automatically the burning process " + TQWhatsThis::add( m_startBurningProcess, i18n("<p>This option start automatically the burning process " "when K3b is loaded.") ); groupBoxAOLayout->addWidget( m_startBurningProcess ); @@ -571,10 +571,10 @@ void CDArchivingDialog::setupBurning(void) void CDArchivingDialog::slotAlbumSelected() { - QValueList<KIPI::ImageCollection> ListAlbums(m_imageCollectionSelector->selectedImageCollections()); + TQValueList<KIPI::ImageCollection> ListAlbums(m_imageCollectionSelector->selectedImageCollections()); double size = 0; - for ( QValueList<KIPI::ImageCollection>::Iterator it = ListAlbums.begin(); it != ListAlbums.end(); ++it ) + for ( TQValueList<KIPI::ImageCollection>::Iterator it = ListAlbums.begin(); it != ListAlbums.end(); ++it ) { KURL::List images = (*it).images(); @@ -591,9 +591,9 @@ void CDArchivingDialog::slotAlbumSelected() } -void CDArchivingDialog::mediaFormatActived (const QString & item ) +void CDArchivingDialog::mediaFormatActived (const TQString & item ) { - QString Color; + TQString Color; if (item == i18n("CD (650Mb)")) MaxMediaSize = 665600; @@ -612,7 +612,7 @@ void CDArchivingDialog::mediaFormatActived (const QString & item ) void CDArchivingDialog::ShowMediaCapacity(void) { - QString Color = "<font color=\"blue\">";; + TQString Color = "<font color=\"blue\">";; if (TargetMediaSize >= MaxMediaSize - (MaxMediaSize*0.1)) Color = "<font color=\"orange\">"; @@ -621,8 +621,8 @@ void CDArchivingDialog::ShowMediaCapacity(void) Color = "<font color=\"red\">"; m_mediaSize->setText( i18n("Total size: ") + Color + - i18n("<b>%1</b></font> / <b>%2</b>").arg(KIO::convertSizeFromKB(TargetMediaSize)) - .arg(KIO::convertSizeFromKB (MaxMediaSize)) ); + i18n("<b>%1</b></font> / <b>%2</b>").tqarg(KIO::convertSizeFromKB(TargetMediaSize)) + .tqarg(KIO::convertSizeFromKB (MaxMediaSize)) ); } void CDArchivingDialog::slotOk() @@ -635,7 +635,7 @@ void CDArchivingDialog::slotOk() return; } - QFile fileK3b(getK3bBinPathName()); + TQFile fileK3b(getK3bBinPathName()); if ( !KStandardDirs::findExe( getK3bBinPathName() )) { @@ -652,27 +652,27 @@ void CDArchivingDialog::slotOk() accept(); } -void CDArchivingDialog::UrlChanged(const QString &url ) +void CDArchivingDialog::UrlChanged(const TQString &url ) { enableButtonOK( !url.isEmpty()); } -QString CDArchivingDialog::getK3bBinPathName() const +TQString CDArchivingDialog::getK3bBinPathName() const { return m_K3bBinPath->url(); } -QString CDArchivingDialog::getK3bParameters() const +TQString CDArchivingDialog::getK3bParameters() const { return m_K3bParameters->text(); } -void CDArchivingDialog::setK3bBinPathName(const QString &Value) +void CDArchivingDialog::setK3bBinPathName(const TQString &Value) { m_K3bBinPath->setURL( Value ); } -void CDArchivingDialog::setK3bParameters(const QString &Value) +void CDArchivingDialog::setK3bParameters(const TQString &Value) { m_K3bParameters->setText( Value ); } @@ -697,17 +697,17 @@ void CDArchivingDialog::setThumbnailsSize(int Value) m_thumbnailsSize->setValue( Value ); } -const QString CDArchivingDialog::getFontName() const +const TQString CDArchivingDialog::getFontName() const { return m_fontName->currentText(); } -void CDArchivingDialog::setFontName(QString Value) +void CDArchivingDialog::setFontName(TQString Value) { m_fontName->setCurrentText (Value); } -const QString CDArchivingDialog::getFontSize() const +const TQString CDArchivingDialog::getFontSize() const { return m_fontSize->text(); } @@ -717,42 +717,42 @@ void CDArchivingDialog::setFontSize(int Value) m_fontSize->setValue( Value ); } -const QColor CDArchivingDialog::getBackgroundColor() const +const TQColor CDArchivingDialog::getBackgroundColor() const { return m_backgroundColor->color(); } -void CDArchivingDialog::setBackgroundColor(QColor Value) +void CDArchivingDialog::setBackgroundColor(TQColor Value) { m_backgroundColor->setColor( Value ); } -const QColor CDArchivingDialog::getForegroundColor() const +const TQColor CDArchivingDialog::getForegroundColor() const { return m_foregroundColor->color(); } -void CDArchivingDialog::setForegroundColor(QColor Value) +void CDArchivingDialog::setForegroundColor(TQColor Value) { m_foregroundColor->setColor( Value ); } -const QString CDArchivingDialog::getImageFormat() const +const TQString CDArchivingDialog::getImageFormat() const { return m_imageFormat->currentText(); } -void CDArchivingDialog::setImageFormat(QString Value) +void CDArchivingDialog::setImageFormat(TQString Value) { return m_imageFormat->setCurrentText( Value ); } -const QString CDArchivingDialog::getMainTitle() const +const TQString CDArchivingDialog::getMainTitle() const { return m_title->text(); } -void CDArchivingDialog::setMainTitle(QString Value) +void CDArchivingDialog::setMainTitle(TQString Value) { return m_title->setText( Value ); } @@ -777,72 +777,72 @@ void CDArchivingDialog::setUseAutoRunWin32(bool Value) m_useAutoRunWin32->setChecked(Value); } -const QString CDArchivingDialog::getVolumeID() const +const TQString CDArchivingDialog::getVolumeID() const { return m_volume_id->text(); } -void CDArchivingDialog::setVolumeID(QString Value) +void CDArchivingDialog::setVolumeID(TQString Value) { return m_volume_id->setText( Value ); } -const QString CDArchivingDialog::getVolumeSetID() const +const TQString CDArchivingDialog::getVolumeSetID() const { return m_volume_set_id->text(); } -void CDArchivingDialog::setVolumeSetID(QString Value) +void CDArchivingDialog::setVolumeSetID(TQString Value) { return m_volume_set_id->setText( Value ); } -const QString CDArchivingDialog::getSystemID() const +const TQString CDArchivingDialog::getSystemID() const { return m_system_id->text(); } -void CDArchivingDialog::setSystemID(QString Value) +void CDArchivingDialog::setSystemID(TQString Value) { return m_system_id->setText( Value ); } -const QString CDArchivingDialog::getApplicationID() const +const TQString CDArchivingDialog::getApplicationID() const { return m_application_id->text(); } -void CDArchivingDialog::setApplicationID(QString Value) +void CDArchivingDialog::setApplicationID(TQString Value) { return m_application_id->setText( Value ); } -const QString CDArchivingDialog::getPublisher() const +const TQString CDArchivingDialog::getPublisher() const { return m_publisher->text(); } -void CDArchivingDialog::setPublisher(QString Value) +void CDArchivingDialog::setPublisher(TQString Value) { return m_publisher->setText( Value ); } -const QString CDArchivingDialog::getPreparer() const +const TQString CDArchivingDialog::getPreparer() const { return m_preparer->text(); } -void CDArchivingDialog::setPreparer(QString Value) +void CDArchivingDialog::setPreparer(TQString Value) { return m_preparer->setText( Value ); } -const QString CDArchivingDialog::getMediaFormat() const +const TQString CDArchivingDialog::getMediaFormat() const { return m_mediaFormat->currentText(); } -void CDArchivingDialog::setMediaFormat(QString Value) +void CDArchivingDialog::setMediaFormat(TQString Value) { return m_mediaFormat->setCurrentText( Value ); } @@ -877,17 +877,17 @@ void CDArchivingDialog::setUseStartBurningProcess(bool Value) m_startBurningProcess->setChecked(Value); } -const QColor CDArchivingDialog::getBordersImagesColor() const +const TQColor CDArchivingDialog::getBordersImagesColor() const { return m_bordersImagesColor->color(); } -void CDArchivingDialog::setBordersImagesColor(QColor Value) +void CDArchivingDialog::setBordersImagesColor(TQColor Value) { m_bordersImagesColor->setColor( Value ); } -const QString CDArchivingDialog::getBordersImagesSize() const +const TQString CDArchivingDialog::getBordersImagesSize() const { return m_bordersImagesSize->text(); } diff --git a/kipi-plugins/cdarchiving/cdarchivingdialog.h b/kipi-plugins/cdarchiving/cdarchivingdialog.h index f29aefe..3aca798 100644 --- a/kipi-plugins/cdarchiving/cdarchivingdialog.h +++ b/kipi-plugins/cdarchiving/cdarchivingdialog.h @@ -28,9 +28,9 @@ #ifndef CDARCHIVINGDIALOG_H #define CDARCHIVINGDIALOG_H -// Qt includes +// TQt includes -#include <qguardedptr.h> +#include <tqguardedptr.h> // KDE includes @@ -51,12 +51,12 @@ class KSqueezedTextLabel; class KURL; class KURLRequester; -class QCheckBox; -class QLineEdit; -class QProgressDialog; -class QPushButton; -class QSpinBox; -class QString; +class TQCheckBox; +class TQLineEdit; +class TQProgressDialog; +class TQPushButton; +class TQSpinBox; +class TQString; namespace KIPI @@ -70,17 +70,18 @@ namespace KIPICDArchivingPlugin class CDArchivingDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CDArchivingDialog( KIPI::Interface* interface, QWidget *parent=0); + CDArchivingDialog( KIPI::Interface* interface, TQWidget *tqparent=0); ~CDArchivingDialog(); - QString getK3bBinPathName() const; - QString getK3bParameters() const; + TQString getK3bBinPathName() const; + TQString getK3bParameters() const; - void setK3bBinPathName(const QString &Value); - void setK3bParameters(const QString &Value); + void setK3bBinPathName(const TQString &Value); + void setK3bParameters(const TQString &Value); int getImagesPerRow() const; void setImagesPerRow(int Value); @@ -88,29 +89,29 @@ public: int getThumbnailsSize() const; void setThumbnailsSize(int Value); - const QString getFontName() const; - void setFontName(QString Value); + const TQString getFontName() const; + void setFontName(TQString Value); - const QString getFontSize() const; + const TQString getFontSize() const; void setFontSize(int Value); - const QString getBordersImagesSize() const; + const TQString getBordersImagesSize() const; void setBordersImagesSize(int Value); - const QColor getBackgroundColor() const; - void setBackgroundColor(QColor Value); + const TQColor getBackgroundColor() const; + void setBackgroundColor(TQColor Value); - const QColor getForegroundColor() const; - void setForegroundColor(QColor Value); + const TQColor getForegroundColor() const; + void setForegroundColor(TQColor Value); - const QColor getBordersImagesColor() const; - void setBordersImagesColor(QColor Value); + const TQColor getBordersImagesColor() const; + void setBordersImagesColor(TQColor Value); - const QString getImageFormat() const; - void setImageFormat(QString Value); + const TQString getImageFormat() const; + void setImageFormat(TQString Value); - const QString getMainTitle() const; - void setMainTitle(QString Value); + const TQString getMainTitle() const; + void setMainTitle(TQString Value); bool getUseHTMLInterface() const; void setUseHTMLInterface(bool Value); @@ -118,26 +119,26 @@ public: bool getUseAutoRunWin32() const; void setUseAutoRunWin32(bool Value); - const QString getVolumeID() const; - void setVolumeID(QString Value); + const TQString getVolumeID() const; + void setVolumeID(TQString Value); - const QString getVolumeSetID() const; - void setVolumeSetID(QString Value); + const TQString getVolumeSetID() const; + void setVolumeSetID(TQString Value); - const QString getSystemID() const; - void setSystemID(QString Value); + const TQString getSystemID() const; + void setSystemID(TQString Value); - const QString getApplicationID() const; - void setApplicationID(QString Value); + const TQString getApplicationID() const; + void setApplicationID(TQString Value); - const QString getPublisher() const; - void setPublisher(QString Value); + const TQString getPublisher() const; + void setPublisher(TQString Value); - const QString getPreparer() const; - void setPreparer(QString Value); + const TQString getPreparer() const; + void setPreparer(TQString Value); - const QString getMediaFormat() const; - void setMediaFormat(QString Value); + const TQString getMediaFormat() const; + void setMediaFormat(TQString Value); bool getUseOnTheFly() const; void setUseUseOnTheFly(bool Value); @@ -148,7 +149,7 @@ public: bool getUseStartBurningProcess() const; void setUseStartBurningProcess(bool Value); - QValueList<KIPI::ImageCollection> getSelectedAlbums() const + TQValueList<KIPI::ImageCollection> getSelectedAlbums() const { return m_selectedAlbums; } @@ -159,9 +160,9 @@ protected slots: void slotHelp(); void slotAlbumSelected(void); - void mediaFormatActived( const QString& item ); + void mediaFormatActived( const TQString& item ); void slotOk(); - void UrlChanged(const QString &url ); + void UrlChanged(const TQString &url ); private: @@ -190,51 +191,51 @@ private: KURLRequester *m_K3bBinPath; - QCheckBox *m_burnOnTheFly; - QCheckBox *m_checkCDBurn; - QCheckBox *m_startBurningProcess; - QCheckBox *m_useAutoRunWin32; - QCheckBox *m_useHTMLInterface; - QComboBox *m_fontName; - QComboBox *m_imageFormat; - QComboBox *m_mediaFormat; - - QFrame *page_CDInfos; - QFrame *page_burning; - QFrame *page_setupLook; - QFrame *page_setupSelection; - - QLabel *m_albumPreview; - QLabel *m_labelBackgroundColor; - QLabel *m_labelFontName; - QLabel *m_labelFontSize; - QLabel *m_labelForegroundColor; - QLabel *m_labelImageBorderSize; - QLabel *m_labelImageBorderSizeColor; - QLabel *m_labelThumbsFileFormat; - QLabel *m_labelTitle; - QLabel *m_mediaSize; - - QLineEdit *m_K3bParameters; - QLineEdit *m_application_id; - QLineEdit *m_preparer; - QLineEdit *m_publisher; - QLineEdit *m_system_id; - QLineEdit *m_title; - QLineEdit *m_volume_id; - QLineEdit *m_volume_set_id; - - QProgressDialog *m_progressDlg; - - QPushButton *m_helpButton; - - QSpinBox *m_bordersImagesSize; - QSpinBox *m_fontSize; - - QString m_ImagesFilesSort; - QString m_TempFolder; - - QValueList<KIPI::ImageCollection> m_selectedAlbums; + TQCheckBox *m_burnOnTheFly; + TQCheckBox *m_checkCDBurn; + TQCheckBox *m_startBurningProcess; + TQCheckBox *m_useAutoRunWin32; + TQCheckBox *m_useHTMLInterface; + TQComboBox *m_fontName; + TQComboBox *m_imageFormat; + TQComboBox *m_mediaFormat; + + TQFrame *page_CDInfos; + TQFrame *page_burning; + TQFrame *page_setupLook; + TQFrame *page_setupSelection; + + TQLabel *m_albumPreview; + TQLabel *m_labelBackgroundColor; + TQLabel *m_labelFontName; + TQLabel *m_labelFontSize; + TQLabel *m_labelForegroundColor; + TQLabel *m_labelImageBorderSize; + TQLabel *m_labelImageBorderSizeColor; + TQLabel *m_labelThumbsFileFormat; + TQLabel *m_labelTitle; + TQLabel *m_mediaSize; + + TQLineEdit *m_K3bParameters; + TQLineEdit *m_application_id; + TQLineEdit *m_preparer; + TQLineEdit *m_publisher; + TQLineEdit *m_system_id; + TQLineEdit *m_title; + TQLineEdit *m_volume_id; + TQLineEdit *m_volume_set_id; + + TQProgressDialog *m_progressDlg; + + TQPushButton *m_helpButton; + + TQSpinBox *m_bordersImagesSize; + TQSpinBox *m_fontSize; + + TQString m_ImagesFilesSort; + TQString m_TempFolder; + + TQValueList<KIPI::ImageCollection> m_selectedAlbums; private: diff --git a/kipi-plugins/cdarchiving/plugin_cdarchiving.cpp b/kipi-plugins/cdarchiving/plugin_cdarchiving.cpp index 90f0452..f179070 100644 --- a/kipi-plugins/cdarchiving/plugin_cdarchiving.cpp +++ b/kipi-plugins/cdarchiving/plugin_cdarchiving.cpp @@ -48,13 +48,13 @@ K_EXPORT_COMPONENT_FACTORY( kipiplugin_cdarchiving, Factory("kipiplugin_cdarchiving")) // ----------------------------------------------------------- -Plugin_CDArchiving::Plugin_CDArchiving(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "CDArchiving") +Plugin_CDArchiving::Plugin_CDArchiving(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "CDArchiving") { kdDebug( 51001 ) << "Plugin_CDArchiving plugin loaded" << endl; } -void Plugin_CDArchiving::setup( QWidget* widget ) +void Plugin_CDArchiving::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -62,7 +62,7 @@ void Plugin_CDArchiving::setup( QWidget* widget ) "cd", // Menu icon. 0, this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "cd_archiving"); @@ -75,7 +75,7 @@ void Plugin_CDArchiving::setup( QWidget* widget ) Plugin_CDArchiving::~Plugin_CDArchiving() { - // No need to delete m_cdarchiving as its a QObject child of this + // No need to delete m_cdarchiving as its a TQObject child of this // and will be deleted automatically } @@ -86,7 +86,7 @@ void Plugin_CDArchiving::slotActivate() { m_progressDlg = 0; - KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( parent() ); + KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( tqparent() ); if ( !interface ) { @@ -117,16 +117,16 @@ void Plugin_CDArchiving::slotCancel() ///////////////////////////////////////////////////////////////////////////////////////////////////// -void Plugin_CDArchiving::customEvent(QCustomEvent *event) +void Plugin_CDArchiving::customEvent(TQCustomEvent *event) { if (!event) return; if (!m_progressDlg) { - m_progressDlg = new KIPI::BatchProgressDialog(kapp->activeWindow(), i18n("Archive to CD/DVD")); + m_progressDlg = new KIPI::BatchProgressDialog(TQT_TQWIDGET(kapp->activeWindow()), i18n("Archive to CD/DVD")); - connect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + connect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); m_current = 0; m_progressDlg->show(); @@ -138,7 +138,7 @@ void Plugin_CDArchiving::customEvent(QCustomEvent *event) if (d->starting) { - QString text; + TQString text; switch (d->action) { @@ -157,7 +157,7 @@ void Plugin_CDArchiving::customEvent(QCustomEvent *event) case(KIPICDArchivingPlugin::BuildAlbumHTMLPage): { - text = i18n("Making HTML pages for Album '%1'...").arg(d->albumName); + text = i18n("Making HTML pages for Album '%1'...").tqarg(d->albumName); break; } @@ -169,7 +169,7 @@ void Plugin_CDArchiving::customEvent(QCustomEvent *event) case(KIPICDArchivingPlugin::ResizeImages): { - text = i18n("Creating thumbnail for '%1'...").arg(d->fileName); + text = i18n("Creating thumbnail for '%1'...").tqarg(d->fileName); break; } @@ -195,7 +195,7 @@ void Plugin_CDArchiving::customEvent(QCustomEvent *event) } else { - QString text; + TQString text; if (d->success) { @@ -211,14 +211,14 @@ void Plugin_CDArchiving::customEvent(QCustomEvent *event) case(KIPICDArchivingPlugin::BuildAlbumHTMLPage): { ++m_current; - text = i18n("HTML page creation for Album '%1' completed.").arg(d->albumName); + text = i18n("HTML page creation for Album '%1' completed.").tqarg(d->albumName); break; } case(KIPICDArchivingPlugin::ResizeImages): { ++m_current; - text = i18n("Creating thumbnail for '%1' done.").arg(d->fileName); + text = i18n("Creating thumbnail for '%1' done.").tqarg(d->fileName); break; } @@ -250,7 +250,7 @@ void Plugin_CDArchiving::customEvent(QCustomEvent *event) { case(KIPICDArchivingPlugin::ResizeImages): { - text = i18n("Failed to create thumbnail for '%1'").arg(d->fileName); + text = i18n("Failed to create thumbnail for '%1'").tqarg(d->fileName); m_progressDlg->addedAction(text, KIPI::WarningMessage); m_progressDlg->setProgress(m_current, m_total); break; @@ -260,7 +260,7 @@ void Plugin_CDArchiving::customEvent(QCustomEvent *event) { ++m_current; text = i18n("Failed to create HTML interface: %1") - .arg(d->message); + .tqarg(d->message); m_progressDlg->addedAction(text, KIPI::ErrorMessage); m_progressDlg->setProgress(m_current, m_total); slotCancel(); @@ -271,7 +271,7 @@ void Plugin_CDArchiving::customEvent(QCustomEvent *event) case(KIPICDArchivingPlugin::BuildAlbumHTMLPage): { text = i18n("Failed to create HTML pages for Album '%1'") - .arg(d->albumName); + .tqarg(d->albumName); m_progressDlg->addedAction(text, KIPI::ErrorMessage); m_progressDlg->setProgress(m_current, m_total); slotCancel(); @@ -319,8 +319,8 @@ void Plugin_CDArchiving::customEvent(QCustomEvent *event) m_progressDlg->setButtonCancelText( i18n("&Close") ); #endif - disconnect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + disconnect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); // Invoke K3b program. diff --git a/kipi-plugins/cdarchiving/plugin_cdarchiving.h b/kipi-plugins/cdarchiving/plugin_cdarchiving.h index f5c1a00..ab73bba 100644 --- a/kipi-plugins/cdarchiving/plugin_cdarchiving.h +++ b/kipi-plugins/cdarchiving/plugin_cdarchiving.h @@ -27,7 +27,7 @@ #include <libkipi/plugin.h> -class QCustomEvent; +class TQCustomEvent; class KAction; @@ -45,12 +45,13 @@ class BatchProgressDialog; class Plugin_CDArchiving : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_CDArchiving(QObject *parent, const char* name, const QStringList &args); + Plugin_CDArchiving(TQObject *tqparent, const char* name, const TQStringList &args); virtual ~Plugin_CDArchiving(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); public slots: void slotActivate(); @@ -65,7 +66,7 @@ private: KIPICDArchivingPlugin::CDArchiving *m_cdarchiving; KAction *m_action_cdarchiving; - void customEvent(QCustomEvent *event); + void customEvent(TQCustomEvent *event); }; diff --git a/kipi-plugins/common/include/kpaboutdata.h b/kipi-plugins/common/include/kpaboutdata.h index 89f986f..1add86b 100644 --- a/kipi-plugins/common/include/kpaboutdata.h +++ b/kipi-plugins/common/include/kpaboutdata.h @@ -33,7 +33,7 @@ namespace KIPIPlugins class LIBKIPI_EXPORT KPAboutData : public KAboutData { private: - QString KipiPluginsVersionString; + TQString KipiPluginsVersionString; public: diff --git a/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp b/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp index dad65dc..0ca6a01 100644 --- a/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp +++ b/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp @@ -20,7 +20,7 @@ // ////////////////////////////////////////////////////////////////////////////// -#include <qglobal.h> +#include <tqglobal.h> #include <kglobal.h> #include <kstandarddirs.h> #include <kglobalsettings.h> @@ -46,19 +46,19 @@ namespace KIPIPlugins { #if KDE_IS_VERSION(3,4,0) // setProgramLogo is defined from kde 3.4.0 on - QString directory; + TQString directory; KGlobal::dirs()->addResourceType("kipi_plugins_logo", KGlobal::dirs()->kde_default("data") + "kipi/data"); directory = KGlobal::dirs()->findResourceDir("kipi_plugins_logo", "kipi-plugins_logo.png"); // set the kipiplugins logo inside the about dialog - setProgramLogo(QImage(directory + "kipi-plugins_logo.png")); + setProgramLogo(TQImage(directory + "kipi-plugins_logo.png")); #endif // set the plugin description into long text description setOtherText(pluginDescription); // put the plugin name and version with kipi-plugins and kipi-plugins version - KipiPluginsVersionString = QString(pluginName) + " " + QString(pluginVersion) + - " - Kipi-plugins " + QString(kipiplugins_version) ; + KipiPluginsVersionString = TQString(pluginName) + " " + TQString(pluginVersion) + + " - Kipi-plugins " + TQString(kipiplugins_version) ; kdDebug( 51001 ) << "Kipi-plugins - " << KipiPluginsVersionString.ascii() << endl; diff --git a/kipi-plugins/findimages/Doxyfile b/kipi-plugins/findimages/Doxyfile index 339dc76..8af60b1 100644 --- a/kipi-plugins/findimages/Doxyfile +++ b/kipi-plugins/findimages/Doxyfile @@ -84,7 +84,7 @@ REPEAT_BRIEF = YES # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# "The $name file" "is" "provides" "specifies" "tqcontains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = diff --git a/kipi-plugins/findimages/actions.cpp b/kipi-plugins/findimages/actions.cpp index e578a92..87341bb 100644 --- a/kipi-plugins/findimages/actions.cpp +++ b/kipi-plugins/findimages/actions.cpp @@ -29,10 +29,10 @@ * * To overcome this problem, we will only send status messages at most every 50 msec. */ -void KIPIFindDupplicateImagesPlugin::sendMessage( QObject* receiver, const Action& action, const QString & fileName, +void KIPIFindDupplicateImagesPlugin::sendMessage( TQObject* receiver, const Action& action, const TQString & fileName, int total, bool starting, bool succes ) { - static QTime time; + static TQTime time; static int count = 0; if (starting) ++count; @@ -46,7 +46,7 @@ void KIPIFindDupplicateImagesPlugin::sendMessage( QObject* receiver, const Actio d->count = count; d->starting = starting; d->success = succes; - QApplication::postEvent( receiver, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent( receiver, new TQCustomEvent(TQEvent::User, d)); time.restart(); } } diff --git a/kipi-plugins/findimages/actions.h b/kipi-plugins/findimages/actions.h index e95b333..c90acc6 100644 --- a/kipi-plugins/findimages/actions.h +++ b/kipi-plugins/findimages/actions.h @@ -23,9 +23,9 @@ #ifndef ACTIONS_H #define ACTIONS_H -#include <qstring.h> -#include <qdatetime.h> -#include <qapplication.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqapplication.h> namespace KIPIFindDupplicateImagesPlugin { @@ -50,8 +50,8 @@ public: success = false; } - QString fileName; - QString errString; + TQString fileName; + TQString errString; int count; int total; bool starting; @@ -60,7 +60,7 @@ public: }; -void sendMessage( QObject* receiver, const Action& action, const QString & fileName, +void sendMessage( TQObject* receiver, const Action& action, const TQString & fileName, int total, bool starting, bool succes ); diff --git a/kipi-plugins/findimages/compareoperation.h b/kipi-plugins/findimages/compareoperation.h index b677714..8845bff 100644 --- a/kipi-plugins/findimages/compareoperation.h +++ b/kipi-plugins/findimages/compareoperation.h @@ -27,7 +27,7 @@ class CompareOperation { public: CompareOperation() :m_stopRequested( false ) {} - virtual QDict < QPtrVector < QFile > > compare( const QStringList& fileList ) = 0; + virtual TQDict < TQPtrVector < TQFile > > compare( const TQStringList& fileList ) = 0; void stopPlease() { m_stopRequested = true; } protected: diff --git a/kipi-plugins/findimages/displaycompare.cpp b/kipi-plugins/findimages/displaycompare.cpp index 70196a4..bd4b5f3 100644 --- a/kipi-plugins/findimages/displaycompare.cpp +++ b/kipi-plugins/findimages/displaycompare.cpp @@ -21,24 +21,24 @@ // ////////////////////////////////////////////////////////////////////////////// -// Include files for Qt - -#include <qptrvector.h> -#include <qdict.h> -#include <qfile.h> -#include <qlistbox.h> -#include <qlabel.h> -#include <qgroupbox.h> -#include <qlistview.h> -#include <qcheckbox.h> -#include <qheader.h> -#include <qlayout.h> -#include <qfileinfo.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qwhatsthis.h> -#include <qpushbutton.h> -#include <qframe.h> +// Include files for TQt + +#include <tqptrvector.h> +#include <tqdict.h> +#include <tqfile.h> +#include <tqlistbox.h> +#include <tqlabel.h> +#include <tqgroupbox.h> +#include <tqlistview.h> +#include <tqcheckbox.h> +#include <tqheader.h> +#include <tqlayout.h> +#include <tqfileinfo.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqwhatsthis.h> +#include <tqpushbutton.h> +#include <tqframe.h> // Include files for KDE @@ -74,57 +74,57 @@ namespace KIPIFindDupplicateImagesPlugin ///////////////////////////////////////////////////////////////////////////////////////////// -class FindOriginalItem : public QCheckListItem +class FindOriginalItem : public TQCheckListItem { public: - FindOriginalItem(QListView * parent, QString const & name, QString const & fullpath, - QString const & album, QString const & comments) - : QCheckListItem( parent, name, QCheckListItem::CheckBox), _name(name), + FindOriginalItem(TQListView * tqparent, TQString const & name, TQString const & fullpath, + TQString const & album, TQString const & comments) + : TQCheckListItem( tqparent, name, TQCheckListItem::CheckBox), _name(name), _fullpath(fullpath), _album (album), _comments (comments) {} - QString name() { return _name; } - QString fullpath() { return _fullpath; } - QString album() { return _album; } - QString comments() { return _comments; } + TQString name() { return _name; } + TQString fullpath() { return _fullpath; } + TQString album() { return _album; } + TQString comments() { return _comments; } private: - QString _name; - QString _fullpath; - QString _album; - QString _comments; + TQString _name; + TQString _fullpath; + TQString _album; + TQString _comments; }; ///////////////////////////////////////////////////////////////////////////////////////////// -class FindDuplicateItem : public QCheckListItem +class FindDuplicateItem : public TQCheckListItem { public: - FindDuplicateItem(QListView * parent, QString const & name, QString const & fullpath, - QString const & album, QString const & comments) - : QCheckListItem( parent, name, QCheckListItem::CheckBox), _name(name), + FindDuplicateItem(TQListView * tqparent, TQString const & name, TQString const & fullpath, + TQString const & album, TQString const & comments) + : TQCheckListItem( tqparent, name, TQCheckListItem::CheckBox), _name(name), _fullpath(fullpath), _album (album), _comments (comments) {} - QString name() { return _name; } - QString fullpath() { return _fullpath; } - QString album() { return _album; } - QString comments() { return _comments; } + TQString name() { return _name; } + TQString fullpath() { return _fullpath; } + TQString album() { return _album; } + TQString comments() { return _comments; } private: - QString _name; - QString _fullpath; - QString _album; - QString _comments; + TQString _name; + TQString _fullpath; + TQString _album; + TQString _comments; }; //////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////// -DisplayCompare::DisplayCompare(QWidget* parent, KIPI::Interface* interface, - const QDict < QPtrVector < QFile > >& cmp ) - : KDialogBase( parent, "DisplayCompare", true, 0, +DisplayCompare::DisplayCompare(TQWidget* tqparent, KIPI::Interface* interface, + const TQDict < TQPtrVector < TQFile > >& cmp ) + : KDialogBase( tqparent, "DisplayCompare", true, 0, Help|User1|Close, Close, false, i18n("Delete")), m_cmp(cmp), m_interface( interface ) { @@ -151,86 +151,86 @@ DisplayCompare::DisplayCompare(QWidget* parent, KIPI::Interface* interface, m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); // ---------------------------------------------------- - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout* ml = new QVBoxLayout( box, 10 ); - QHBoxLayout* h1 = new QHBoxLayout( ml ); - QVBoxLayout* v1 = new QVBoxLayout( h1 ); + TQVBoxLayout* ml = new TQVBoxLayout( box, 10 ); + TQHBoxLayout* h1 = new TQHBoxLayout( ml ); + TQVBoxLayout* v1 = new TQVBoxLayout( h1 ); h1->addSpacing( 5 ); - QGridLayout* g1 = new QGridLayout( v1, 1, 2 ); + TQGridLayout* g1 = new TQGridLayout( v1, 1, 2 ); //--------------------------------------------- - GroupBox1 = new QGroupBox( 1, Qt::Horizontal, i18n("Original Files"), box ); - GroupBox1->layout()->setSpacing( 6 ); - GroupBox1->layout()->setMargin( 11 ); + GroupBox1 = new TQGroupBox( 1, Qt::Horizontal, i18n("Original Files"), box ); + GroupBox1->tqlayout()->setSpacing( 6 ); + GroupBox1->tqlayout()->setMargin( 11 ); OriginalNameLabel = new KSqueezedTextLabel( GroupBox1, "OriginalNameLabel" ); - OriginalNameLabel->setFrameShape( QLabel::Box ); - OriginalNameLabel->setAlignment( int( QLabel::AlignCenter ) ); + OriginalNameLabel->setFrameShape( TQLabel::Box ); + OriginalNameLabel->tqsetAlignment( int( TQLabel::AlignCenter ) ); - preview1 = new QLabel( GroupBox1, "preview1" ); + preview1 = new TQLabel( GroupBox1, "preview1" ); preview1->setFixedHeight( 120 ); - preview1->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - preview1->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); - QWhatsThis::add( preview1, i18n( "<p>The preview of files with duplicates." ) ); + preview1->tqsetAlignment( TQt::AlignHCenter | TQt::AlignVCenter ); + preview1->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); + TQWhatsThis::add( preview1, i18n( "<p>The preview of files with duplicates." ) ); originalInfoLabel1 = new KSqueezedTextLabel( GroupBox1, "originalInfoLabel1" ); - originalInfoLabel1->setAlignment( int( QLabel::AlignCenter ) ); + originalInfoLabel1->tqsetAlignment( int( TQLabel::AlignCenter ) ); originalInfoLabel2 = new KSqueezedTextLabel( GroupBox1, "originalInfoLabel2" ); - originalInfoLabel2->setAlignment( int( QLabel::AlignCenter ) ); + originalInfoLabel2->tqsetAlignment( int( TQLabel::AlignCenter ) ); originalInfoLabel3 = new KSqueezedTextLabel( GroupBox1, "originalInfoLabel3" ); - originalInfoLabel3->setAlignment( int( QLabel::AlignCenter ) ); + originalInfoLabel3->tqsetAlignment( int( TQLabel::AlignCenter ) ); originalInfoLabel4 = new KSqueezedTextLabel( GroupBox1, "originalInfoLabel4" ); - originalInfoLabel4->setAlignment( int( QLabel::AlignCenter ) ); + originalInfoLabel4->tqsetAlignment( int( TQLabel::AlignCenter ) ); originalInfoLabel5 = new KSqueezedTextLabel( GroupBox1, "originalInfoLabel5" ); - originalInfoLabel5->setAlignment( int( QLabel::AlignCenter ) ); + originalInfoLabel5->tqsetAlignment( int( TQLabel::AlignCenter ) ); listName = new KListView( GroupBox1, "listName" ); listName->header()->setLabel( 0, i18n( "Files" ) ); - QWhatsThis::add( listName, i18n( "<p>This list contains all files with many duplicates." ) ); + TQWhatsThis::add( listName, i18n( "<p>This list contains all files with many duplicates." ) ); listName->addColumn( i18n( "Files" ) ); - listName->setResizeMode(QListView::AllColumns); + listName->setResizeMode(TQListView::AllColumns); g1->addWidget( GroupBox1 , 0, 0); //--------------------------------------------- - GroupBox2 = new QGroupBox( 1, Qt::Horizontal, i18n("Similar Files"), box ); - GroupBox2->layout()->setSpacing( 6 ); - GroupBox2->layout()->setMargin( 11 ); + GroupBox2 = new TQGroupBox( 1, Qt::Horizontal, i18n("Similar Files"), box ); + GroupBox2->tqlayout()->setSpacing( 6 ); + GroupBox2->tqlayout()->setMargin( 11 ); similarNameLabel = new KSqueezedTextLabel( GroupBox2, "similarNameLabel" ); - similarNameLabel->setFrameShape( QLabel::Box ); - similarNameLabel->setAlignment( int( QLabel::AlignCenter ) ); + similarNameLabel->setFrameShape( TQLabel::Box ); + similarNameLabel->tqsetAlignment( int( TQLabel::AlignCenter ) ); - preview2 = new QLabel( GroupBox2, "preview2" ); + preview2 = new TQLabel( GroupBox2, "preview2" ); preview2->setFixedHeight( 120 ); - preview2->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - preview2->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); - QWhatsThis::add( preview2, i18n( "<p>The preview of duplicate files." ) ); + preview2->tqsetAlignment( TQt::AlignHCenter | TQt::AlignVCenter ); + preview2->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); + TQWhatsThis::add( preview2, i18n( "<p>The preview of duplicate files." ) ); similarInfoLabel1 = new KSqueezedTextLabel( GroupBox2, "similarInfoLabel1" ); - similarInfoLabel1->setAlignment( int( QLabel::AlignCenter ) ); + similarInfoLabel1->tqsetAlignment( int( TQLabel::AlignCenter ) ); similarInfoLabel2 = new KSqueezedTextLabel( GroupBox2, "similarInfoLabel2" ); - similarInfoLabel2->setAlignment( int( QLabel::AlignCenter ) ); + similarInfoLabel2->tqsetAlignment( int( TQLabel::AlignCenter ) ); similarInfoLabel3 = new KSqueezedTextLabel( GroupBox2, "similarInfoLabel3" ); - similarInfoLabel3->setAlignment( int( QLabel::AlignCenter ) ); + similarInfoLabel3->tqsetAlignment( int( TQLabel::AlignCenter ) ); similarInfoLabel4 = new KSqueezedTextLabel( GroupBox2, "similarInfoLabel4" ); - similarInfoLabel4->setAlignment( int( QLabel::AlignCenter ) ); + similarInfoLabel4->tqsetAlignment( int( TQLabel::AlignCenter ) ); similarInfoLabel5 = new KSqueezedTextLabel( GroupBox2, "similarInfoLabel5" ); - similarInfoLabel5->setAlignment( int( QLabel::AlignCenter ) ); + similarInfoLabel5->tqsetAlignment( int( TQLabel::AlignCenter ) ); listEq = new KListView( GroupBox2, "listEq" ); listEq->header()->setLabel( 0, i18n( "Files" ) ); - QWhatsThis::add( listEq, i18n( "<p>This list contains all duplicates files." ) ); + TQWhatsThis::add( listEq, i18n( "<p>This list contains all duplicates files." ) ); listEq->addColumn( i18n( "Identical To" ) ); - listEq->setResizeMode(QListView::AllColumns); + listEq->setResizeMode(TQListView::AllColumns); g1->addWidget( GroupBox2 , 0, 1); @@ -238,19 +238,19 @@ DisplayCompare::DisplayCompare(QWidget* parent, KIPI::Interface* interface, //--------------------------------------------- - QDictIterator < QPtrVector < QFile > >itres(m_cmp); // iterator for res + TQDictIterator < TQPtrVector < TQFile > >itres(m_cmp); // iterator for res int n_id = 0; while (itres.current ()) { - QFileInfo fi(itres.currentKey()); - QString Temp = fi.dirPath(); - QString albumName = Temp.section('/', -1); + TQFileInfo fi(itres.currentKey()); + TQString Temp = fi.dirPath(); + TQString albumName = Temp.section('/', -1); KURL url; url.setPath(fi.fileName()); KIPI::ImageInfo info = m_interface->info(url); - QString comments = info.description(); + TQString comments = info.description(); new FindOriginalItem( listName, fi.fileName(), itres.currentKey(), albumName, comments ); ++itres; @@ -262,14 +262,14 @@ DisplayCompare::DisplayCompare(QWidget* parent, KIPI::Interface* interface, // signals and slots connections - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotDelete())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotDelete())); - connect(listName, SIGNAL(selectionChanged ( QListViewItem * )), - this, SLOT(slotDisplayLeft(QListViewItem *))); + connect(listName, TQT_SIGNAL(selectionChanged ( TQListViewItem * )), + this, TQT_SLOT(slotDisplayLeft(TQListViewItem *))); - connect(listEq, SIGNAL(selectionChanged ( QListViewItem * )), - this, SLOT(slotDisplayRight(QListViewItem *))); + connect(listEq, TQT_SIGNAL(selectionChanged ( TQListViewItem * )), + this, TQT_SLOT(slotDisplayRight(TQListViewItem *))); resize( 700, 600 ); listName->setSelected(listName->firstChild(), true); @@ -308,7 +308,7 @@ void DisplayCompare::slotDelete( void ) KURL deleteImage(item->fullpath()); if ( KIO::NetAccess::del(deleteImage) == false ) - KMessageBox::error(this, i18n("Cannot remove duplicate file:\n%1").arg(item->fullpath())); + KMessageBox::error(this, i18n("Cannot remove duplicate file:\n%1").tqarg(item->fullpath())); else m_interface->delImage( deleteImage ); @@ -329,7 +329,7 @@ void DisplayCompare::slotDelete( void ) KURL deleteImage(item->fullpath()); if ( KIO::NetAccess::del(deleteImage) == false ) - KMessageBox::error(this, i18n("Cannot remove original file:\n%1").arg(item->fullpath())); + KMessageBox::error(this, i18n("Cannot remove original file:\n%1").tqarg(item->fullpath())); item->setOn( false ); } @@ -339,57 +339,57 @@ void DisplayCompare::slotDelete( void ) ///////////////////////////////////////////////////////////////////////////////////////////// -void DisplayCompare::slotDisplayLeft(QListViewItem * item) +void DisplayCompare::slotDisplayLeft(TQListViewItem * item) { KApplication::setOverrideCursor( waitCursor ); listEq->clear(); FindOriginalItem *pitem = static_cast<FindOriginalItem*>( item ); - QPtrVector < QFile > *list = (QPtrVector < QFile > *)m_cmp.find(pitem->fullpath()); - QImage im(pitem->fullpath()); + TQPtrVector < TQFile > *list = (TQPtrVector < TQFile > *)m_cmp.tqfind(pitem->fullpath()); + TQImage im(pitem->fullpath()); if ( !im.isNull() ) { OriginalNameLabel->setText(pitem->name()); - originalInfoLabel1->setText(i18n("Image size: %1x%2 pixels").arg(im.width()).arg(im.height())); + originalInfoLabel1->setText(i18n("Image size: %1x%2 pixels").tqarg(im.width()).tqarg(im.height())); originalInfoLabel2->setText(i18n("File size: 1 byte", - "File size: %n bytes",QFileInfo(pitem->fullpath()).size())); - originalInfoLabel3->setText(i18n("Modified: %1").arg(KLocale(NULL) - .formatDateTime(QFileInfo(pitem->fullpath()) + "File size: %n bytes",TQFileInfo(pitem->fullpath()).size())); + originalInfoLabel3->setText(i18n("Modified: %1").tqarg(KLocale(NULL) + .formatDateTime(TQFileInfo(pitem->fullpath()) .lastModified()))); - originalInfoLabel4->setText(i18n("Album: %1").arg(pitem->album())); - originalInfoLabel5->setText(i18n("Comments: %1").arg(pitem->comments())); + originalInfoLabel4->setText(i18n("Album: %1").tqarg(pitem->album())); + originalInfoLabel5->setText(i18n("Comments: %1").tqarg(pitem->comments())); } preview1->clear(); - QString IdemIndexed = "file:" + pitem->fullpath(); + TQString IdemIndexed = "file:" + pitem->fullpath(); KURL url(IdemIndexed); KIO::PreviewJob* thumbJob1 = KIO::filePreview( url, preview1->height() ); - connect(thumbJob1, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), - SLOT(slotGotPreview1(const KFileItem*, const QPixmap&))); + connect(thumbJob1, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), + TQT_SLOT(slotGotPreview1(const KFileItem*, const TQPixmap&))); FindDuplicateItem *last = NULL; - QFile *f = NULL; - QFileInfo *fi = new QFileInfo(); - QString fn; + TQFile *f = NULL; + TQFileInfo *fi = new TQFileInfo(); + TQString fn; for (unsigned int i = 0 ; i < list->size () ; ++i) { - f = (QFile*)list->at(i); + f = (TQFile*)list->at(i); fi->setFile(*f); fn = fi->absFilePath(); if (fi->exists ()) { - QString Temp = fi->dirPath(); - QString albumName = Temp.section('/', -1); + TQString Temp = fi->dirPath(); + TQString albumName = Temp.section('/', -1); KURL url; url.setPath(fi->fileName()); KIPI::ImageInfo info = m_interface->info(url); - QString comments = info.description(); + TQString comments = info.description(); FindDuplicateItem *item = new FindDuplicateItem( listEq, fi->fileName(), @@ -402,7 +402,7 @@ void DisplayCompare::slotDisplayLeft(QListViewItem * item) } } - preview2->setPixmap(QPixmap()); + preview2->setPixmap(TQPixmap()); listEq->setSelected(last, true); KApplication::restoreOverrideCursor(); } @@ -410,7 +410,7 @@ void DisplayCompare::slotDisplayLeft(QListViewItem * item) ///////////////////////////////////////////////////////////////////////////////////////////// -void DisplayCompare::slotGotPreview1(const KFileItem* /*url*/, const QPixmap &pixmap) +void DisplayCompare::slotGotPreview1(const KFileItem* /*url*/, const TQPixmap &pixmap) { preview1->setPixmap(pixmap); } @@ -418,34 +418,34 @@ void DisplayCompare::slotGotPreview1(const KFileItem* /*url*/, const QPixmap &pi ///////////////////////////////////////////////////////////////////////////////////////////// -void DisplayCompare::slotDisplayRight(QListViewItem * item) +void DisplayCompare::slotDisplayRight(TQListViewItem * item) { KApplication::setOverrideCursor( waitCursor ); FindDuplicateItem *pitem = static_cast<FindDuplicateItem*>( item ); - QImage im(pitem->fullpath()); + TQImage im(pitem->fullpath()); if ( !im.isNull() ) { similarNameLabel->setText(pitem->name()); - similarInfoLabel1->setText(i18n("Image size: %1x%2 pixels").arg(im.width()).arg(im.height())); + similarInfoLabel1->setText(i18n("Image size: %1x%2 pixels").tqarg(im.width()).tqarg(im.height())); similarInfoLabel2->setText(i18n("File size: 1 byte", - "File size: %n bytes", QFileInfo(pitem->fullpath()).size())); - similarInfoLabel3->setText(i18n("Modified: %1").arg(KLocale(NULL) - .formatDateTime(QFileInfo(pitem->fullpath()) + "File size: %n bytes", TQFileInfo(pitem->fullpath()).size())); + similarInfoLabel3->setText(i18n("Modified: %1").tqarg(KLocale(NULL) + .formatDateTime(TQFileInfo(pitem->fullpath()) .lastModified()))); - similarInfoLabel4->setText(i18n("Album: %1").arg(pitem->album())); - similarInfoLabel5->setText(i18n("Caption: %1").arg(pitem->comments())); + similarInfoLabel4->setText(i18n("Album: %1").tqarg(pitem->album())); + similarInfoLabel5->setText(i18n("Caption: %1").tqarg(pitem->comments())); } preview2->clear(); - QString IdemIndexed = "file:" + pitem->fullpath(); + TQString IdemIndexed = "file:" + pitem->fullpath(); KURL url(IdemIndexed); KIO::PreviewJob* thumbJob2 = KIO::filePreview( url, preview2->height() ); - connect(thumbJob2, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), - SLOT(slotGotPreview2(const KFileItem*, const QPixmap&))); + connect(thumbJob2, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), + TQT_SLOT(slotGotPreview2(const KFileItem*, const TQPixmap&))); KApplication::restoreOverrideCursor(); } @@ -453,7 +453,7 @@ void DisplayCompare::slotDisplayRight(QListViewItem * item) ///////////////////////////////////////////////////////////////////////////////////////////// -void DisplayCompare::slotGotPreview2(const KFileItem* /*url*/, const QPixmap &pixmap) +void DisplayCompare::slotGotPreview2(const KFileItem* /*url*/, const TQPixmap &pixmap) { preview2->setPixmap(pixmap); } diff --git a/kipi-plugins/findimages/displaycompare.h b/kipi-plugins/findimages/displaycompare.h index 18e4681..8edcba8 100644 --- a/kipi-plugins/findimages/displaycompare.h +++ b/kipi-plugins/findimages/displaycompare.h @@ -24,11 +24,11 @@ #ifndef __DISPLAYCOMPARE_H__ #define __DISPLAYCOMPARE_H__ -// Include files for Qt +// Include files for TQt -#include <qptrvector.h> -#include <qdict.h> -#include <qguardedptr.h> +#include <tqptrvector.h> +#include <tqdict.h> +#include <tqguardedptr.h> // Include files for KDE @@ -42,16 +42,16 @@ #include "kpaboutdata.h" -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QGroupBox; -class QLabel; -class QListView; -class QListViewItem; -class QPushButton; -class QPrtList; -class QFile; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQGroupBox; +class TQLabel; +class TQListView; +class TQListViewItem; +class TQPushButton; +class TQPrtList; +class TQFile; class KSqueezedTextLabel; class KFileItem; @@ -62,27 +62,28 @@ namespace KIPIFindDupplicateImagesPlugin class DisplayCompare : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DisplayCompare(QWidget* parent, KIPI::Interface* interface, const QDict < QPtrVector < QFile > >& cmp); + DisplayCompare(TQWidget* tqparent, KIPI::Interface* interface, const TQDict < TQPtrVector < TQFile > >& cmp); ~DisplayCompare(); private slots : - void slotDisplayRight(QListViewItem *); - void slotDisplayLeft(QListViewItem *); + void slotDisplayRight(TQListViewItem *); + void slotDisplayLeft(TQListViewItem *); void slotHelp(); void slotDelete( void ); - void slotGotPreview1(const KFileItem* url, const QPixmap &pixmap); - void slotGotPreview2(const KFileItem* url, const QPixmap &pixmap); + void slotGotPreview1(const KFileItem* url, const TQPixmap &pixmap); + void slotGotPreview2(const KFileItem* url, const TQPixmap &pixmap); private: - const QDict < QPtrVector < QFile > > m_cmp; + const TQDict < TQPtrVector < TQFile > > m_cmp; - QGroupBox* GroupBox1; - QGroupBox* GroupBox2; + TQGroupBox* GroupBox1; + TQGroupBox* GroupBox2; KSqueezedTextLabel* OriginalNameLabel; KSqueezedTextLabel* originalInfoLabel1; @@ -98,13 +99,13 @@ private: KSqueezedTextLabel* similarInfoLabel4; KSqueezedTextLabel* similarInfoLabel5; - QLabel* preview1; - QLabel* preview2; + TQLabel* preview1; + TQLabel* preview2; - QListView* listName; - QListView* listEq; + TQListView* listName; + TQListView* listEq; - QPushButton *m_helpButton; + TQPushButton *m_helpButton; KIPI::Interface *m_interface; diff --git a/kipi-plugins/findimages/fastcompare.cpp b/kipi-plugins/findimages/fastcompare.cpp index 858a69c..0cd0b51 100644 --- a/kipi-plugins/findimages/fastcompare.cpp +++ b/kipi-plugins/findimages/fastcompare.cpp @@ -24,58 +24,58 @@ #include "fastcompare.h" #include "actions.h" -#include <qstringlist.h> -#include <qapplication.h> +#include <tqstringlist.h> +#include <tqapplication.h> #include <kdebug.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> -KIPIFindDupplicateImagesPlugin::FastCompare::FastCompare( QObject* parent ) - :m_parent( parent ) +KIPIFindDupplicateImagesPlugin::FastCompare::FastCompare( TQObject* tqparent ) + :m_parent( tqparent ) { } -QDict < QPtrVector < QFile > > KIPIFindDupplicateImagesPlugin::FastCompare::compare( const QStringList& filesList ) +TQDict < TQPtrVector < TQFile > > KIPIFindDupplicateImagesPlugin::FastCompare::compare( const TQStringList& filesList ) { - QDict < QPtrVector < QFile > > res; - QDict < QPtrVector < QFile > >*dict = new QDict < QPtrVector < QFile > >; + TQDict < TQPtrVector < TQFile > > res; + TQDict < TQPtrVector < TQFile > >*dict = new TQDict < TQPtrVector < TQFile > >; dict->setAutoDelete(true); - QPtrVector < QFile > *list; + TQPtrVector < TQFile > *list; - QString size; - QFile *file; + TQString size; + TQFile *file; int nbrF = 0; - sendMessage( m_parent, KIPIFindDupplicateImagesPlugin::Progress, QString::null, filesList.count()*2, true, false ); + sendMessage( m_parent, KIPIFindDupplicateImagesPlugin::Progress, TQString(), filesList.count()*2, true, false ); kdDebug( 51000 ) << filesList.count() << " images to parse with Fast method..." << endl; - for ( QStringList::ConstIterator item = filesList.begin(); item != filesList.end(); ++item ) + for ( TQStringList::ConstIterator item = filesList.begin(); item != filesList.end(); ++item ) { if ( m_stopRequested ) - return QDict < QPtrVector < QFile > >(); + return TQDict < TQPtrVector < TQFile > >(); - QString itemName(*item); + TQString itemName(*item); nbrF++; sendMessage( m_parent, KIPIFindDupplicateImagesPlugin::FastParsing, itemName, 0, true, false ); // Create a file - file = new QFile( itemName ); + file = new TQFile( itemName ); // Read the file size - size = QString::number(QFileInfo (*file).size ()); + size = TQString::number(TQFileInfo (*file).size ()); // if not in the table, we do it - if ( !dict->find (size) ) + if ( !dict->tqfind (size) ) { - list = new QPtrVector < QFile >; + list = new TQPtrVector < TQFile >; list->setAutoDelete(true); dict->insert (size, list); } // Read the list - list = (QPtrVector < QFile > *)dict->find (size); + list = (TQPtrVector < TQFile > *)dict->tqfind (size); //Add the file list->resize (list->size () + 1); @@ -86,11 +86,11 @@ QDict < QPtrVector < QFile > > KIPIFindDupplicateImagesPlugin::FastCompare::comp // For counting the files comparaison tasks. int count = 0; - QDictIterator < QPtrVector < QFile > >itcount (*dict); // Iterator for dict. + TQDictIterator < TQPtrVector < TQFile > >itcount (*dict); // Iterator for dict. while (itcount.current ()) { - list = (QPtrVector < QFile > *)itcount.current (); + list = (TQPtrVector < TQFile > *)itcount.current (); if (list->size () != 1) for (unsigned int i = 0; i < list->size (); i++) @@ -100,45 +100,45 @@ QDict < QPtrVector < QFile > > KIPIFindDupplicateImagesPlugin::FastCompare::comp } // Files comparison - QDictIterator < QPtrVector < QFile > >it (*dict); // Iterator for dict. + TQDictIterator < TQPtrVector < TQFile > >it (*dict); // Iterator for dict. while (it.current ()) { if ( m_stopRequested ) - return QDict < QPtrVector < QFile > >(); - QDict < QFile > *fait = new QDict < QFile >; - list = (QPtrVector < QFile > *)it.current (); + return TQDict < TQPtrVector < TQFile > >(); + TQDict < TQFile > *fait = new TQDict < TQFile >; + list = (TQPtrVector < TQFile > *)it.current (); if (list->size () != 1) { for (unsigned int i = 0; i < list->size (); i++) { - QFile *file1 = (QFile *) (list->at (i)); + TQFile *file1 = (TQFile *) (list->at (i)); sendMessage( m_parent, KIPIFindDupplicateImagesPlugin::Exact,file1->name(),filesList.count() + count, true, false ); - if (!fait->find (file1->name())) + if (!fait->tqfind (file1->name())) { for (unsigned int j = i + 1; j < list->size (); j++) { - QFile *file2 = (QFile *) (list->at (j)); + TQFile *file2 = (TQFile *) (list->at (j)); // The files are equals ? if (equals (file1, file2)) { - QPtrVector < QFile > *vect; + TQPtrVector < TQFile > *vect; // Add the file. - if (!res.find (file1->name ())) + if (!res.tqfind (file1->name ())) { - vect = new QPtrVector < QFile >; + vect = new TQPtrVector < TQFile >; vect->setAutoDelete(true); res.insert (file1->name (), vect); } else - vect = (QPtrVector < QFile > *)res.find (file1->name ()); + vect = (TQPtrVector < TQFile > *)res.tqfind (file1->name ()); vect->resize (vect->size () + 1); vect->insert (vect->size () - 1, file2); @@ -164,18 +164,18 @@ QDict < QPtrVector < QFile > > KIPIFindDupplicateImagesPlugin::FastCompare::comp ///////////////////////////////////////////////////////////////////////////////////////////// // Nota: original source code from ShowImg ! -bool KIPIFindDupplicateImagesPlugin::FastCompare::equals(QFile * f1, QFile * f2) +bool KIPIFindDupplicateImagesPlugin::FastCompare::equals(TQFile * f1, TQFile * f2) { - if ( QFileInfo (*f1).size () != QFileInfo (*f2).size () ) + if ( TQFileInfo (*f1).size () != TQFileInfo (*f2).size () ) return false; f1->open (IO_ReadOnly); f2->open (IO_ReadOnly); - QDataStream s1 (f1); - QDataStream s2 (f2); + TQDataStream s1 (f1); + TQDataStream s2 (f2); - Q_INT8 b1, b2; + TQ_INT8 b1, b2; bool eq = true; while ( !s1.atEnd () && eq ) diff --git a/kipi-plugins/findimages/fastcompare.h b/kipi-plugins/findimages/fastcompare.h index 0222880..f939799 100644 --- a/kipi-plugins/findimages/fastcompare.h +++ b/kipi-plugins/findimages/fastcompare.h @@ -25,11 +25,11 @@ #ifndef FASTCOMPARE_H #define FASTCOMPARE_H -class QStringList; -class QObject; -#include <qdict.h> -#include <qptrvector.h> -#include <qfile.h> +class TQStringList; +class TQObject; +#include <tqdict.h> +#include <tqptrvector.h> +#include <tqfile.h> #include "actions.h" #include "compareoperation.h" @@ -39,14 +39,14 @@ namespace KIPIFindDupplicateImagesPlugin class FastCompare :public CompareOperation { public: - FastCompare( QObject* parent ); - virtual QDict < QPtrVector < QFile > > compare( const QStringList& filesList ); + FastCompare( TQObject* tqparent ); + virtual TQDict < TQPtrVector < TQFile > > compare( const TQStringList& filesList ); protected: - bool equals(QFile*, QFile*); // Return true if the 2 files are the sames. + bool equals(TQFile*, TQFile*); // Return true if the 2 files are the sames. private: - QObject* m_parent; + TQObject* m_parent; }; } diff --git a/kipi-plugins/findimages/finddupplicatedialog.cpp b/kipi-plugins/findimages/finddupplicatedialog.cpp index cd6cfe5..0ff548e 100644 --- a/kipi-plugins/findimages/finddupplicatedialog.cpp +++ b/kipi-plugins/findimages/finddupplicatedialog.cpp @@ -20,21 +20,21 @@ // ////////////////////////////////////////////////////////////////////////////// -// Include files for Qt - -#include <qlabel.h> -#include <qvbox.h> -#include <qgroupbox.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qspinbox.h> -#include <qlistview.h> -#include <qheader.h> -#include <qpushbutton.h> -#include <qfileinfo.h> +// Include files for TQt + +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqgroupbox.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqspinbox.h> +#include <tqlistview.h> +#include <tqheader.h> +#include <tqpushbutton.h> +#include <tqfileinfo.h> // Include files for KDE @@ -73,9 +73,9 @@ namespace KIPIFindDupplicateImagesPlugin { -FindDuplicateDialog::FindDuplicateDialog( KIPI::Interface* interface, QWidget *parent) +FindDuplicateDialog::FindDuplicateDialog( KIPI::Interface* interface, TQWidget *tqparent) : KDialogBase( IconList, i18n("Configure"), Help|Ok|Cancel, - Ok, parent, "FindDuplicateDialog", true, false ), + Ok, tqparent, "FindDuplicateDialog", true, false ), m_interface( interface ) { setCaption(i18n("Find Duplicate Images")); @@ -105,7 +105,7 @@ FindDuplicateDialog::FindDuplicateDialog( KIPI::Interface* interface, QWidget *p m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); } @@ -126,9 +126,9 @@ void FindDuplicateDialog::setupSelection(void) i18n("Album's Selection"), BarIcon("folder_image", KIcon::SizeMedium)); - QVBoxLayout *layout = new QVBoxLayout(page_setupSelection, 0, spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout(page_setupSelection, 0, spacingHint() ); m_imageCollectionSelector = new KIPI::ImageCollectionSelector(page_setupSelection, m_interface); - layout->addWidget(m_imageCollectionSelector); + tqlayout->addWidget(m_imageCollectionSelector); } @@ -136,24 +136,24 @@ void FindDuplicateDialog::setupSelection(void) void FindDuplicateDialog::setupPageMethod(void) { - QString whatsThis; + TQString whatsThis; page_setupMethod = addPage( i18n("Method & Cache"), i18n("Find-Duplicates Method & Cache Configuration"), BarIcon("run", KIcon::SizeMedium ) ); - QVBoxLayout *vlay = new QVBoxLayout( page_setupMethod, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page_setupMethod, 0, spacingHint() ); //--------------------------------------------- - QGroupBox * groupBox1 = new QGroupBox( 2, Qt::Horizontal, i18n("Method"), page_setupMethod ); - groupBox1->layout()->setSpacing( 6 ); - groupBox1->layout()->setMargin( 11 ); + TQGroupBox * groupBox1 = new TQGroupBox( 2, Qt::Horizontal, i18n("Method"), page_setupMethod ); + groupBox1->tqlayout()->setSpacing( 6 ); + groupBox1->tqlayout()->setMargin( 11 ); - QLabel *m_labelsearchMethod = new QLabel( i18n("Search method:"), groupBox1 ); - m_findMethod = new QComboBox(false, groupBox1); + TQLabel *m_labelsearchMethod = new TQLabel( i18n("Search method:"), groupBox1 ); + m_findMethod = new TQComboBox(false, groupBox1); m_findMethod->insertItem(i18n("Almost"), MethodAlmost); m_findMethod->insertItem(i18n("Fast"), MethodFast); m_findMethod->setCurrentItem ( MethodAlmost ); - QWhatsThis::add( m_findMethod, i18n("<p>Select here the search method used to find duplicate " + TQWhatsThis::add( m_findMethod, i18n("<p>Select here the search method used to find duplicate " "images in the Albums database.<p>" "<b>Almost</b>: the algorithm calculates an approximate difference between images. " "This method is slower but robust. You can affine the thresholding using the " @@ -162,48 +162,48 @@ void FindDuplicateDialog::setupPageMethod(void) "This method is faster but is not as robust.")); m_labelsearchMethod->setBuddy( m_findMethod ); - (void) new QLabel (i18n("Approximate threshold:"), groupBox1); + (void) new TQLabel (i18n("Approximate threshold:"), groupBox1); m_approximateThreshold = new KIntNumInput(88, groupBox1); m_approximateThreshold->setRange(60, 100, 1, true ); - QWhatsThis::add( m_approximateThreshold, i18n("<p>Select here the approximate threshold " - "value, as a percentage, for the 'Almost' find-duplicates method. " + TQWhatsThis::add( m_approximateThreshold, i18n("<p>Select here the approximate threshold " + "value, as a percentage, for the 'Almost' tqfind-duplicates method. " "This value is used by the algorithm to distinguish two " "similar images. The default value is 88.") ); vlay->addWidget( groupBox1 ); //--------------------------------------------- - QGroupBox * groupBox2 = new QGroupBox( 1, Qt::Horizontal, i18n("Cache Maintenance"), page_setupMethod ); - new QLabel(i18n("The find-duplicate-images process uses a cache folder for images' fingerprints\n" + TQGroupBox * groupBox2 = new TQGroupBox( 1, Qt::Horizontal, i18n("Cache Maintenance"), page_setupMethod ); + new TQLabel(i18n("The tqfind-duplicate-images process uses a cache folder for images' fingerprints\n" "to speed up the analysis of items from Albums."), groupBox2); - QPushButton* updateCache = new QPushButton( groupBox2, "UpdateCache" ); + TQPushButton* updateCache = new TQPushButton( groupBox2, "UpdateCache" ); updateCache->setText(i18n( "&Update Cache" )); - QWhatsThis::add( updateCache, i18n("<p>Update the cache data for the selected Albums.") ); - QPushButton* purgeCache = new QPushButton( groupBox2, "PurgeCacheAlbumsSelected" ); + TQWhatsThis::add( updateCache, i18n("<p>Update the cache data for the selected Albums.") ); + TQPushButton* purgeCache = new TQPushButton( groupBox2, "PurgeCacheAlbumsSelected" ); purgeCache->setText(i18n( "&Purge Cache (Albums Selected)" )); - QWhatsThis::add( purgeCache, i18n("<p>Purge the cache data for the selected Albums.") ); - QPushButton* purgeAllCache = new QPushButton( groupBox2, "PurgeAllCache" ); + TQWhatsThis::add( purgeCache, i18n("<p>Purge the cache data for the selected Albums.") ); + TQPushButton* purgeAllCache = new TQPushButton( groupBox2, "PurgeAllCache" ); purgeAllCache->setText(i18n( "&Purge All Caches" )); - QWhatsThis::add( purgeAllCache, i18n("<p>Purge the cache data for all Albums.") ); + TQWhatsThis::add( purgeAllCache, i18n("<p>Purge the cache data for all Albums.") ); vlay->addWidget( groupBox2 ); vlay->addStretch(1); //--------------------------------------------- - connect(m_findMethod, SIGNAL(activated(int)), - this, SLOT(slotfindMethodChanged(int))); + connect(m_findMethod, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotfindMethodChanged(int))); - connect(updateCache, SIGNAL(clicked()), - this, SLOT(slotUpdateCache())); + connect(updateCache, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotUpdateCache())); - connect(purgeCache, SIGNAL(clicked()), - this, SLOT(slotPurgeCache())); + connect(purgeCache, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotPurgeCache())); - connect(purgeAllCache, SIGNAL(clicked()), - this, SLOT(slotPurgeAllCache())); + connect(purgeAllCache, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotPurgeAllCache())); slotfindMethodChanged(m_findMethod->currentItem()); } @@ -233,13 +233,13 @@ void FindDuplicateDialog::slotfindMethodChanged(int index) void FindDuplicateDialog::slotUpdateCache(void) { - QValueList<KIPI::ImageCollection> albumsList = getSelectedAlbums(); - QStringList albumsListPath; + TQValueList<KIPI::ImageCollection> albumsList = getSelectedAlbums(); + TQStringList albumsListPath; - for( QValueList<KIPI::ImageCollection>::ConstIterator album = albumsList.begin() ; + for( TQValueList<KIPI::ImageCollection>::ConstIterator album = albumsList.begin() ; album != albumsList.end() ; ++album ) { - if ( !albumsListPath.contains( (*album).path().path() ) ) + if ( !albumsListPath.tqcontains( (*album).path().path() ) ) albumsListPath.append( (*album).path().path() ); } @@ -254,14 +254,14 @@ void FindDuplicateDialog::slotUpdateCache(void) void FindDuplicateDialog::slotPurgeCache(void) { - QValueList<KIPI::ImageCollection> albumsList = getSelectedAlbums(); + TQValueList<KIPI::ImageCollection> albumsList = getSelectedAlbums(); - QStringList albumsListPath; + TQStringList albumsListPath; - for( QValueList<KIPI::ImageCollection>::ConstIterator album = albumsList.begin() ; + for( TQValueList<KIPI::ImageCollection>::ConstIterator album = albumsList.begin() ; album != albumsList.end() ; ++album ) { - if ( !albumsListPath.contains( (*album).path().path() ) ) + if ( !albumsListPath.tqcontains( (*album).path().path() ) ) albumsListPath.append( (*album).path().path() ); } @@ -296,7 +296,7 @@ void FindDuplicateDialog::slotOk() ///////////////////////////////////////////////////////////////////////////////////////////// -QValueList<KIPI::ImageCollection> FindDuplicateDialog::getSelectedAlbums() const +TQValueList<KIPI::ImageCollection> FindDuplicateDialog::getSelectedAlbums() const { return m_imageCollectionSelector->selectedImageCollections(); } diff --git a/kipi-plugins/findimages/finddupplicatedialog.h b/kipi-plugins/findimages/finddupplicatedialog.h index c66e661..64c5422 100644 --- a/kipi-plugins/findimages/finddupplicatedialog.h +++ b/kipi-plugins/findimages/finddupplicatedialog.h @@ -23,10 +23,10 @@ #ifndef FINDDUPPLICATEDIALOG_H #define FINDDUPPLICATEDIALOG_H -// Include files for Qt +// Include files for TQt -#include <qstring.h> -#include <qguardedptr.h> +#include <tqstring.h> +#include <tqguardedptr.h> // Include files for KDE @@ -40,9 +40,9 @@ #include "kpaboutdata.h" -class QComboBox; -class QFrame; -class QPushButton; +class TQComboBox; +class TQFrame; +class TQPushButton; class KFileItem; class KIntNumInput; @@ -59,10 +59,11 @@ namespace KIPIFindDupplicateImagesPlugin class FindDuplicateDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FindDuplicateDialog( KIPI::Interface* interface, QWidget *parent=0); + FindDuplicateDialog( KIPI::Interface* interface, TQWidget *tqparent=0); ~FindDuplicateDialog(); int getFindMethod() const; @@ -71,7 +72,7 @@ class FindDuplicateDialog : public KDialogBase const int getApproximateThreeshold() const; void setApproximateThreeshold(int Value); - QValueList<KIPI::ImageCollection> getSelectedAlbums() const; + TQValueList<KIPI::ImageCollection> getSelectedAlbums() const; enum FindDuplicateMethod { MethodAlmost = 0, @@ -80,8 +81,8 @@ class FindDuplicateDialog : public KDialogBase signals: - void updateCache(QStringList fromDir); - void clearCache(QStringList fromDir); + void updateCache(TQStringList fromDir); + void clearCache(TQStringList fromDir); void clearAllCache(void); protected slots: @@ -95,12 +96,12 @@ class FindDuplicateDialog : public KDialogBase private: - QComboBox *m_findMethod; + TQComboBox *m_findMethod; - QFrame *page_setupSelection; - QFrame *page_setupMethod; + TQFrame *page_setupSelection; + TQFrame *page_setupMethod; - QPushButton *m_helpButton; + TQPushButton *m_helpButton; KIntNumInput *m_approximateThreshold; diff --git a/kipi-plugins/findimages/finddupplicateimages.cpp b/kipi-plugins/findimages/finddupplicateimages.cpp index bbe7b5f..d8bcee3 100644 --- a/kipi-plugins/findimages/finddupplicateimages.cpp +++ b/kipi-plugins/findimages/finddupplicateimages.cpp @@ -30,14 +30,14 @@ extern "C" #include <math.h> } -// Include files for Qt +// Include files for TQt -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> -#include <qimage.h> -#include <qprogressdialog.h> -#include <qmutex.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqimage.h> +#include <tqprogressdialog.h> +#include <tqmutex.h> // Include files for KDE @@ -63,7 +63,7 @@ extern "C" #include "finddupplicatedialog.h" #include "displaycompare.h" #include "actions.h" -#include <qcursor.h> +#include <tqcursor.h> #include "imagesimilaritydata.h" #include "fuzzycompare.h" #include "fastcompare.h" @@ -74,13 +74,13 @@ namespace KIPIFindDupplicateImagesPlugin //////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////// -FindDuplicateImages::FindDuplicateImages( KIPI::Interface* interface, QObject *parent) - : QObject(parent), QThread(), m_interface( interface ), +FindDuplicateImages::FindDuplicateImages( KIPI::Interface* interface, TQObject *tqparent) + : TQObject(tqparent), TQThread(), m_interface( interface ), m_cacheDir(KGlobal::dirs()->saveLocation("cache", "kipi-findduplicate/")), m_compareOp( 0 ) { KImageIO::registerFormats(); - parent_ = parent; + tqparent_ = tqparent; } @@ -134,22 +134,22 @@ void FindDuplicateImages::readSettings(void) bool FindDuplicateImages::execDialog() { - qApp->setOverrideCursor( QCursor(Qt::WaitCursor) ); - m_findDuplicateDialog = new FindDuplicateDialog( m_interface, kapp->activeWindow() ); - qApp->restoreOverrideCursor(); + tqApp->setOverrideCursor( TQCursor(TQt::WaitCursor) ); + m_findDuplicateDialog = new FindDuplicateDialog( m_interface, TQT_TQWIDGET(kapp->activeWindow()) ); + tqApp->restoreOverrideCursor(); readSettings(); - connect( m_findDuplicateDialog, SIGNAL(updateCache(QStringList)), - this, SLOT(slotUpdateCache(QStringList)) ); + connect( m_findDuplicateDialog, TQT_SIGNAL(updateCache(TQStringList)), + this, TQT_SLOT(slotUpdateCache(TQStringList)) ); - connect( m_findDuplicateDialog, SIGNAL(clearCache(QStringList)), - this, SLOT(slotClearCache(QStringList)) ); + connect( m_findDuplicateDialog, TQT_SIGNAL(clearCache(TQStringList)), + this, TQT_SLOT(slotClearCache(TQStringList)) ); - connect( m_findDuplicateDialog, SIGNAL(clearAllCache()), - this, SLOT(slotClearAllCache()) ); + connect( m_findDuplicateDialog, TQT_SIGNAL(clearAllCache()), + this, TQT_SLOT(slotClearAllCache()) ); - if ( m_findDuplicateDialog->exec() == QDialog::Accepted ) + if ( m_findDuplicateDialog->exec() == TQDialog::Accepted ) { // This is the value for approximate comparison level between 2 images. m_approximateLevel = (float) m_findDuplicateDialog->getApproximateThreeshold() / (float)100; @@ -167,9 +167,9 @@ bool FindDuplicateImages::execDialog() void FindDuplicateImages::showResult() { if( !m_res.isEmpty() ) - DisplayCompare((QWidget *)(kapp->activeWindow()), m_interface, m_res).exec(); + DisplayCompare((TQWidget *)(TQT_TQWIDGET(kapp->activeWindow())), m_interface, m_res).exec(); else - KMessageBox::information(kapp->activeWindow(), i18n("No identical files found")); + KMessageBox::information(TQT_TQWIDGET(kapp->activeWindow()), i18n("No identical files found")); } @@ -177,22 +177,22 @@ void FindDuplicateImages::showResult() void FindDuplicateImages::compareAlbums(void) { - qApp->setOverrideCursor( QCursor(Qt::WaitCursor) ); + tqApp->setOverrideCursor( TQCursor(TQt::WaitCursor) ); writeSettings(); // Prepare the data for the threaded operations. - QValueList<KIPI::ImageCollection> ListAlbums(m_findDuplicateDialog->getSelectedAlbums()); + TQValueList<KIPI::ImageCollection> ListAlbums(m_findDuplicateDialog->getSelectedAlbums()); filesList.clear(); - for( QValueList<KIPI::ImageCollection>::Iterator it = ListAlbums.begin(); it != ListAlbums.end(); ++it ) + for( TQValueList<KIPI::ImageCollection>::Iterator it = ListAlbums.begin(); it != ListAlbums.end(); ++it ) { KURL::List Files = (*it).images(); for( KURL::List::Iterator it2 = Files.begin(); it2 != Files.end(); ++it2 ) { - if ( !filesList.contains( (*it2).path() ) ) + if ( !filesList.tqcontains( (*it2).path() ) ) { filesList.append( (*it2).path() ); // PENDING(blackie) handle remote URLS } @@ -203,16 +203,16 @@ void FindDuplicateImages::compareAlbums(void) if ( m_findDuplicateDialog->getFindMethod() == FindDuplicateDialog::MethodAlmost ) { - FuzzyCompare *op = new FuzzyCompare( parent_, m_cacheDir ); + FuzzyCompare *op = new FuzzyCompare( tqparent_, m_cacheDir ); op->setApproximateThreeshold( m_approximateLevel ); m_compareOp = op; } else - m_compareOp = new FastCompare( parent_ ); + m_compareOp = new FastCompare( tqparent_ ); start(); // Starting the thread. - qApp->restoreOverrideCursor(); + tqApp->restoreOverrideCursor(); } @@ -222,20 +222,20 @@ void FindDuplicateImages::compareAlbums(void) void FindDuplicateImages::run() { m_res = m_compareOp->compare(filesList ); - sendMessage( parent_, KIPIFindDupplicateImagesPlugin::Progress, QString::null, 0, false, true ); + sendMessage( tqparent_, KIPIFindDupplicateImagesPlugin::Progress, TQString(), 0, false, true ); } ///////////////////////////////////////////////////////////////////////////////////////////// // Nota: original source code from ShowImg ! -void FindDuplicateImages::slotClearCache(QStringList fromDirs) +void FindDuplicateImages::slotClearCache(TQStringList fromDirs) { bool delOk = true; - for ( QStringList::Iterator it = fromDirs.begin(); it != fromDirs.end(); ++it ) + for ( TQStringList::Iterator it = fromDirs.begin(); it != fromDirs.end(); ++it ) { - QString deleteImage = m_cacheDir + *it ; + TQString deleteImage = m_cacheDir + *it ; if ( DeleteDir(deleteImage) == false ) delOk = false; @@ -264,15 +264,15 @@ void FindDuplicateImages::slotClearAllCache(void) ///////////////////////////////////////////////////////////////////////////////////////////// // Nota: original source code from ShowImg ! -void FindDuplicateImages::slotUpdateCache(QStringList fromDirs) +void FindDuplicateImages::slotUpdateCache(TQStringList fromDirs) { - pdCache = new QProgressDialog (m_findDuplicateDialog, "tmppb", true); + pdCache = new TQProgressDialog (m_findDuplicateDialog, "tmppb", true); pdCache->setLabelText(i18n("Updating in progress...")); pdCache->setTotalSteps(2); pdCache->show(); pdCache->setProgress(2); - for ( QStringList::Iterator it = fromDirs.begin(); it != fromDirs.end(); ++it ) + for ( TQStringList::Iterator it = fromDirs.begin(); it != fromDirs.end(); ++it ) updateCache(*it); pdCache->close(); @@ -284,35 +284,35 @@ void FindDuplicateImages::slotUpdateCache(QStringList fromDirs) ///////////////////////////////////////////////////////////////////////////////////////////// // Nota: original source code from ShowImg ! -void FindDuplicateImages::updateCache(QString fromDir) +void FindDuplicateImages::updateCache(TQString fromDir) { // PENDING(blackie) this method doesn't seem to work. kdDebug( 51000 ) << fromDir.ascii() << endl; pdCache->setLabelText(i18n("Updating in progress for:\n") + fromDir); - QDir d(m_cacheDir + fromDir); + TQDir d(m_cacheDir + fromDir); int len = m_cacheDir.length()-1; // Remove trailing / bool delDir = false; kdDebug( 51000 ) << m_cacheDir + fromDir.latin1() << endl; - if ( !QFileInfo(fromDir).exists() ) + if ( !TQFileInfo(fromDir).exists() ) delDir = true; // If the source folder have been removed, remove also the cache... - d.setFilter( QDir::All | QDir::Hidden | QDir::NoSymLinks ); - const QFileInfoList *list = d.entryInfoList(); + d.setFilter( TQDir::All | TQDir::Hidden | TQDir::NoSymLinks ); + const TQFileInfoList *list = d.entryInfoList(); if ( !list ) return; - QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfoListIterator it( *list ); + TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { kapp->processEvents(); - QString fCache=fi->absFilePath(); - QString orgFile=fCache.right(fCache.length()-len); + TQString fCache=fi->absFilePath(); + TQString orgFile=fCache.right(fCache.length()-len); if ( fi->isDir() && !fromDir.startsWith(orgFile) ) { @@ -320,17 +320,17 @@ void FindDuplicateImages::updateCache(QString fromDir) } else { - if ( !QFileInfo(orgFile).exists() && QFileInfo(orgFile).extension(false) != "dat" ) + if ( !TQFileInfo(orgFile).exists() && TQFileInfo(orgFile).extension(false) != "dat" ) { - QDir().remove(fCache); - QDir().remove(fCache + ".dat"); + TQDir().remove(fCache); + TQDir().remove(fCache + ".dat"); } } ++it; } if (delDir) - QDir().rmdir(m_cacheDir + fromDir); + TQDir().rmdir(m_cacheDir + fromDir); } @@ -363,11 +363,11 @@ float FindDuplicateImages::image_sim_compare(ImageSimilarityData *a, ImageSimila ///////////////////////////////////////////////////////////////////////////////////////////////////// -bool FindDuplicateImages::DeleteDir(QString dirname) +bool FindDuplicateImages::DeleteDir(TQString dirname) { if ( !dirname.isEmpty() ) { - QDir dir; + TQDir dir; if (dir.exists ( dirname ) == true) { @@ -389,14 +389,14 @@ bool FindDuplicateImages::DeleteDir(QString dirname) ///////////////////////////////////////////////////////////////////////////////////////////////////// -bool FindDuplicateImages::deldir(QString dirname) +bool FindDuplicateImages::deldir(TQString dirname) { - QDir *dir = new QDir(dirname); - dir->setFilter ( QDir::Dirs | QDir::Files | QDir::NoSymLinks ); + TQDir *dir = new TQDir(dirname); + dir->setFilter ( TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks ); - const QFileInfoList* fileinfolist = dir->entryInfoList(); - QFileInfoListIterator it(*fileinfolist); - QFileInfo* fi; + const TQFileInfoList* fileinfolist = dir->entryInfoList(); + TQFileInfoListIterator it(*fileinfolist); + TQFileInfo* fi; while( (fi = it.current() ) ) { diff --git a/kipi-plugins/findimages/finddupplicateimages.h b/kipi-plugins/findimages/finddupplicateimages.h index 04d35fb..8de237c 100644 --- a/kipi-plugins/findimages/finddupplicateimages.h +++ b/kipi-plugins/findimages/finddupplicateimages.h @@ -26,23 +26,23 @@ #ifndef FINDDUPPLICATEIMAGES_H #define FINDDUPPLICATEIMAGES_H -// Include files for Qt +// Include files for TQt -#include <qobject.h> -#include <qstring.h> -#include <qthread.h> -#include <qstringlist.h> -#include <qptrvector.h> -#include <qdict.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqthread.h> +#include <tqstringlist.h> +#include <tqptrvector.h> +#include <tqdict.h> // Includes file for libKIPI. #include <libkipi/interface.h> -class QProgressDialog; -class QFile; -class QCustomEvent; -class QMutex; +class TQProgressDialog; +class TQFile; +class TQCustomEvent; +class TQMutex; class KConfig; @@ -53,12 +53,13 @@ class ImageSimilarityData; class FindDuplicateDialog; class CompareOperation; -class FindDuplicateImages : public QObject, public QThread +class FindDuplicateImages : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: - FindDuplicateImages( KIPI::Interface* interface, QObject *parent=0); + FindDuplicateImages( KIPI::Interface* interface, TQObject *tqparent=0); ~FindDuplicateImages(); virtual void run(); @@ -69,29 +70,29 @@ public: void stopPlease(); public slots: - void slotUpdateCache(QStringList fromDirs); - void slotClearCache(QStringList fromDir); + void slotUpdateCache(TQStringList fromDirs); + void slotClearCache(TQStringList fromDir); void slotClearAllCache(void); protected: KConfig *config; - QString m_imagesFileFilter; - QProgressDialog *pdCache; + TQString m_imagesFileFilter; + TQProgressDialog *pdCache; FindDuplicateDialog *m_findDuplicateDialog; float m_approximateLevel; float image_sim_compare(ImageSimilarityData *a, ImageSimilarityData *b); void writeSettings(void); void readSettings(void); - void updateCache(QString fromDir); - bool DeleteDir(QString dirname); - bool deldir(QString dirname); + void updateCache(TQString fromDir); + bool DeleteDir(TQString dirname); + bool deldir(TQString dirname); - QStringList filesList; - QObject *parent_; - QDict < QPtrVector < QFile > > m_res; + TQStringList filesList; + TQObject *tqparent_; + TQDict < TQPtrVector < TQFile > > m_res; KIPI::Interface* m_interface; - QString m_cacheDir; + TQString m_cacheDir; private: CompareOperation* m_compareOp; diff --git a/kipi-plugins/findimages/fuzzycompare.cpp b/kipi-plugins/findimages/fuzzycompare.cpp index 50da23b..d588298 100644 --- a/kipi-plugins/findimages/fuzzycompare.cpp +++ b/kipi-plugins/findimages/fuzzycompare.cpp @@ -24,49 +24,49 @@ #include "fuzzycompare.h" #include "actions.h" -#include <qstringlist.h> -#include <qapplication.h> +#include <tqstringlist.h> +#include <tqapplication.h> #include <kdebug.h> #include "imagesimilaritydata.h" -#include <qdatetime.h> -#include <qfileinfo.h> +#include <tqdatetime.h> +#include <tqfileinfo.h> #include "finddupplicateimages.h" -#include <qimage.h> +#include <tqimage.h> #include <kimageio.h> #include <kimageeffect.h> #include <kstandarddirs.h> #include <math.h> -KIPIFindDupplicateImagesPlugin::FuzzyCompare::FuzzyCompare( QObject* parent, const QString& cacheDir ) - :m_parent( parent ), m_cacheDir( cacheDir ) +KIPIFindDupplicateImagesPlugin::FuzzyCompare::FuzzyCompare( TQObject* tqparent, const TQString& cacheDir ) + :m_parent( tqparent ), m_cacheDir( cacheDir ) { } -QDict < QPtrVector < QFile > > KIPIFindDupplicateImagesPlugin::FuzzyCompare::compare( const QStringList& filesList ) +TQDict < TQPtrVector < TQFile > > KIPIFindDupplicateImagesPlugin::FuzzyCompare::compare( const TQStringList& filesList ) { - sendMessage( m_parent, KIPIFindDupplicateImagesPlugin::Progress, QString::null, filesList.count()*2, true, false ); + sendMessage( m_parent, KIPIFindDupplicateImagesPlugin::Progress, TQString(), filesList.count()*2, true, false ); kdDebug( 51000 ) << filesList.count() << " images to parse with Almost method..." << endl; - QDict < QPtrVector < QFile > > res; + TQDict < TQPtrVector < TQFile > > res; - QPtrVector < ImageSimilarityData > *listRatW = new QPtrVector < ImageSimilarityData >; - QPtrVector < ImageSimilarityData > *listRatH = new QPtrVector < ImageSimilarityData >; - QPtrVector < ImageSimilarityData > *list; + TQPtrVector < ImageSimilarityData > *listRatW = new TQPtrVector < ImageSimilarityData >; + TQPtrVector < ImageSimilarityData > *listRatH = new TQPtrVector < ImageSimilarityData >; + TQPtrVector < ImageSimilarityData > *list; listRatW->setAutoDelete(true); listRatH->setAutoDelete(true); - QTime debut=QTime::currentTime (); + TQTime debut=TQTime::currentTime (); ImageSimilarityData *is; - for ( QStringList::ConstIterator item = filesList.begin() ; item != filesList.end() ; ++item ) + for ( TQStringList::ConstIterator item = filesList.begin() ; item != filesList.end() ; ++item ) { if ( m_stopRequested ) - return QDict < QPtrVector < QFile > >(); + return TQDict < TQPtrVector < TQFile > >(); - QString itemName(*item); - QFileInfo fi(itemName); - QString Temp = fi.dirPath(); - QString albumName = Temp.section('/', -1); + TQString itemName(*item); + TQFileInfo fi(itemName); + TQString Temp = fi.dirPath(); + TQString albumName = Temp.section('/', -1); sendMessage( m_parent, KIPIFindDupplicateImagesPlugin::Matrix, itemName, 0, true, false ); @@ -86,10 +86,10 @@ QDict < QPtrVector < QFile > > KIPIFindDupplicateImagesPlugin::FuzzyCompare::co sendMessage( m_parent, KIPIFindDupplicateImagesPlugin::Matrix, itemName, 0, false, false ); } - kdDebug( 51000 ) << "Matrix creation time:" << debut.msecsTo(QTime::currentTime()) << endl; - debut = QTime::currentTime (); + kdDebug( 51000 ) << "Matrix creation time:" << debut.msecsTo(TQTime::currentTime()) << endl; + debut = TQTime::currentTime (); - QDict < QFile > *fait = new QDict < QFile >; + TQDict < TQFile > *fait = new TQDict < TQFile >; list = listRatW; bool done = false; @@ -100,12 +100,12 @@ QDict < QPtrVector < QFile > > KIPIFindDupplicateImagesPlugin::FuzzyCompare::co for (unsigned int i = 0; i < list->size (); i++) { if ( m_stopRequested ) - return QDict < QPtrVector < QFile > >(); + return TQDict < TQPtrVector < TQFile > >(); // Create the 'ImageSimilarityData' data for the first image. ImageSimilarityData *i1 = list->at(i); - if (i1 && !fait->find(i1->filename)) + if (i1 && !fait->tqfind(i1->filename)) { sendMessage( m_parent, KIPIFindDupplicateImagesPlugin::Similar, i1->filename, 0, true, false ); @@ -119,21 +119,21 @@ QDict < QPtrVector < QFile > > KIPIFindDupplicateImagesPlugin::FuzzyCompare::co if (eq >= m_approximateLevel) // the files are the same ! { - QPtrVector < QFile > *vect; + TQPtrVector < TQFile > *vect; // Add file to the list. - if (!res.find (i1->filename)) + if (!res.tqfind (i1->filename)) { - vect = new QPtrVector < QFile >; + vect = new TQPtrVector < TQFile >; vect->setAutoDelete(true); res.insert (i1->filename, vect); } else - vect = (QPtrVector < QFile > *)res.find(i1->filename); + vect = (TQPtrVector < TQFile > *)res.tqfind(i1->filename); vect->resize (vect->size () + 1); - vect->insert (vect->size () - 1, new QFile(i2->filename)); - fait->insert(i2->filename, new QFile(i2->filename)); + vect->insert (vect->size () - 1, new TQFile(i2->filename)); + fait->insert(i2->filename, new TQFile(i2->filename)); } } } @@ -151,7 +151,7 @@ QDict < QPtrVector < QFile > > KIPIFindDupplicateImagesPlugin::FuzzyCompare::co list = NULL; } - kdDebug( 51000 ) << "Comparison time: " << debut.msecsTo(QTime::currentTime()) << endl; + kdDebug( 51000 ) << "Comparison time: " << debut.msecsTo(TQTime::currentTime()) << endl; // End of comparison process. @@ -166,7 +166,7 @@ QDict < QPtrVector < QFile > > KIPIFindDupplicateImagesPlugin::FuzzyCompare::co ///////////////////////////////////////////////////////////////////////////////////////////// // Nota: original source code from ShowImg ! -KIPIFindDupplicateImagesPlugin::ImageSimilarityData* KIPIFindDupplicateImagesPlugin::FuzzyCompare::image_sim_fill_data(QString filename) +KIPIFindDupplicateImagesPlugin::ImageSimilarityData* KIPIFindDupplicateImagesPlugin::FuzzyCompare::image_sim_fill_data(TQString filename) { int w, h; uchar *pix; @@ -178,18 +178,18 @@ KIPIFindDupplicateImagesPlugin::ImageSimilarityData* KIPIFindDupplicateImagesPlu int xs, ys; const int INC=1; - QImage *pixbuf; + TQImage *pixbuf; ImageSimilarityData *sd = new ImageSimilarityData(); sd->filename=filename; - QFileInfo info(m_cacheDir + QFileInfo(filename).absFilePath()+".dat"); + TQFileInfo info(m_cacheDir + TQFileInfo(filename).absFilePath()+".dat"); if(info.exists()) { - QFile f(m_cacheDir+QFileInfo(filename).absFilePath()+".dat"); + TQFile f(m_cacheDir+TQFileInfo(filename).absFilePath()+".dat"); if ( f.open(IO_ReadOnly) ) { - QDataStream s( &f ); + TQDataStream s( &f ); s >> sd->ratio; for(int i=0 ; i<PAS*PAS ; i++) s >> sd->avg_r[i]; for(int i=0 ; i<PAS*PAS ; i++) s >> sd->avg_g[i]; @@ -201,7 +201,7 @@ KIPIFindDupplicateImagesPlugin::ImageSimilarityData* KIPIFindDupplicateImagesPlu return sd; } - pixbuf = new QImage(filename); + pixbuf = new TQImage(filename); if ( !sd || !pixbuf ) return 0L; @@ -261,12 +261,12 @@ KIPIFindDupplicateImagesPlugin::ImageSimilarityData* KIPIFindDupplicateImagesPlu // Saving the data. - QFile f(m_cacheDir+QFileInfo(filename).absFilePath()+".dat"); - KStandardDirs::makeDir(QFileInfo(f).dirPath(true)); + TQFile f(m_cacheDir+TQFileInfo(filename).absFilePath()+".dat"); + KStandardDirs::makeDir(TQFileInfo(f).dirPath(true)); if ( f.open(IO_WriteOnly) ) { - QDataStream s( &f ); + TQDataStream s( &f ); s << sd->ratio; for(int i=0 ; i<PAS*PAS ; i++) s << sd->avg_r[i]; for(int i=0 ; i<PAS*PAS ; i++) s << sd->avg_g[i]; @@ -318,27 +318,27 @@ float KIPIFindDupplicateImagesPlugin::FuzzyCompare::image_sim_compare_fast(Image ///////////////////////////////////////////////////////////////////////////////////////////// // Nota: original source code from ShowImg ! -char KIPIFindDupplicateImagesPlugin::FuzzyCompare::getRed(QImage* im, int x, int y) +char KIPIFindDupplicateImagesPlugin::FuzzyCompare::getRed(TQImage* im, int x, int y) { - return qRed(im->pixel(x, y)); + return tqRed(im->pixel(x, y)); } ///////////////////////////////////////////////////////////////////////////////////////////// // Nota: original source code from ShowImg ! -char KIPIFindDupplicateImagesPlugin::FuzzyCompare::getGreen(QImage* im, int x, int y) +char KIPIFindDupplicateImagesPlugin::FuzzyCompare::getGreen(TQImage* im, int x, int y) { - return qGreen(im->pixel(x, y)); + return tqGreen(im->pixel(x, y)); } ///////////////////////////////////////////////////////////////////////////////////////////// // Nota: original source code from ShowImg ! -char KIPIFindDupplicateImagesPlugin::FuzzyCompare::getBlue(QImage* im, int x, int y) +char KIPIFindDupplicateImagesPlugin::FuzzyCompare::getBlue(TQImage* im, int x, int y) { - return qBlue(im->pixel(x, y)); + return tqBlue(im->pixel(x, y)); } diff --git a/kipi-plugins/findimages/fuzzycompare.h b/kipi-plugins/findimages/fuzzycompare.h index 77a264a..104a1ac 100644 --- a/kipi-plugins/findimages/fuzzycompare.h +++ b/kipi-plugins/findimages/fuzzycompare.h @@ -25,12 +25,12 @@ #ifndef FUZZYCOMPARE_H #define FUZZYCOMPARE_H -class QImage; -class QObject; -class QStringList; -#include <qdict.h> -#include <qptrvector.h> -#include <qfile.h> +class TQImage; +class TQObject; +class TQStringList; +#include <tqdict.h> +#include <tqptrvector.h> +#include <tqfile.h> #include "compareoperation.h" namespace KIPIFindDupplicateImagesPlugin @@ -41,20 +41,20 @@ class ImageSimilarityData; class FuzzyCompare :public CompareOperation { public: - FuzzyCompare( QObject* parent, const QString& cacheDir ); + FuzzyCompare( TQObject* tqparent, const TQString& cacheDir ); void setApproximateThreeshold( float approximateLevel ) { m_approximateLevel = approximateLevel; } - QDict < QPtrVector < QFile > > compare(const QStringList& filesList ); + TQDict < TQPtrVector < TQFile > > compare(const TQStringList& filesList ); protected: - ImageSimilarityData* image_sim_fill_data(QString filename); + ImageSimilarityData* image_sim_fill_data(TQString filename); float image_sim_compare_fast(ImageSimilarityData *a, ImageSimilarityData *b, float min); - char getRed(QImage *im, int x, int y); - char getGreen(QImage *im, int x, int y); - char getBlue(QImage *im, int x, int y); + char getRed(TQImage *im, int x, int y); + char getGreen(TQImage *im, int x, int y); + char getBlue(TQImage *im, int x, int y); private: - QObject* m_parent; - const QString m_cacheDir; + TQObject* m_parent; + const TQString m_cacheDir; float m_approximateLevel; }; diff --git a/kipi-plugins/findimages/imagesimilaritydata.h b/kipi-plugins/findimages/imagesimilaritydata.h index 55c6712..2367a4f 100644 --- a/kipi-plugins/findimages/imagesimilaritydata.h +++ b/kipi-plugins/findimages/imagesimilaritydata.h @@ -57,7 +57,7 @@ public: free(avg_b); } - QString filename; + TQString filename; uchar *avg_r; uchar *avg_g; diff --git a/kipi-plugins/findimages/plugin_findimages.cpp b/kipi-plugins/findimages/plugin_findimages.cpp index 6fba820..7141161 100644 --- a/kipi-plugins/findimages/plugin_findimages.cpp +++ b/kipi-plugins/findimages/plugin_findimages.cpp @@ -21,9 +21,9 @@ // ////////////////////////////////////////////////////////////////////////////// -// Qt includes. +// TQt includes. -#include <qfileinfo.h> +#include <tqfileinfo.h> // KDE includes. @@ -47,7 +47,7 @@ #include "finddupplicateimages.h" #include "actions.h" #include "plugin_findimages.h" -#include <qcursor.h> +#include <tqcursor.h> ///////////////////////////////////////////////////////////////////////////////////////////// @@ -56,13 +56,13 @@ typedef KGenericFactory<Plugin_FindImages> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_findimages, Factory("kipiplugin_findimages")) - Plugin_FindImages::Plugin_FindImages(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "FindImages") + Plugin_FindImages::Plugin_FindImages(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "FindImages") { kdDebug( 51001 ) << "Plugin_FindImages plugin loaded" << endl; } -void Plugin_FindImages::setup( QWidget* widget ) +void Plugin_FindImages::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -70,7 +70,7 @@ void Plugin_FindImages::setup( QWidget* widget ) "finddupplicateimages", 0, this, - SLOT(slotFindDuplicateImages()), + TQT_SLOT(slotFindDuplicateImages()), actionCollection(), "findduplicateimages"); @@ -89,7 +89,7 @@ Plugin_FindImages::~Plugin_FindImages() void Plugin_FindImages::slotFindDuplicateImages() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -101,10 +101,10 @@ void Plugin_FindImages::slotFindDuplicateImages() if (m_findDuplicateOperation->execDialog()) { - m_progressDlg = new KIPI::BatchProgressDialog(kapp->activeWindow(), i18n("Find Duplicate Images")); + m_progressDlg = new KIPI::BatchProgressDialog(TQT_TQWIDGET(kapp->activeWindow()), i18n("Find Duplicate Images")); - connect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + connect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); m_progressDlg->show(); m_findDuplicateOperation->compareAlbums(); } @@ -127,7 +127,7 @@ void Plugin_FindImages::slotCancel() ///////////////////////////////////////////////////////////////////////////////////////////////////// -void Plugin_FindImages::customEvent(QCustomEvent *event) +void Plugin_FindImages::customEvent(TQCustomEvent *event) { if (!event) return; @@ -137,32 +137,32 @@ void Plugin_FindImages::customEvent(QCustomEvent *event) if (d->starting) { - QString text; + TQString text; switch (d->action) { case(KIPIFindDupplicateImagesPlugin::Similar): { - text = i18n("Similar comparison for '%1'").arg(QFileInfo(d->fileName).fileName() ); + text = i18n("Similar comparison for '%1'").tqarg(TQFileInfo(d->fileName).fileName() ); break; } case(KIPIFindDupplicateImagesPlugin::Exact): { m_total = d->total; // Needed because the total can change in this mode ! - text = i18n("Exact comparison for '%1'").arg(QFileInfo(d->fileName).fileName()); + text = i18n("Exact comparison for '%1'").tqarg(TQFileInfo(d->fileName).fileName()); break; } case(KIPIFindDupplicateImagesPlugin::Matrix): { - text = i18n("Creating fingerprint for '%1'").arg(QFileInfo(d->fileName).fileName()); + text = i18n("Creating fingerprint for '%1'").tqarg(TQFileInfo(d->fileName).fileName()); break; } case(KIPIFindDupplicateImagesPlugin::FastParsing): { - text = i18n("Fast parsing for '%1'").arg(QFileInfo(d->fileName).fileName()); + text = i18n("Fast parsing for '%1'").tqarg(TQFileInfo(d->fileName).fileName()); break; } @@ -185,14 +185,14 @@ void Plugin_FindImages::customEvent(QCustomEvent *event) { if (!d->success) { - QString text; + TQString text; switch (d->action) { case(KIPIFindDupplicateImagesPlugin::Matrix): { text = i18n("Failed to create fingerprint for '%1'") - .arg(QFileInfo(d->fileName).fileName()); + .tqarg(TQFileInfo(d->fileName).fileName()); break; } @@ -225,35 +225,35 @@ void Plugin_FindImages::customEvent(QCustomEvent *event) } else { - QString text; + TQString text; switch (d->action) { case(KIPIFindDupplicateImagesPlugin::Matrix): { text = i18n("Fingerprint created for '%1'") - .arg(QFileInfo(d->fileName).fileName()); + .tqarg(TQFileInfo(d->fileName).fileName()); break; } case(KIPIFindDupplicateImagesPlugin::FastParsing): { text = i18n("Fast parsing completed for '%1'") - .arg(QFileInfo(d->fileName).fileName()); + .tqarg(TQFileInfo(d->fileName).fileName()); break; } case(KIPIFindDupplicateImagesPlugin::Similar): { text = i18n("Finding similar images for '%1' completed.") - .arg(QFileInfo(d->fileName).fileName()); + .tqarg(TQFileInfo(d->fileName).fileName()); break; } case(KIPIFindDupplicateImagesPlugin::Exact): { text = i18n("Finding exact images for '%1' completed.") - .arg(QFileInfo(d->fileName).fileName()); + .tqarg(TQFileInfo(d->fileName).fileName()); break; } @@ -282,8 +282,8 @@ void Plugin_FindImages::customEvent(QCustomEvent *event) m_progressDlg->setButtonCancelText( i18n("&Close") ); #endif - disconnect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + disconnect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); m_progressDlg->addedAction(i18n("Displaying results..."), KIPI::StartingMessage); diff --git a/kipi-plugins/findimages/plugin_findimages.h b/kipi-plugins/findimages/plugin_findimages.h index 8bc0344..35f5fda 100644 --- a/kipi-plugins/findimages/plugin_findimages.h +++ b/kipi-plugins/findimages/plugin_findimages.h @@ -28,7 +28,7 @@ #include <libkipi/plugin.h> -class QCustomEvent; +class TQCustomEvent; class KActionMenu; class KAction; @@ -43,14 +43,15 @@ class FindDuplicateImages; class Plugin_FindImages : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_FindImages(QObject *parent, const char* name, const QStringList &args); + Plugin_FindImages(TQObject *tqparent, const char* name, const TQStringList &args); ~Plugin_FindImages(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); private: @@ -64,7 +65,7 @@ protected: int m_total; - void customEvent(QCustomEvent *event); + void customEvent(TQCustomEvent *event); private slots: diff --git a/kipi-plugins/flickrexport/flickralbumdialog.ui b/kipi-plugins/flickrexport/flickralbumdialog.ui index 63ac730..d6349ed 100644 --- a/kipi-plugins/flickrexport/flickralbumdialog.ui +++ b/kipi-plugins/flickrexport/flickralbumdialog.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>KIPIFlickrExportPlugin::FlickrAlbumDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>FlickrAlbumDialog</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -28,7 +28,7 @@ <property name="spacing"> <number>5</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>header</cstring> </property> @@ -50,15 +50,15 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>titleLabel</cstring> </property> @@ -66,7 +66,7 @@ <string>Title (optional):</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>nameLabel</cstring> </property> @@ -74,7 +74,7 @@ <string>Name (optional):</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>captionLabel</cstring> </property> @@ -82,17 +82,17 @@ <string>Caption (optional):</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>titleEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>nameEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>captionEdit</cstring> </property> @@ -113,7 +113,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -137,14 +137,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -161,7 +161,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -193,5 +193,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kipi-plugins/flickrexport/flickritem.h b/kipi-plugins/flickrexport/flickritem.h index 5179ac8..96bf513 100644 --- a/kipi-plugins/flickrexport/flickritem.h +++ b/kipi-plugins/flickrexport/flickritem.h @@ -23,9 +23,9 @@ #ifndef FLICKRITEM_H #define FLICKRITEM_H -// Qt includes. +// TQt includes. -#include <qstring.h> +#include <tqstring.h> namespace KIPIFlickrExportPlugin { @@ -47,13 +47,13 @@ public: int ref_num; // int album_num; - QStrList tags; - QString title; - QString description; + TQStrList tags; + TQString title; + TQString description; -// QString caption; -// QString thumbName; -// QString albumURL; +// TQString caption; +// TQString thumbName; +// TQString albumURL; }; // ------------------------------------------------------------- @@ -74,9 +74,9 @@ public: bool is_friend; bool is_family; - QString title; - QString description; - QStringList tags; + TQString title; + TQString description; + TQStringList tags; }; // ------------------------------------------------------------- @@ -89,7 +89,7 @@ public: GAlbum() { ref_num = -1; - parent_ref_num = -1; + tqparent_ref_num = -1; add = false; write = false; @@ -105,13 +105,13 @@ public: bool create_sub; int ref_num; - int parent_ref_num; + int tqparent_ref_num; - QString name; - QString parentName; - QString title; - QString summary; - QString baseurl; + TQString name; + TQString tqparentName; + TQString title; + TQString summary; + TQString baseurl; }; // ------------------------------------------------------------- @@ -126,13 +126,13 @@ public: id = "-1"; } - QString id; - QString primary; //="2483" - QString secret; //="abcdef" - QString server; - QString photos; - QString title; - QString description; + TQString id; + TQString primary; //="2483" + TQString secret; //="abcdef" + TQString server; + TQString photos; + TQString title; + TQString description; }; } // namespace KIPIFlickrExportPlugin diff --git a/kipi-plugins/flickrexport/flickrtalker.cpp b/kipi-plugins/flickrexport/flickrtalker.cpp index f9926fb..7da02ce 100644 --- a/kipi-plugins/flickrexport/flickrtalker.cpp +++ b/kipi-plugins/flickrexport/flickrtalker.cpp @@ -28,19 +28,19 @@ #include <cstdlib> #include <string> -// Qt includes. - -#include <qcstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qimage.h> -#include <qstringlist.h> -#include <qlineedit.h> -#include <qmessagebox.h> -#include <qdom.h> -#include <qmap.h> -#include <qfileinfo.h> -#include <qprogressdialog.h> +// TQt includes. + +#include <tqcstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqstringlist.h> +#include <tqlineedit.h> +#include <tqmessagebox.h> +#include <tqdom.h> +#include <tqmap.h> +#include <tqfileinfo.h> +#include <tqprogressdialog.h> // KDE includes. @@ -77,15 +77,15 @@ namespace KIPIFlickrExportPlugin { -FlickrTalker::FlickrTalker(QWidget* parent) +FlickrTalker::FlickrTalker(TQWidget* tqparent) { - m_parent = parent; + m_parent = tqparent; m_job = 0; m_apikey = "49d585bafa0758cb5c58ab67198bf632"; m_secret = "34b39925e6273ffd"; - connect(this, SIGNAL(signalAuthenticate()), - this, SLOT(slotAuthenticate())); + connect(this, TQT_SIGNAL(signalAuthenticate()), + this, TQT_SLOT(slotAuthenticate())); } FlickrTalker::~FlickrTalker() @@ -97,13 +97,13 @@ FlickrTalker::~FlickrTalker() /** Compute MD5 signature using url queries keys and values following Flickr notice: http://www.flickr.com/services/api/auth.spec.html */ -QString FlickrTalker::getApiSig(const QString& secret, const KURL& url) +TQString FlickrTalker::getApiSig(const TQString& secret, const KURL& url) { - QMap<QString, QString> queries = url.queryItems(); - QString compressed(secret); + TQMap<TQString, TQString> queries = url.queryItems(); + TQString compressed(secret); - // NOTE: iterator QMap iterator will sort alphabetically items based on key values. - for (QMap<QString, QString>::iterator it = queries.begin() ; it != queries.end(); ++it) + // NOTE: iterator TQMap iterator will sort alphabetically items based on key values. + for (TQMap<TQString, TQString>::iterator it = queries.begin() ; it != queries.end(); ++it) { compressed.append(it.key()); compressed.append(it.data()); @@ -126,19 +126,19 @@ void FlickrTalker::getFrob() KURL url("http://www.flickr.com/services/rest/"); url.addQueryItem("method", "flickr.auth.getFrob"); url.addQueryItem("api_key", m_apikey); - QString md5 = getApiSig(m_secret, url); + TQString md5 = getApiSig(m_secret, url); url.addQueryItem("api_sig", md5); kdDebug() << "Get frob url: " << url << endl; - QByteArray tmp; + TQByteArray tmp; KIO::TransferJob* job = KIO::http_post(url, tmp, false); job->addMetaData("content-type", "Content-Type: application/x-www-form-urlencoded"); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_GETFROB; m_authProgressDlg->setLabelText(i18n("Getting the Frob")); @@ -148,7 +148,7 @@ void FlickrTalker::getFrob() emit signalBusy(true); } -void FlickrTalker::checkToken(const QString& token) +void FlickrTalker::checkToken(const TQString& token) { if (m_job) { @@ -160,19 +160,19 @@ void FlickrTalker::checkToken(const QString& token) url.addQueryItem("method", "flickr.auth.checkToken"); url.addQueryItem("api_key", m_apikey); url.addQueryItem("auth_token", token); - QString md5 = getApiSig(m_secret, url); + TQString md5 = getApiSig(m_secret, url); url.addQueryItem("api_sig", md5); kdDebug() << "Check token url: " << url << endl; - QByteArray tmp; + TQByteArray tmp; KIO::TransferJob* job = KIO::http_post(url, tmp, false); job->addMetaData("content-type", "Content-Type: application/x-www-form-urlencoded"); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_CHECKTOKEN; m_authProgressDlg->setLabelText(i18n("Checking if previous token is still valid")); @@ -194,12 +194,12 @@ void FlickrTalker::slotAuthenticate() url.addQueryItem("api_key", m_apikey); url.addQueryItem("frob", m_frob); url.addQueryItem("perms", "write"); - QString md5 = getApiSig(m_secret, url); + TQString md5 = getApiSig(m_secret, url); url.addQueryItem("api_sig", md5); kdDebug() << "Authenticate url: " << url << endl; KApplication::kApplication()->invokeBrowser(url.url()); - int valueOk = KMessageBox::questionYesNo(kapp->activeWindow(), + int valueOk = KMessageBox::questionYesNo(TQT_TQWIDGET(kapp->activeWindow()), i18n("Please Follow through the instructions in the browser window and " "return back to press ok if you are authenticated or press No"), i18n("Flickr Service Web Authorization")); @@ -230,18 +230,18 @@ void FlickrTalker::getToken() url.addQueryItem("api_key", m_apikey); url.addQueryItem("method", "flickr.auth.getToken"); url.addQueryItem("frob", m_frob); - QString md5 = getApiSig(m_secret, url); + TQString md5 = getApiSig(m_secret, url); url.addQueryItem("api_sig", md5); kdDebug() << "Get token url: " << url << endl; - QByteArray tmp; + TQByteArray tmp; KIO::TransferJob* job = KIO::http_post(url, tmp, false); job->addMetaData("content-type", "Content-Type: application/x-www-form-urlencoded"); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_GETTOKEN; m_job = job; @@ -257,18 +257,18 @@ void FlickrTalker::listPhotoSets() url.addQueryItem("api_key", m_apikey); url.addQueryItem("method", "flickr.photosets.getList"); url.addQueryItem("user_id", m_userId); - QString md5 = getApiSig(m_secret, url); + TQString md5 = getApiSig(m_secret, url); url.addQueryItem("api_sig", md5); kdDebug() << "List photo sets url: " << url << endl; - QByteArray tmp; + TQByteArray tmp; KIO::TransferJob* job = KIO::http_post(url, tmp, false); job->addMetaData("content-type", "Content-Type: application/x-www-form-urlencoded" ); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_LISTPHOTOSETS; m_job = job; @@ -276,7 +276,7 @@ void FlickrTalker::listPhotoSets() emit signalBusy(true); } -void FlickrTalker::getPhotoProperty(const QString& method, const QStringList& argList) +void FlickrTalker::getPhotoProperty(const TQString& method, const TQStringList& argList) { if (m_job) { @@ -289,24 +289,24 @@ void FlickrTalker::getPhotoProperty(const QString& method, const QStringList& ar url.addQueryItem("method", method); url.addQueryItem("frob", m_frob); - for (QStringList::const_iterator it = argList.begin(); it != argList.end(); ++it) + for (TQStringList::const_iterator it = argList.begin(); it != argList.end(); ++it) { - QStringList str = QStringList::split("=", (*it)); + TQStringList str = TQStringList::split("=", (*it)); url.addQueryItem(str[0], str[1]); } - QString md5 = getApiSig(m_secret, url); + TQString md5 = getApiSig(m_secret, url); url.addQueryItem("api_sig", md5); kdDebug() << "Get photo property url: " << url << endl; - QByteArray tmp; + TQByteArray tmp; KIO::TransferJob* job = KIO::http_post(url, tmp, false); job->addMetaData("content-type", "Content-Type: application/x-www-form-urlencoded" ); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_GETPHOTOPROPERTY; m_job = job; @@ -316,18 +316,18 @@ void FlickrTalker::getPhotoProperty(const QString& method, const QStringList& ar // m_authProgressDlg->setLabelText("Getting the Token from the server"); // m_authProgressDlg->setProgress(3,4); } -void FlickrTalker::listPhotos(const QString& /*albumName*/) +void FlickrTalker::listPhotos(const TQString& /*albumName*/) { // TODO } -void FlickrTalker::createAlbum(const QString& /*parentAlbumName*/, const QString& /*albumName*/, - const QString& /*albumTitle*/, const QString& /*albumCaption*/) +void FlickrTalker::createAlbum(const TQString& /*tqparentAlbumName*/, const TQString& /*albumName*/, + const TQString& /*albumTitle*/, const TQString& /*albumCaption*/) { //TODO: The equivalent for Album is sets. } -bool FlickrTalker::addPhoto(const QString& photoPath, const FPhotoInfo& info, +bool FlickrTalker::addPhoto(const TQString& photoPath, const FPhotoInfo& info, bool rescale, int maxDim, int imageQuality) { if (m_job) @@ -337,7 +337,7 @@ bool FlickrTalker::addPhoto(const QString& photoPath, const FPhotoInfo& info, } KURL url("http://www.flickr.com/services/upload/"); - QString path = photoPath; + TQString path = photoPath; MPForm form; form.addPair("auth_token", m_token); @@ -346,19 +346,19 @@ bool FlickrTalker::addPhoto(const QString& photoPath, const FPhotoInfo& info, form.addPair("api_key", m_apikey); url.addQueryItem("api_key", m_apikey); - QString ispublic = (info.is_public == 1) ? "1" : "0"; + TQString ispublic = (info.is_public == 1) ? "1" : "0"; form.addPair("is_public", ispublic); url.addQueryItem("is_public", ispublic); - QString isfamily = (info.is_family == 1) ? "1" : "0"; + TQString isfamily = (info.is_family == 1) ? "1" : "0"; form.addPair("is_family", isfamily); url.addQueryItem("is_family", isfamily); - QString isfriend = (info.is_friend == 1) ? "1" : "0"; + TQString isfriend = (info.is_friend == 1) ? "1" : "0"; form.addPair("is_friend", isfriend); url.addQueryItem("is_friend", isfriend); - QString tags = info.tags.join(" "); + TQString tags = info.tags.join(" "); if(tags.length() > 0) { form.addPair("tags", tags); @@ -377,19 +377,19 @@ bool FlickrTalker::addPhoto(const QString& photoPath, const FPhotoInfo& info, url.addQueryItem("description", info.description); } - QString md5 = getApiSig(m_secret, url); + TQString md5 = getApiSig(m_secret, url); form.addPair("api_sig", md5); url.addQueryItem("api_sig", md5); - QImage image; + TQImage image; // Check if RAW file. #if KDCRAW_VERSION < 0x000106 - QString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); + TQString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); #else - QString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); + TQString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); #endif - QFileInfo fileInfo(photoPath); - if (rawFilesExt.upper().contains(fileInfo.extension(false).upper())) + TQFileInfo fileInfo(photoPath); + if (rawFilesExt.upper().tqcontains(fileInfo.extension(false).upper())) KDcrawIface::KDcraw::loadDcrawPreview(image, photoPath); else image.load(photoPath); @@ -398,10 +398,10 @@ bool FlickrTalker::addPhoto(const QString& photoPath, const FPhotoInfo& info, if (!image.isNull()) { - path = locateLocal("tmp", QFileInfo(photoPath).baseName().stripWhiteSpace() + ".jpg"); + path = locateLocal("tmp", TQFileInfo(photoPath).baseName().stripWhiteSpace() + ".jpg"); if (rescale && (image.width() > maxDim || image.height() > maxDim)) - image = image.smoothScale(maxDim, maxDim, QImage::ScaleMin); + image = image.smoothScale(maxDim, maxDim, TQ_ScaleMin); image.save(path, "JPEG", imageQuality); @@ -417,7 +417,7 @@ bool FlickrTalker::addPhoto(const QString& photoPath, const FPhotoInfo& info, // As IPTC do not support UTF-8, we need to remove it. exiv2Iface.removeIptcTag("Iptc.Application2.Keywords", false); - exiv2Iface.setImageProgramId(QString("Kipi-plugins"), QString(kipiplugins_version)); + exiv2Iface.setImageProgramId(TQString("Kipi-plugins"), TQString(kipiplugins_version)); exiv2Iface.save(path); } else @@ -436,11 +436,11 @@ bool FlickrTalker::addPhoto(const QString& photoPath, const FPhotoInfo& info, KIO::TransferJob* job = KIO::http_post(url, form.formData(), false); job->addMetaData("content-type", form.contentType()); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_ADDPHOTO; m_job = job; @@ -449,12 +449,12 @@ bool FlickrTalker::addPhoto(const QString& photoPath, const FPhotoInfo& info, return true; } -QString FlickrTalker::getUserName() +TQString FlickrTalker::getUserName() { return m_username; } -QString FlickrTalker::getUserId() +TQString FlickrTalker::getUserId() { return m_userId; } @@ -471,7 +471,7 @@ void FlickrTalker::cancel() m_authProgressDlg->hide(); } -void FlickrTalker::data(KIO::Job*, const QByteArray& data) +void FlickrTalker::data(KIO::Job*, const TQByteArray& data) { if (data.isEmpty()) return; @@ -481,9 +481,9 @@ void FlickrTalker::data(KIO::Job*, const QByteArray& data) memcpy(m_buffer.data()+oldSize, data.data(), data.size()); } -void FlickrTalker::slotError(const QString& error) +void FlickrTalker::slotError(const TQString& error) { - QString transError; + TQString transError; int errorNo = atoi(error.latin1()); switch (errorNo) @@ -541,8 +541,8 @@ void FlickrTalker::slotError(const QString& error) break; }; - KMessageBox::error(kapp->activeWindow(), - i18n("Error Occured: %1\n We can not proceed further").arg(transError)); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), + i18n("Error Occured: %1\n We can not proceed further").tqarg(transError)); // kdDebug() << "Not handling the error now will see it later" << endl; } @@ -598,25 +598,25 @@ void FlickrTalker::slotResult(KIO::Job *job) }*/ } -void FlickrTalker::parseResponseGetFrob(const QByteArray& data) +void FlickrTalker::parseResponseGetFrob(const TQByteArray& data) { bool success = false; - QString errorString; - QDomDocument doc("mydocument"); + TQString errorString; + TQDomDocument doc("mydocument"); if (!doc.setContent(data)) { return; } - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); while(!node.isNull()) { if (node.isElement() && node.nodeName() == "frob") { - QDomElement e = node.toElement(); // try to convert the node to an element. + TQDomElement e = node.toElement(); // try to convert the node to an element. kdDebug() << "Frob is" << e.text() << endl; m_frob = e.text(); // this is what is obtained from data. success = true; @@ -641,29 +641,29 @@ void FlickrTalker::parseResponseGetFrob(const QByteArray& data) emit signalError(errorString); } -void FlickrTalker::parseResponseCheckToken(const QByteArray& data) +void FlickrTalker::parseResponseCheckToken(const TQByteArray& data) { bool success = false; - QString errorString; - QString username; - QString transReturn; - QDomDocument doc("checktoken"); + TQString errorString; + TQString username; + TQString transReturn; + TQDomDocument doc("checktoken"); if (!doc.setContent(data)) { return; } - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); - QDomElement e; + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); + TQDomElement e; while(!node.isNull()) { if (node.isElement() && node.nodeName() == "auth") { e = node.toElement(); // try to convert the node to an element. - QDomNode details = e.firstChild(); + TQDomNode details = e.firstChild(); while(!details.isNull()) { @@ -680,7 +680,7 @@ void FlickrTalker::parseResponseCheckToken(const QByteArray& data) if(details.nodeName() == "perms") { kdDebug() << "Perms=" << e.text() << endl; - QString perms = e.text();//this is what is obtained from data. + TQString perms = e.text();//this is what is obtained from data. if(perms == "write") transReturn = i18n("As in the persmission to", "write"); @@ -716,7 +716,7 @@ void FlickrTalker::parseResponseCheckToken(const QByteArray& data) kdDebug() << "Error code=" << errorString << endl; kdDebug() << "Msg=" << node.toElement().attribute("msg") << endl; - int valueOk = KMessageBox::questionYesNo(kapp->activeWindow(), + int valueOk = KMessageBox::questionYesNo(TQT_TQWIDGET(kapp->activeWindow()), i18n("Your token is invalid. Would you like to " "get a new token to proceed ?\n")); if(valueOk == KMessageBox::Yes) @@ -740,24 +740,24 @@ void FlickrTalker::parseResponseCheckToken(const QByteArray& data) kdDebug() << "CheckToken finished" << endl; } -void FlickrTalker::parseResponseGetToken(const QByteArray& data) +void FlickrTalker::parseResponseGetToken(const TQByteArray& data) { bool success = false; - QString errorString; - QDomDocument doc("gettoken"); + TQString errorString; + TQDomDocument doc("gettoken"); if (!doc.setContent( data )) return; - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); - QDomElement e; + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); + TQDomElement e; while(!node.isNull()) { if (node.isElement() && node.nodeName() == "auth") { e = node.toElement(); // try to convert the node to an element. - QDomNode details = e.firstChild(); + TQDomNode details = e.firstChild(); while(!details.isNull()) { @@ -812,27 +812,27 @@ void FlickrTalker::parseResponseGetToken(const QByteArray& data) else emit signalError(errorString); } -void FlickrTalker::parseResponseListPhotoSets(const QByteArray& data) +void FlickrTalker::parseResponseListPhotoSets(const TQByteArray& data) { bool success = false; - QDomDocument doc("getListPhotoSets"); + TQDomDocument doc("getListPhotoSets"); if (!doc.setContent(data)) return; - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); - QDomElement e; - QString photoSet_id, photoSet_title, photoSet_description; - QValueList <FPhotoSet> photoSetList; + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); + TQDomElement e; + TQString photoSet_id, photoSet_title, photoSet_description; + TQValueList <FPhotoSet> photoSetList; while(!node.isNull()) { if (node.isElement() && node.nodeName() == "photosets") { e = node.toElement(); - QDomNode details = e.firstChild(); + TQDomNode details = e.firstChild(); FPhotoSet fps; - QDomNode detailsNode = details; + TQDomNode detailsNode = details; while(!detailsNode.isNull()) { @@ -844,8 +844,8 @@ void FlickrTalker::parseResponseListPhotoSets(const QByteArray& data) kdDebug() << "id=" << e.attribute("id") << endl; photoSet_id = e.attribute("id"); //this is what is obtained from data. fps.id = photoSet_id; - QDomNode photoSetDetails = detailsNode.firstChild(); - QDomElement e_detail; + TQDomNode photoSetDetails = detailsNode.firstChild(); + TQDomElement e_detail; while(!photoSetDetails.isNull()) { @@ -880,7 +880,7 @@ void FlickrTalker::parseResponseListPhotoSets(const QByteArray& data) if (node.isElement() && node.nodeName() == "err") { kdDebug() << "Checking Error in response" << endl; - QString code = node.toElement().attribute("code"); + TQString code = node.toElement().attribute("code"); kdDebug() << "Error code=" << code << endl; kdDebug() << "Msg=" << node.toElement().attribute("msg") << endl; emit signalError(code); @@ -901,48 +901,48 @@ void FlickrTalker::parseResponseListPhotoSets(const QByteArray& data) } } -void FlickrTalker::parseResponseListPhotos(const QByteArray& data) +void FlickrTalker::parseResponseListPhotos(const TQByteArray& data) { - QDomDocument doc("getPhotosList"); + TQDomDocument doc("getPhotosList"); if (!doc.setContent( data)) return; - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); - //QDomElement e; + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); + //TQDomElement e; //TODO } -void FlickrTalker::parseResponseCreateAlbum(const QByteArray& data) +void FlickrTalker::parseResponseCreateAlbum(const TQByteArray& data) { - QDomDocument doc("getCreateAlbum"); + TQDomDocument doc("getCreateAlbum"); if (!doc.setContent(data)) return; - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); //TODO } -void FlickrTalker::parseResponseAddPhoto(const QByteArray& data) +void FlickrTalker::parseResponseAddPhoto(const TQByteArray& data) { bool success = false; - QString line; - QDomDocument doc("AddPhoto Response"); + TQString line; + TQDomDocument doc("AddPhoto Response"); if (!doc.setContent(data)) return; - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); - QDomElement e; + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); + TQDomElement e; while(!node.isNull()) { if (node.isElement() && node.nodeName() == "photoid") { e = node.toElement(); // try to convert the node to an element. - QDomNode details = e.firstChild(); + TQDomNode details = e.firstChild(); kdDebug() << "Photoid= " << e.text() << endl; success = true; } @@ -950,7 +950,7 @@ void FlickrTalker::parseResponseAddPhoto(const QByteArray& data) if (node.isElement() && node.nodeName() == "err") { kdDebug() << "Checking Error in response" << endl; - QString code = node.toElement().attribute("code"); + TQString code = node.toElement().attribute("code"); kdDebug() << "Error code=" << code << endl; kdDebug() << "Msg=" << node.toElement().attribute("msg") << endl; emit signalError(code); @@ -971,24 +971,24 @@ void FlickrTalker::parseResponseAddPhoto(const QByteArray& data) } } -void FlickrTalker::parseResponsePhotoProperty(const QByteArray& data) +void FlickrTalker::parseResponsePhotoProperty(const TQByteArray& data) { bool success = false; - QString line; - QDomDocument doc("Photos Properties"); + TQString line; + TQDomDocument doc("Photos Properties"); if (!doc.setContent(data)) return; - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); - QDomElement e; + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); + TQDomElement e; while(!node.isNull()) { if (node.isElement() && node.nodeName() == "photoid") { e = node.toElement(); // try to convert the node to an element. - QDomNode details = e.firstChild(); + TQDomNode details = e.firstChild(); kdDebug() << "Photoid=" << e.text() << endl; success = true; } @@ -996,7 +996,7 @@ void FlickrTalker::parseResponsePhotoProperty(const QByteArray& data) if (node.isElement() && node.nodeName() == "err") { kdDebug() << "Checking Error in response" << endl; - QString code = node.toElement().attribute("code"); + TQString code = node.toElement().attribute("code"); kdDebug() << "Error code=" << code << endl; kdDebug() << "Msg=" << node.toElement().attribute("msg") << endl; emit signalError(code); diff --git a/kipi-plugins/flickrexport/flickrtalker.h b/kipi-plugins/flickrexport/flickrtalker.h index 9b98209..6205fef 100644 --- a/kipi-plugins/flickrexport/flickrtalker.h +++ b/kipi-plugins/flickrexport/flickrtalker.h @@ -24,19 +24,19 @@ #ifndef FLICKRTALKER_H #define FLICKRTALKER_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qvaluelist.h> -#include <qobject.h> -#include <qprogressdialog.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqobject.h> +#include <tqprogressdialog.h> // KDE includes. #include <kurl.h> #include <kio/job.h> -class QProgressDialog; +class TQProgressDialog; namespace KIPIFlickrExportPlugin { @@ -46,9 +46,10 @@ class GPhoto; class FPhotoInfo; class FPhotoSet; -class FlickrTalker : public QObject +class FlickrTalker : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -67,79 +68,79 @@ public: public: - FlickrTalker(QWidget* parent); + FlickrTalker(TQWidget* tqparent); ~FlickrTalker(); - QString getUserName(); - QString getUserId(); + TQString getUserName(); + TQString getUserId(); void getFrob(); void getToken(); - void checkToken(const QString& token); - void getPhotoProperty(const QString& method, const QStringList& argList); + void checkToken(const TQString& token); + void getPhotoProperty(const TQString& method, const TQStringList& argList); void cancel(); void listPhotoSets(); - void listPhotos(const QString& albumName); - void createAlbum(const QString& parentAlbumName, - const QString& albumName, - const QString& albumTitle, - const QString& albumCaption); + void listPhotos(const TQString& albumName); + void createAlbum(const TQString& tqparentAlbumName, + const TQString& albumName, + const TQString& albumTitle, + const TQString& albumCaption); - bool addPhoto(const QString& photoPath, const FPhotoInfo& info, + bool addPhoto(const TQString& photoPath, const FPhotoInfo& info, bool rescale=false, int maxDim=600, int imageQuality=85); public: - QProgressDialog *m_authProgressDlg; + TQProgressDialog *m_authProgressDlg; signals: - void signalError(const QString& msg); -// void signalLoginFailed( const QString& msg ); + void signalError(const TQString& msg); +// void signalLoginFailed( const TQString& msg ); void signalBusy(bool val); - void signalAlbums(const QValueList<GAlbum>& albumList); - void signalPhotos(const QValueList<GPhoto>& photoList); + void signalAlbums(const TQValueList<GAlbum>& albumList); + void signalPhotos(const TQValueList<GPhoto>& photoList); void signalAddPhotoSucceeded(); - void signalListPhotoSetsSucceeded(const QValueList <FPhotoSet>& photoSetList); - void signalAddPhotoFailed(const QString& msg); - void signalListPhotoSetsFailed(const QString& msg); + void signalListPhotoSetsSucceeded(const TQValueList <FPhotoSet>& photoSetList); + void signalAddPhotoFailed(const TQString& msg); + void signalListPhotoSetsFailed(const TQString& msg); void signalAuthenticate(); - void signalTokenObtained(const QString& token); + void signalTokenObtained(const TQString& token); private: -// void parseResponseLogin(const QByteArray& data); - void parseResponseListPhotoSets(const QByteArray& data); - void parseResponseListPhotos(const QByteArray& data); - void parseResponseCreateAlbum(const QByteArray& data); - void parseResponseAddPhoto(const QByteArray& data); - void parseResponseGetFrob(const QByteArray& data); - void parseResponseGetToken(const QByteArray& data); - void parseResponseCheckToken(const QByteArray& data); - void parseResponsePhotoProperty(const QByteArray& data); +// void parseResponseLogin(const TQByteArray& data); + void parseResponseListPhotoSets(const TQByteArray& data); + void parseResponseListPhotos(const TQByteArray& data); + void parseResponseCreateAlbum(const TQByteArray& data); + void parseResponseAddPhoto(const TQByteArray& data); + void parseResponseGetFrob(const TQByteArray& data); + void parseResponseGetToken(const TQByteArray& data); + void parseResponseCheckToken(const TQByteArray& data); + void parseResponsePhotoProperty(const TQByteArray& data); - QString getApiSig(const QString& secret, const KURL& url); + TQString getApiSig(const TQString& secret, const KURL& url); private slots: - void slotError(const QString& msg); + void slotError(const TQString& msg); void slotAuthenticate(); - void data(KIO::Job *job, const QByteArray& data); + void data(KIO::Job *job, const TQByteArray& data); void slotResult(KIO::Job *job); private: - QWidget* m_parent; + TQWidget* m_parent; -// QString m_cookie; - QByteArray m_buffer; +// TQString m_cookie; + TQByteArray m_buffer; - QString m_apikey; - QString m_secret; - QString m_frob; - QString m_token; - QString m_username; - QString m_userId; + TQString m_apikey; + TQString m_secret; + TQString m_frob; + TQString m_token; + TQString m_username; + TQString m_userId; KIO::Job* m_job; diff --git a/kipi-plugins/flickrexport/flickrviewitem.cpp b/kipi-plugins/flickrexport/flickrviewitem.cpp index 50d955a..cc7d00f 100644 --- a/kipi-plugins/flickrexport/flickrviewitem.cpp +++ b/kipi-plugins/flickrexport/flickrviewitem.cpp @@ -21,10 +21,10 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> // Local includes. @@ -33,14 +33,14 @@ namespace KIPIFlickrExportPlugin { -GAlbumViewItem::GAlbumViewItem(QListView* parent, const QString& name, const GAlbum& album) - : QListViewItem(parent, name) +GAlbumViewItem::GAlbumViewItem(TQListView* tqparent, const TQString& name, const GAlbum& album) + : TQListViewItem(tqparent, name) { m_album = album; } -GAlbumViewItem::GAlbumViewItem(QListViewItem* parent, const QString& name, const GAlbum& album) - : QListViewItem(parent, name) +GAlbumViewItem::GAlbumViewItem(TQListViewItem* tqparent, const TQString& name, const GAlbum& album) + : TQListViewItem(tqparent, name) { m_album = album; } @@ -49,23 +49,23 @@ GAlbumViewItem::~GAlbumViewItem() { } -void GAlbumViewItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int) +void GAlbumViewItem::paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int) { if (!p) return; - QListView *lv = listView(); + TQListView *lv = listView(); if (!lv) return; - QFontMetrics fm(p->fontMetrics()); + TQFontMetrics fm(p->fontMetrics()); if (isSelected()) p->fillRect(0, 0, width, height(), cg.highlight()); else p->fillRect(0, 0, width, height(), cg.base()); - const QPixmap* icon = pixmap(column); + const TQPixmap* icon = pixmap(column); int iconWidth = 0; if (icon) @@ -83,24 +83,24 @@ void GAlbumViewItem::paintCell(QPainter* p, const QColorGroup& cg, int column, i int r = lv->itemMargin() + iconWidth; int h = lv->fontMetrics().height() + 2; - p->drawText(r, 0, width-r, h, Qt::AlignVCenter, m_album.title); + p->drawText(r, 0, width-r, h, TQt::AlignVCenter, m_album.title); - QFont fn(lv->font()); + TQFont fn(lv->font()); fn.setPointSize(fn.pointSize()-2); fn.setItalic(true); p->setFont(fn); - p->setPen(isSelected() ? cg.highlightedText() : Qt::gray); - p->drawText(r, h, width-r, h, Qt::AlignVCenter, m_album.name); + p->setPen(isSelected() ? cg.highlightedText() : TQt::gray); + p->drawText(r, h, width-r, h, TQt::AlignVCenter, m_album.name); } void GAlbumViewItem::setup() { int h = listView()->fontMetrics().height(); int margin = 4; - setHeight( QMAX(2*h + margin, 32) ); + setHeight( TQMAX(2*h + margin, 32) ); } -void GAlbumViewItem::paintFocus(QPainter*, const QColorGroup&, const QRect&) +void GAlbumViewItem::paintFocus(TQPainter*, const TQColorGroup&, const TQRect&) { } diff --git a/kipi-plugins/flickrexport/flickrviewitem.h b/kipi-plugins/flickrexport/flickrviewitem.h index 9bd5a21..65c58f1 100644 --- a/kipi-plugins/flickrexport/flickrviewitem.h +++ b/kipi-plugins/flickrexport/flickrviewitem.h @@ -24,9 +24,9 @@ #ifndef FLICKRVIEWITEM_H #define FLICKRVIEWITEM_H -// Qt includes. +// TQt includes. -#include <qlistview.h> +#include <tqlistview.h> // Local includes. @@ -35,19 +35,19 @@ namespace KIPIFlickrExportPlugin { -class GAlbumViewItem : public QListViewItem +class GAlbumViewItem : public TQListViewItem { public: - GAlbumViewItem(QListView* parent, const QString& name, const GAlbum& album); - GAlbumViewItem(QListViewItem* parent, const QString& name, const GAlbum& album); + GAlbumViewItem(TQListView* tqparent, const TQString& name, const GAlbum& album); + GAlbumViewItem(TQListViewItem* tqparent, const TQString& name, const GAlbum& album); ~GAlbumViewItem(); protected: - void paintCell(QPainter *p, const QColorGroup& cg, int column, int width, int); - void paintFocus(QPainter*, const QColorGroup&, const QRect&); + void paintCell(TQPainter *p, const TQColorGroup& cg, int column, int width, int); + void paintFocus(TQPainter*, const TQColorGroup&, const TQRect&); void setup(); private: diff --git a/kipi-plugins/flickrexport/flickrwidget.cpp b/kipi-plugins/flickrexport/flickrwidget.cpp index 45e5afb..52d4dd6 100644 --- a/kipi-plugins/flickrexport/flickrwidget.cpp +++ b/kipi-plugins/flickrexport/flickrwidget.cpp @@ -21,20 +21,20 @@ * * ============================================================ */ -// Qt includes. - -#include <qpushbutton.h> -#include <qlabel.h> -#include <qframe.h> -#include <qheader.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qgroupbox.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +// TQt includes. + +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqheader.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqgroupbox.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> // KDE includes. @@ -62,18 +62,18 @@ namespace KIPIFlickrExportPlugin { -FlickrWidget::FlickrWidget(QWidget* parent, KIPI::Interface *iface) - : QWidget(parent) +FlickrWidget::FlickrWidget(TQWidget* tqparent, KIPI::Interface *iface) + : TQWidget(tqparent) { setName("FlickrWidget"); - QVBoxLayout* flickrWidgetLayout = new QVBoxLayout(this, 5, 5); + TQVBoxLayout* flickrWidgetLayout = new TQVBoxLayout(this, 5, 5); m_photoView = 0; //new KHTMLPart(splitter); - KSeparator *line = new KSeparator(Horizontal, this); + KSeparator *line = new KSeparator(Qt::Horizontal, this); m_tab = new KTabWidget(this); KActiveLabel *headerLabel = new KActiveLabel(this); - headerLabel->setFocusPolicy(NoFocus); + headerLabel->setFocusPolicy(TQ_NoFocus); headerLabel->setLinkUnderline(false); headerLabel->setText(i18n("<qt><b><h2><a href='http://www.flickr.com'>" "<font color=\"#0065DE\">flick</font>" @@ -84,21 +84,21 @@ FlickrWidget::FlickrWidget(QWidget* parent, KIPI::Interface *iface) // ------------------------------------------------------------------- m_imglst = new ImagesList(m_tab, iface); - QWidget* settingsBox = new QWidget(m_tab); - QVBoxLayout* settingsBoxLayout = new QVBoxLayout(settingsBox); + TQWidget* settingsBox = new TQWidget(m_tab); + TQVBoxLayout* settingsBoxLayout = new TQVBoxLayout(settingsBox); - //m_newAlbumBtn = new QPushButton(settingsBox, "m_newAlbumBtn"); - //m_newAlbumBtn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + //m_newAlbumBtn = new TQPushButton(settingsBox, "m_newAlbumBtn"); + //m_newAlbumBtn->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); //m_newAlbumBtn->setText(i18n("&New Album")); - QGridLayout* tagsLayout = new QGridLayout(1, 1); - QLabel* tagsLabel = new QLabel(i18n("Added Tags: "), settingsBox); + TQGridLayout* tagsLayout = new TQGridLayout(1, 1); + TQLabel* tagsLabel = new TQLabel(i18n("Added Tags: "), settingsBox); m_tagsLineEdit = new KLineEdit(settingsBox); - m_exportHostTagsCheckBox = new QCheckBox(settingsBox); + m_exportHostTagsCheckBox = new TQCheckBox(settingsBox); m_exportHostTagsCheckBox->setText(i18n("Use Host Application Tags")); - m_stripSpaceTagsCheckBox = new QCheckBox(settingsBox); + m_stripSpaceTagsCheckBox = new TQCheckBox(settingsBox); m_stripSpaceTagsCheckBox->setText(i18n("Strip Space From Host Application Tags")); - QToolTip::add(m_tagsLineEdit, i18n("Enter here new tags separated by space.")); + TQToolTip::add(m_tagsLineEdit, i18n("Enter here new tags separated by space.")); tagsLayout->addWidget(tagsLabel, 0, 0); tagsLayout->addWidget(m_tagsLineEdit, 0, 1); @@ -107,38 +107,38 @@ FlickrWidget::FlickrWidget(QWidget* parent, KIPI::Interface *iface) // ------------------------------------------------------------------------ - QGroupBox* optionsBox = new QGroupBox(i18n("Override Default Options"), settingsBox); + TQGroupBox* optionsBox = new TQGroupBox(i18n("Override Default Options"), settingsBox); optionsBox->setColumnLayout(0, Qt::Vertical); - optionsBox->layout()->setSpacing(KDialog::spacingHint()); - optionsBox->layout()->setMargin(KDialog::spacingHint()); - QGridLayout* optionsBoxLayout = new QGridLayout(optionsBox->layout(), 5, 3); + optionsBox->tqlayout()->setSpacing(KDialog::spacingHint()); + optionsBox->tqlayout()->setMargin(KDialog::spacingHint()); + TQGridLayout* optionsBoxLayout = new TQGridLayout(optionsBox->tqlayout(), 5, 3); - m_publicCheckBox = new QCheckBox(optionsBox); + m_publicCheckBox = new TQCheckBox(optionsBox); m_publicCheckBox->setText(i18n("As in accessible for people", "Public (anyone can see them)")); - m_familyCheckBox = new QCheckBox(optionsBox); + m_familyCheckBox = new TQCheckBox(optionsBox); m_familyCheckBox->setText(i18n("Visible to Family")); - m_friendsCheckBox = new QCheckBox(optionsBox); + m_friendsCheckBox = new TQCheckBox(optionsBox); m_friendsCheckBox->setText(i18n("Visible to Friends")); - m_resizeCheckBox = new QCheckBox(optionsBox); + m_resizeCheckBox = new TQCheckBox(optionsBox); m_resizeCheckBox->setText(i18n("Resize photos before uploading")); m_resizeCheckBox->setChecked(false); - m_dimensionSpinBox = new QSpinBox(0, 5000, 10, optionsBox); + m_dimensionSpinBox = new TQSpinBox(0, 5000, 10, optionsBox); m_dimensionSpinBox->setValue(600); - m_dimensionSpinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + m_dimensionSpinBox->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); m_dimensionSpinBox->setEnabled(false); - QLabel* resizeLabel = new QLabel(i18n("Maximum dimension (pixels):"), optionsBox); + TQLabel* resizeLabel = new TQLabel(i18n("Maximum dimension (pixels):"), optionsBox); - m_imageQualitySpinBox = new QSpinBox(0, 100, 1, optionsBox); + m_imageQualitySpinBox = new TQSpinBox(0, 100, 1, optionsBox); m_imageQualitySpinBox->setValue(85); - m_imageQualitySpinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + m_imageQualitySpinBox->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); // NOTE: The term Compression factor may be to technical to write in the label - QLabel* imageQualityLabel = new QLabel(i18n("JPEG Image Quality (higher is better):"), optionsBox); + TQLabel* imageQualityLabel = new TQLabel(i18n("JPEG Image Quality (higher is better):"), optionsBox); optionsBoxLayout->addMultiCellWidget(m_publicCheckBox, 0, 0, 0, 3); optionsBoxLayout->addMultiCellWidget(m_familyCheckBox, 1, 1, 0, 3); @@ -155,15 +155,15 @@ FlickrWidget::FlickrWidget(QWidget* parent, KIPI::Interface *iface) // ------------------------------------------------------------------------ - QGroupBox* accountBox = new QGroupBox(i18n("Account"), settingsBox); + TQGroupBox* accountBox = new TQGroupBox(i18n("Account"), settingsBox); accountBox->setColumnLayout(0, Qt::Vertical); - accountBox->layout()->setSpacing(KDialog::spacingHint()); - accountBox->layout()->setMargin(KDialog::spacingHint()); - QGridLayout* accountBoxLayout = new QGridLayout(accountBox->layout(), 1, 3); + accountBox->tqlayout()->setSpacing(KDialog::spacingHint()); + accountBox->tqlayout()->setMargin(KDialog::spacingHint()); + TQGridLayout* accountBoxLayout = new TQGridLayout(accountBox->tqlayout(), 1, 3); - QLabel *userNameLabel = new QLabel(i18n("User Name: "), accountBox); - m_userNameDisplayLabel = new QLabel(accountBox); - m_changeUserButton = new QPushButton(accountBox); + TQLabel *userNameLabel = new TQLabel(i18n("User Name: "), accountBox); + m_userNameDisplayLabel = new TQLabel(accountBox); + m_changeUserButton = new TQPushButton(accountBox); m_changeUserButton->setText(i18n("Use a different account")); m_changeUserButton->setIconSet(SmallIcon("switchuser")); @@ -194,11 +194,11 @@ FlickrWidget::FlickrWidget(QWidget* parent, KIPI::Interface *iface) // ------------------------------------------------------------------------ - connect(m_resizeCheckBox, SIGNAL(clicked()), - this, SLOT(slotResizeChecked())); + connect(m_resizeCheckBox, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotResizeChecked())); - connect(m_exportHostTagsCheckBox, SIGNAL(clicked()), - this, SLOT(slotExportHostTagsChecked())); + connect(m_exportHostTagsCheckBox, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotExportHostTagsChecked())); } FlickrWidget::~FlickrWidget() diff --git a/kipi-plugins/flickrexport/flickrwidget.h b/kipi-plugins/flickrexport/flickrwidget.h index e451a8a..7643a9a 100644 --- a/kipi-plugins/flickrexport/flickrwidget.h +++ b/kipi-plugins/flickrexport/flickrwidget.h @@ -24,14 +24,14 @@ #ifndef FLICKRWIDGET_H #define FLICKRWIDGET_H -// Qt includes. +// TQt includes. -#include <qwidget.h> +#include <tqwidget.h> -class QPushButton; -class QSpinBox; -class QCheckBox; -class QRadioButton; +class TQPushButton; +class TQSpinBox; +class TQCheckBox; +class TQRadioButton; class KTabWidget; class KLineEdit; @@ -47,9 +47,10 @@ namespace KIPIFlickrExportPlugin class ImagesList; -class FlickrWidget : public QWidget +class FlickrWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: @@ -61,7 +62,7 @@ public: public: - FlickrWidget(QWidget* parent, KIPI::Interface *iface); + FlickrWidget(TQWidget* tqparent, KIPI::Interface *iface); ~FlickrWidget(); private slots: @@ -71,20 +72,20 @@ private slots: private: -// QPushButton* m_newAlbumBtn; - QPushButton* m_changeUserButton; +// TQPushButton* m_newAlbumBtn; + TQPushButton* m_changeUserButton; - QCheckBox* m_resizeCheckBox; - QCheckBox* m_familyCheckBox; - QCheckBox* m_friendsCheckBox; - QCheckBox* m_publicCheckBox; - QCheckBox* m_exportHostTagsCheckBox; - QCheckBox* m_stripSpaceTagsCheckBox; + TQCheckBox* m_resizeCheckBox; + TQCheckBox* m_familyCheckBox; + TQCheckBox* m_friendsCheckBox; + TQCheckBox* m_publicCheckBox; + TQCheckBox* m_exportHostTagsCheckBox; + TQCheckBox* m_stripSpaceTagsCheckBox; - QSpinBox* m_dimensionSpinBox; - QSpinBox* m_imageQualitySpinBox; + TQSpinBox* m_dimensionSpinBox; + TQSpinBox* m_imageQualitySpinBox; - QLabel* m_userNameDisplayLabel; + TQLabel* m_userNameDisplayLabel; KLineEdit* m_tagsLineEdit; diff --git a/kipi-plugins/flickrexport/flickrwindow.cpp b/kipi-plugins/flickrexport/flickrwindow.cpp index 5f6a345..8b16801 100644 --- a/kipi-plugins/flickrexport/flickrwindow.cpp +++ b/kipi-plugins/flickrexport/flickrwindow.cpp @@ -21,17 +21,17 @@ * * ============================================================ */ -// Qt includes. - -#include <qpushbutton.h> -#include <qtimer.h> -#include <qpixmap.h> -#include <qcursor.h> -#include <qprogressdialog.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qstringlist.h> -#include <qradiobutton.h> +// TQt includes. + +#include <tqpushbutton.h> +#include <tqtimer.h> +#include <tqpixmap.h> +#include <tqcursor.h> +#include <tqprogressdialog.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqstringlist.h> +#include <tqradiobutton.h> // KDE includes. @@ -75,8 +75,8 @@ namespace KIPIFlickrExportPlugin { -FlickrWindow::FlickrWindow(KIPI::Interface* interface, const QString &tmpFolder, QWidget *parent) - : KDialogBase(parent, 0, false, i18n("Export to Flickr Web Service"), +FlickrWindow::FlickrWindow(KIPI::Interface* interface, const TQString &tmpFolder, TQWidget *tqparent) + : KDialogBase(tqparent, 0, false, i18n("Export to Flickr Web Service"), Help|User1|Close, Close, false) { m_tmp = tmpFolder; @@ -104,8 +104,8 @@ FlickrWindow::FlickrWindow(KIPI::Interface* interface, const QString &tmpFolder, setMainWidget(m_widget); m_widget->setMinimumSize(600, 400); - connect(m_imglst, SIGNAL(signalImageListChanged(bool)), - this, SLOT(slotImageListChanged(bool))); + connect(m_imglst, TQT_SIGNAL(signalImageListChanged(bool)), + this, TQT_SLOT(slotImageListChanged(bool))); //m_startUploadButton->setEnabled(false); //m_albumView->setRootIsDecorated(true); @@ -130,68 +130,68 @@ FlickrWindow::FlickrWindow(KIPI::Interface* interface, const QString &tmpFolder, KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup(helpMenu->menu()); // -------------------------------------------------------------------------- m_talker = new FlickrTalker(this); - connect(m_talker, SIGNAL( signalError( const QString& ) ), - m_talker, SLOT( slotError( const QString& ) )); + connect(m_talker, TQT_SIGNAL( signalError( const TQString& ) ), + m_talker, TQT_SLOT( slotError( const TQString& ) )); - connect(m_talker, SIGNAL( signalBusy( bool ) ), - this, SLOT( slotBusy( bool ) )); + connect(m_talker, TQT_SIGNAL( signalBusy( bool ) ), + this, TQT_SLOT( slotBusy( bool ) )); - connect(m_talker, SIGNAL( signalAddPhotoSucceeded() ), - this, SLOT( slotAddPhotoSucceeded() )); + connect(m_talker, TQT_SIGNAL( signalAddPhotoSucceeded() ), + this, TQT_SLOT( slotAddPhotoSucceeded() )); - connect(m_talker, SIGNAL( signalAddPhotoFailed( const QString& ) ), - this, SLOT( slotAddPhotoFailed( const QString& ) )); + connect(m_talker, TQT_SIGNAL( signalAddPhotoFailed( const TQString& ) ), + this, TQT_SLOT( slotAddPhotoFailed( const TQString& ) )); - connect(m_talker, SIGNAL( signalListPhotoSetsSucceeded( const QValueList<FPhotoSet>& ) ), - this, SLOT( slotListPhotoSetsResponse( const QValueList<FPhotoSet>& ) )); + connect(m_talker, TQT_SIGNAL( signalListPhotoSetsSucceeded( const TQValueList<FPhotoSet>& ) ), + this, TQT_SLOT( slotListPhotoSetsResponse( const TQValueList<FPhotoSet>& ) )); - //connect( m_talker, SIGNAL( signalAlbums( const QValueList<GAlbum>& ) ), - // SLOT( slotAlbums( const QValueList<GAlbum>& ) ) ); + //connect( m_talker, TQT_SIGNAL( signalAlbums( const TQValueList<GAlbum>& ) ), + // TQT_SLOT( slotAlbums( const TQValueList<GAlbum>& ) ) ); - //connect( m_talker, SIGNAL( signalPhotos( const QValueList<GPhoto>& ) ), - // SLOT( slotPhotos( const QValueList<GPhoto>& ) ) ); + //connect( m_talker, TQT_SIGNAL( signalPhotos( const TQValueList<GPhoto>& ) ), + // TQT_SLOT( slotPhotos( const TQValueList<GPhoto>& ) ) ); // -------------------------------------------------------------------------- - m_progressDlg = new QProgressDialog(this, 0, true); + m_progressDlg = new TQProgressDialog(this, 0, true); m_progressDlg->setAutoReset(true); m_progressDlg->setAutoClose(true); - connect(m_progressDlg, SIGNAL( canceled() ), - this, SLOT( slotAddPhotoCancel() )); + connect(m_progressDlg, TQT_SIGNAL( canceled() ), + this, TQT_SLOT( slotAddPhotoCancel() )); - connect(m_changeUserButton, SIGNAL( clicked() ), - this, SLOT( slotUserChangeRequest() )); + connect(m_changeUserButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotUserChangeRequest() )); - connect(m_talker, SIGNAL( signalTokenObtained(const QString&) ), - this, SLOT( slotTokenObtained(const QString&) )); + connect(m_talker, TQT_SIGNAL( signalTokenObtained(const TQString&) ), + this, TQT_SLOT( slotTokenObtained(const TQString&) )); - //connect( m_tagView, SIGNAL( selectionChanged() ), - // SLOT( slotTagSelected() ) ); + //connect( m_tagView, TQT_SIGNAL( selectionChanged() ), + // TQT_SLOT( slotTagSelected() ) ); - //connect( m_photoView->browserExtension(), SIGNAL( openURLRequest( const KURL&, const KParts::URLArgs& ) ), - // SLOT( slotOpenPhoto( const KURL& ) ) ); + //connect( m_photoView->browserExtension(), TQT_SIGNAL( openURLRequest( const KURL&, const KParts::URLArgs& ) ), + // TQT_SLOT( slotOpenPhoto( const KURL& ) ) ); - //connect( m_newAlbumBtn, SIGNAL( clicked() ), - // SLOT( slotNewAlbum() ) ); + //connect( m_newAlbumBtn, TQT_SIGNAL( clicked() ), + // TQT_SLOT( slotNewAlbum() ) ); // -------------------------------------------------------------------------- readSettings(); - m_authProgressDlg = new QProgressDialog(this, 0, true); + m_authProgressDlg = new TQProgressDialog(this, 0, true); m_authProgressDlg->setAutoReset(true); m_authProgressDlg->setAutoClose(true); - connect(m_authProgressDlg, SIGNAL( canceled() ), - this, SLOT( slotAuthCancel() )); + connect(m_authProgressDlg, TQT_SIGNAL( canceled() ), + this, TQT_SLOT( slotAuthCancel() )); m_talker->m_authProgressDlg = m_authProgressDlg; m_widget->setEnabled(false); @@ -251,7 +251,7 @@ void FlickrWindow::readSettings() m_familyCheckBox->setChecked(config.readBoolEntry("Family Sharing", false)); m_friendsCheckBox->setChecked(config.readBoolEntry("Friends Sharing", false)); - resize(configDialogSize(config, QString("FlickrExport Dialog"))); + resize(configDialogSize(config, TQString("FlickrExport Dialog"))); } void FlickrWindow::writeSettings() @@ -267,7 +267,7 @@ void FlickrWindow::writeSettings() config.writeEntry("Public Sharing", m_publicCheckBox->isChecked()); config.writeEntry("Family Sharing", m_familyCheckBox->isChecked()); config.writeEntry("Friends Sharing", m_friendsCheckBox->isChecked()); - saveDialogSize(config, QString("FlickrExport Dialog")); + saveDialogSize(config, TQString("FlickrExport Dialog")); config.sync(); } @@ -286,13 +286,13 @@ void FlickrWindow::slotClose() done(Close); } -void FlickrWindow::slotTokenObtained(const QString& token) +void FlickrWindow::slotTokenObtained(const TQString& token) { m_token = token; m_username = m_talker->getUserName(); m_userId = m_talker->getUserId(); kdDebug() << "SlotTokenObtained invoked setting user Display name to " << m_username << endl; - m_userNameDisplayLabel->setText(QString("<qt><b>%1</b></qt>").arg(m_username)); + m_userNameDisplayLabel->setText(TQString("<qt><b>%1</b></qt>").tqarg(m_username)); m_widget->setEnabled(true); } @@ -300,19 +300,19 @@ void FlickrWindow::slotBusy(bool val) { if (val) { - setCursor(QCursor::WaitCursor); + setCursor(TQCursor::WaitCursor); // m_newAlbumBtn->setEnabled( false ); // m_addPhotoButton->setEnabled( false ); } else { - setCursor(QCursor::ArrowCursor); + setCursor(TQCursor::ArrowCursor); // m_newAlbumBtn->setEnabled( loggedIn ); // m_addPhotoButton->setEnabled( loggedIn && m_albumView->selectedItem() ); } } -void FlickrWindow::slotError(const QString& msg) +void FlickrWindow::slotError(const TQString& msg) { //m_talker->slotError(msg); KMessageBox::error( this, msg ); @@ -326,7 +326,7 @@ void FlickrWindow::slotUserChangeRequest() } /* -void FlickrWindow::slotAlbums( const QValueList<GAlbum>& albumList ) +void FlickrWindow::slotAlbums( const TQValueList<GAlbum>& albumList ) { m_albumDict.clear(); m_tagView->clear(); @@ -335,15 +335,15 @@ void FlickrWindow::slotAlbums( const QValueList<GAlbum>& albumList ) //m_photoView->end(); KIconLoader* iconLoader = KApplication::kApplication()->iconLoader(); - QPixmap pix = iconLoader->loadIcon( "folder", KIcon::NoGroup, 32 ); + TQPixmap pix = iconLoader->loadIcon( "folder", KIcon::NoGroup, 32 ); - typedef QValueList<GAlbum> GAlbumList; + typedef TQValueList<GAlbum> GAlbumList; GAlbumList::const_iterator iter; for ( iter = albumList.begin(); iter != albumList.end(); ++iter ) { const GAlbum& album = *iter; - if ( album.parent_ref_num == 0 ) + if ( album.tqparent_ref_num == 0 ) { GAlbumViewItem* item = new GAlbumViewItem( m_tagView, album.name, album ); @@ -352,17 +352,17 @@ void FlickrWindow::slotAlbums( const QValueList<GAlbum>& albumList ) } else { - QListViewItem* parent = m_albumDict.find( album.parent_ref_num ); - if ( parent ) + TQListViewItem* tqparent = m_albumDict.tqfind( album.tqparent_ref_num ); + if ( tqparent ) { - GAlbumViewItem* item = new GAlbumViewItem( parent, album.name, + GAlbumViewItem* item = new GAlbumViewItem( tqparent, album.name, album); item->setPixmap( 0, pix ); m_albumDict.insert( album.ref_num, item ); } else { - kdWarning() << "Failed to find parent for album " + kdWarning() << "Failed to find tqparent for album " << album.name << "with id " << album.ref_num; } @@ -383,7 +383,7 @@ void FlickrWindow::slotAlbums( const QValueList<GAlbum>& albumList ) if (lastSelectedID > 0) { - GAlbumViewItem* lastSelectedItem = m_albumDict.find( lastSelectedID ); + GAlbumViewItem* lastSelectedItem = m_albumDict.tqfind( lastSelectedID ); if (lastSelectedItem) { m_tagView->setSelected( lastSelectedItem, true ); @@ -400,7 +400,7 @@ void FlickrWindow::slotAuthCancel() } /* -void FlickrWindow::slotPhotos( const QValueList<GPhoto>& photoList) +void FlickrWindow::slotPhotos( const TQValueList<GPhoto>& photoList) { // TODO } @@ -415,7 +415,7 @@ void FlickrWindow::slotOpenPhoto( const KURL& url ) } */ -void FlickrWindow::slotListPhotoSetsResponse(const QValueList <FPhotoSet>& /*photoSetList*/) +void FlickrWindow::slotListPhotoSetsResponse(const TQValueList <FPhotoSet>& /*photoSetList*/) { kdDebug() << "SlotListPhotoSetsResponse invoked" << endl; // TODO @@ -438,7 +438,7 @@ void FlickrWindow::slotUser1() if (urls.isEmpty()) return; - typedef QPair<KURL, FPhotoInfo> Pair; + typedef TQPair<KURL, FPhotoInfo> Pair; m_uploadQueue.clear(); @@ -453,10 +453,10 @@ void FlickrWindow::slotUser1() temp.is_public = m_publicCheckBox->isChecked(); temp.is_family = m_familyCheckBox->isChecked(); temp.is_friend = m_friendsCheckBox->isChecked(); - QStringList tagsFromDialog = QStringList::split(" ", m_tagsLineEdit->text(), false); + TQStringList tagsFromDialog = TQStringList::split(" ", m_tagsLineEdit->text(), false); - QStringList allTags; - QStringList::Iterator itTags; + TQStringList allTags; + TQStringList::Iterator itTags; // Tags from the dialog itTags = tagsFromDialog.begin(); @@ -467,15 +467,15 @@ void FlickrWindow::slotUser1() } // Tags from the database - QMap <QString, QVariant> attribs = info.attributes(); - QStringList tagsFromDatabase; + TQMap <TQString, TQVariant> attribs = info.attributes(); + TQStringList tagsFromDatabase; if(m_exportHostTagsCheckBox->isChecked()) { tagsFromDatabase = attribs["tags"].asStringList(); if (m_stripSpaceTagsCheckBox->isChecked()) { - for (QStringList::iterator it = tagsFromDatabase.begin(); it != tagsFromDatabase.end() ; ++it) + for (TQStringList::iterator it = tagsFromDatabase.begin(); it != tagsFromDatabase.end() ; ++it) *it = (*it).stripWhiteSpace().remove(" "); } } @@ -517,7 +517,7 @@ void FlickrWindow::slotAddPhotoNext() return; } - typedef QPair<KURL, FPhotoInfo> Pair; + typedef TQPair<KURL, FPhotoInfo> Pair; Pair pathComments = m_uploadQueue.first(); FPhotoInfo info = pathComments.second; bool res = m_talker->addPhoto(pathComments.first.path(), //the file path @@ -531,7 +531,7 @@ void FlickrWindow::slotAddPhotoNext() return; } - m_progressDlg->setLabelText(i18n("Uploading file %1").arg(pathComments.first.filename())); + m_progressDlg->setLabelText(i18n("Uploading file %1").tqarg(pathComments.first.filename())); if (m_progressDlg->isHidden()) m_progressDlg->show(); @@ -547,10 +547,10 @@ void FlickrWindow::slotAddPhotoSucceeded() slotAddPhotoNext(); } -void FlickrWindow::slotAddPhotoFailed(const QString& msg) +void FlickrWindow::slotAddPhotoFailed(const TQString& msg) { if (KMessageBox::warningContinueCancel(this, - i18n("Failed to upload photo into Flickr. %1\nDo you want to continue?").arg(msg)) + i18n("Failed to upload photo into Flickr. %1\nDo you want to continue?").tqarg(msg)) != KMessageBox::Continue) { m_uploadQueue.clear(); diff --git a/kipi-plugins/flickrexport/flickrwindow.h b/kipi-plugins/flickrexport/flickrwindow.h index a87e9ee..ac01db8 100644 --- a/kipi-plugins/flickrexport/flickrwindow.h +++ b/kipi-plugins/flickrexport/flickrwindow.h @@ -24,11 +24,11 @@ #ifndef FLICKRWINDOW_H #define FLICKRWINDOW_H -// Qt includes. +// TQt includes. -#include <qvaluelist.h> -#include <qpair.h> -#include <qintdict.h> +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqintdict.h> // KDE includes. @@ -43,10 +43,10 @@ #include "kpaboutdata.h" -class QPushButton; -class QSpinBox; -class QCheckBox; -class QProgressDialog; +class TQPushButton; +class TQSpinBox; +class TQCheckBox; +class TQProgressDialog; class KLineEdit; class KHTMLPart; @@ -77,31 +77,32 @@ class ImagesList; class FlickrWindow : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FlickrWindow(KIPI::Interface *interface, const QString &tmpFolder, QWidget *parent); + FlickrWindow(KIPI::Interface *interface, const TQString &tmpFolder, TQWidget *tqparent); ~FlickrWindow(); private slots: - void slotTokenObtained(const QString& token); + void slotTokenObtained(const TQString& token); void slotDoLogin(); void slotBusy(bool val); - void slotError(const QString& msg); + void slotError(const TQString& msg); -// void slotLoginFailed( const QString& msg ); -// void slotAlbums( const QValueList<GAlbum>& albumList ); -// void slotPhotos( const QValueList<GPhoto>& photoList ); +// void slotLoginFailed( const TQString& msg ); +// void slotAlbums( const TQValueList<GAlbum>& albumList ); +// void slotPhotos( const TQValueList<GPhoto>& photoList ); // void slotTagSelected(); // void slotOpenPhoto( const KURL& url ); void slotNewPhotoSet(); void slotUserChangeRequest(); - void slotListPhotoSetsResponse(const QValueList <FPhotoSet>& photoSetList); + void slotListPhotoSetsResponse(const TQValueList <FPhotoSet>& photoSetList); void slotAddPhotoNext(); void slotAddPhotoSucceeded(); - void slotAddPhotoFailed(const QString& msg); + void slotAddPhotoFailed(const TQString& msg); void slotAddPhotoCancel(); void slotAuthCancel(); void slotHelp(); @@ -119,33 +120,33 @@ private: unsigned int m_uploadCount; unsigned int m_uploadTotal; -// QPushButton *m_newAlbumBtn; - QPushButton *m_changeUserButton; +// TQPushButton *m_newAlbumBtn; + TQPushButton *m_changeUserButton; - QCheckBox *m_resizeCheckBox; - QCheckBox *m_publicCheckBox; - QCheckBox *m_familyCheckBox; - QCheckBox *m_friendsCheckBox; - QCheckBox *m_exportHostTagsCheckBox; - QCheckBox *m_stripSpaceTagsCheckBox; + TQCheckBox *m_resizeCheckBox; + TQCheckBox *m_publicCheckBox; + TQCheckBox *m_familyCheckBox; + TQCheckBox *m_friendsCheckBox; + TQCheckBox *m_exportHostTagsCheckBox; + TQCheckBox *m_stripSpaceTagsCheckBox; - QSpinBox *m_dimensionSpinBox; - QSpinBox *m_imageQualitySpinBox; + TQSpinBox *m_dimensionSpinBox; + TQSpinBox *m_imageQualitySpinBox; - QIntDict<GAlbumViewItem> m_albumDict; + TQIntDict<GAlbumViewItem> m_albumDict; - QString m_token; - QString m_username; - QString m_userId; - QString m_lastSelectedAlbum; - QString m_tmp; + TQString m_token; + TQString m_username; + TQString m_userId; + TQString m_lastSelectedAlbum; + TQString m_tmp; - QLabel *m_userNameDisplayLabel; + TQLabel *m_userNameDisplayLabel; - QProgressDialog *m_progressDlg; - QProgressDialog *m_authProgressDlg; + TQProgressDialog *m_progressDlg; + TQProgressDialog *m_authProgressDlg; - QValueList< QPair<KURL, FPhotoInfo> > m_uploadQueue; + TQValueList< TQPair<KURL, FPhotoInfo> > m_uploadQueue; // KWallet::Wallet *m_wallet; KHTMLPart *m_photoView; diff --git a/kipi-plugins/flickrexport/imageslist.cpp b/kipi-plugins/flickrexport/imageslist.cpp index 1127b40..b93cc43 100644 --- a/kipi-plugins/flickrexport/imageslist.cpp +++ b/kipi-plugins/flickrexport/imageslist.cpp @@ -24,13 +24,13 @@ // QT includes. -#include <qpushbutton.h> -#include <qpainter.h> -#include <qfileinfo.h> -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qdragobject.h> -#include <qimage.h> +#include <tqpushbutton.h> +#include <tqpainter.h> +#include <tqfileinfo.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> +#include <tqdragobject.h> +#include <tqimage.h> // KDE includes. @@ -55,8 +55,8 @@ namespace KIPIFlickrExportPlugin { -ImagesListViewItem::ImagesListViewItem(QListView *view, const KURL& url) - : QListViewItem(view) +ImagesListViewItem::ImagesListViewItem(TQListView *view, const KURL& url) + : TQListViewItem(view) { setThumb(SmallIcon("file_broken", ICONSIZE, KIcon::DisabledState)); setUrl(url); @@ -77,56 +77,56 @@ KURL ImagesListViewItem::url() const return m_url; } -void ImagesListViewItem::setThumb(const QPixmap& pix) +void ImagesListViewItem::setThumb(const TQPixmap& pix) { - QPixmap pixmap(ICONSIZE+2, ICONSIZE+2); - pixmap.fill(Qt::color0); - QPainter p(&pixmap); + TQPixmap pixmap(ICONSIZE+2, ICONSIZE+2); + pixmap.fill(TQt::color0); + TQPainter p(&pixmap); p.drawPixmap((pixmap.width()/2) - (pix.width()/2), (pixmap.height()/2) - (pix.height()/2), pix); setPixmap(0, pixmap); } // --------------------------------------------------------------------------- -ImagesListView::ImagesListView(QWidget *parent) - : QListView(parent) +ImagesListView::ImagesListView(TQWidget *tqparent) + : TQListView(tqparent) { addColumn(i18n("Thumbnail")); addColumn(i18n("File Name")); - QWhatsThis::add(this, i18n("<p>This is the list of images to upload on your Flickr account.")); + TQWhatsThis::add(this, i18n("<p>This is the list of images to upload on your Flickr account.")); setAcceptDrops(true); - setResizeMode(QListView::AllColumns); + setResizeMode(TQListView::AllColumns); setAllColumnsShowFocus(true); setSorting(-1); - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - setSelectionMode(QListView::Extended); + tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + setSelectionMode(TQListView::Extended); } ImagesListView::~ImagesListView() { } -void ImagesListView::dragEnterEvent(QDragEnterEvent *e) +void ImagesListView::dragEnterEvent(TQDragEnterEvent *e) { - e->accept(QUriDrag::canDecode(e)); + e->accept(TQUriDrag::canDecode(e)); } -void ImagesListView::dropEvent(QDropEvent *e) +void ImagesListView::dropEvent(TQDropEvent *e) { - QStrList strList; + TQStrList strList; KURL::List urls; - if (!QUriDrag::decode(e, strList)) + if (!TQUriDrag::decode(e, strList)) return; - QStrList stringList; - QStrListIterator it(strList); + TQStrList stringList; + TQStrListIterator it(strList); char *str; while ((str = it.current()) != 0) { - QString filePath = QUriDrag::uriToLocalFile(str); - QFileInfo fileInfo(filePath); + TQString filePath = TQUriDrag::uriToLocalFile(str); + TQFileInfo fileInfo(filePath); if (fileInfo.isFile() && fileInfo.exists()) urls.append(fileInfo.filePath()); @@ -152,29 +152,29 @@ public: iface = 0; } - QPushButton *addButton; - QPushButton *removeButton; + TQPushButton *addButton; + TQPushButton *removeButton; ImagesListView *listView; KIPI::Interface *iface; }; -ImagesList::ImagesList(QWidget* parent, KIPI::Interface *iface) - : QWidget(parent) +ImagesList::ImagesList(TQWidget* tqparent, KIPI::Interface *iface) + : TQWidget(tqparent) { d = new ImagesPagePriv; d->iface = iface; // -------------------------------------------------------- - QGridLayout* grid = new QGridLayout(this, 2, 3); + TQGridLayout* grid = new TQGridLayout(this, 2, 3); d->listView = new ImagesListView(this); // -------------------------------------------------------- - d->addButton = new QPushButton(this); - d->removeButton = new QPushButton(this); + d->addButton = new TQPushButton(this); + d->removeButton = new TQPushButton(this); d->addButton->setText(i18n("&Add")); d->addButton->setIconSet(SmallIcon("add")); d->removeButton->setText(i18n("&Remove")); @@ -192,14 +192,14 @@ ImagesList::ImagesList(QWidget* parent, KIPI::Interface *iface) // -------------------------------------------------------- - connect(d->addButton, SIGNAL(clicked()), - this, SLOT(slotAddItems())); + connect(d->addButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddItems())); - connect(d->removeButton, SIGNAL(clicked()), - this, SLOT(slotRemoveItems())); + connect(d->removeButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveItems())); - connect(d->listView, SIGNAL(signalDropedItems(const KURL::List&)), - this, SLOT(slotAddImages(const KURL::List&))); + connect(d->listView, TQT_SIGNAL(signalDropedItems(const KURL::List&)), + this, TQT_SLOT(slotAddImages(const KURL::List&))); // -------------------------------------------------------- @@ -226,20 +226,20 @@ void ImagesList::slotAddImages(const KURL::List& list) // Check if the new item already exist in the list. - bool find = false; + bool tqfind = false; - QListViewItemIterator it(d->listView); + TQListViewItemIterator it(d->listView); while (it.current()) { ImagesListViewItem* item = dynamic_cast<ImagesListViewItem*>(*it); if (item->url() == imageUrl) - find = true; + tqfind = true; ++it; } - if (!find) + if (!tqfind) { new ImagesListViewItem(d->listView, imageUrl); urls.append(imageUrl); @@ -250,13 +250,13 @@ void ImagesList::slotAddImages(const KURL::List& list) KIO::PreviewJob *thumbnailJob = KIO::filePreview(urls, ICONSIZE); - connect(thumbnailJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), - this, SLOT(slotGotThumbnail(const KFileItem*, const QPixmap&))); + connect(thumbnailJob, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), + this, TQT_SLOT(slotGotThumbnail(const KFileItem*, const TQPixmap&))); } -void ImagesList::slotGotThumbnail(const KFileItem *item, const QPixmap& pix) +void ImagesList::slotGotThumbnail(const KFileItem *item, const TQPixmap& pix) { - QListViewItemIterator it(d->listView); + TQListViewItemIterator it(d->listView); while (it.current()) { @@ -280,48 +280,48 @@ void ImagesList::slotAddItems() void ImagesList::slotRemoveItems() { - bool find; + bool tqfind; do { - find = false; - QListViewItemIterator it(d->listView); + tqfind = false; + TQListViewItemIterator it(d->listView); while (it.current()) { ImagesListViewItem* item = dynamic_cast<ImagesListViewItem*>(*it); if (item->isSelected()) { delete item; - find = true; + tqfind = true; break; } ++it; } } - while(find); + while(tqfind); emit signalImageListChanged(imageUrls().isEmpty()); } void ImagesList::removeItemByUrl(const KURL& url) { - bool find; + bool tqfind; do { - find = false; - QListViewItemIterator it(d->listView); + tqfind = false; + TQListViewItemIterator it(d->listView); while (it.current()) { ImagesListViewItem* item = dynamic_cast<ImagesListViewItem*>(*it); if (item->url() == url) { delete item; - find = true; + tqfind = true; break; } ++it; } } - while(find); + while(tqfind); emit signalImageListChanged(imageUrls().isEmpty()); } @@ -329,7 +329,7 @@ void ImagesList::removeItemByUrl(const KURL& url) KURL::List ImagesList::imageUrls() const { KURL::List list; - QListViewItemIterator it(d->listView); + TQListViewItemIterator it(d->listView); while (it.current()) { ImagesListViewItem* item = dynamic_cast<ImagesListViewItem*>(*it); diff --git a/kipi-plugins/flickrexport/imageslist.h b/kipi-plugins/flickrexport/imageslist.h index 66363e8..8192969 100644 --- a/kipi-plugins/flickrexport/imageslist.h +++ b/kipi-plugins/flickrexport/imageslist.h @@ -23,11 +23,11 @@ #ifndef IMAGES_LIST_H #define IMAGES_LIST_H -// Qt includes. +// TQt includes. -#include <qlistview.h> -#include <qwidget.h> -#include <qpixmap.h> +#include <tqlistview.h> +#include <tqwidget.h> +#include <tqpixmap.h> // KDE includes. @@ -45,18 +45,18 @@ namespace KIPIFlickrExportPlugin class ImagesPagePriv; -class ImagesListViewItem : public QListViewItem +class ImagesListViewItem : public TQListViewItem { public: - ImagesListViewItem(QListView *view, const KURL& url); + ImagesListViewItem(TQListView *view, const KURL& url); ~ImagesListViewItem(); void setUrl(const KURL& url); KURL url() const; - void setThumb(const QPixmap& pix); + void setThumb(const TQPixmap& pix); private: @@ -65,13 +65,14 @@ private: // --------------------------------------------------------- -class ImagesListView : public QListView +class ImagesListView : public TQListView { Q_OBJECT + TQ_OBJECT public: - ImagesListView(QWidget *parent); + ImagesListView(TQWidget *tqparent); ~ImagesListView(); signals: @@ -80,19 +81,20 @@ signals: private: - void dragEnterEvent(QDragEnterEvent *e); - void dropEvent(QDropEvent *e); + void dragEnterEvent(TQDragEnterEvent *e); + void dropEvent(TQDropEvent *e); }; // --------------------------------------------------------- -class ImagesList : public QWidget +class ImagesList : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ImagesList(QWidget* parent, KIPI::Interface *iface); + ImagesList(TQWidget* tqparent, KIPI::Interface *iface); ~ImagesList(); KURL::List imageUrls() const; @@ -110,7 +112,7 @@ private slots: void slotAddItems(); void slotRemoveItems(); - void slotGotThumbnail(const KFileItem *item, const QPixmap& pix); + void slotGotThumbnail(const KFileItem *item, const TQPixmap& pix); private: diff --git a/kipi-plugins/flickrexport/login.cpp b/kipi-plugins/flickrexport/login.cpp index 3f58188..7e3c2e2 100644 --- a/kipi-plugins/flickrexport/login.cpp +++ b/kipi-plugins/flickrexport/login.cpp @@ -20,13 +20,13 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qlabel.h> -#include <qframe.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqlayout.h> // KDE includes. @@ -40,31 +40,31 @@ namespace KIPIFlickrExportPlugin { -FlickrLogin::FlickrLogin(QWidget* parent, const QString& header, - const QString& _name, const QString& _passwd) - : QDialog(parent) +FlickrLogin::FlickrLogin(TQWidget* tqparent, const TQString& header, + const TQString& _name, const TQString& _passwd) + : TQDialog(tqparent) { setSizeGripEnabled(false); - QVBoxLayout* vbox = new QVBoxLayout(this, 5, 5, "vbox"); - m_headerLabel = new QLabel(this); - m_headerLabel->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); + TQVBoxLayout* vbox = new TQVBoxLayout(this, 5, 5, "vbox"); + m_headerLabel = new TQLabel(this); + m_headerLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); m_headerLabel->setText(header); - QFrame* hline = new QFrame(this, "hline"); - hline->setFrameShape(QFrame::HLine); - hline->setFrameShadow(QFrame::Sunken); + TQFrame* hline = new TQFrame(this, "hline"); + hline->setFrameShape(TQFrame::HLine); + hline->setFrameShadow(TQFrame::Sunken); - QGridLayout* centerLayout = new QGridLayout(0, 1, 1, 5, 5); + TQGridLayout* centerLayout = new TQGridLayout(0, 1, 1, 5, 5); - m_nameEdit = new QLineEdit(this); - m_passwdEdit = new QLineEdit(this); - m_passwdEdit->setEchoMode(QLineEdit::Password); + m_nameEdit = new TQLineEdit(this); + m_passwdEdit = new TQLineEdit(this); + m_passwdEdit->setEchoMode(TQLineEdit::Password); - QLabel* nameLabel = new QLabel(this); + TQLabel* nameLabel = new TQLabel(this); nameLabel->setText(i18n("Username:")); - QLabel* passwdLabel = new QLabel(this); + TQLabel* passwdLabel = new TQLabel(this); passwdLabel->setText(i18n("Password:")); centerLayout->addWidget(m_nameEdit, 0, 1); @@ -72,15 +72,15 @@ FlickrLogin::FlickrLogin(QWidget* parent, const QString& header, centerLayout->addWidget(nameLabel, 0, 0); centerLayout->addWidget(passwdLabel, 1, 0); - QHBoxLayout* btnLayout = new QHBoxLayout(0, 0, 5); - btnLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); + TQHBoxLayout* btnLayout = new TQHBoxLayout(0, 0, 5); + btnLayout->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); - QPushButton *okBtn = new QPushButton(this); + TQPushButton *okBtn = new TQPushButton(this); okBtn->setAutoDefault(true); okBtn->setDefault(true); okBtn->setText(i18n("&OK")); - QPushButton *cancelBtn = new QPushButton(this); + TQPushButton *cancelBtn = new TQPushButton(this); cancelBtn->setText(i18n("&Cancel")); btnLayout->addWidget( okBtn ); @@ -91,7 +91,7 @@ FlickrLogin::FlickrLogin(QWidget* parent, const QString& header, vbox->addLayout(centerLayout); vbox->addLayout(btnLayout); - resize( QSize(300, 150).expandedTo(minimumSizeHint()) ); + resize( TQSize(300, 150).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); m_nameEdit->setText(_name); @@ -99,23 +99,23 @@ FlickrLogin::FlickrLogin(QWidget* parent, const QString& header, // --------------------------------------------------------------- - connect(okBtn, SIGNAL( clicked() ), - this, SLOT( accept() )); + connect(okBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( accept() )); - connect(cancelBtn, SIGNAL( clicked() ), - this, SLOT( reject() )); + connect(cancelBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( reject() )); } FlickrLogin::~FlickrLogin() { } -QString FlickrLogin::name() const +TQString FlickrLogin::name() const { return m_nameEdit->text(); } -QString FlickrLogin::password() const +TQString FlickrLogin::password() const { return m_passwdEdit->text(); } diff --git a/kipi-plugins/flickrexport/login.h b/kipi-plugins/flickrexport/login.h index 84dbaad..67ae748 100644 --- a/kipi-plugins/flickrexport/login.h +++ b/kipi-plugins/flickrexport/login.h @@ -23,35 +23,36 @@ #ifndef FLICKRLOGIN_H #define FLICKRLOGIN_H -// Qt includes. +// TQt includes. -#include <qdialog.h> +#include <tqdialog.h> -class QLabel; -class QLineEdit; +class TQLabel; +class TQLineEdit; namespace KIPIFlickrExportPlugin { -class FlickrLogin : public QDialog +class FlickrLogin : public TQDialog { Q_OBJECT + TQ_OBJECT public: - FlickrLogin(QWidget* parent, const QString& header, - const QString& _name=QString(), - const QString& _passwd=QString()); + FlickrLogin(TQWidget* tqparent, const TQString& header, + const TQString& _name=TQString(), + const TQString& _passwd=TQString()); ~FlickrLogin(); - QString name() const; - QString password() const; + TQString name() const; + TQString password() const; private: - QLabel *m_headerLabel; - QLineEdit *m_nameEdit; - QLineEdit *m_passwdEdit; + TQLabel *m_headerLabel; + TQLineEdit *m_nameEdit; + TQLineEdit *m_passwdEdit; }; } // namespace KIPIFlickrExportPlugin diff --git a/kipi-plugins/flickrexport/mpform.cpp b/kipi-plugins/flickrexport/mpform.cpp index 462b0e4..35138f0 100644 --- a/kipi-plugins/flickrexport/mpform.cpp +++ b/kipi-plugins/flickrexport/mpform.cpp @@ -26,11 +26,11 @@ #include <cstring> #include <cstdio> -// Qt includes. +// TQt includes. -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> // KDE includes. @@ -63,19 +63,19 @@ void MPForm::reset() void MPForm::finish() { - QCString str; + TQCString str; str += "--"; str += m_boundary; str += "--"; - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << str; } -bool MPForm::addPair(const QString& name, const QString& value) +bool MPForm::addPair(const TQString& name, const TQString& value) { - QCString str; + TQCString str; str += "--"; str += m_boundary; @@ -91,17 +91,17 @@ bool MPForm::addPair(const QString& name, const QString& value) //m_buffer.resize(oldSize + str.size()); //memcpy(m_buffer.data() + oldSize, str.data(), str.size()); - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); - ts << QString::fromUtf8(str); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); + ts << TQString::fromUtf8(str); return true; } -bool MPForm::addFile(const QString& name,const QString& path) +bool MPForm::addFile(const TQString& name,const TQString& path) { KMimeType::Ptr ptr = KMimeType::findByURL(path); - QString mime = ptr->name(); + TQString mime = ptr->name(); if (mime.isEmpty()) { // if we ourselves can't determine the mime of the local file, @@ -109,14 +109,14 @@ bool MPForm::addFile(const QString& name,const QString& path) return false; } - QFile imageFile(path); + TQFile imageFile(path); if (!imageFile.open(IO_ReadOnly)) return false; - QByteArray imageData = imageFile.readAll(); + TQByteArray imageData = imageFile.readAll(); imageFile.close(); - QCString str; + TQCString str; str += "--"; str += m_boundary; @@ -125,15 +125,15 @@ bool MPForm::addFile(const QString& name,const QString& path) str += name.ascii(); str += "\"; "; str += "filename=\""; - str += QFile::encodeName(KURL(path).filename()); + str += TQFile::encodeName(KURL(path).filename()); str += "\""; str += "\r\n"; str += "Content-Type: "; str += mime.ascii(); str += "\r\n\r\n"; - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << str; int oldSize = m_buffer.size(); @@ -145,17 +145,17 @@ bool MPForm::addFile(const QString& name,const QString& path) return true; } -QString MPForm::contentType() const +TQString MPForm::contentType() const { - return QString("Content-Type: multipart/form-data; boundary=" + m_boundary); + return TQString("Content-Type: multipart/form-data; boundary=" + m_boundary); } -QString MPForm::boundary() const +TQString MPForm::boundary() const { return m_boundary; } -QByteArray MPForm::formData() const +TQByteArray MPForm::formData() const { return m_buffer; } diff --git a/kipi-plugins/flickrexport/mpform.h b/kipi-plugins/flickrexport/mpform.h index 89d958d..1ec0093 100644 --- a/kipi-plugins/flickrexport/mpform.h +++ b/kipi-plugins/flickrexport/mpform.h @@ -24,10 +24,10 @@ #ifndef MPFORM_H #define MPFORM_H -// Qt includes. +// TQt includes. -#include <qcstring.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqstring.h> namespace KIPIFlickrExportPlugin { @@ -43,17 +43,17 @@ public: void finish(); void reset(); - bool addPair(const QString& name, const QString& value); - bool addFile(const QString& name, const QString& path); + bool addPair(const TQString& name, const TQString& value); + bool addFile(const TQString& name, const TQString& path); - QString contentType() const; - QByteArray formData() const; - QString boundary() const; + TQString contentType() const; + TQByteArray formData() const; + TQString boundary() const; private: - QByteArray m_buffer; - QCString m_boundary; + TQByteArray m_buffer; + TQCString m_boundary; }; } // namespace KIPIFlickrExportPlugin diff --git a/kipi-plugins/flickrexport/plugin_flickrexport.cpp b/kipi-plugins/flickrexport/plugin_flickrexport.cpp index 101aaae..f6d5dc5 100644 --- a/kipi-plugins/flickrexport/plugin_flickrexport.cpp +++ b/kipi-plugins/flickrexport/plugin_flickrexport.cpp @@ -52,13 +52,13 @@ typedef KGenericFactory<Plugin_FlickrExport> Factory; K_EXPORT_COMPONENT_FACTORY(kipiplugin_flickrexport, Factory("kipiplugin_flickrexport")) -Plugin_FlickrExport::Plugin_FlickrExport(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin(Factory::instance(), parent, "FlickrExport") +Plugin_FlickrExport::Plugin_FlickrExport(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin(Factory::instance(), tqparent, "FlickrExport") { kdDebug(51001) << "Plugin_FlickrExport plugin loaded" << endl; } -void Plugin_FlickrExport::setup(QWidget* widget) +void Plugin_FlickrExport::setup(TQWidget* widget) { KIPI::Plugin::setup(widget); @@ -66,11 +66,11 @@ void Plugin_FlickrExport::setup(QWidget* widget) "www", 0, this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "flickrexport"); - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { @@ -89,7 +89,7 @@ Plugin_FlickrExport::~Plugin_FlickrExport() void Plugin_FlickrExport::slotActivate() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { kdError( 51000 ) << "Kipi interface is null!" << endl; @@ -97,10 +97,10 @@ void Plugin_FlickrExport::slotActivate() } KStandardDirs dir; - QString Tmp = dir.saveLocation("tmp", "kipi-flickrexportplugin-" + QString::number(getpid()) + "/"); + TQString Tmp = dir.saveLocation("tmp", "kipi-flickrexportplugin-" + TQString::number(getpid()) + "/"); // We clean it up in the close button - m_dlg = new KIPIFlickrExportPlugin::FlickrWindow(interface, Tmp, kapp->activeWindow()); + m_dlg = new KIPIFlickrExportPlugin::FlickrWindow(interface, Tmp, TQT_TQWIDGET(kapp->activeWindow())); m_dlg->show(); } diff --git a/kipi-plugins/flickrexport/plugin_flickrexport.h b/kipi-plugins/flickrexport/plugin_flickrexport.h index 282686d..0bbeb99 100644 --- a/kipi-plugins/flickrexport/plugin_flickrexport.h +++ b/kipi-plugins/flickrexport/plugin_flickrexport.h @@ -34,14 +34,15 @@ using namespace KIPIFlickrExportPlugin; class Plugin_FlickrExport : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_FlickrExport(QObject *parent, const char* name, const QStringList &args); + Plugin_FlickrExport(TQObject *tqparent, const char* name, const TQStringList &args); ~Plugin_FlickrExport(); virtual KIPI::Category category(KAction* action) const; - virtual void setup(QWidget*); + virtual void setup(TQWidget*); public slots: diff --git a/kipi-plugins/galleryexport/TODO b/kipi-plugins/galleryexport/TODO index fcff8e0..7a3d8b6 100644 --- a/kipi-plugins/galleryexport/TODO +++ b/kipi-plugins/galleryexport/TODO @@ -10,4 +10,4 @@ Somewhat immediate implementation needed: For the lazy times: * Polish the html code used to render the thumbnails, better - fonts sizes and layout + fonts sizes and tqlayout diff --git a/kipi-plugins/galleryexport/galleries.cpp b/kipi-plugins/galleryexport/galleries.cpp index c38baff..eddaba5 100644 --- a/kipi-plugins/galleryexport/galleries.cpp +++ b/kipi-plugins/galleryexport/galleries.cpp @@ -16,9 +16,9 @@ * GNU General Public License for more details. * ============================================================ */ -#include <qstring.h> +#include <tqstring.h> -#include <qwidget.h> +#include <tqwidget.h> #include <kapplication.h> #include <kdebug.h> #include <kconfig.h> @@ -34,8 +34,8 @@ namespace KIPIGalleryExportPlugin { -Gallery::Gallery(const QString& name, const QString& url, - const QString& username, const QString& password, +Gallery::Gallery(const TQString& name, const TQString& url, + const TQString& username, const TQString& password, const unsigned int version, const unsigned int galleryId) : mName(name), @@ -53,41 +53,41 @@ Gallery::~Gallery() } -QString Gallery::name() const { return mName; } -QString Gallery::url() const { return mUrl; } -QString Gallery::username() const { return mUsername; } -QString Gallery::password() const { return mPassword; } +TQString Gallery::name() const { return mName; } +TQString Gallery::url() const { return mUrl; } +TQString Gallery::username() const { return mUsername; } +TQString Gallery::password() const { return mPassword; } unsigned int Gallery::version() const { return mVersion; } unsigned int Gallery::galleryId() const { return mGalleryId; } -void Gallery::setName(QString name) { mName = name; } -void Gallery::setUrl(QString url) { mUrl = url; } -void Gallery::setUsername(QString username) { mUsername = username; } -void Gallery::setPassword(QString password) { mPassword = password; } +void Gallery::setName(TQString name) { mName = name; } +void Gallery::setUrl(TQString url) { mUrl = url; } +void Gallery::setUsername(TQString username) { mUsername = username; } +void Gallery::setPassword(TQString password) { mPassword = password; } void Gallery::setVersion(unsigned int version) { mVersion = version; } void Gallery::setGalleryId(unsigned int galleryId) { mGalleryId = galleryId; } -QListViewItem* Gallery::asQListViewItem(QListView* pParent) +TQListViewItem* Gallery::asTQListViewItem(TQListView* pParent) { - QListViewItem* p_lvi = (QListViewItem*) new GalleryQListViewItem(this, pParent); + TQListViewItem* p_lvi = (TQListViewItem*) new GalleryTQListViewItem(this, pParent); return p_lvi; } -GalleryQListViewItem::GalleryQListViewItem(Gallery* pGallery, QListView* pParent) - : QListViewItem(pParent, pGallery->name(), pGallery->url(), pGallery->username()), +GalleryTQListViewItem::GalleryTQListViewItem(Gallery* pGallery, TQListView* pParent) + : TQListViewItem(pParent, pGallery->name(), pGallery->url(), pGallery->username()), mpGallery(pGallery) { } -Gallery* GalleryQListViewItem::GetGallery() +Gallery* GalleryTQListViewItem::GetGallery() { return mpGallery; } -void GalleryQListViewItem::Refresh() +void GalleryTQListViewItem::Refresh() { setText(0, mpGallery->name()); setText(1, mpGallery->url()); @@ -144,12 +144,12 @@ void Galleries::Load() // read config KConfig config("kipirc"); config.setGroup("GallerySync Settings"); - QValueList<int> gallery_ids = config.readIntListEntry("Galleries"); + TQValueList<int> gallery_ids = config.readIntListEntry("Galleries"); config.setGroup("GallerySync Galleries"); - QString name, url, username, password = ""; + TQString name, url, username, password = ""; int version; - for (QValueList<int>::Iterator it = gallery_ids.begin(); it != gallery_ids.end(); ++it) + for (TQValueList<int>::Iterator it = gallery_ids.begin(); it != gallery_ids.end(); ++it) { unsigned int gallery_id = (*it); @@ -157,12 +157,12 @@ void Galleries::Load() mMaxGalleryId = gallery_id; // Load the gallery with this id. - name = config.readEntry(QString("Name%1").arg(gallery_id)); - url = config.readEntry(QString("URL%1").arg(gallery_id)); - username = config.readEntry(QString("Username%1").arg(gallery_id)); - version = config.readNumEntry(QString("Version%1").arg(gallery_id)); + name = config.readEntry(TQString("Name%1").tqarg(gallery_id)); + url = config.readEntry(TQString("URL%1").tqarg(gallery_id)); + username = config.readEntry(TQString("Username%1").tqarg(gallery_id)); + version = config.readNumEntry(TQString("Version%1").tqarg(gallery_id)); if (bln_use_wallet) - mpWallet->readPassword(QString("Password%1").arg(gallery_id), password); + mpWallet->readPassword(TQString("Password%1").tqarg(gallery_id), password); Gallery* p_gallery = new Gallery(name, url, username, password, version, gallery_id); mGalleries.append(p_gallery); @@ -187,7 +187,7 @@ void Galleries::Remove(Gallery* pGallery) void Galleries::Save() { - QValueList<int> gallery_ids; + TQValueList<int> gallery_ids; KConfig config("kipirc"); config.deleteGroup("GallerySync Galleries"); config.setGroup("GallerySync Galleries"); @@ -217,23 +217,23 @@ void Galleries::Save() unsigned int gallery_id = p_gallery->galleryId(); gallery_ids.append(gallery_id); - config.writeEntry(QString("Name%1").arg(gallery_id), p_gallery->name()); - config.writeEntry(QString("URL%1").arg(gallery_id), p_gallery->url()); - config.writeEntry(QString("Username%1").arg(gallery_id), p_gallery->username()); - config.writeEntry(QString("Version%1").arg(gallery_id), p_gallery->version()); + config.writeEntry(TQString("Name%1").tqarg(gallery_id), p_gallery->name()); + config.writeEntry(TQString("URL%1").tqarg(gallery_id), p_gallery->url()); + config.writeEntry(TQString("Username%1").tqarg(gallery_id), p_gallery->username()); + config.writeEntry(TQString("Version%1").tqarg(gallery_id), p_gallery->version()); if (bln_use_wallet) - mpWallet->writePassword(QString("Password%1").arg(gallery_id), p_gallery->password()); + mpWallet->writePassword(TQString("Password%1").tqarg(gallery_id), p_gallery->password()); } config.setGroup("GallerySync Settings"); config.writeEntry("Galleries", gallery_ids); } -QListView* Galleries::asQListView(QWidget* pParent) +TQListView* Galleries::asTQListView(TQWidget* pParent) { Load(); - QListView* p_lv = new QListView (pParent); + TQListView* p_lv = new TQListView (pParent); p_lv->addColumn(i18n("Gallery Name")); p_lv->addColumn(i18n("URL")); p_lv->addColumn(i18n("User")); @@ -241,7 +241,7 @@ QListView* Galleries::asQListView(QWidget* pParent) for (GalleryPtrList::iterator it = mGalleries.begin(); it != mGalleries.end(); ++it) { - (*it)->asQListViewItem(p_lv); + (*it)->asTQListViewItem(p_lv); } return p_lv; diff --git a/kipi-plugins/galleryexport/galleries.h b/kipi-plugins/galleryexport/galleries.h index c9a8dd1..009db38 100644 --- a/kipi-plugins/galleryexport/galleries.h +++ b/kipi-plugins/galleryexport/galleries.h @@ -19,8 +19,8 @@ #ifndef GALLERIES_H #define GALLERIES_H -#include <qptrlist.h> -#include <qlistview.h> +#include <tqptrlist.h> +#include <tqlistview.h> namespace KWallet { @@ -34,36 +34,36 @@ class Gallery { public: - Gallery(const QString& name = i18n("New Gallery"), - const QString& url = QString("http://www.newgallery.com/"), - const QString& username = QString(), - const QString& password = QString(), + Gallery(const TQString& name = i18n("New Gallery"), + const TQString& url = TQString("http://www.newgallery.com/"), + const TQString& username = TQString(), + const TQString& password = TQString(), const unsigned int version = 2, const unsigned int galleryId = 0); ~Gallery(); - QString name() const; - QString url() const; - QString username() const; - QString password() const; + TQString name() const; + TQString url() const; + TQString username() const; + TQString password() const; unsigned int version() const; unsigned int galleryId() const; - void setName(QString name); - void setUrl(QString url); - void setUsername(QString username); - void setPassword(QString password); + void setName(TQString name); + void setUrl(TQString url); + void setUsername(TQString username); + void setPassword(TQString password); void setVersion(unsigned int version); void setGalleryId(unsigned int galleryId); - QListViewItem* asQListViewItem(QListView* pParent); + TQListViewItem* asTQListViewItem(TQListView* pParent); private: - QString mName; - QString mUrl; - QString mUsername; - QString mPassword; + TQString mName; + TQString mUrl; + TQString mUsername; + TQString mPassword; unsigned int mVersion; unsigned int mGalleryId; @@ -71,10 +71,10 @@ private: /* Simple Stub Class to allow easy access to Galleries from GUI elements */ -class GalleryQListViewItem : public QListViewItem +class GalleryTQListViewItem : public TQListViewItem { public: - GalleryQListViewItem(Gallery* pGallery, QListView* pParent); + GalleryTQListViewItem(Gallery* pGallery, TQListView* pParent); Gallery* GetGallery(); void Refresh(); @@ -83,7 +83,7 @@ private: }; -typedef QPtrList<Gallery> GalleryPtrList; +typedef TQPtrList<Gallery> GalleryPtrList; /* Container class for all Galleries */ class Galleries @@ -95,7 +95,7 @@ public: void Add(Gallery* pGallery); void Remove(Gallery* pGallery); void Save(); - QListView* asQListView(QWidget* pParent); + TQListView* asTQListView(TQWidget* pParent); private: void Load(); diff --git a/kipi-plugins/galleryexport/galleryalbumdialog.ui b/kipi-plugins/galleryexport/galleryalbumdialog.ui index 2dfbf6a..0ec158a 100644 --- a/kipi-plugins/galleryexport/galleryalbumdialog.ui +++ b/kipi-plugins/galleryexport/galleryalbumdialog.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>KIPIGalleryExportPlugin::GalleryAlbumDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>GalleryAlbumDialog</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -28,7 +28,7 @@ <property name="spacing"> <number>5</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>header</cstring> </property> @@ -50,15 +50,15 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>titleLabel</cstring> </property> @@ -66,7 +66,7 @@ <string>Title (optional):</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>nameLabel</cstring> </property> @@ -74,7 +74,7 @@ <string>Name (optional):</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>captionLabel</cstring> </property> @@ -82,17 +82,17 @@ <string>Caption (optional):</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>titleEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>nameEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>captionEdit</cstring> </property> @@ -113,7 +113,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -137,14 +137,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -161,7 +161,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -193,5 +193,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kipi-plugins/galleryexport/galleryconfig.cpp b/kipi-plugins/galleryexport/galleryconfig.cpp index 65fd7f4..9fc79f4 100644 --- a/kipi-plugins/galleryexport/galleryconfig.cpp +++ b/kipi-plugins/galleryexport/galleryconfig.cpp @@ -17,18 +17,18 @@ * * ============================================================ */ -// Include files for Qt - -#include <qlistview.h> -#include <qpushbutton.h> -#include <qtimer.h> -#include <qpixmap.h> -#include <qcursor.h> -#include <qlineedit.h> -#include <qprogressdialog.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qlayout.h> +// Include files for TQt + +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqtimer.h> +#include <tqpixmap.h> +#include <tqcursor.h> +#include <tqlineedit.h> +#include <tqprogressdialog.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqlayout.h> // Include files for KDE @@ -56,75 +56,75 @@ namespace KIPIGalleryExportPlugin { -GalleryEdit::GalleryEdit(QWidget* pParent, +GalleryEdit::GalleryEdit(TQWidget* pParent, Gallery* pGallery, - QString title) + TQString title) : KDialogBase(pParent, 0, true, title, Ok|Cancel, Ok, false), mpGallery(pGallery) { setButtonGuiItem( Ok, KStdGuiItem::save() ); - QFrame *page = new QFrame (this); - QHBoxLayout *tll = new QHBoxLayout(page); + TQFrame *page = new TQFrame (this); + TQHBoxLayout *tll = new TQHBoxLayout(page); page->setMinimumSize (500, 200); setMainWidget(page); - QVBoxLayout* vbox = new QVBoxLayout(); + TQVBoxLayout* vbox = new TQVBoxLayout(); vbox->setSpacing (KDialog::spacingHint()); tll->addItem(vbox); - mpHeaderLabel = new QLabel(page); - mpHeaderLabel->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, - QSizePolicy::Fixed)); + mpHeaderLabel = new TQLabel(page); + mpHeaderLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, + TQSizePolicy::Fixed)); mpHeaderLabel->setText(title); vbox->addWidget(mpHeaderLabel); - QFrame* hline = new QFrame(page, "hline"); - hline->setFrameShape(QFrame::HLine); - hline->setFrameShadow(QFrame::Sunken); - hline->setFrameShape(QFrame::HLine); + TQFrame* hline = new TQFrame(page, "hline"); + hline->setFrameShape(TQFrame::HLine); + hline->setFrameShadow(TQFrame::Sunken); + hline->setFrameShape(TQFrame::HLine); vbox->addWidget(hline); - QGridLayout* centerLayout = new QGridLayout(0, 1, 1, 5, 5); + TQGridLayout* centerLayout = new TQGridLayout(0, 1, 1, 5, 5); - mpNameEdit = new QLineEdit( this ); + mpNameEdit = new TQLineEdit( this ); centerLayout->addWidget(mpNameEdit, 0, 1); - mpUrlEdit = new QLineEdit( this ); + mpUrlEdit = new TQLineEdit( this ); centerLayout->addWidget(mpUrlEdit, 1, 1); - mpUsernameEdit = new QLineEdit( this ); + mpUsernameEdit = new TQLineEdit( this ); centerLayout->addWidget(mpUsernameEdit, 2, 1); - mpPasswordEdit = new QLineEdit( this ); - mpPasswordEdit->setEchoMode(QLineEdit::Password); + mpPasswordEdit = new TQLineEdit( this ); + mpPasswordEdit->setEchoMode(TQLineEdit::Password); centerLayout->addWidget(mpPasswordEdit, 3, 1); - QLabel* name_label = new QLabel(this); + TQLabel* name_label = new TQLabel(this); name_label->setText(i18n( "Name:" )); centerLayout->addWidget(name_label, 0, 0); - QLabel* urlLabel = new QLabel(this); + TQLabel* urlLabel = new TQLabel(this); urlLabel->setText(i18n( "URL:" )); centerLayout->addWidget(urlLabel, 1, 0); - QLabel* nameLabel = new QLabel(this); + TQLabel* nameLabel = new TQLabel(this); nameLabel->setText(i18n( "Username:" )); centerLayout->addWidget(nameLabel, 2, 0); - QLabel* passwdLabel = new QLabel(this); + TQLabel* passwdLabel = new TQLabel(this); passwdLabel->setText(i18n( "Password:" )); centerLayout->addWidget(passwdLabel, 3, 0); //--------------------------------------------- - mpGalleryVersion = new QCheckBox( i18n("Use &Gallery 2"), this); + mpGalleryVersion = new TQCheckBox( i18n("Use &Gallery 2"), this); mpGalleryVersion->setChecked( 2 == pGallery->version() ); centerLayout->addWidget( mpGalleryVersion, 4, 1 ); //--------------------------------------------- vbox->addLayout( centerLayout ); - resize( QSize(300, 150).expandedTo(minimumSizeHint()) ); + resize( TQSize(300, 150).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); mpNameEdit->setText(pGallery->name()); diff --git a/kipi-plugins/galleryexport/galleryconfig.h b/kipi-plugins/galleryexport/galleryconfig.h index 0aaedcc..a5945ac 100644 --- a/kipi-plugins/galleryexport/galleryconfig.h +++ b/kipi-plugins/galleryexport/galleryconfig.h @@ -20,9 +20,9 @@ #define GALLERYCONFIG_H #include <kdialogbase.h> -#include <qvaluelist.h> -#include <qpair.h> -#include <qintdict.h> +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqintdict.h> namespace KIPIGalleryExportPlugin { @@ -32,23 +32,24 @@ class Gallery; class GalleryEdit : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GalleryEdit(QWidget* pParent, + GalleryEdit(TQWidget* pParent, Gallery* pGallery, - QString title); + TQString title); ~GalleryEdit(); private: Gallery* mpGallery; - QLabel* mpHeaderLabel; - QLineEdit* mpNameEdit; - QLineEdit* mpUrlEdit; - QLineEdit* mpUsernameEdit; - QLineEdit* mpPasswordEdit; - QCheckBox* mpGalleryVersion; + TQLabel* mpHeaderLabel; + TQLineEdit* mpNameEdit; + TQLineEdit* mpUrlEdit; + TQLineEdit* mpUsernameEdit; + TQLineEdit* mpPasswordEdit; + TQCheckBox* mpGalleryVersion; private slots: void slotOk(void); diff --git a/kipi-plugins/galleryexport/galleryitem.h b/kipi-plugins/galleryexport/galleryitem.h index 89661ec..a752698 100644 --- a/kipi-plugins/galleryexport/galleryitem.h +++ b/kipi-plugins/galleryexport/galleryitem.h @@ -22,7 +22,7 @@ #ifndef GALLERYITEM_H #define GALLERYITEM_H -#include <qstring.h> +#include <tqstring.h> namespace KIPIGalleryExportPlugin { @@ -38,10 +38,10 @@ public: int ref_num; int album_num; - QString name; - QString caption; - QString thumbName; - QString albumURL; + TQString name; + TQString caption; + TQString thumbName; + TQString albumURL; }; class GAlbum @@ -51,7 +51,7 @@ public: GAlbum() { ref_num = -1; - parent_ref_num = -1; + tqparent_ref_num = -1; add = false; write = false; @@ -62,19 +62,19 @@ public: bool operator<(const GAlbum& rhs) const { - if (parent_ref_num == rhs.parent_ref_num) + if (tqparent_ref_num == rhs.tqparent_ref_num) return ref_num < rhs.ref_num; - return parent_ref_num < rhs.parent_ref_num; + return tqparent_ref_num < rhs.tqparent_ref_num; } int ref_num; - int parent_ref_num; - QString name; - QString parentName; - QString title; - QString summary; - QString baseurl; + int tqparent_ref_num; + TQString name; + TQString tqparentName; + TQString title; + TQString summary; + TQString baseurl; bool add; bool write; diff --git a/kipi-plugins/galleryexport/gallerylist.cpp b/kipi-plugins/galleryexport/gallerylist.cpp index 36192d5..314ebd2 100644 --- a/kipi-plugins/galleryexport/gallerylist.cpp +++ b/kipi-plugins/galleryexport/gallerylist.cpp @@ -17,18 +17,18 @@ * * ============================================================ */ -// Include files for Qt - -#include <qlistview.h> -#include <qpushbutton.h> -#include <qtimer.h> -#include <qpixmap.h> -#include <qcursor.h> -#include <qlineedit.h> -#include <qprogressdialog.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qlayout.h> +// Include files for TQt + +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqtimer.h> +#include <tqpixmap.h> +#include <tqcursor.h> +#include <tqlineedit.h> +#include <tqprogressdialog.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqlayout.h> // Include files for KDE @@ -46,7 +46,7 @@ namespace KIPIGalleryExportPlugin { -GalleryList::GalleryList(QWidget *pParent, Galleries* pGalleries, bool blnShowOpen) +GalleryList::GalleryList(TQWidget *pParent, Galleries* pGalleries, bool blnShowOpen) : KDialogBase(pParent, 0, true, i18n("Remote Galleries"), Ok|Close|User1|User2|User3, Close, false), @@ -66,29 +66,29 @@ GalleryList::GalleryList(QWidget *pParent, Galleries* pGalleries, bool blnShowOp enableButton(User1, false); enableButton(User2, false); - QFrame *page = new QFrame(this); - QHBoxLayout *tll = new QHBoxLayout(page); + TQFrame *page = new TQFrame(this); + TQHBoxLayout *tll = new TQHBoxLayout(page); page->setMinimumSize(400, 200); setMainWidget(page); - QHBoxLayout *hb = new QHBoxLayout(); + TQHBoxLayout *hb = new TQHBoxLayout(); hb->setSpacing(KDialog::spacingHint()); tll->addItem(hb); - QLabel *label = new QLabel(page); + TQLabel *label = new TQLabel(page); hb->addWidget(label); label->setPixmap(UserIcon("gallery")); - label->setFrameStyle (QFrame::Panel | QFrame::Sunken); - label->setAlignment(Qt::AlignTop); - QVBoxLayout *vb = new QVBoxLayout(); + label->setFrameStyle (TQFrame::Panel | TQFrame::Sunken); + label->tqsetAlignment(TQt::AlignTop); + TQVBoxLayout *vb = new TQVBoxLayout(); vb->setSpacing (KDialog::spacingHint()); tll->addItem(vb); - mpGalleryList = mpGalleries->asQListView(page); + mpGalleryList = mpGalleries->asTQListView(page); vb->addWidget(mpGalleryList); - connect(mpGalleryList, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); - connect(mpGalleryList, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), - this, SLOT(doubleClicked(QListViewItem*, const QPoint&, int))); + connect(mpGalleryList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); + connect(mpGalleryList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT(doubleClicked(TQListViewItem*, const TQPoint&, int))); } GalleryList::~GalleryList() @@ -103,7 +103,7 @@ Gallery* GalleryList::GetGallery() void GalleryList::selectionChanged() { - QListViewItem* p_lvi = mpGalleryList->selectedItem(); + TQListViewItem* p_lvi = mpGalleryList->selectedItem(); bool bln_selected = (p_lvi ? true : false); enableButton(User1, bln_selected); enableButton(User2, bln_selected); @@ -111,7 +111,7 @@ void GalleryList::selectionChanged() if (bln_selected) { - GalleryQListViewItem* p_glvi = dynamic_cast<GalleryQListViewItem*>(p_lvi); + GalleryTQListViewItem* p_glvi = dynamic_cast<GalleryTQListViewItem*>(p_lvi); mpCurrentGallery = p_glvi->GetGallery(); } else @@ -120,7 +120,7 @@ void GalleryList::selectionChanged() } } -void GalleryList::doubleClicked(QListViewItem* pCurrent, const QPoint&, int) +void GalleryList::doubleClicked(TQListViewItem* pCurrent, const TQPoint&, int) { if (!pCurrent) return; @@ -140,11 +140,11 @@ void GalleryList::slotUser3(void) { Gallery* p_gallery = new Gallery(); GalleryEdit dlg(this, p_gallery, i18n("New Remote Gallery")); - if (QDialog::Accepted == dlg.exec()) + if (TQDialog::Accepted == dlg.exec()) { mpGalleries->Add(p_gallery); mpGalleries->Save(); - p_gallery->asQListViewItem(mpGalleryList); + p_gallery->asTQListViewItem(mpGalleryList); } else { @@ -156,16 +156,16 @@ void GalleryList::slotUser3(void) //================== Edit ====== void GalleryList::slotUser2(void) { - QListViewItem* p_lvi = mpGalleryList->selectedItem(); + TQListViewItem* p_lvi = mpGalleryList->selectedItem(); if (!p_lvi) { - KMessageBox::error(kapp->activeWindow(), i18n("No gallery selected!")); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("No gallery selected!")); } else { - GalleryQListViewItem* p_glvi = dynamic_cast<GalleryQListViewItem*>(p_lvi); + GalleryTQListViewItem* p_glvi = dynamic_cast<GalleryTQListViewItem*>(p_lvi); GalleryEdit dlg(this, p_glvi->GetGallery(), i18n("Edit Remote Gallery")); - if (QDialog::Accepted == dlg.exec()) + if (TQDialog::Accepted == dlg.exec()) { p_glvi->Refresh(); mpGalleries->Save(); @@ -177,23 +177,23 @@ void GalleryList::slotUser2(void) //================== Remove ====== void GalleryList::slotUser1(void) { - QListViewItem* p_lvi = mpGalleryList->selectedItem(); + TQListViewItem* p_lvi = mpGalleryList->selectedItem(); if (!p_lvi) { - KMessageBox::error(kapp->activeWindow(), i18n("No gallery selected!")); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("No gallery selected!")); } else { if (KMessageBox::Yes == - KMessageBox::warningYesNo(kapp->activeWindow(), + KMessageBox::warningYesNo(TQT_TQWIDGET(kapp->activeWindow()), i18n("Are you sure you want to remove this gallery? " "All synchronisaton settings will be lost. " "You cannot undo this action."), i18n("Remove Remote Gallery"), KStdGuiItem::yes(), KStdGuiItem::no(), - QString::null, KMessageBox::Dangerous)) + TQString(), KMessageBox::Dangerous)) { - GalleryQListViewItem* p_glvi = dynamic_cast<GalleryQListViewItem*>(p_lvi); + GalleryTQListViewItem* p_glvi = dynamic_cast<GalleryTQListViewItem*>(p_lvi); Gallery* p_gallery = p_glvi->GetGallery(); delete p_glvi; mpGalleries->Remove(p_gallery); diff --git a/kipi-plugins/galleryexport/gallerylist.h b/kipi-plugins/galleryexport/gallerylist.h index f4aacd0..9216dda 100644 --- a/kipi-plugins/galleryexport/gallerylist.h +++ b/kipi-plugins/galleryexport/gallerylist.h @@ -21,7 +21,7 @@ #include <kdialogbase.h> -#include <qlistview.h> +#include <tqlistview.h> namespace KIPIGalleryExportPlugin { @@ -32,10 +32,11 @@ class Galleries; class GalleryList : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GalleryList(QWidget *parent, Galleries* pGalleries, bool blnShowOpen = true); + GalleryList(TQWidget *tqparent, Galleries* pGalleries, bool blnShowOpen = true); ~GalleryList(); Gallery* GetGallery(void); @@ -44,12 +45,12 @@ private: Galleries* mpGalleries; Gallery* mpCurrentGallery; - QListView* mpGalleryList; + TQListView* mpGalleryList; private slots: void selectionChanged(); - void doubleClicked(QListViewItem*, const QPoint&, int); + void doubleClicked(TQListViewItem*, const TQPoint&, int); void slotUser1(); void slotUser2(); diff --git a/kipi-plugins/galleryexport/gallerympform.cpp b/kipi-plugins/galleryexport/gallerympform.cpp index f3cf894..5161bc2 100644 --- a/kipi-plugins/galleryexport/gallerympform.cpp +++ b/kipi-plugins/galleryexport/gallerympform.cpp @@ -24,9 +24,9 @@ #include <kmimetype.h> #include <kurl.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> #include <cstring> #include <cstdio> @@ -45,7 +45,7 @@ GalleryMPForm::GalleryMPForm() if (GalleryTalker::isGallery2()) { addPairRaw("g2_controller", "remote:GalleryRemote"); - QString auth_token = GalleryTalker::getAuthToken(); + TQString auth_token = GalleryTalker::getAuthToken(); if (!auth_token.isEmpty()) addPairRaw("g2_authToken", auth_token); } @@ -62,28 +62,28 @@ void GalleryMPForm::reset() void GalleryMPForm::finish() { - QCString str; + TQCString str; str += "--"; str += m_boundary; str += "--"; str += "\r\n"; - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << str << '\0'; } -bool GalleryMPForm::addPair(const QString& name, const QString& value) +bool GalleryMPForm::addPair(const TQString& name, const TQString& value) { if (GalleryTalker::isGallery2()) - return addPairRaw(QString("g2_form[%1]").arg(name), value); + return addPairRaw(TQString("g2_form[%1]").tqarg(name), value); return addPairRaw(name, value); } -bool GalleryMPForm::addPairRaw(const QString& name, const QString& value) +bool GalleryMPForm::addPairRaw(const TQString& name, const TQString& value) { - QCString str; + TQCString str; str += "--"; str += m_boundary; @@ -99,16 +99,16 @@ bool GalleryMPForm::addPairRaw(const QString& name, const QString& value) //m_buffer.resize(oldSize + str.size()); //memcpy(m_buffer.data() + oldSize, str.data(), str.size()); - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << str; return true; } -bool GalleryMPForm::addFile(const QString& path, const QString& displayFilename) +bool GalleryMPForm::addFile(const TQString& path, const TQString& displayFilename) { - QString filename = "userfile_name"; + TQString filename = "userfile_name"; if (GalleryTalker::isGallery2()) filename = "g2_userfile_name"; @@ -118,7 +118,7 @@ bool GalleryMPForm::addFile(const QString& path, const QString& displayFilename) } KMimeType::Ptr ptr = KMimeType::findByURL(path); - QString mime = ptr->name(); + TQString mime = ptr->name(); if (mime.isEmpty()) { // if we ourselves can't determine the mime of the local file, @@ -126,13 +126,13 @@ bool GalleryMPForm::addFile(const QString& path, const QString& displayFilename) return false; } - QFile imageFile(path); + TQFile imageFile(path); if ( !imageFile.open( IO_ReadOnly ) ) return false; - QByteArray imageData = imageFile.readAll(); + TQByteArray imageData = imageFile.readAll(); imageFile.close(); - QCString str; + TQCString str; str += "--"; str += m_boundary; @@ -144,15 +144,15 @@ bool GalleryMPForm::addFile(const QString& path, const QString& displayFilename) str += "userfile"; str += "\"; "; str += "filename=\""; - str += QFile::encodeName(KURL(path).filename()); + str += TQFile::encodeName(KURL(path).filename()); str += "\""; str += "\r\n"; str += "Content-Type: "; str += mime.ascii(); str += "\r\n\r\n"; - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << str; int oldSize = m_buffer.size(); @@ -164,17 +164,17 @@ bool GalleryMPForm::addFile(const QString& path, const QString& displayFilename) return true; } -QString GalleryMPForm::contentType() const +TQString GalleryMPForm::contentType() const { - return QString("Content-Type: multipart/form-data; boundary=" + m_boundary); + return TQString("Content-Type: multipart/form-data; boundary=" + m_boundary); } -QString GalleryMPForm::boundary() const +TQString GalleryMPForm::boundary() const { return m_boundary; } -QByteArray GalleryMPForm::formData() const +TQByteArray GalleryMPForm::formData() const { return m_buffer; } diff --git a/kipi-plugins/galleryexport/gallerympform.h b/kipi-plugins/galleryexport/gallerympform.h index 10c6bfc..0c0a6f2 100644 --- a/kipi-plugins/galleryexport/gallerympform.h +++ b/kipi-plugins/galleryexport/gallerympform.h @@ -19,8 +19,8 @@ #ifndef GALLERYMPFORM_H #define GALLERYMPFORM_H -#include <qcstring.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqstring.h> class KURL; @@ -37,19 +37,19 @@ public: void finish(); void reset(); - bool addPair(const QString& name, const QString& value); - bool addFile(const QString& path, const QString& displayFilename); + bool addPair(const TQString& name, const TQString& value); + bool addFile(const TQString& path, const TQString& displayFilename); - QString contentType() const; - QByteArray formData() const; - QString boundary() const; + TQString contentType() const; + TQByteArray formData() const; + TQString boundary() const; private: - bool addPairRaw(const QString& name, const QString& value); + bool addPairRaw(const TQString& name, const TQString& value); - QByteArray m_buffer; - QCString m_boundary; + TQByteArray m_buffer; + TQCString m_boundary; }; } diff --git a/kipi-plugins/galleryexport/gallerytalker.cpp b/kipi-plugins/galleryexport/gallerytalker.cpp index e18a7b0..10043dd 100644 --- a/kipi-plugins/galleryexport/gallerytalker.cpp +++ b/kipi-plugins/galleryexport/gallerytalker.cpp @@ -19,11 +19,11 @@ * * ============================================================ */ -#include <qcstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qimage.h> -#include <qregexp.h> +#include <tqcstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqregexp.h> #include <klocale.h> #include <kio/job.h> @@ -45,8 +45,8 @@ namespace KIPIGalleryExportPlugin { -GalleryTalker::GalleryTalker( QWidget* parent ) - : m_parent( parent ), m_job( 0 ), m_loggedIn( false ) +GalleryTalker::GalleryTalker( TQWidget* tqparent ) + : m_parent( tqparent ), m_job( 0 ), m_loggedIn( false ) { } @@ -57,15 +57,15 @@ GalleryTalker::~GalleryTalker() } bool GalleryTalker::s_using_gallery2 = true; -QString GalleryTalker::s_authToken = ""; +TQString GalleryTalker::s_authToken = ""; bool GalleryTalker::loggedIn() const { return m_loggedIn; } -void GalleryTalker::login( const KURL& url, const QString& name, - const QString& passwd ) +void GalleryTalker::login( const KURL& url, const TQString& name, + const TQString& passwd ) { m_url = url; @@ -80,10 +80,10 @@ void GalleryTalker::login( const KURL& url, const QString& name, KIO::TransferJob* job = KIO::http_post(m_url, form.formData(), false); job->addMetaData("content-type", form.contentType() ); job->addMetaData("cookies", "manual"); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *))); m_state = GE_LOGIN; m_job = job; @@ -95,7 +95,7 @@ void GalleryTalker::listAlbums() { GalleryMPForm form; - QString task = "fetch-albums"; + TQString task = "fetch-albums"; if (s_using_gallery2) task = "fetch-albums-prune"; @@ -107,10 +107,10 @@ void GalleryTalker::listAlbums() job->addMetaData("content-type", form.contentType() ); job->addMetaData("cookies", "manual"); job->addMetaData("setcookies", m_cookie); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *))); m_state = GE_LISTALBUMS; m_job = job; @@ -118,7 +118,7 @@ void GalleryTalker::listAlbums() emit signalBusy( true ); } -void GalleryTalker::listPhotos( const QString& albumName ) +void GalleryTalker::listPhotos( const TQString& albumName ) { if (m_job) { @@ -137,10 +137,10 @@ void GalleryTalker::listPhotos( const QString& albumName ) job->addMetaData("content-type", form.contentType() ); job->addMetaData("cookies", "manual"); job->addMetaData("setcookies", m_cookie); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *))); m_state = GE_LISTPHOTOS; m_job = job; @@ -148,10 +148,10 @@ void GalleryTalker::listPhotos( const QString& albumName ) emit signalBusy( true ); } -void GalleryTalker::createAlbum( const QString& parentAlbumName, - const QString& albumName, - const QString& albumTitle, - const QString& albumCaption ) +void GalleryTalker::createAlbum( const TQString& tqparentAlbumName, + const TQString& albumName, + const TQString& albumTitle, + const TQString& albumCaption ) { if (m_job) { @@ -163,7 +163,7 @@ void GalleryTalker::createAlbum( const QString& parentAlbumName, form.addPair("cmd", "new-album"); form.addPair("protocol_version", "2.11"); - form.addPair("set_albumName", parentAlbumName); + form.addPair("set_albumName", tqparentAlbumName); if (!albumName.isEmpty()) form.addPair("newAlbumName", albumName); if (!albumTitle.isEmpty()) @@ -176,10 +176,10 @@ void GalleryTalker::createAlbum( const QString& parentAlbumName, job->addMetaData("content-type", form.contentType() ); job->addMetaData("cookies", "manual"); job->addMetaData("setcookies", m_cookie); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *))); m_state = GE_CREATEALBUM; m_job = job; @@ -187,9 +187,9 @@ void GalleryTalker::createAlbum( const QString& parentAlbumName, emit signalBusy( true ); } -bool GalleryTalker::addPhoto( const QString& albumName, - const QString& photoPath, - const QString& caption, +bool GalleryTalker::addPhoto( const TQString& albumName, + const TQString& photoPath, + const TQString& caption, bool captionIsTitle, bool captionIsDescription, bool rescale, int maxDim ) { @@ -199,8 +199,8 @@ bool GalleryTalker::addPhoto( const QString& albumName, m_job = 0; } - QString path = photoPath; - QString display_filename = QFile::encodeName(KURL(path).filename()); + TQString path = photoPath; + TQString display_filename = TQFile::encodeName(KURL(path).filename()); GalleryMPForm form; @@ -215,18 +215,18 @@ bool GalleryTalker::addPhoto( const QString& albumName, if (captionIsDescription) form.addPair("extrafield.Description", caption); } - QImage image(photoPath); + TQImage image(photoPath); if (!image.isNull()) { // image file - see if we need to rescale it if (rescale && (image.width() > maxDim || image.height() > maxDim)) { - image = image.smoothScale(maxDim, maxDim, QImage::ScaleMin); + image = image.smoothScale(maxDim, maxDim, TQ_ScaleMin); path = locateLocal("tmp", KURL(photoPath).filename()); - image.save(path, QImageIO::imageFormat(photoPath)); + image.save(path, TQImageIO::imageFormat(photoPath)); - if ("JPEG" == QString(QImageIO::imageFormat(photoPath)).upper()) + if ("JPEG" == TQString(TQImageIO::imageFormat(photoPath)).upper()) { KExiv2Iface::KExiv2 exiv2; if (exiv2.load(photoPath)) @@ -251,10 +251,10 @@ bool GalleryTalker::addPhoto( const QString& albumName, job->addMetaData("content-type", form.contentType()); job->addMetaData("cookies", "manual"); job->addMetaData("setcookies", m_cookie); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *))); m_state = GE_ADDPHOTO; m_job = job; @@ -273,7 +273,7 @@ void GalleryTalker::cancel() } } -void GalleryTalker::data(KIO::Job*, const QByteArray& data) +void GalleryTalker::data(KIO::Job*, const TQByteArray& data) { if (data.isEmpty()) return; @@ -320,11 +320,11 @@ void GalleryTalker::slotResult(KIO::Job *job) if (m_state == GE_LOGIN && m_loggedIn) { - QStringList cookielist = QStringList::split("\n", job->queryMetaData("setcookies")); + TQStringList cookielist = TQStringList::split("\n", job->queryMetaData("setcookies")); m_cookie = "Cookie:"; - for (QStringList::Iterator it = cookielist.begin(); it != cookielist.end(); ++it) + for (TQStringList::Iterator it = cookielist.begin(); it != cookielist.end(); ++it) { - QRegExp rx("^Set-Cookie: ([^;]+=[^;]+)"); + TQRegExp rx("^Set-Cookie: ([^;]+=[^;]+)"); if (rx.search(*it) > -1) m_cookie += " " + rx.cap(1) + ";"; } @@ -332,11 +332,11 @@ void GalleryTalker::slotResult(KIO::Job *job) } } -void GalleryTalker::parseResponseLogin(const QByteArray &data) +void GalleryTalker::parseResponseLogin(const TQByteArray &data) { - QTextStream ts(data, IO_ReadOnly ); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream ts(data, IO_ReadOnly ); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; bool foundResponse = false; m_loggedIn = false; @@ -351,7 +351,7 @@ void GalleryTalker::parseResponseLogin(const QByteArray &data) } else { - QStringList strlist = QStringList::split("=", line); + TQStringList strlist = TQStringList::split("=", line); if (strlist.count() == 2) { if (("status" == strlist[0]) && ("0" == strlist[1])) @@ -378,15 +378,15 @@ void GalleryTalker::parseResponseLogin(const QByteArray &data) } } -void GalleryTalker::parseResponseListAlbums(const QByteArray &data) +void GalleryTalker::parseResponseListAlbums(const TQByteArray &data) { - QTextStream ts(data, IO_ReadOnly ); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream ts(data, IO_ReadOnly ); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; bool foundResponse = false; bool success = false; - typedef QValueList<GAlbum> GAlbumList; + typedef TQValueList<GAlbum> GAlbumList; GAlbumList albumList; GAlbumList::iterator iter = albumList.begin(); @@ -399,11 +399,11 @@ void GalleryTalker::parseResponseListAlbums(const QByteArray &data) } else { - QStringList strlist = QStringList::split("=", line); + TQStringList strlist = TQStringList::split("=", line); if (strlist.count() == 2) { - QString key = strlist[0]; - QString value = strlist[1]; + TQString key = strlist[0]; + TQString value = strlist[1]; if (key == "status") { @@ -429,10 +429,10 @@ void GalleryTalker::parseResponseListAlbums(const QByteArray &data) if (iter != albumList.end()) (*iter).summary = value; } - else if (key.startsWith("album.parent")) + else if (key.startsWith("album.tqparent")) { if (iter != albumList.end()) - (*iter).parent_ref_num = value.toInt(); + (*iter).tqparent_ref_num = value.toInt(); } else if (key.startsWith("album.perms.add")) { @@ -479,25 +479,25 @@ void GalleryTalker::parseResponseListAlbums(const QByteArray &data) return; } - // We need parent albums to come first for rest of the code to work + // We need tqparent albums to come first for rest of the code to work qHeapSort(albumList); emit signalAlbums( albumList ); } -void GalleryTalker::parseResponseListPhotos(const QByteArray &data) +void GalleryTalker::parseResponseListPhotos(const TQByteArray &data) { - QTextStream ts(data, IO_ReadOnly ); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream ts(data, IO_ReadOnly ); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; bool foundResponse = false; bool success = false; - typedef QValueList<GPhoto> GPhotoList; + typedef TQValueList<GPhoto> GPhotoList; GPhotoList photoList; GPhotoList::iterator iter = photoList.begin(); - QString albumURL; + TQString albumURL; while (!ts.atEnd()) { @@ -509,13 +509,13 @@ void GalleryTalker::parseResponseListPhotos(const QByteArray &data) } else { - // Boris the Gallery default URL contains "=" char. So we will split the string only from the first "=" char - QStringList strlist = QStringList(); - strlist << line.left(line.find('=')) << line.mid(line.find('=')+1); + // Boris the Gallery default URL tqcontains "=" char. So we will split the string only from the first "=" char + TQStringList strlist = TQStringList(); + strlist << line.left(line.tqfind('=')) << line.mid(line.tqfind('=')+1); if (strlist.count() >= 2) { - QString key = strlist[0]; - QString value = strlist[1]; + TQString key = strlist[0]; + TQString value = strlist[1]; if (key == "status") { @@ -540,7 +540,7 @@ void GalleryTalker::parseResponseListPhotos(const QByteArray &data) } else if (key.startsWith("baseurl")) { - albumURL = value.replace("\\",""); + albumURL = value.tqreplace("\\",""); } } } @@ -566,11 +566,11 @@ void GalleryTalker::parseResponseListPhotos(const QByteArray &data) emit signalPhotos( photoList ); } -void GalleryTalker::parseResponseCreateAlbum(const QByteArray &data) +void GalleryTalker::parseResponseCreateAlbum(const TQByteArray &data) { - QTextStream ts(data, IO_ReadOnly ); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream ts(data, IO_ReadOnly ); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; bool foundResponse = false; bool success = false; @@ -584,11 +584,11 @@ void GalleryTalker::parseResponseCreateAlbum(const QByteArray &data) } else { - QStringList strlist = QStringList::split("=", line); + TQStringList strlist = TQStringList::split("=", line); if (strlist.count() == 2) { - QString key = strlist[0]; - QString value = strlist[1]; + TQString key = strlist[0]; + TQString value = strlist[1]; if (key == "status") { @@ -618,11 +618,11 @@ void GalleryTalker::parseResponseCreateAlbum(const QByteArray &data) listAlbums(); } -void GalleryTalker::parseResponseAddPhoto(const QByteArray &data) +void GalleryTalker::parseResponseAddPhoto(const TQByteArray &data) { - QTextStream ts(data, IO_ReadOnly ); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream ts(data, IO_ReadOnly ); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; bool foundResponse = false; bool success = false; @@ -640,11 +640,11 @@ void GalleryTalker::parseResponseAddPhoto(const QByteArray &data) } else { - QStringList strlist = QStringList::split("=", line); + TQStringList strlist = TQStringList::split("=", line); if (strlist.count() == 2) { - QString key = strlist[0]; - QString value = strlist[1]; + TQString key = strlist[0]; + TQString value = strlist[1]; if (key == "status") { diff --git a/kipi-plugins/galleryexport/gallerytalker.h b/kipi-plugins/galleryexport/gallerytalker.h index 5e5891d..d3a4c41 100644 --- a/kipi-plugins/galleryexport/gallerytalker.h +++ b/kipi-plugins/galleryexport/gallerytalker.h @@ -19,7 +19,7 @@ #ifndef GALLERYTALKER_H #define GALLERYTALKER_H -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> namespace KIO @@ -28,7 +28,7 @@ namespace KIO } class KURL; -template <class T> class QValueList; +template <class T> class TQValueList; namespace KIPIGalleryExportPlugin { @@ -36,9 +36,10 @@ namespace KIPIGalleryExportPlugin class GAlbum; class GPhoto; -class GalleryTalker : public QObject +class GalleryTalker : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -50,27 +51,27 @@ public: GE_ADDPHOTO }; - GalleryTalker(QWidget* parent); + GalleryTalker(TQWidget* tqparent); ~GalleryTalker(); static void setGallery2(bool usegallery2) {s_using_gallery2 = usegallery2;}; static bool isGallery2() {return s_using_gallery2;}; - static QString getAuthToken() {return s_authToken;}; + static TQString getAuthToken() {return s_authToken;}; bool loggedIn() const; - void login( const KURL& url, const QString& name, - const QString& passwd ); + void login( const KURL& url, const TQString& name, + const TQString& passwd ); void listAlbums(); - void listPhotos( const QString& albumName ); - void createAlbum( const QString& parentAlbumName, - const QString& albumName, - const QString& albumTitle, - const QString& albumCaption ); - bool addPhoto( const QString& albumName, - const QString& photoPath, - const QString& caption=QString(), + void listPhotos( const TQString& albumName ); + void createAlbum( const TQString& tqparentAlbumName, + const TQString& albumName, + const TQString& albumTitle, + const TQString& albumCaption ); + bool addPhoto( const TQString& albumName, + const TQString& photoPath, + const TQString& caption=TQString(), bool captionIsTitle=true, bool captionIsDescription=false, bool rescale=false, int maxDim=600); @@ -78,38 +79,38 @@ public: private: - QWidget* m_parent; + TQWidget* m_parent; State m_state; - QString m_cookie; + TQString m_cookie; KURL m_url; KIO::Job* m_job; bool m_loggedIn; - QByteArray m_buffer; + TQByteArray m_buffer; static bool s_using_gallery2; - static QString s_authToken; + static TQString s_authToken; private: - void parseResponseLogin(const QByteArray &data); - void parseResponseListAlbums(const QByteArray &data); - void parseResponseListPhotos(const QByteArray &data); - void parseResponseCreateAlbum(const QByteArray &data); - void parseResponseAddPhoto(const QByteArray &data); + void parseResponseLogin(const TQByteArray &data); + void parseResponseListAlbums(const TQByteArray &data); + void parseResponseListPhotos(const TQByteArray &data); + void parseResponseCreateAlbum(const TQByteArray &data); + void parseResponseAddPhoto(const TQByteArray &data); signals: - void signalError( const QString& msg ); - void signalLoginFailed( const QString& msg ); + void signalError( const TQString& msg ); + void signalLoginFailed( const TQString& msg ); void signalBusy( bool val ); - void signalAlbums( const QValueList<GAlbum>& albumList ); - void signalPhotos( const QValueList<GPhoto>& photoList ); + void signalAlbums( const TQValueList<GAlbum>& albumList ); + void signalPhotos( const TQValueList<GPhoto>& photoList ); void signalAddPhotoSucceeded( ); - void signalAddPhotoFailed( const QString& msg ); + void signalAddPhotoFailed( const TQString& msg ); private slots: - void data(KIO::Job *job, const QByteArray &data); + void data(KIO::Job *job, const TQByteArray &data); void slotResult (KIO::Job *job); }; diff --git a/kipi-plugins/galleryexport/galleryviewitem.cpp b/kipi-plugins/galleryexport/galleryviewitem.cpp index 4a847ca..35ab07f 100644 --- a/kipi-plugins/galleryexport/galleryviewitem.cpp +++ b/kipi-plugins/galleryexport/galleryviewitem.cpp @@ -19,8 +19,8 @@ * * ============================================================ */ -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include "galleryviewitem.h" #include "gallerytalker.h" @@ -28,23 +28,23 @@ namespace KIPIGalleryExportPlugin { -void GAlbumViewItem::paintCell(QPainter * p, const QColorGroup & cg, +void GAlbumViewItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int ) { if (!p) return; - QListView *lv = listView(); + TQListView *lv = listView(); if (!lv) return; - QFontMetrics fm(p->fontMetrics()); + TQFontMetrics fm(p->fontMetrics()); if (isSelected()) p->fillRect(0, 0, width, height(), cg.highlight()); else p->fillRect(0, 0, width, height(), cg.base()); - const QPixmap * icon = pixmap( column ); + const TQPixmap * icon = pixmap( column ); int iconWidth = 0; if (icon) @@ -68,18 +68,18 @@ void GAlbumViewItem::paintCell(QPainter * p, const QColorGroup & cg, // We display things slightly differently depending on version. if (GalleryTalker::isGallery2()) { - p->drawText(r, h/2, width-r, h, Qt::AlignVCenter, album.title); + p->drawText(r, h/2, width-r, h, TQt::AlignVCenter, album.title); } else { - p->drawText(r, 0, width-r, h, Qt::AlignVCenter, album.title); + p->drawText(r, 0, width-r, h, TQt::AlignVCenter, album.title); - QFont fn(lv->font()); + TQFont fn(lv->font()); fn.setPointSize(fn.pointSize()-2); fn.setItalic(true); p->setFont(fn); - p->setPen(isSelected() ? cg.highlightedText() : Qt::gray); - p->drawText(r, h, width-r, h, Qt::AlignVCenter, album.name); + p->setPen(isSelected() ? cg.highlightedText() : TQt::gray); + p->drawText(r, h, width-r, h, TQt::AlignVCenter, album.name); } } @@ -87,7 +87,7 @@ void GAlbumViewItem::setup() { int h = listView()->fontMetrics().height(); int margin = 4; - setHeight( QMAX(2*h + margin, 32) ); + setHeight( TQMAX(2*h + margin, 32) ); } } diff --git a/kipi-plugins/galleryexport/galleryviewitem.h b/kipi-plugins/galleryexport/galleryviewitem.h index 6c5077a..6a40c69 100644 --- a/kipi-plugins/galleryexport/galleryviewitem.h +++ b/kipi-plugins/galleryexport/galleryviewitem.h @@ -19,30 +19,30 @@ #ifndef GALLERYVIEWITEM_H #define GALLERYVIEWITEM_H -#include <qlistview.h> +#include <tqlistview.h> #include "galleryitem.h" namespace KIPIGalleryExportPlugin { -class GAlbumViewItem : public QListViewItem +class GAlbumViewItem : public TQListViewItem { public: - GAlbumViewItem(QListView* parent, const QString& name, + GAlbumViewItem(TQListView* tqparent, const TQString& name, const GAlbum& _album) - : QListViewItem(parent, name), album(_album) {} - GAlbumViewItem(QListViewItem* parent, const QString& name, + : TQListViewItem(tqparent, name), album(_album) {} + GAlbumViewItem(TQListViewItem* tqparent, const TQString& name, const GAlbum& _album) - : QListViewItem(parent, name), album(_album) {} + : TQListViewItem(tqparent, name), album(_album) {} GAlbum album; - void paintCell(QPainter * p, const QColorGroup & cg, + void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int ); - void paintFocus (QPainter*, const QColorGroup&, - const QRect&) {} + void paintFocus (TQPainter*, const TQColorGroup&, + const TQRect&) {} protected: diff --git a/kipi-plugins/galleryexport/gallerywidget.cpp b/kipi-plugins/galleryexport/gallerywidget.cpp index e3fcc5c..0dd2435 100644 --- a/kipi-plugins/galleryexport/gallerywidget.cpp +++ b/kipi-plugins/galleryexport/gallerywidget.cpp @@ -23,53 +23,53 @@ #include <khtml_part.h> #include <khtmlview.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qframe.h> -#include <qheader.h> -#include <qlistview.h> -#include <qbuttongroup.h> -#include <qgroupbox.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qsplitter.h> -#include <qwhatsthis.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqheader.h> +#include <tqlistview.h> +#include <tqbuttongroup.h> +#include <tqgroupbox.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqsplitter.h> +#include <tqwhatsthis.h> #include "gallerywidget.h" namespace KIPIGalleryExportPlugin { -GalleryWidget::GalleryWidget( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) +GalleryWidget::GalleryWidget( TQWidget* tqparent, const char* name, WFlags fl ) + : TQWidget( tqparent, name, fl ) { if ( !name ) setName( "GalleryWidget" ); - QVBoxLayout* galleryWidgetLayout - = new QVBoxLayout( this, 5, 5, "GalleryWidgetLayout"); + TQVBoxLayout* galleryWidgetLayout + = new TQVBoxLayout( this, 5, 5, "GalleryWidgetLayout"); // ------------------------------------------------------------------------ - QLabel* headerLabel; - QFrame* headerLine; + TQLabel* headerLabel; + TQFrame* headerLine; - headerLabel = new QLabel( this, "headerLabel" ); + headerLabel = new TQLabel( this, "headerLabel" ); galleryWidgetLayout->addWidget( headerLabel, 0 ); - headerLine = new QFrame( this, "headerLine" ); - headerLine->setFrameShape( QFrame::HLine ); - headerLine->setFrameShadow( QFrame::Sunken ); + headerLine = new TQFrame( this, "headerLine" ); + headerLine->setFrameShape( TQFrame::HLine ); + headerLine->setFrameShadow( TQFrame::Sunken ); galleryWidgetLayout->addWidget( headerLine, 0 ); // ------------------------------------------------------------------------ - QSplitter* splitter = new QSplitter(this); + TQSplitter* splitter = new TQSplitter(this); galleryWidgetLayout->addWidget( splitter, 5 ); - m_albumView = new QListView( splitter, "m_albumView" ); + m_albumView = new TQListView( splitter, "m_albumView" ); m_albumView->addColumn( i18n( "Albums" ) ); - m_albumView->setResizeMode( QListView::AllColumns ); + m_albumView->setResizeMode( TQListView::AllColumns ); // ------------------------------------------------------------------------ @@ -77,51 +77,51 @@ GalleryWidget::GalleryWidget( QWidget* parent, const char* name, WFlags fl ) // ------------------------------------------------------------------------ - QVBoxLayout* rightButtonGroupLayout; - QSpacerItem* spacer; - QButtonGroup* rightButtonGroup; + TQVBoxLayout* rightButtonGroupLayout; + TQSpacerItem* spacer; + TQButtonGroup* rightButtonGroup; - rightButtonGroup = new QButtonGroup( splitter, "rightButtonGroup" ); - rightButtonGroupLayout = new QVBoxLayout( rightButtonGroup ); + rightButtonGroup = new TQButtonGroup( splitter, "rightButtonGroup" ); + rightButtonGroupLayout = new TQVBoxLayout( rightButtonGroup ); rightButtonGroupLayout->setSpacing( 5 ); rightButtonGroupLayout->setMargin( 5 ); - m_newAlbumBtn = new QPushButton( rightButtonGroup, "m_newAlbumBtn" ); - m_newAlbumBtn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - rightButtonGroupLayout->addWidget( m_newAlbumBtn, 0, Qt::AlignHCenter ); + m_newAlbumBtn = new TQPushButton( rightButtonGroup, "m_newAlbumBtn" ); + m_newAlbumBtn->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + rightButtonGroupLayout->addWidget( m_newAlbumBtn, 0, TQt::AlignHCenter ); - m_addPhotoBtn = new QPushButton( rightButtonGroup, "m_addPhotoBtn" ); - m_addPhotoBtn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - rightButtonGroupLayout->addWidget( m_addPhotoBtn, 0, Qt::AlignHCenter ); + m_addPhotoBtn = new TQPushButton( rightButtonGroup, "m_addPhotoBtn" ); + m_addPhotoBtn->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + rightButtonGroupLayout->addWidget( m_addPhotoBtn, 0, TQt::AlignHCenter ); // ------------------------------------------------------------------------ - QGroupBox* optionsBox = new QGroupBox(i18n("Override Default Options"), + TQGroupBox* optionsBox = new TQGroupBox(i18n("Override Default Options"), rightButtonGroup); optionsBox->setColumnLayout(0, Qt::Vertical); - optionsBox->layout()->setSpacing(5); - optionsBox->layout()->setMargin(5); - QGridLayout* optionsBoxLayout = new QGridLayout(optionsBox->layout()); + optionsBox->tqlayout()->setSpacing(5); + optionsBox->tqlayout()->setMargin(5); + TQGridLayout* optionsBoxLayout = new TQGridLayout(optionsBox->tqlayout()); // ------------------------------------------------------------------------ - m_captTitleCheckBox = new QCheckBox(optionsBox); + m_captTitleCheckBox = new TQCheckBox(optionsBox); m_captTitleCheckBox->setText(i18n("Comment sets Title")); optionsBoxLayout->addMultiCellWidget(m_captTitleCheckBox, 0, 0, 0, 1); - m_captDescrCheckBox = new QCheckBox(optionsBox); + m_captDescrCheckBox = new TQCheckBox(optionsBox); m_captDescrCheckBox->setText(i18n("Comment sets Description")); optionsBoxLayout->addMultiCellWidget(m_captDescrCheckBox, 1, 1, 0, 1); - m_resizeCheckBox = new QCheckBox(optionsBox); + m_resizeCheckBox = new TQCheckBox(optionsBox); m_resizeCheckBox->setText(i18n("Resize photos before uploading")); optionsBoxLayout->addMultiCellWidget(m_resizeCheckBox, 2, 2, 0, 1); - m_dimensionSpinBox = new QSpinBox(0, 5000, 10, optionsBox); + m_dimensionSpinBox = new TQSpinBox(0, 5000, 10, optionsBox); m_dimensionSpinBox->setValue(600); - m_dimensionSpinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + m_dimensionSpinBox->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); optionsBoxLayout->addWidget(m_dimensionSpinBox, 3, 1); - QLabel* resizeLabel = new QLabel(i18n("Maximum dimension:"), optionsBox); + TQLabel* resizeLabel = new TQLabel(i18n("Maximum dimension:"), optionsBox); optionsBoxLayout->addWidget(resizeLabel, 3, 0); m_captTitleCheckBox->setChecked(true); @@ -129,7 +129,7 @@ GalleryWidget::GalleryWidget( QWidget* parent, const char* name, WFlags fl ) m_resizeCheckBox->setChecked(false); m_dimensionSpinBox->setEnabled(false); - connect(m_resizeCheckBox, SIGNAL(clicked()), SLOT(slotResizeChecked())); + connect(m_resizeCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotResizeChecked())); // ------------------------------------------------------------------------ @@ -137,7 +137,7 @@ GalleryWidget::GalleryWidget( QWidget* parent, const char* name, WFlags fl ) // ------------------------------------------------------------------------ - spacer = new QSpacerItem( 20, 100, QSizePolicy::Minimum, QSizePolicy::Expanding ); + spacer = new TQSpacerItem( 20, 100, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); rightButtonGroupLayout->addItem( spacer ); // ------------------------------------------------------------------------ @@ -149,7 +149,7 @@ GalleryWidget::GalleryWidget( QWidget* parent, const char* name, WFlags fl ) // ------------------------------------------------------------------------ - resize( QSize(600, 400).expandedTo(minimumSizeHint()) ); + resize( TQSize(600, 400).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); } diff --git a/kipi-plugins/galleryexport/gallerywidget.h b/kipi-plugins/galleryexport/gallerywidget.h index 2022856..a14c944 100644 --- a/kipi-plugins/galleryexport/gallerywidget.h +++ b/kipi-plugins/galleryexport/gallerywidget.h @@ -19,24 +19,25 @@ #ifndef GALLERYWIDGET_H #define GALLERYWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> -class QListView; -class QPushButton; -class QSpinBox; -class QCheckBox; +class TQListView; +class TQPushButton; +class TQSpinBox; +class TQCheckBox; class KHTMLPart; namespace KIPIGalleryExportPlugin { -class GalleryWidget : public QWidget +class GalleryWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - GalleryWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + GalleryWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~GalleryWidget(); private slots: @@ -45,14 +46,14 @@ private slots: private: - QListView* m_albumView; + TQListView* m_albumView; KHTMLPart* m_photoView; - QPushButton* m_newAlbumBtn; - QPushButton* m_addPhotoBtn; - QCheckBox* m_captTitleCheckBox; - QCheckBox* m_captDescrCheckBox; - QCheckBox* m_resizeCheckBox; - QSpinBox* m_dimensionSpinBox; + TQPushButton* m_newAlbumBtn; + TQPushButton* m_addPhotoBtn; + TQCheckBox* m_captTitleCheckBox; + TQCheckBox* m_captDescrCheckBox; + TQCheckBox* m_resizeCheckBox; + TQSpinBox* m_dimensionSpinBox; friend class GalleryWindow; }; diff --git a/kipi-plugins/galleryexport/gallerywindow.cpp b/kipi-plugins/galleryexport/gallerywindow.cpp index 2dabde2..fb90a36 100644 --- a/kipi-plugins/galleryexport/gallerywindow.cpp +++ b/kipi-plugins/galleryexport/gallerywindow.cpp @@ -19,17 +19,17 @@ * * ============================================================ */ -// Include files for Qt - -#include <qlistview.h> -#include <qpushbutton.h> -#include <qtimer.h> -#include <qpixmap.h> -#include <qcursor.h> -#include <qlineedit.h> -#include <qprogressdialog.h> -#include <qspinbox.h> -#include <qcheckbox.h> +// Include files for TQt + +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqtimer.h> +#include <tqpixmap.h> +#include <tqcursor.h> +#include <tqlineedit.h> +#include <tqprogressdialog.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> // Include files for KDE @@ -68,8 +68,8 @@ namespace KIPIGalleryExportPlugin { -GalleryWindow::GalleryWindow(KIPI::Interface* interface, QWidget *parent, Galleries* pGalleries) - : KDialogBase(parent, 0, true, i18n("Gallery Export"), Help|Close, Close, false), +GalleryWindow::GalleryWindow(KIPI::Interface* interface, TQWidget *tqparent, Galleries* pGalleries) + : KDialogBase(tqparent, 0, true, i18n("Gallery Export"), Help|Close, Close, false), m_interface(interface), mpGalleries(pGalleries) { @@ -93,7 +93,7 @@ GalleryWindow::GalleryWindow(KIPI::Interface* interface, QWidget *parent, Galler m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); GalleryWidget* widget = new GalleryWidget(this); @@ -114,40 +114,40 @@ GalleryWindow::GalleryWindow(KIPI::Interface* interface, QWidget *parent, Galler m_newAlbumBtn->setEnabled( false ); m_addPhotoBtn->setEnabled( false ); - m_progressDlg = new QProgressDialog( this, 0, true ); + m_progressDlg = new TQProgressDialog( this, 0, true ); m_progressDlg->setAutoReset( true ); m_progressDlg->setAutoClose( true ); - connect(m_progressDlg, SIGNAL(canceled()), SLOT(slotAddPhotoCancel())); + connect(m_progressDlg, TQT_SIGNAL(canceled()), TQT_SLOT(slotAddPhotoCancel())); - connect(m_albumView, SIGNAL(selectionChanged()), SLOT(slotAlbumSelected())); + connect(m_albumView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotAlbumSelected())); connect(m_photoView->browserExtension(), - SIGNAL(openURLRequest(const KURL&, + TQT_SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)), - SLOT(slotOpenPhoto(const KURL&))); + TQT_SLOT(slotOpenPhoto(const KURL&))); - connect(m_newAlbumBtn, SIGNAL(clicked()), SLOT(slotNewAlbum())); - connect(m_addPhotoBtn, SIGNAL(clicked()), SLOT( slotAddPhotos())); + connect(m_newAlbumBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotNewAlbum())); + connect(m_addPhotoBtn, TQT_SIGNAL(clicked()), TQT_SLOT( slotAddPhotos())); // read config KConfig config("kipirc"); config.setGroup("GallerySync Settings"); m_talker = new GalleryTalker( this ); - connect( m_talker, SIGNAL( signalError( const QString& ) ), - SLOT( slotError( const QString& ) ) ); - connect( m_talker, SIGNAL( signalBusy( bool ) ), - SLOT( slotBusy( bool ) ) ); - connect( m_talker, SIGNAL( signalLoginFailed( const QString& ) ), - SLOT( slotLoginFailed( const QString& ) ) ); - connect( m_talker, SIGNAL( signalAlbums( const QValueList<GAlbum>& ) ), - SLOT( slotAlbums( const QValueList<GAlbum>& ) ) ); - connect( m_talker, SIGNAL( signalPhotos( const QValueList<GPhoto>& ) ), - SLOT( slotPhotos( const QValueList<GPhoto>& ) ) ); - connect( m_talker, SIGNAL( signalAddPhotoSucceeded() ), - SLOT( slotAddPhotoSucceeded() ) ); - connect( m_talker, SIGNAL( signalAddPhotoFailed( const QString& ) ), - SLOT( slotAddPhotoFailed( const QString& ) ) ); + connect( m_talker, TQT_SIGNAL( signalError( const TQString& ) ), + TQT_SLOT( slotError( const TQString& ) ) ); + connect( m_talker, TQT_SIGNAL( signalBusy( bool ) ), + TQT_SLOT( slotBusy( bool ) ) ); + connect( m_talker, TQT_SIGNAL( signalLoginFailed( const TQString& ) ), + TQT_SLOT( slotLoginFailed( const TQString& ) ) ); + connect( m_talker, TQT_SIGNAL( signalAlbums( const TQValueList<GAlbum>& ) ), + TQT_SLOT( slotAlbums( const TQValueList<GAlbum>& ) ) ); + connect( m_talker, TQT_SIGNAL( signalPhotos( const TQValueList<GPhoto>& ) ), + TQT_SLOT( slotPhotos( const TQValueList<GPhoto>& ) ) ); + connect( m_talker, TQT_SIGNAL( signalAddPhotoSucceeded() ), + TQT_SLOT( slotAddPhotoSucceeded() ) ); + connect( m_talker, TQT_SIGNAL( signalAddPhotoFailed( const TQString& ) ), + TQT_SLOT( slotAddPhotoFailed( const TQString& ) ) ); if (config.readBoolEntry("Resize", false)) { @@ -172,7 +172,7 @@ GalleryWindow::GalleryWindow(KIPI::Interface* interface, QWidget *parent, Galler m_dimensionSpinBox->setValue(config.readNumEntry("Maximum Width", 1600)); - QTimer::singleShot( 0, this, SLOT( slotDoLogin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoLogin() ) ); } GalleryWindow::~GalleryWindow() @@ -199,7 +199,7 @@ void GalleryWindow::slotDoLogin() { GalleryList dlg(this, mpGalleries); - if (QDialog::Accepted != dlg.exec()) + if (TQDialog::Accepted != dlg.exec()) { close(); return; @@ -237,7 +237,7 @@ void GalleryWindow::slotDoLogin() m_talker->login(url.url(), p_gallery->username(), p_gallery->password()); } -void GalleryWindow::slotLoginFailed( const QString& msg ) +void GalleryWindow::slotLoginFailed( const TQString& msg ) { if ( KMessageBox::warningYesNo( this, i18n( "Failed to login into remote gallery. " ) @@ -256,25 +256,25 @@ void GalleryWindow::slotBusy( bool val ) { if ( val ) { - setCursor(QCursor::WaitCursor); + setCursor(TQCursor::WaitCursor); m_newAlbumBtn->setEnabled( false ); m_addPhotoBtn->setEnabled( false ); } else { - setCursor(QCursor::ArrowCursor); + setCursor(TQCursor::ArrowCursor); bool loggedIn = m_talker->loggedIn(); m_newAlbumBtn->setEnabled( loggedIn ); m_addPhotoBtn->setEnabled( loggedIn && m_albumView->selectedItem() ); } } -void GalleryWindow::slotError( const QString& msg ) +void GalleryWindow::slotError( const TQString& msg ) { KMessageBox::error( this, msg ); } -void GalleryWindow::slotAlbums( const QValueList<GAlbum>& albumList ) +void GalleryWindow::slotAlbums( const TQValueList<GAlbum>& albumList ) { m_albumDict.clear(); m_albumView->clear(); @@ -283,15 +283,15 @@ void GalleryWindow::slotAlbums( const QValueList<GAlbum>& albumList ) m_photoView->end(); KIconLoader* iconLoader = KApplication::kApplication()->iconLoader(); - QPixmap pix = iconLoader->loadIcon( "folder", KIcon::NoGroup, 32 ); + TQPixmap pix = iconLoader->loadIcon( "folder", KIcon::NoGroup, 32 ); - typedef QValueList<GAlbum> GAlbumList; + typedef TQValueList<GAlbum> GAlbumList; GAlbumList::const_iterator iter; for ( iter = albumList.begin(); iter != albumList.end(); ++iter ) { const GAlbum& album = *iter; - if ( album.parent_ref_num == 0 ) + if ( album.tqparent_ref_num == 0 ) { GAlbumViewItem* item = new GAlbumViewItem( m_albumView, album.title, album ); @@ -300,17 +300,17 @@ void GalleryWindow::slotAlbums( const QValueList<GAlbum>& albumList ) } else { - QListViewItem* parent = m_albumDict.find( album.parent_ref_num ); - if ( parent ) + TQListViewItem* tqparent = m_albumDict.tqfind( album.tqparent_ref_num ); + if ( tqparent ) { - GAlbumViewItem* item = new GAlbumViewItem( parent, album.title, + GAlbumViewItem* item = new GAlbumViewItem( tqparent, album.title, album); item->setPixmap( 0, pix ); m_albumDict.insert( album.ref_num, item ); } else { - kdWarning() << "Failed to find parent for album " + kdWarning() << "Failed to find tqparent for album " << album.name << " with id " << album.ref_num << "\n"; } @@ -331,7 +331,7 @@ void GalleryWindow::slotAlbums( const QValueList<GAlbum>& albumList ) if (lastSelectedID > 0) { - GAlbumViewItem* lastSelectedItem = m_albumDict.find( lastSelectedID ); + GAlbumViewItem* lastSelectedItem = m_albumDict.tqfind( lastSelectedID ); if (lastSelectedItem) { m_albumView->setSelected( lastSelectedItem, true ); @@ -340,24 +340,24 @@ void GalleryWindow::slotAlbums( const QValueList<GAlbum>& albumList ) } } -void GalleryWindow::slotPhotos( const QValueList<GPhoto>& photoList) +void GalleryWindow::slotPhotos( const TQValueList<GPhoto>& photoList) { int pxSize = fontMetrics().height() - 2; - QString styleSheet = - QString( "body { margin: 8px; font-size: %1px; " + TQString styleSheet = + TQString( "body { margin: 8px; font-size: %1px; " " color: %2; background-color: %3;}" ) - .arg( pxSize ) - .arg( colorGroup().text().name() ) - .arg( colorGroup().base().name() ); + .tqarg( pxSize ) + .tqarg( tqcolorGroup().text().name() ) + .tqarg( tqcolorGroup().base().name() ); - styleSheet += QString( "a { font-size: %1px; color: %2; " + styleSheet += TQString( "a { font-size: %1px; color: %2; " "text-decoration: none;}" ) - .arg( pxSize ) - .arg( colorGroup().text().name() ); - styleSheet += QString( "i { font-size: %1px; color: %2; " + .tqarg( pxSize ) + .tqarg( tqcolorGroup().text().name() ); + styleSheet += TQString( "i { font-size: %1px; color: %2; " "text-decoration: none;}" ) - .arg( pxSize-2 ) - .arg( QColor("steelblue").name() ); + .tqarg( pxSize-2 ) + .tqarg( TQColor("steelblue").name() ); m_photoView->begin(); m_photoView->setUserStyleSheet( styleSheet ); @@ -368,7 +368,7 @@ void GalleryWindow::slotPhotos( const QValueList<GPhoto>& photoList) "border='0' cellspacing='1' cellpadding='1'>" ); - typedef QValueList<GPhoto> GPhotoList; + typedef TQValueList<GPhoto> GPhotoList; GPhotoList::const_iterator iter; for ( iter = photoList.begin(); iter != photoList.end(); ++iter ) { @@ -377,14 +377,14 @@ void GalleryWindow::slotPhotos( const QValueList<GPhoto>& photoList) KURL thumburl(photo.albumURL + photo.thumbName); m_photoView->write( "<tr><td class='photo'>" - + QString("<a href='%1'>") - .arg(imageurl.url()) - + QString("<img border=1 src=\"%1\"><br>") - .arg(thumburl.url()) + + TQString("<a href='%1'>") + .tqarg(imageurl.url()) + + TQString("<img border=1 src=\"%1\"><br>") + .tqarg(thumburl.url()) + photo.name - + ( photo.caption.isEmpty() ? QString() : - QString("<br><i>%1</i>") - .arg(photo.caption) ) + + ( photo.caption.isEmpty() ? TQString() : + TQString("<br><i>%1</i>") + .tqarg(photo.caption) ) + "</a></td></tr>" ); } @@ -396,7 +396,7 @@ void GalleryWindow::slotPhotos( const QValueList<GPhoto>& photoList) void GalleryWindow::slotAlbumSelected() { - QListViewItem* item = m_albumView->selectedItem(); + TQListViewItem* item = m_albumView->selectedItem(); if ( !item ) { m_addPhotoBtn->setEnabled( false ); @@ -427,19 +427,19 @@ void GalleryWindow::slotNewAlbum() { GalleryAlbumDialog dlg; dlg.titleEdit->setFocus( ); - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) { return; } - QString name = dlg.nameEdit->text(); - QString title = dlg.titleEdit->text(); - QString caption = dlg.captionEdit->text(); + TQString name = dlg.nameEdit->text(); + TQString title = dlg.titleEdit->text(); + TQString caption = dlg.captionEdit->text(); // check for prohibited chars in the album name // \ / * ? " ' & < > | . + # ( ) or spaces - // Todo: Change this to a QRegExp check. - QChar ch; + // Todo: Change this to a TQRegExp check. + TQChar ch; bool clean = true; for (uint i=0; i<name.length(); i++) { @@ -529,29 +529,29 @@ void GalleryWindow::slotNewAlbum() if (!clean) { KMessageBox::error( this, i18n("Sorry, these characters are not allowed in album name: %1") - .arg("\\ / * ? \" \' & < > | . + # ( ) or spaces") ); + .tqarg("\\ / * ? \" \' & < > | . + # ( ) or spaces") ); return; } - QString parentAlbumName; + TQString tqparentAlbumName; - QListViewItem* item = m_albumView->selectedItem(); + TQListViewItem* item = m_albumView->selectedItem(); if (item) { GAlbumViewItem* viewItem = static_cast<GAlbumViewItem*>(item); - parentAlbumName = viewItem->album.name; + tqparentAlbumName = viewItem->album.name; } else { - parentAlbumName = "0"; + tqparentAlbumName = "0"; } - m_talker->createAlbum(parentAlbumName, name, title, caption); + m_talker->createAlbum(tqparentAlbumName, name, title, caption); } void GalleryWindow::slotAddPhotos() { - QListViewItem* item = m_albumView->selectedItem(); + TQListViewItem* item = m_albumView->selectedItem(); if (!item) return; @@ -559,7 +559,7 @@ void GalleryWindow::slotAddPhotos() if (urls.isEmpty()) return; - typedef QPair<QString,QString> Pair; + typedef TQPair<TQString,TQString> Pair; m_uploadQueue.clear(); for (KURL::List::iterator it = urls.begin(); it != urls.end(); ++it) @@ -584,7 +584,7 @@ void GalleryWindow::slotAddPhotoNext() return; } - typedef QPair<QString,QString> Pair; + typedef TQPair<TQString,TQString> Pair; Pair pathComments = m_uploadQueue.first(); m_uploadQueue.pop_front(); @@ -601,7 +601,7 @@ void GalleryWindow::slotAddPhotoNext() } m_progressDlg->setLabelText( i18n("Uploading file %1 ") - .arg( KURL(pathComments.first).filename() ) ); + .tqarg( KURL(pathComments.first).filename() ) ); if (m_progressDlg->isHidden()) m_progressDlg->show(); @@ -614,7 +614,7 @@ void GalleryWindow::slotAddPhotoSucceeded() slotAddPhotoNext(); } -void GalleryWindow::slotAddPhotoFailed( const QString& msg ) +void GalleryWindow::slotAddPhotoFailed( const TQString& msg ) { if ( KMessageBox::warningContinueCancel( this, i18n( "Failed to upload photo into " diff --git a/kipi-plugins/galleryexport/gallerywindow.h b/kipi-plugins/galleryexport/gallerywindow.h index 3d160e0..07cd366 100644 --- a/kipi-plugins/galleryexport/gallerywindow.h +++ b/kipi-plugins/galleryexport/gallerywindow.h @@ -20,15 +20,15 @@ #define GALLERYWINDOW_H #include <kdialogbase.h> -#include <qvaluelist.h> -#include <qpair.h> -#include <qintdict.h> - -class QListView; -class QPushButton; -class QSpinBox; -class QCheckBox; -class QProgressDialog; +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqintdict.h> + +class TQListView; +class TQPushButton; +class TQSpinBox; +class TQCheckBox; +class TQProgressDialog; class KHTMLPart; class KURL; @@ -53,33 +53,34 @@ class GAlbumViewItem; class GalleryWindow : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GalleryWindow(KIPI::Interface *interface, QWidget *parent, Galleries* pGalleries); + GalleryWindow(KIPI::Interface *interface, TQWidget *tqparent, Galleries* pGalleries); ~GalleryWindow(); private: - QListView *m_albumView; + TQListView *m_albumView; KHTMLPart *m_photoView; - QPushButton *m_newAlbumBtn; - QPushButton *m_addPhotoBtn; - QPushButton *m_helpButton; - QCheckBox *m_captTitleCheckBox; - QCheckBox *m_captDescrCheckBox; - QCheckBox *m_resizeCheckBox; - QSpinBox *m_dimensionSpinBox; + TQPushButton *m_newAlbumBtn; + TQPushButton *m_addPhotoBtn; + TQPushButton *m_helpButton; + TQCheckBox *m_captTitleCheckBox; + TQCheckBox *m_captDescrCheckBox; + TQCheckBox *m_resizeCheckBox; + TQSpinBox *m_dimensionSpinBox; GalleryTalker *m_talker; - QIntDict<GAlbumViewItem> m_albumDict; - QString m_lastSelectedAlbum; + TQIntDict<GAlbumViewItem> m_albumDict; + TQString m_lastSelectedAlbum; KIPI::Interface *m_interface; KIPIPlugins::KPAboutData *m_about; - QProgressDialog *m_progressDlg; + TQProgressDialog *m_progressDlg; unsigned int m_uploadCount; unsigned int m_uploadTotal; - QValueList< QPair<QString,QString> > m_uploadQueue; + TQValueList< TQPair<TQString,TQString> > m_uploadQueue; Galleries* mpGalleries; Gallery* mpGallery; @@ -87,18 +88,18 @@ private: private slots: void slotDoLogin(); - void slotLoginFailed( const QString& msg ); + void slotLoginFailed( const TQString& msg ); void slotBusy( bool val ); - void slotError( const QString& msg ); - void slotAlbums( const QValueList<GAlbum>& albumList ); - void slotPhotos( const QValueList<GPhoto>& photoList ); + void slotError( const TQString& msg ); + void slotAlbums( const TQValueList<GAlbum>& albumList ); + void slotPhotos( const TQValueList<GPhoto>& photoList ); void slotAlbumSelected(); void slotOpenPhoto( const KURL& url ); void slotNewAlbum(); void slotAddPhotos(); void slotAddPhotoNext(); void slotAddPhotoSucceeded(); - void slotAddPhotoFailed( const QString& msg ); + void slotAddPhotoFailed( const TQString& msg ); void slotAddPhotoCancel(); void slotHelp(); }; diff --git a/kipi-plugins/galleryexport/plugin_galleryexport.cpp b/kipi-plugins/galleryexport/plugin_galleryexport.cpp index 032fea9..9753a92 100644 --- a/kipi-plugins/galleryexport/plugin_galleryexport.cpp +++ b/kipi-plugins/galleryexport/plugin_galleryexport.cpp @@ -47,23 +47,23 @@ typedef KGenericFactory<Plugin_GalleryExport> Factory; K_EXPORT_COMPONENT_FACTORY(kipiplugin_galleryexport, Factory("kipiplugin_galleryexport")) -Plugin_GalleryExport::Plugin_GalleryExport(QObject *parent, +Plugin_GalleryExport::Plugin_GalleryExport(TQObject *tqparent, const char*, - const QStringList&) - : KIPI::Plugin(Factory::instance(), parent, "GalleryExport"), + const TQStringList&) + : KIPI::Plugin(Factory::instance(), tqparent, "GalleryExport"), mpGalleries(0) { kdDebug(51001) << "Plugin_GalleryExport plugin loaded" << endl; } -void Plugin_GalleryExport::setup(QWidget* widget) +void Plugin_GalleryExport::setup(TQWidget* widget) { mpGalleries = new KIPIGalleryExportPlugin::Galleries(); KIPI::Plugin::setup(widget); - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { @@ -77,7 +77,7 @@ void Plugin_GalleryExport::setup(QWidget* widget) m_action_sync = new KAction(i18n("Remote Gallery Sync..."), 0, this, - SLOT(slotSync()), + TQT_SLOT(slotSync()), actionCollection(), "galleryexport"); m_action_sync->setEnabled(true); @@ -86,7 +86,7 @@ void Plugin_GalleryExport::setup(QWidget* widget) m_action_configure = new KAction(i18n("Remote Galleries..."), 0, this, - SLOT(slotConfigure()), + TQT_SLOT(slotConfigure()), actionCollection(), "galleryexport"); m_action_configure->setEnabled(true); @@ -95,7 +95,7 @@ void Plugin_GalleryExport::setup(QWidget* widget) m_action_collection_settings = new KAction(i18n("Remote Gallery Settings..."), 0, this, - SLOT(slotCollectionSettings()), + TQT_SLOT(slotCollectionSettings()), actionCollection(), "galleryexport"); m_action_collection_settings->setEnabled(true); @@ -104,7 +104,7 @@ void Plugin_GalleryExport::setup(QWidget* widget) m_action_image_setting = new KAction(i18n("Remote Gallery Settings..."), 0, this, - SLOT(slotImageSettings()), + TQT_SLOT(slotImageSettings()), actionCollection(), "galleryexport"); m_action_image_setting->setEnabled(true); @@ -122,52 +122,52 @@ Plugin_GalleryExport::~Plugin_GalleryExport() void Plugin_GalleryExport::slotSync() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { kdError( 51000 ) << "Kipi interface is null!" << endl; return; } - KIPIGalleryExportPlugin::GalleryWindow dlg(interface, kapp->activeWindow(), mpGalleries); + KIPIGalleryExportPlugin::GalleryWindow dlg(interface, TQT_TQWIDGET(kapp->activeWindow()), mpGalleries); dlg.exec(); } void Plugin_GalleryExport::slotConfigure() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { kdError( 51000 ) << "Kipi interface is null!" << endl; return; } - KIPIGalleryExportPlugin::GalleryList dlg(kapp->activeWindow(), mpGalleries, false); + KIPIGalleryExportPlugin::GalleryList dlg(TQT_TQWIDGET(kapp->activeWindow()), mpGalleries, false); dlg.exec(); } void Plugin_GalleryExport::slotCollectionSettings() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { kdError( 51000 ) << "Kipi interface is null!" << endl; return; } - KMessageBox::error(kapp->activeWindow(), "Not Implemented Yet!"); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), "Not Implemented Yet!"); } void Plugin_GalleryExport::slotImageSettings() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { kdError( 51000 ) << "Kipi interface is null!" << endl; return; } - KMessageBox::error(kapp->activeWindow(), "Not Implemented Yet!"); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), "Not Implemented Yet!"); } KIPI::Category Plugin_GalleryExport::category( KAction* action ) const diff --git a/kipi-plugins/galleryexport/plugin_galleryexport.h b/kipi-plugins/galleryexport/plugin_galleryexport.h index b6505dc..a6f61d3 100644 --- a/kipi-plugins/galleryexport/plugin_galleryexport.h +++ b/kipi-plugins/galleryexport/plugin_galleryexport.h @@ -36,16 +36,17 @@ class Galleries; class Plugin_GalleryExport : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_GalleryExport(QObject *parent, + Plugin_GalleryExport(TQObject *tqparent, const char* name, - const QStringList &args); + const TQStringList &args); ~Plugin_GalleryExport(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* ); + virtual void setup( TQWidget* ); public slots: diff --git a/kipi-plugins/gpssync/gpsbabelbinary.cpp b/kipi-plugins/gpssync/gpsbabelbinary.cpp index 5dd6ab2..c0b9c1a 100644 --- a/kipi-plugins/gpssync/gpsbabelbinary.cpp +++ b/kipi-plugins/gpssync/gpsbabelbinary.cpp @@ -44,16 +44,16 @@ public: GPSBabelBinaryPriv() { available = false; - version = QString::null; + version = TQString(); } bool available; - QString version; + TQString version; }; GPSBabelBinary::GPSBabelBinary() - : QObject() + : TQObject() { d = new GPSBabelBinaryPriv; checkSystem(); @@ -70,8 +70,8 @@ void GPSBabelBinary::checkSystem() process.clearArguments(); process << path() << "-V"; - connect(&process, SIGNAL(receivedStdout(KProcess *, char*, int)), - this, SLOT(slotReadStdoutFromGPSBabel(KProcess*, char*, int))); + connect(&process, TQT_SIGNAL(receivedStdout(KProcess *, char*, int)), + this, TQT_SLOT(slotReadStdoutFromGPSBabel(KProcess*, char*, int))); d->available = process.start(KProcess::Block, KProcess::Stdout); } @@ -79,10 +79,10 @@ void GPSBabelBinary::checkSystem() void GPSBabelBinary::slotReadStdoutFromGPSBabel(KProcess*, char* buffer, int buflen) { // The gpsbabel output look like this : GPSBabel Version 1.2.5 - QString headerStarts("GPSBabel Version "); + TQString headerStarts("GPSBabel Version "); - QString stdOut = QString::fromLocal8Bit(buffer, buflen); - QString firstLine = stdOut.section('\n', 1, 1); + TQString stdOut = TQString::fromLocal8Bit(buffer, buflen); + TQString firstLine = stdOut.section('\n', 1, 1); if (firstLine.startsWith(headerStarts)) { @@ -101,7 +101,7 @@ bool GPSBabelBinary::isAvailable() const return d->available; } -QString GPSBabelBinary::version() const +TQString GPSBabelBinary::version() const { return d->version; } @@ -117,9 +117,9 @@ bool GPSBabelBinary::versionIsRight() const return false; } -QString GPSBabelBinary::minimalVersion() const +TQString GPSBabelBinary::minimalVersion() const { - return QString("1.2.5"); + return TQString("1.2.5"); } } // namespace KIPIGPSSyncPlugin diff --git a/kipi-plugins/gpssync/gpsbabelbinary.h b/kipi-plugins/gpssync/gpsbabelbinary.h index 3dc95ab..232bf5d 100644 --- a/kipi-plugins/gpssync/gpsbabelbinary.h +++ b/kipi-plugins/gpssync/gpsbabelbinary.h @@ -23,10 +23,10 @@ #ifndef GPSBABELBINARY_H #define GPSBABELBINARY_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqobject.h> class KProcess; @@ -35,9 +35,10 @@ namespace KIPIGPSSyncPlugin class GPSBabelBinaryPriv; -class GPSBabelBinary : public QObject +class GPSBabelBinary : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -46,9 +47,9 @@ public: static const char *path(); bool isAvailable() const; - QString version() const; + TQString version() const; bool versionIsRight() const; - QString minimalVersion() const; + TQString minimalVersion() const; void checkSystem(); diff --git a/kipi-plugins/gpssync/gpsdatacontainer.h b/kipi-plugins/gpssync/gpsdatacontainer.h index 2413950..38d7e46 100644 --- a/kipi-plugins/gpssync/gpsdatacontainer.h +++ b/kipi-plugins/gpssync/gpsdatacontainer.h @@ -23,7 +23,7 @@ #ifndef GPSDATACONTAINER_H #define GPSDATACONTAINER_H -// Qt includes. +// TQt includes. namespace KIPIGPSSyncPlugin { diff --git a/kipi-plugins/gpssync/gpsdataparser.cpp b/kipi-plugins/gpssync/gpsdataparser.cpp index 2124f1d..66d7bd0 100644 --- a/kipi-plugins/gpssync/gpsdataparser.cpp +++ b/kipi-plugins/gpssync/gpsdataparser.cpp @@ -26,13 +26,13 @@ #include <cmath> #include <cstdlib> -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qstringlist.h> -#include <qfile.h> -#include <qdom.h> -#include <qtextstream.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqfile.h> +#include <tqdom.h> +#include <tqtextstream.h> // KDE includes. @@ -60,14 +60,14 @@ int GPSDataParser::numPoints() return m_GPSDataMap.count(); } -bool GPSDataParser::matchDate(const QDateTime& photoDateTime, int maxGapTime, int timeZone, +bool GPSDataParser::matchDate(const TQDateTime& photoDateTime, int maxGapTime, int timeZone, bool interpolate, int interpolationDstTime, GPSDataContainer& gpsData) { // GPS device are sync in time by satelite using GMT time. // If the camera time is different than GMT time, we need to convert it to GMT time // Using the time zone. - QDateTime cameraGMTDateTime = photoDateTime.addSecs(timeZone*(-1)); + TQDateTime cameraGMTDateTime = photoDateTime.addSecs(timeZone*(-1)); kdDebug() << "cameraGMTDateTime: " << cameraGMTDateTime << endl; @@ -102,8 +102,8 @@ bool GPSDataParser::matchDate(const QDateTime& photoDateTime, int maxGapTime, in // The interpolate GPS point will be separate by at the maximum of 'interpolationDstTime' // seconds before and after the next and previous real GPS point found. - QDateTime prevDateTime = findPrevDate(cameraGMTDateTime, interpolationDstTime); - QDateTime nextDateTime = findNextDate(cameraGMTDateTime, interpolationDstTime); + TQDateTime prevDateTime = findPrevDate(cameraGMTDateTime, interpolationDstTime); + TQDateTime nextDateTime = findNextDate(cameraGMTDateTime, interpolationDstTime); if (!nextDateTime.isNull() && !prevDateTime.isNull()) { @@ -134,11 +134,11 @@ bool GPSDataParser::matchDate(const QDateTime& photoDateTime, int maxGapTime, in return false; } -QDateTime GPSDataParser::findNextDate(const QDateTime& dateTime, int secs) +TQDateTime GPSDataParser::findNextDate(const TQDateTime& dateTime, int secs) { // We will find the item in GPS data list where the time is // at the maximum bigger than 'secs' mn of the value to match. - QDateTime itemFound = dateTime.addSecs(secs); + TQDateTime itemFound = dateTime.addSecs(secs); bool found = false; for (GPSDataMap::Iterator it = m_GPSDataMap.begin(); @@ -157,14 +157,14 @@ QDateTime GPSDataParser::findNextDate(const QDateTime& dateTime, int secs) if (found) return itemFound; - return QDateTime(); + return TQDateTime(); } -QDateTime GPSDataParser::findPrevDate(const QDateTime& dateTime, int secs) +TQDateTime GPSDataParser::findPrevDate(const TQDateTime& dateTime, int secs) { // We will find the item in GPS data list where the time is // at the maximum smaller than 'secs' mn of the value to match. - QDateTime itemFound = dateTime.addSecs((-1)*secs); + TQDateTime itemFound = dateTime.addSecs((-1)*secs); bool found = false; for (GPSDataMap::Iterator it = m_GPSDataMap.begin(); @@ -183,75 +183,75 @@ QDateTime GPSDataParser::findPrevDate(const QDateTime& dateTime, int secs) if (found) return itemFound; - return QDateTime(); + return TQDateTime(); } bool GPSDataParser::loadGPXFile(const KURL& url) { - QFile gpxfile(url.path()); + TQFile gpxfile(url.path()); if (!gpxfile.open(IO_ReadOnly)) return false; - QDomDocument gpxDoc("gpx"); + TQDomDocument gpxDoc("gpx"); if (!gpxDoc.setContent(&gpxfile)) return false; - QDomElement gpxDocElem = gpxDoc.documentElement(); + TQDomElement gpxDocElem = gpxDoc.documentElement(); if (gpxDocElem.tagName()!="gpx") return false; - for (QDomNode nTrk = gpxDocElem.firstChild(); + for (TQDomNode nTrk = gpxDocElem.firstChild(); !nTrk.isNull(); nTrk = nTrk.nextSibling()) { - QDomElement trkElem = nTrk.toElement(); + TQDomElement trkElem = nTrk.toElement(); if (trkElem.isNull()) continue; if (trkElem.tagName() != "trk") continue; - for (QDomNode nTrkseg = trkElem.firstChild(); + for (TQDomNode nTrkseg = trkElem.firstChild(); !nTrkseg.isNull(); nTrkseg = nTrkseg.nextSibling()) { - QDomElement trksegElem = nTrkseg.toElement(); + TQDomElement trksegElem = nTrkseg.toElement(); if (trksegElem.isNull()) continue; if (trksegElem.tagName() != "trkseg") continue; - for (QDomNode nTrkpt = trksegElem.firstChild(); + for (TQDomNode nTrkpt = trksegElem.firstChild(); !nTrkpt.isNull(); nTrkpt = nTrkpt.nextSibling()) { - QDomElement trkptElem = nTrkpt.toElement(); + TQDomElement trkptElem = nTrkpt.toElement(); if (trkptElem.isNull()) continue; if (trkptElem.tagName() != "trkpt") continue; - QDateTime ptDateTime; + TQDateTime ptDateTime; double ptAltitude = 0.0; double ptLatitude = 0.0; double ptLongitude = 0.0; // Get GPS position. If not available continue to next point. - QString lat = trkptElem.attribute("lat"); - QString lon = trkptElem.attribute("lon"); + TQString lat = trkptElem.attribute("lat"); + TQString lon = trkptElem.attribute("lon"); if (lat.isEmpty() || lon.isEmpty()) continue; ptLatitude = lat.toDouble(); ptLongitude = lon.toDouble(); // Get metadata of track point (altitude and time stamp) - for (QDomNode nTrkptMeta = trkptElem.firstChild(); + for (TQDomNode nTrkptMeta = trkptElem.firstChild(); !nTrkptMeta.isNull(); nTrkptMeta = nTrkptMeta.nextSibling()) { - QDomElement trkptMetaElem = nTrkptMeta.toElement(); + TQDomElement trkptMetaElem = nTrkptMeta.toElement(); if (trkptMetaElem.isNull()) continue; - if (trkptMetaElem.tagName() == QString("time")) + if (trkptMetaElem.tagName() == TQString("time")) { // Get GPS point time stamp. If not available continue to next point. - QString time = trkptMetaElem.text(); + TQString time = trkptMetaElem.text(); if (time.isEmpty()) continue; - ptDateTime = QDateTime::fromString(time, Qt::ISODate); + ptDateTime = TQDateTime::fromString(time, Qt::ISODate); } - if (trkptMetaElem.tagName() == QString("ele")) + if (trkptMetaElem.tagName() == TQString("ele")) { // Get GPS point altitude. If not available continue to next point. - QString ele = trkptMetaElem.text(); + TQString ele = trkptMetaElem.text(); if (!ele.isEmpty()) ptAltitude = ele.toDouble(); } diff --git a/kipi-plugins/gpssync/gpsdataparser.h b/kipi-plugins/gpssync/gpsdataparser.h index 121a97e..953073e 100644 --- a/kipi-plugins/gpssync/gpsdataparser.h +++ b/kipi-plugins/gpssync/gpsdataparser.h @@ -24,10 +24,10 @@ #ifndef GPSDATAPARSER_H #define GPSDATAPARSER_H -// Qt includes. +// TQt includes. -#include <qdatetime.h> -#include <qmap.h> +#include <tqdatetime.h> +#include <tqmap.h> // KDE includes. @@ -52,19 +52,19 @@ public: void clear(); int numPoints(); - bool matchDate(const QDateTime& photoDateTime, int maxGapTime, int timeZone, + bool matchDate(const TQDateTime& photoDateTime, int maxGapTime, int timeZone, bool interpolate, int interpolationDstTime, GPSDataContainer& gpsData); private: // Methods used to perform interpolation. - QDateTime findNextDate(const QDateTime& dateTime, int secs); - QDateTime findPrevDate(const QDateTime& dateTime, int secs); + TQDateTime findNextDate(const TQDateTime& dateTime, int secs); + TQDateTime findPrevDate(const TQDateTime& dateTime, int secs); protected: - typedef QMap<QDateTime, GPSDataContainer> GPSDataMap; + typedef TQMap<TQDateTime, GPSDataContainer> GPSDataMap; GPSDataMap m_GPSDataMap; }; diff --git a/kipi-plugins/gpssync/gpseditdialog.cpp b/kipi-plugins/gpssync/gpseditdialog.cpp index 032aecd..43f4559 100644 --- a/kipi-plugins/gpssync/gpseditdialog.cpp +++ b/kipi-plugins/gpssync/gpseditdialog.cpp @@ -20,13 +20,13 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qtimer.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qvalidator.h> +#include <tqtimer.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqvalidator.h> // KDE includes. @@ -70,7 +70,7 @@ public: bool hasGPSInfo; - QPushButton *goButton; + TQPushButton *goButton; KLineEdit *altitudeInput; KLineEdit *latitudeInput; @@ -83,39 +83,39 @@ public: GPSMapWidget *worldMap; }; -GPSEditDialog::GPSEditDialog(QWidget* parent, const GPSDataContainer& gpsData, - const QString& fileName, bool hasGPSInfo) - : KDialogBase(Plain, i18n("%1 - Edit Geographical Coordinates").arg(fileName), +GPSEditDialog::GPSEditDialog(TQWidget* tqparent, const GPSDataContainer& gpsData, + const TQString& fileName, bool hasGPSInfo) + : KDialogBase(Plain, i18n("%1 - Edit Geographical Coordinates").tqarg(fileName), Help|Ok|Cancel, Ok, - parent, 0, true, false) + tqparent, 0, true, false) { d = new GPSEditDialogDialogPrivate; d->hasGPSInfo = hasGPSInfo; d->gpsData = gpsData; - QGridLayout* grid = new QGridLayout(plainPage(), 8, 3, 0, spacingHint()); + TQGridLayout* grid = new TQGridLayout(plainPage(), 8, 3, 0, spacingHint()); - QLabel *message = new QLabel(i18n("<p>Use the map on the right to select the location where " + TQLabel *message = new TQLabel(i18n("<p>Use the map on the right to select the location where " "the picture have been taken. Click with left mouse button or move the marker " "on the map to get the GPS coordinates.<p>"), plainPage()); - QLabel *altitudeLabel = new QLabel(i18n("Altitude:"), plainPage()); - QLabel *latitudeLabel = new QLabel(i18n("Latitude:"), plainPage()); - QLabel *longitudeLabel = new QLabel(i18n("Longitude:"), plainPage()); + TQLabel *altitudeLabel = new TQLabel(i18n("Altitude:"), plainPage()); + TQLabel *latitudeLabel = new TQLabel(i18n("Latitude:"), plainPage()); + TQLabel *longitudeLabel = new TQLabel(i18n("Longitude:"), plainPage()); d->altitudeInput = new KLineEdit(plainPage()); d->latitudeInput = new KLineEdit(plainPage()); d->longitudeInput = new KLineEdit(plainPage()); - QPushButton *altResetButton = new QPushButton(SmallIcon("clear_left"), QString::null, plainPage()); - QPushButton *latResetButton = new QPushButton(SmallIcon("clear_left"), QString::null, plainPage()); - QPushButton *lonResetButton = new QPushButton(SmallIcon("clear_left"), QString::null, plainPage()); + TQPushButton *altResetButton = new TQPushButton(SmallIcon("clear_left"), TQString(), plainPage()); + TQPushButton *latResetButton = new TQPushButton(SmallIcon("clear_left"), TQString(), plainPage()); + TQPushButton *lonResetButton = new TQPushButton(SmallIcon("clear_left"), TQString(), plainPage()); - d->altitudeInput->setValidator(new QDoubleValidator(-20000.0, 20000.0, 1, this)); - d->latitudeInput->setValidator(new QDoubleValidator(-90.0, 90.0, 12, this)); - d->longitudeInput->setValidator(new QDoubleValidator(-180.0, 180.0, 12, this)); + d->altitudeInput->setValidator(new TQDoubleValidator(-20000.0, 20000.0, 1, TQT_TQOBJECT(this))); + d->latitudeInput->setValidator(new TQDoubleValidator(-90.0, 90.0, 12, TQT_TQOBJECT(this))); + d->longitudeInput->setValidator(new TQDoubleValidator(-180.0, 180.0, 12, TQT_TQOBJECT(this))); - d->goButton = new QPushButton(i18n("Goto Location"), plainPage()); + d->goButton = new TQPushButton(i18n("Goto Location"), plainPage()); d->goButton->setEnabled(false); d->worldMap = new GPSMapWidget(plainPage()); @@ -153,39 +153,39 @@ GPSEditDialog::GPSEditDialog(QWidget* parent, const GPSDataContainer& gpsData, KHelpMenu* helpMenu = new KHelpMenu(this, d->about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), - this, SLOT(slotHelp()), 0, -1, 0); + this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // --------------------------------------------------------------- - connect(altResetButton, SIGNAL(released()), - d->altitudeInput, SLOT(clear())); + connect(altResetButton, TQT_SIGNAL(released()), + d->altitudeInput, TQT_SLOT(clear())); - connect(latResetButton, SIGNAL(released()), - d->latitudeInput, SLOT(clear())); + connect(latResetButton, TQT_SIGNAL(released()), + d->latitudeInput, TQT_SLOT(clear())); - connect(lonResetButton, SIGNAL(released()), - d->longitudeInput, SLOT(clear())); + connect(lonResetButton, TQT_SIGNAL(released()), + d->longitudeInput, TQT_SLOT(clear())); - connect(d->altitudeInput, SIGNAL(textChanged(const QString&)), - this, SLOT(slotGPSPositionChanged())); + connect(d->altitudeInput, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotGPSPositionChanged())); - connect(d->latitudeInput, SIGNAL(textChanged(const QString&)), - this, SLOT(slotGPSPositionChanged())); + connect(d->latitudeInput, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotGPSPositionChanged())); - connect(d->longitudeInput, SIGNAL(textChanged(const QString&)), - this, SLOT(slotGPSPositionChanged())); + connect(d->longitudeInput, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotGPSPositionChanged())); - connect(d->worldMap, SIGNAL(signalNewGPSLocationFromMap(const QString&, const QString&, const QString&)), - this, SLOT(slotNewGPSLocationFromMap(const QString&, const QString&, const QString&))); + connect(d->worldMap, TQT_SIGNAL(signalNewGPSLocationFromMap(const TQString&, const TQString&, const TQString&)), + this, TQT_SLOT(slotNewGPSLocationFromMap(const TQString&, const TQString&, const TQString&))); - connect(d->goButton, SIGNAL(released()), - this, SLOT(slotGotoLocation())); + connect(d->goButton, TQT_SIGNAL(released()), + this, TQT_SLOT(slotGotoLocation())); // --------------------------------------------------------------- readSettings(); - QTimer::singleShot(0, this, SLOT(slotUpdateWorldMap())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateWorldMap())); } GPSEditDialog::~GPSEditDialog() @@ -199,7 +199,7 @@ void GPSEditDialog::slotHelp() KApplication::kApplication()->invokeHelp("gpssync", "kipi-plugins"); } -void GPSEditDialog::closeEvent(QCloseEvent *e) +void GPSEditDialog::closeEvent(TQCloseEvent *e) { if (!e) return; saveSettings(); @@ -223,7 +223,7 @@ void GPSEditDialog::slotUpdateWorldMap() d->worldMap->resized(); } -void GPSEditDialog::resizeEvent(QResizeEvent *e) +void GPSEditDialog::resizeEvent(TQResizeEvent *e) { if (!e) return; slotUpdateWorldMap(); @@ -239,10 +239,10 @@ void GPSEditDialog::readSettings() { KConfig config("kipirc"); config.setGroup("GPS Sync Settings"); - resize(configDialogSize(config, QString("GPS Edit Dialog"))); + resize(configDialogSize(config, TQString("GPS Edit Dialog"))); d->worldMap->setZoomLevel(config.readNumEntry("Zoom Level", 8)); - d->worldMap->setMapType(config.readEntry("Map Type", QString("G_MAP_TYPE"))); + d->worldMap->setMapType(config.readEntry("Map Type", TQString("G_MAP_TYPE"))); d->altitudeInput->blockSignals(true); d->latitudeInput->blockSignals(true); @@ -250,15 +250,15 @@ void GPSEditDialog::readSettings() if (d->hasGPSInfo) { - d->altitudeInput->setText(QString::number(d->gpsData.altitude(), 'g', 12)); - d->latitudeInput->setText(QString::number(d->gpsData.latitude(), 'g', 12)); - d->longitudeInput->setText(QString::number(d->gpsData.longitude(), 'g', 12)); + d->altitudeInput->setText(TQString::number(d->gpsData.altitude(), 'g', 12)); + d->latitudeInput->setText(TQString::number(d->gpsData.latitude(), 'g', 12)); + d->longitudeInput->setText(TQString::number(d->gpsData.longitude(), 'g', 12)); } else { - d->altitudeInput->setText(QString::number(config.readDoubleNumEntry("GPS Last Altitude", 0.0), 'g', 12)); - d->latitudeInput->setText(QString::number(config.readDoubleNumEntry("GPS Last Latitude", 0.0), 'g', 12)); - d->longitudeInput->setText(QString::number(config.readDoubleNumEntry("GPS Last Longitude", 0.0), 'g', 12)); + d->altitudeInput->setText(TQString::number(config.readDoubleNumEntry("GPS Last Altitude", 0.0), 'g', 12)); + d->latitudeInput->setText(TQString::number(config.readDoubleNumEntry("GPS Last Latitude", 0.0), 'g', 12)); + d->longitudeInput->setText(TQString::number(config.readDoubleNumEntry("GPS Last Longitude", 0.0), 'g', 12)); } d->altitudeInput->blockSignals(false); @@ -273,7 +273,7 @@ void GPSEditDialog::saveSettings() { KConfig config("kipirc"); config.setGroup("GPS Sync Settings"); - saveDialogSize(config, QString("GPS Edit Dialog")); + saveDialogSize(config, TQString("GPS Edit Dialog")); config.writeEntry("GPS Last Latitude", d->latitudeInput->text().toDouble()); config.writeEntry("GPS Last Longitude", d->longitudeInput->text().toDouble()); config.writeEntry("GPS Last Altitude", d->altitudeInput->text().toDouble()); @@ -328,7 +328,7 @@ void GPSEditDialog::slotOk() accept(); } -void GPSEditDialog::slotNewGPSLocationFromMap(const QString& lat, const QString& lon, const QString& alt) +void GPSEditDialog::slotNewGPSLocationFromMap(const TQString& lat, const TQString& lon, const TQString& alt) { d->latitudeInput->setText(lat); d->longitudeInput->setText(lon); diff --git a/kipi-plugins/gpssync/gpseditdialog.h b/kipi-plugins/gpssync/gpseditdialog.h index 5ce243d..848c1d9 100644 --- a/kipi-plugins/gpssync/gpseditdialog.h +++ b/kipi-plugins/gpssync/gpseditdialog.h @@ -39,11 +39,12 @@ class GPSEditDialogDialogPrivate; class GPSEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GPSEditDialog(QWidget* parent, const GPSDataContainer& gpsData, - const QString& fileName, bool hasGPSInfo); + GPSEditDialog(TQWidget* tqparent, const GPSDataContainer& gpsData, + const TQString& fileName, bool hasGPSInfo); ~GPSEditDialog(); GPSDataContainer getGPSInfo(); @@ -52,7 +53,7 @@ protected slots: void slotOk(); void slotCancel(); - void slotNewGPSLocationFromMap(const QString& lat, const QString& lon, const QString& alt); + void slotNewGPSLocationFromMap(const TQString& lat, const TQString& lon, const TQString& alt); void slotUpdateWorldMap(); void slotGotoLocation(); void slotGPSPositionChanged(); @@ -60,8 +61,8 @@ protected slots: protected: - void resizeEvent(QResizeEvent *); - void closeEvent(QCloseEvent *); + void resizeEvent(TQResizeEvent *); + void closeEvent(TQCloseEvent *); private: diff --git a/kipi-plugins/gpssync/gpslistviewitem.cpp b/kipi-plugins/gpssync/gpslistviewitem.cpp index 8951c87..0378291 100644 --- a/kipi-plugins/gpssync/gpslistviewitem.cpp +++ b/kipi-plugins/gpssync/gpslistviewitem.cpp @@ -20,10 +20,10 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qpainter.h> -#include <qfileinfo.h> +#include <tqpainter.h> +#include <tqfileinfo.h> // KDE includes. @@ -58,14 +58,14 @@ public: bool erase; bool hasGPSInfo; - QDateTime date; + TQDateTime date; KURL url; GPSDataContainer gpsData; }; -GPSListViewItem::GPSListViewItem(KListView *view, QListViewItem *after, const KURL& url) +GPSListViewItem::GPSListViewItem(KListView *view, TQListViewItem *after, const KURL& url) : KListViewItem(view, after) { d = new GPSListViewItemPriv; @@ -96,13 +96,13 @@ void GPSListViewItem::setGPSInfo(const GPSDataContainer& gpsData, bool dirty, bo d->gpsData = gpsData; d->erase = false; d->hasGPSInfo = true; - setText(3, QString::number(d->gpsData.latitude(), 'g', 12)); - setText(4, QString::number(d->gpsData.longitude(), 'g', 12)); - setText(5, QString::number(d->gpsData.altitude(), 'g', 12)); + setText(3, TQString::number(d->gpsData.latitude(), 'g', 12)); + setText(4, TQString::number(d->gpsData.longitude(), 'g', 12)); + setText(5, TQString::number(d->gpsData.altitude(), 'g', 12)); if (isDirty()) { - QString status; + TQString status; if (d->gpsData.isInterpolated()) status = i18n("Interpolated"); @@ -117,7 +117,7 @@ void GPSListViewItem::setGPSInfo(const GPSDataContainer& gpsData, bool dirty, bo setText(6, status); } - repaint(); + tqrepaint(); } GPSDataContainer GPSListViewItem::GPSInfo() const @@ -130,10 +130,10 @@ void GPSListViewItem::eraseGPSInfo() d->erase = true; d->dirty = true; setText(6, i18n("Deleted!")); - repaint(); + tqrepaint(); } -void GPSListViewItem::setDateTime(const QDateTime& date) +void GPSListViewItem::setDateTime(const TQDateTime& date) { if (date.isValid()) { @@ -146,7 +146,7 @@ void GPSListViewItem::setDateTime(const QDateTime& date) } } -QDateTime GPSListViewItem::dateTime() const +TQDateTime GPSListViewItem::dateTime() const { return d->date; } @@ -197,7 +197,7 @@ void GPSListViewItem::writeGPSInfoToFile() void GPSListViewItem::setEnabled(bool e) { d->enabled = e; - repaint(); + tqrepaint(); } bool GPSListViewItem::isEnabled() @@ -210,36 +210,36 @@ bool GPSListViewItem::isDirty() return d->dirty; } -void GPSListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void GPSListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { if (isEnabled()) { if ( isDirty() && !d->erase && column >= 3 && column <= 5 ) { - QColorGroup _cg( cg ); - QColor c = _cg.text(); - _cg.setColor( QColorGroup::Text, Qt::red ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); - _cg.setColor( QColorGroup::Text, c ); + TQColorGroup _cg( cg ); + TQColor c = _cg.text(); + _cg.setColor( TQColorGroup::Text, TQt::red ); + KListViewItem::paintCell( p, _cg, column, width, tqalignment ); + _cg.setColor( TQColorGroup::Text, c ); } else if ( isDirty() && d->erase && column == 6) { - QColorGroup _cg( cg ); - QColor c = _cg.text(); - _cg.setColor( QColorGroup::Text, Qt::red ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); - _cg.setColor( QColorGroup::Text, c ); + TQColorGroup _cg( cg ); + TQColor c = _cg.text(); + _cg.setColor( TQColorGroup::Text, TQt::red ); + KListViewItem::paintCell( p, _cg, column, width, tqalignment ); + _cg.setColor( TQColorGroup::Text, c ); } else - KListViewItem::paintCell(p, cg, column, width, alignment); + KListViewItem::paintCell(p, cg, column, width, tqalignment); } else { - QColorGroup _cg( cg ); - QColor c = _cg.text(); - _cg.setColor( QColorGroup::Text, Qt::gray ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); - _cg.setColor( QColorGroup::Text, c ); + TQColorGroup _cg( cg ); + TQColor c = _cg.text(); + _cg.setColor( TQColorGroup::Text, TQt::gray ); + KListViewItem::paintCell( p, _cg, column, width, tqalignment ); + _cg.setColor( TQColorGroup::Text, c ); } } diff --git a/kipi-plugins/gpssync/gpslistviewitem.h b/kipi-plugins/gpssync/gpslistviewitem.h index b4483c5..a9c0526 100644 --- a/kipi-plugins/gpssync/gpslistviewitem.h +++ b/kipi-plugins/gpssync/gpslistviewitem.h @@ -23,10 +23,10 @@ #ifndef GPSLISTVIEWITEM_H #define GPSLISTVIEWITEM_H -// Qt includes. +// TQt includes. -#include <qdatetime.h> -#include <qstring.h> +#include <tqdatetime.h> +#include <tqstring.h> // KDE includes. @@ -37,9 +37,9 @@ #include "gpsdatacontainer.h" -class QPainter; -class QColorGroup; -class QPixmap; +class TQPainter; +class TQColorGroup; +class TQPixmap; namespace KIPIGPSSyncPlugin { @@ -50,15 +50,15 @@ class GPSListViewItem : public KListViewItem public: - GPSListViewItem(KListView *view, QListViewItem *after, const KURL& url); + GPSListViewItem(KListView *view, TQListViewItem *after, const KURL& url); ~GPSListViewItem(); void setGPSInfo(const GPSDataContainer& gpsData, bool dirty=true, bool addedManually=false); GPSDataContainer GPSInfo() const; void eraseGPSInfo(); - void setDateTime(const QDateTime &date); - QDateTime dateTime() const; + void setDateTime(const TQDateTime &date); + TQDateTime dateTime() const; void setEnabled(bool e); bool isEnabled(); @@ -71,7 +71,7 @@ public: protected: - 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); private: diff --git a/kipi-plugins/gpssync/gpsmapwidget.cpp b/kipi-plugins/gpssync/gpsmapwidget.cpp index 92484cd..3f800a2 100644 --- a/kipi-plugins/gpssync/gpsmapwidget.cpp +++ b/kipi-plugins/gpssync/gpsmapwidget.cpp @@ -42,20 +42,20 @@ public: GPSMapWidgetPrivate() { - gpsLocalorUrl = QString("http://digikam3rdparty.free.fr/gpslocator/getlonlatalt.php"); + gpsLocalorUrl = TQString("http://digikam3rdparty.free.fr/gpslocator/getlonlatalt.php"); } - QString gpsLocalorUrl; - QString latitude; - QString longitude; - QString altitude; - QString zoomLevel; - QString mapType; - QString fileName; + TQString gpsLocalorUrl; + TQString latitude; + TQString longitude; + TQString altitude; + TQString zoomLevel; + TQString mapType; + TQString fileName; }; -GPSMapWidget::GPSMapWidget(QWidget* parent) - : KHTMLPart(parent) +GPSMapWidget::GPSMapWidget(TQWidget* tqparent) + : KHTMLPart(tqparent) { d = new GPSMapWidgetPrivate; @@ -63,8 +63,8 @@ GPSMapWidget::GPSMapWidget(QWidget* parent) setDNDEnabled(false); setEditable(false); - view()->setVScrollBarMode(QScrollView::AlwaysOff); - view()->setHScrollBarMode(QScrollView::AlwaysOff); + view()->setVScrollBarMode(TQScrollView::AlwaysOff); + view()->setHScrollBarMode(TQScrollView::AlwaysOff); view()->setMinimumSize(480, 360); } @@ -73,35 +73,35 @@ GPSMapWidget::~GPSMapWidget() delete d; } -void GPSMapWidget::setFileName(const QString& fileName) +void GPSMapWidget::setFileName(const TQString& fileName) { d->fileName = fileName; } -QString GPSMapWidget::fileName() +TQString GPSMapWidget::fileName() { return d->fileName; } -void GPSMapWidget::setGPSPosition(const QString& lat, const QString& lon) +void GPSMapWidget::setGPSPosition(const TQString& lat, const TQString& lon) { d->latitude = lat; d->longitude = lon; } -void GPSMapWidget::setMapType(const QString& mapType) +void GPSMapWidget::setMapType(const TQString& mapType) { d->mapType = mapType; } -QString GPSMapWidget::mapType() +TQString GPSMapWidget::mapType() { return d->mapType; } void GPSMapWidget::setZoomLevel(int zoomLevel) { - d->zoomLevel = QString::number(zoomLevel); + d->zoomLevel = TQString::number(zoomLevel); } int GPSMapWidget::GPSMapWidget::zoomLevel() @@ -109,9 +109,9 @@ int GPSMapWidget::GPSMapWidget::zoomLevel() return d->zoomLevel.toInt(); } -void GPSMapWidget::extractGPSPositionfromStatusbar(const QString& txt) +void GPSMapWidget::extractGPSPositionfromStatusbar(const TQString& txt) { - QString status = txt; + TQString status = txt; status.remove(0, 5); status.truncate(status.length()-1); d->latitude = status.section(",", 0, 0); @@ -124,11 +124,11 @@ void GPSMapWidget::extractGPSPositionfromStatusbar(const QString& txt) void GPSMapWidget::khtmlMouseMoveEvent(khtml::MouseMoveEvent *e) { - QString status = jsStatusBarText(); + TQString status = jsStatusBarText(); - // If a new point to the map have been moved, the Status + // If a new point to the map have been moved, the tqStatus // string is like : "(lat:25.5894748, lon:47.6897455478, alt:211)" - if (status.startsWith(QString("(lat:"))) + if (status.startsWith(TQString("(lat:"))) extractGPSPositionfromStatusbar(status); KHTMLPart::khtmlMouseMoveEvent(e); @@ -136,24 +136,24 @@ void GPSMapWidget::khtmlMouseMoveEvent(khtml::MouseMoveEvent *e) void GPSMapWidget::khtmlMouseReleaseEvent(khtml::MouseReleaseEvent *e) { - QString status = jsStatusBarText(); + TQString status = jsStatusBarText(); - // If a new point to the map have been moved, the Status + // If a new point to the map have been moved, the tqStatus // string is like : "(lat:25.5894748, lon:47.6897455478, alt:211)" - if (status.startsWith(QString("(lat:"))) + if (status.startsWith(TQString("(lat:"))) extractGPSPositionfromStatusbar(status); - // If a new map zoom level have been selected, the Status + // If a new map zoom level have been selected, the tqStatus // string is like : "newZoomLevel:5" - if (status.startsWith(QString("newZoomLevel:"))) + if (status.startsWith(TQString("newZoomLevel:"))) { status.remove(0, 13); d->zoomLevel = status; } - // If a new map type have been selected, the Status + // If a new map type have been selected, the tqStatus // string is like : "newMapType:G_SATELLITE_TYPE" - if (status.startsWith(QString("newMapType:"))) + if (status.startsWith(TQString("newMapType:"))) { status.remove(0, 11); d->mapType = status; @@ -164,7 +164,7 @@ void GPSMapWidget::khtmlMouseReleaseEvent(khtml::MouseReleaseEvent *e) void GPSMapWidget::resized() { - QString url = d->gpsLocalorUrl; + TQString url = d->gpsLocalorUrl; url.append("?latitude="); url.append(d->latitude); url.append("&longitude="); @@ -172,9 +172,9 @@ void GPSMapWidget::resized() url.append("&altitude="); url.append(d->altitude); url.append("&width="); - url.append(QString::number(view()->width())); + url.append(TQString::number(view()->width())); url.append("&height="); - url.append(QString::number(view()->height())); + url.append(TQString::number(view()->height())); url.append("&zoom="); url.append(d->zoomLevel); url.append("&maptype="); diff --git a/kipi-plugins/gpssync/gpsmapwidget.h b/kipi-plugins/gpssync/gpsmapwidget.h index 3ca2e52..9789540 100644 --- a/kipi-plugins/gpssync/gpsmapwidget.h +++ b/kipi-plugins/gpssync/gpsmapwidget.h @@ -24,9 +24,9 @@ #ifndef GPSMAPWIDGET_H #define GPSMAPWIDGET_H -// Qt includes. +// TQt includes. -#include <qstring.h> +#include <tqstring.h> // KDE includes. @@ -40,28 +40,29 @@ class GPSMapWidgetPrivate; class GPSMapWidget : public KHTMLPart { Q_OBJECT + TQ_OBJECT public: - GPSMapWidget(QWidget* parent); + GPSMapWidget(TQWidget* tqparent); ~GPSMapWidget(); - void setGPSPosition(const QString& lat, const QString& lon); + void setGPSPosition(const TQString& lat, const TQString& lon); void setZoomLevel(int zoomLevel); int zoomLevel(); - void setMapType(const QString& mapType); - QString mapType(); + void setMapType(const TQString& mapType); + TQString mapType(); - void setFileName(const QString& fileName); - QString fileName(); + void setFileName(const TQString& fileName); + TQString fileName(); void resized(); signals: - void signalNewGPSLocationFromMap(const QString&, const QString&, const QString&); + void signalNewGPSLocationFromMap(const TQString&, const TQString&, const TQString&); protected: @@ -70,7 +71,7 @@ protected: private: - void extractGPSPositionfromStatusbar(const QString& txt); + void extractGPSPositionfromStatusbar(const TQString& txt); private: diff --git a/kipi-plugins/gpssync/gpssyncdialog.cpp b/kipi-plugins/gpssync/gpssyncdialog.cpp index eed7154..b14ee13 100644 --- a/kipi-plugins/gpssync/gpssyncdialog.cpp +++ b/kipi-plugins/gpssync/gpssyncdialog.cpp @@ -21,16 +21,16 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qcombobox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qvgroupbox.h> -#include <qgrid.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqvgroupbox.h> +#include <tqgrid.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> // KDE includes. @@ -82,12 +82,12 @@ public: about = 0; } - QLabel *gpxPointsLabel; - QLabel *maxTimeLabel; + TQLabel *gpxPointsLabel; + TQLabel *maxTimeLabel; - QComboBox *timeZoneCB; + TQComboBox *timeZoneCB; - QCheckBox *interpolateBox; + TQCheckBox *interpolateBox; KListView *listView; @@ -103,10 +103,10 @@ public: GPSDataParser gpxParser; }; -GPSSyncDialog::GPSSyncDialog( KIPI::Interface* interface, QWidget* parent) +GPSSyncDialog::GPSSyncDialog( KIPI::Interface* interface, TQWidget* tqparent) : KDialogBase(Plain, i18n("Geolocation"), Help|User1|User2|User3|Apply|Close, Close, - parent, 0, true, false) + tqparent, 0, true, false) { d = new GPSSyncDialogPriv; d->interface = interface; @@ -123,7 +123,7 @@ GPSSyncDialog::GPSSyncDialog( KIPI::Interface* interface, QWidget* parent) enableButton(User2, true); enableButton(User3, true); - QGridLayout *mainLayout = new QGridLayout(plainPage(), 3, 1, 0, marginHint()); + TQGridLayout *mainLayout = new TQGridLayout(plainPage(), 3, 1, 0, marginHint()); // -------------------------------------------------------------- @@ -134,35 +134,35 @@ GPSSyncDialog::GPSSyncDialog( KIPI::Interface* interface, QWidget* parent) d->listView->addColumn( i18n("Latitude") ); d->listView->addColumn( i18n("Longitude") ); d->listView->addColumn( i18n("Altitude") ); - d->listView->addColumn( i18n("Status") ); - d->listView->setResizeMode(QListView::AllColumns); + d->listView->addColumn( i18n("tqStatus") ); + d->listView->setResizeMode(TQListView::AllColumns); d->listView->setAllColumnsShowFocus(true); d->listView->setSorting(-1); - d->listView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - d->listView->setSelectionMode(QListView::Extended); + d->listView->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + d->listView->setSelectionMode(TQListView::Extended); d->listView->setMinimumWidth(450); // --------------------------------------------------------------- - QGroupBox *settingsBox = new QGroupBox(0, Qt::Vertical, i18n("Settings"), plainPage()); - QGridLayout *settingsBoxLayout = new QGridLayout(settingsBox->layout(), 8, 1, + TQGroupBox *settingsBox = new TQGroupBox(0, Qt::Vertical, i18n("Settings"), plainPage()); + TQGridLayout *settingsBoxLayout = new TQGridLayout(settingsBox->tqlayout(), 8, 1, KDialog::spacingHint()); - QPushButton *loadGPXButton = new QPushButton(i18n("Load GPX File..."), settingsBox); + TQPushButton *loadGPXButton = new TQPushButton(i18n("Load GPX File..."), settingsBox); - QLabel *gpxFileLabel = new QLabel(i18n("Current GPX file:"), settingsBox); + TQLabel *gpxFileLabel = new TQLabel(i18n("Current GPX file:"), settingsBox); d->gpxFileName = new KSqueezedTextLabel(i18n("No GPX file"), settingsBox); - d->gpxPointsLabel = new QLabel(settingsBox); - KSeparator *line = new KSeparator(Horizontal, settingsBox); + d->gpxPointsLabel = new TQLabel(settingsBox); + KSeparator *line = new KSeparator(Qt::Horizontal, settingsBox); - QLabel *maxGapLabel = new QLabel(i18n("Max. time gap (sec.):"), settingsBox); + TQLabel *maxGapLabel = new TQLabel(i18n("Max. time gap (sec.):"), settingsBox); d->maxGapInput = new KIntSpinBox(0, 1000000, 1, 30, 10, settingsBox); - QWhatsThis::add(d->maxGapInput, i18n("<p>Sets the maximum difference in " + TQWhatsThis::add(d->maxGapInput, i18n("<p>Sets the maximum difference in " "seconds from a GPS track point to the image time to be matched. " "If the time difference exceeds this setting, no match will be attempted.")); - QLabel *timeZoneLabel = new QLabel(i18n("Time zone:"), settingsBox); - d->timeZoneCB = new QComboBox( false, settingsBox ); + TQLabel *timeZoneLabel = new TQLabel(i18n("Time zone:"), settingsBox); + d->timeZoneCB = new TQComboBox( false, settingsBox ); // See list of time zomes over the world : // http://en.wikipedia.org/wiki/List_of_time_zones @@ -207,19 +207,19 @@ GPSSyncDialog::GPSSyncDialog( KIPI::Interface* interface, QWidget* parent) d->timeZoneCB->insertItem("GMT+12:45"); d->timeZoneCB->insertItem("GMT+13:00"); d->timeZoneCB->insertItem("GMT+14:00"); - QWhatsThis::add(d->timeZoneCB, i18n("<p>Sets the time zone the camera was set to " + TQWhatsThis::add(d->timeZoneCB, i18n("<p>Sets the time zone the camera was set to " "during photo shooting, so that the time stamps of the images " "can be converted to GMT to match the GPS time reference.\n" "Note: positive offsets count eastwards from zero longitude (GMT), " "they are 'ahead of time'.")); - d->interpolateBox = new QCheckBox(i18n("Interpolate"), settingsBox); - QWhatsThis::add(d->interpolateBox, i18n("<p>Set this option to interpolate GPS track points " + d->interpolateBox = new TQCheckBox(i18n("Interpolate"), settingsBox); + TQWhatsThis::add(d->interpolateBox, i18n("<p>Set this option to interpolate GPS track points " "which are not closely matched to the GPX data file.")); - d->maxTimeLabel = new QLabel(i18n("Difference in min.:"), settingsBox); + d->maxTimeLabel = new TQLabel(i18n("Difference in min.:"), settingsBox); d->maxTimeInput = new KIntSpinBox(0, 240, 1, 15, 10, settingsBox); - QWhatsThis::add(d->maxTimeInput, i18n("<p>Sets the maximum time difference in minutes (240 max.)" + TQWhatsThis::add(d->maxTimeInput, i18n("<p>Sets the maximum time difference in minutes (240 max.)" " to interpolate GPX file points to image time data.")); settingsBoxLayout->addMultiCellWidget(loadGPXButton, 0, 0, 0, 1); @@ -257,19 +257,19 @@ GPSSyncDialog::GPSSyncDialog( KIPI::Interface* interface, QWidget* parent) KHelpMenu* helpMenu = new KHelpMenu(this, d->about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), - this, SLOT(slotHelp()), 0, -1, 0); + this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // --------------------------------------------------------------- - connect(loadGPXButton, SIGNAL(released()), - this, SLOT(slotLoadGPXFile())); + connect(loadGPXButton, TQT_SIGNAL(released()), + this, TQT_SLOT(slotLoadGPXFile())); - connect(d->interpolateBox, SIGNAL(toggled(bool)), - d->maxTimeLabel, SLOT(setEnabled(bool))); + connect(d->interpolateBox, TQT_SIGNAL(toggled(bool)), + d->maxTimeLabel, TQT_SLOT(setEnabled(bool))); - connect(d->interpolateBox, SIGNAL(toggled(bool)), - d->maxTimeInput, SLOT(setEnabled(bool))); + connect(d->interpolateBox, TQT_SIGNAL(toggled(bool)), + d->maxTimeInput, TQT_SLOT(setEnabled(bool))); readSettings(); } @@ -292,14 +292,14 @@ void GPSSyncDialog::setImages( const KURL::List& images ) KIO::PreviewJob *thumbnailJob = KIO::filePreview(images, 64); - connect(thumbnailJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), - this, SLOT(slotGotThumbnail(const KFileItem*, const QPixmap&))); + connect(thumbnailJob, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), + this, TQT_SLOT(slotGotThumbnail(const KFileItem*, const TQPixmap&))); } void GPSSyncDialog::slotLoadGPXFile() { KURL loadGPXFile = KFileDialog::getOpenURL(KGlobalSettings::documentPath(), - i18n("%1|GPS Exchange Format").arg("*.gpx"), this, + i18n("%1|GPS Exchange Format").tqarg("*.gpx"), this, i18n("Select GPX File to Load") ); if( loadGPXFile.isEmpty() ) return; @@ -310,7 +310,7 @@ void GPSSyncDialog::slotLoadGPXFile() if (!ret) { KMessageBox::error(this, i18n("Cannot parse %1 GPX file!") - .arg(loadGPXFile.fileName()), i18n("GPS Sync")); + .tqarg(loadGPXFile.fileName()), i18n("GPS Sync")); enableButton(User1, false); return; } @@ -318,18 +318,18 @@ void GPSSyncDialog::slotLoadGPXFile() if (d->gpxParser.numPoints() <= 0) { KMessageBox::sorry(this, i18n("The %1 GPX file do not have a date-time track to use!") - .arg(loadGPXFile.fileName()), i18n("GPS Sync")); + .tqarg(loadGPXFile.fileName()), i18n("GPS Sync")); enableButton(User1, false); return; } d->gpxFileName->setText(loadGPXFile.fileName()); - d->gpxPointsLabel->setText(i18n("Points parsed: %1").arg(d->gpxParser.numPoints())); + d->gpxPointsLabel->setText(i18n("Points parsed: %1").tqarg(d->gpxParser.numPoints())); enableButton(User1, true); slotUser1(); } -void GPSSyncDialog::closeEvent(QCloseEvent *e) +void GPSSyncDialog::closeEvent(TQCloseEvent *e) { if (!e) return; if (!promptUserClose()) @@ -353,7 +353,7 @@ bool GPSSyncDialog::promptUserClose() { // Check if one item is dirty in the list. - QListViewItemIterator it( d->listView ); + TQListViewItemIterator it( d->listView ); int dirty = 0; while ( it.current() ) @@ -367,13 +367,13 @@ bool GPSSyncDialog::promptUserClose() if (dirty > 0) { - QString msg = i18n("1 image from the list is not updated.", + TQString msg = i18n("1 image from the list is not updated.", "%n images from the list are not updated.", dirty); if (KMessageBox::No == KMessageBox::warningYesNo(this, i18n("<p>%1\n" "Do you really want to close this window without applying changes?</p>") - .arg(msg))) + .tqarg(msg))) return false; } @@ -391,7 +391,7 @@ void GPSSyncDialog::readSettings() d->maxTimeLabel->setEnabled(d->interpolateBox->isChecked()); d->maxTimeInput->setEnabled(d->interpolateBox->isChecked()); - resize(configDialogSize(config, QString("GPS Sync Dialog"))); + resize(configDialogSize(config, TQString("GPS Sync Dialog"))); } void GPSSyncDialog::saveSettings() @@ -402,7 +402,7 @@ void GPSSyncDialog::saveSettings() config.writeEntry("Time Zone", d->timeZoneCB->currentItem() ); config.writeEntry("Interpolate", d->interpolateBox->isChecked() ); config.writeEntry("Max Inter Dist Time", d->maxTimeInput->value() ); - saveDialogSize(config, QString("GPS Sync Dialog")); + saveDialogSize(config, TQString("GPS Sync Dialog")); config.sync(); } @@ -411,17 +411,17 @@ void GPSSyncDialog::slotUser1() { int itemsUpdated = 0; - QListViewItemIterator it( d->listView ); + TQListViewItemIterator it( d->listView ); while ( it.current() ) { GPSListViewItem *item = dynamic_cast<GPSListViewItem*>(it.current()); GPSDataContainer gpsData; - QString tz = d->timeZoneCB->currentText(); - int hh = QString(QString(tz[4])+QString(tz[5])).toInt(); - int mm = QString(QString(tz[7])+QString(tz[8])).toInt(); + TQString tz = d->timeZoneCB->currentText(); + int hh = TQString(TQString(tz[4])+TQString(tz[5])).toInt(); + int mm = TQString(TQString(tz[7])+TQString(tz[8])).toInt(); int offset = hh*3600 + mm*60; - if (tz[3] == QChar('-')) + if (tz[3] == TQChar('-')) offset = (-1)*offset; if (d->gpxParser.matchDate(item->dateTime(), @@ -444,7 +444,7 @@ void GPSSyncDialog::slotUser1() return; } - QString msg = i18n("GPS data of 1 image have been updated on the list using the GPX data file.", + TQString msg = i18n("GPS data of 1 image have been updated on the list using the GPX data file.", "GPS data of %n images have been updated on the list using the GPX data file.", itemsUpdated); msg += '\n'; @@ -471,7 +471,7 @@ void GPSSyncDialog::slotUser2() if (dlg.exec() == KDialogBase::Accepted) { - QListViewItemIterator it(d->listView); + TQListViewItemIterator it(d->listView); while (it.current()) { @@ -495,7 +495,7 @@ void GPSSyncDialog::slotUser3() return; } - QListViewItemIterator it(d->listView); + TQListViewItemIterator it(d->listView); while (it.current()) { @@ -512,7 +512,7 @@ void GPSSyncDialog::slotApply() { KURL::List images; - QListViewItemIterator it( d->listView ); + TQListViewItemIterator it( d->listView ); while ( it.current() ) { GPSListViewItem *selItem = dynamic_cast<GPSListViewItem*>(it.current()); @@ -530,9 +530,9 @@ void GPSSyncDialog::slotApply() d->interface->refreshImages(images); } -void GPSSyncDialog::slotGotThumbnail(const KFileItem *item, const QPixmap& pix) +void GPSSyncDialog::slotGotThumbnail(const KFileItem *item, const TQPixmap& pix) { - QListViewItemIterator it(d->listView); + TQListViewItemIterator it(d->listView); while (it.current()) { diff --git a/kipi-plugins/gpssync/gpssyncdialog.h b/kipi-plugins/gpssync/gpssyncdialog.h index 053e97a..e0e5199 100644 --- a/kipi-plugins/gpssync/gpssyncdialog.h +++ b/kipi-plugins/gpssync/gpssyncdialog.h @@ -33,7 +33,7 @@ #include <libkipi/interface.h> -class QListViewItem; +class TQListViewItem; class KFileItem; @@ -45,17 +45,18 @@ class GPSSyncDialogPriv; class GPSSyncDialog :public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GPSSyncDialog(KIPI::Interface* interface, QWidget* parent); + GPSSyncDialog(KIPI::Interface* interface, TQWidget* tqparent); ~GPSSyncDialog(); void setImages(const KURL::List& images); protected: - void closeEvent(QCloseEvent *); + void closeEvent(TQCloseEvent *); protected slots: @@ -68,7 +69,7 @@ protected slots: private slots: - void slotGotThumbnail(const KFileItem*, const QPixmap&); + void slotGotThumbnail(const KFileItem*, const TQPixmap&); void slotLoadGPXFile(); private: diff --git a/kipi-plugins/gpssync/kmlexport.cpp b/kipi-plugins/gpssync/kmlexport.cpp index 5262140..096ba97 100644 --- a/kipi-plugins/gpssync/kmlexport.cpp +++ b/kipi-plugins/gpssync/kmlexport.cpp @@ -25,10 +25,10 @@ extern "C" #include <unistd.h> } -// Qt includes. +// TQt includes. -#include <qpainter.h> -#include <qregexp.h> +#include <tqpainter.h> +#include <tqregexp.h> // KDE includes. @@ -59,8 +59,8 @@ namespace KIPIGPSSyncPlugin kmlExport::kmlExport(KIPI::Interface* interface) { m_interface = interface; - QWidget* parent = KApplication::kApplication()->mainWidget(); - m_progressDialog = new KIPI::BatchProgressDialog(parent, i18n("Generating KML file...")); + TQWidget* tqparent = KApplication::kApplication()->mainWidget(); + m_progressDialog = new KIPI::BatchProgressDialog(tqparent, i18n("Generating KML file...")); } kmlExport::~kmlExport() @@ -69,49 +69,49 @@ kmlExport::~kmlExport() } /*! - \fn kmlExport::createDir(QDir dir) + \fn kmlExport::createDir(TQDir dir) */ -bool kmlExport::createDir(QDir dir) +bool kmlExport::createDir(TQDir dir) { if (dir.exists()) return true; - QDir parent = dir; - parent.cdUp(); - bool ok = createDir(parent); + TQDir tqparent = dir; + tqparent.cdUp(); + bool ok = createDir(tqparent); if (!ok) { - logError(i18n("Could not create '%1").arg(parent.path())); + logError(i18n("Could not create '%1").tqarg(tqparent.path())); return false; } - return parent.mkdir(dir.dirName()); + return tqparent.mkdir(dir.dirName()); } /*! -\fn kmlExport::webifyFileName(const QString &fileName) +\fn kmlExport::webifyFileName(const TQString &fileName) */ -QString kmlExport::webifyFileName(const QString &fileName) +TQString kmlExport::webifyFileName(const TQString &fileName) { - QString webFileName=fileName.lower(); + TQString webFileName=fileName.lower(); // Remove potentially troublesome chars - webFileName=webFileName.replace(QRegExp("[^-0-9a-z]+"), "_"); + webFileName=webFileName.tqreplace(TQRegExp("[^-0-9a-z]+"), "_"); return webFileName; } /*! - \fn kmlExport::generateSquareThumbnail(const QImage& fullImage, int size) + \fn kmlExport::generateSquareThumbnail(const TQImage& fullImage, int size) */ -QImage kmlExport::generateSquareThumbnail(const QImage& fullImage, int size) +TQImage kmlExport::generateSquareThumbnail(const TQImage& fullImage, int size) { - QImage image = fullImage.smoothScale(size, size, QImage::ScaleMax); + TQImage image = fullImage.smoothScale(size, size, TQ_ScaleMax); if (image.width() == size && image.height() == size) { return image; } - QPixmap croppedPix(size, size); - QPainter painter(&croppedPix); + TQPixmap croppedPix(size, size); + TQPainter painter(&croppedPix); int sx=0, sy=0; if (image.width()>size) @@ -129,19 +129,19 @@ QImage kmlExport::generateSquareThumbnail(const QImage& fullImage, int size) } /*! - \fn kmlExport::generateBorderedThumbnail(const QImage& fullImage, int size) + \fn kmlExport::generateBorderedThumbnail(const TQImage& fullImage, int size) */ -QImage kmlExport::generateBorderedThumbnail(const QImage& fullImage, int size) +TQImage kmlExport::generateBorderedThumbnail(const TQImage& fullImage, int size) { int image_border = 3; // getting an image minus the border - QImage image = fullImage.smoothScale(size -(2*image_border), size - (2*image_border), QImage::ScaleMax); + TQImage image = fullImage.smoothScale(size -(2*image_border), size - (2*image_border), TQ_ScaleMax); - QPixmap croppedPix(image.width() + (2*image_border), image.height() + (2*image_border)); - QPainter painter(&croppedPix); + TQPixmap croppedPix(image.width() + (2*image_border), image.height() + (2*image_border)); + TQPainter painter(&croppedPix); - QColor BrushColor(255,255,255); + TQColor BrushColor(255,255,255); painter.fillRect(0,0,image.width() + (2*image_border),image.height() + (2*image_border),BrushColor); /*! @todo add a corner to the thumbnail and a hotspot to the kml element */ @@ -152,36 +152,36 @@ QImage kmlExport::generateBorderedThumbnail(const QImage& fullImage, int size) } /*! -\fn kmlExport::generateImagesthumb(KIPI::Interface* interface, const KURL& imageURL, QDomElement &kmlAlbum ) +\fn kmlExport::generateImagesthumb(KIPI::Interface* interface, const KURL& imageURL, TQDomElement &kmlAlbum ) */ -void kmlExport::generateImagesthumb(KIPI::Interface* interface, const KURL& imageURL, QDomElement &kmlAlbum ) +void kmlExport::generateImagesthumb(KIPI::Interface* interface, const KURL& imageURL, TQDomElement &kmlAlbum ) { KIPI::Interface* mInterface = interface; KIPI::ImageInfo info = mInterface->info(imageURL); // Load image - QString path = imageURL.path(); - QFile imageFile(path); + TQString path = imageURL.path(); + TQFile imageFile(path); if (!imageFile.open(IO_ReadOnly)) { - logWarning(i18n("Could not read image '%1'").arg(path)); + logWarning(i18n("Could not read image '%1'").tqarg(path)); return; } - QString imageFormat = QImageIO::imageFormat(&imageFile); + TQString imageFormat = TQImageIO::imageFormat(TQT_TQIODEVICE(&imageFile)); if (imageFormat.isEmpty()) { - logWarning(i18n("Format of image '%1' is unknown").arg(path)); + logWarning(i18n("Format of image '%1' is unknown").tqarg(path)); return; } imageFile.close(); imageFile.open(IO_ReadOnly); - QByteArray imageData = imageFile.readAll(); - QImage image; + TQByteArray imageData = imageFile.readAll(); + TQImage image; if (!image.loadFromData(imageData) ) { - logWarning(i18n("Error loading image '%1'").arg(path)); + logWarning(i18n("Error loading image '%1'").tqarg(path)); return; } @@ -191,20 +191,20 @@ void kmlExport::generateImagesthumb(KIPI::Interface* interface, const KURL& imag */ if ( info.angle() != 0 ) { - QWMatrix matrix; + TQWMatrix matrix; matrix.rotate( info.angle() ); image = image.xForm( matrix ); } - image = image.smoothScale(m_size, m_size, QImage::ScaleMax); + image = image.smoothScale(m_size, m_size, TQ_ScaleMax); - QImage icon; + TQImage icon; if (m_optimize_googlemap) { icon = generateSquareThumbnail(image,m_googlemapSize); } else { - // icon = image.smoothScale(m_iconSize, m_iconSize, QImage::ScaleMax); + // icon = image.smoothScale(m_iconSize, m_iconSize, TQ_ScaleMax); icon = generateBorderedThumbnail(image, m_iconSize); } @@ -213,35 +213,35 @@ void kmlExport::generateImagesthumb(KIPI::Interface* interface, const KURL& imag * it's appear with digikam but not with gwenview * which already seems to strip the extension */ - QString baseFileName = webifyFileName(info.title()); + TQString baseFileName = webifyFileName(info.title()); // baseFileName = mUniqueNameHelper.makeNameUnique(baseFileName); - QString fullFileName; + TQString fullFileName; fullFileName = baseFileName + '.' + imageFormat.lower(); - QString destPath = m_tempDestDir + m_imageDir + fullFileName; + TQString destPath = m_tempDestDir + m_imageDir + fullFileName; if (!image.save(destPath, imageFormat.ascii(), 85)) { // if not able to save the image, it's pointless to create a placemark - logWarning(i18n("Could not save image '%1' to '%2'").arg(path).arg(destPath)); + logWarning(i18n("Could not save image '%1' to '%2'").tqarg(path).tqarg(destPath)); } else { - //logInfo(i18n("Creation of picture '%1'").arg(fullFileName)); + //logInfo(i18n("Creation of picture '%1'").tqarg(fullFileName)); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.load(imageURL.path()); double alt, lat, lng; exiv2Iface.getGPSInfo(alt, lat, lng); - QDomElement kmlPlacemark = addKmlElement(kmlAlbum, "Placemark"); + TQDomElement kmlPlacemark = addKmlElement(kmlAlbum, "Placemark"); addKmlTextElement(kmlPlacemark,"name",fullFileName); // location and altitude - QDomElement kmlGeometry = addKmlElement(kmlPlacemark, "Point"); + TQDomElement kmlGeometry = addKmlElement(kmlPlacemark, "Point"); if (alt) { - addKmlTextElement(kmlGeometry, "coordinates", QString("%1,%2,%3").arg(lng).arg(lat).arg(alt)); + addKmlTextElement(kmlGeometry, "coordinates", TQString("%1,%2,%3").tqarg(lng).tqarg(lat).tqarg(alt)); } else { - addKmlTextElement(kmlGeometry, "coordinates", QString("%1,%2").arg(lng).arg(lat)); + addKmlTextElement(kmlGeometry, "coordinates", TQString("%1,%2").tqarg(lng).tqarg(lat)); } if (m_altitudeMode == 2 ) @@ -276,18 +276,18 @@ void kmlExport::generateImagesthumb(KIPI::Interface* interface, const KURL& imag * but the exiv2Iface.getImageDateTime() return the (standard)DateTime first * libkexiv2 seems to take Original dateTime first so it shoul be alright now. */ - QDateTime datetime = exiv2Iface.getImageDateTime(); + TQDateTime datetime = exiv2Iface.getImageDateTime(); if (datetime.isValid()) { - QDomElement kmlTimeStamp = addKmlElement(kmlPlacemark, "TimeStamp"); + TQDomElement kmlTimeStamp = addKmlElement(kmlPlacemark, "TimeStamp"); addKmlTextElement(kmlTimeStamp, "when", datetime.toString("yyyy-MM-ddThh:mm:ssZ")); } else if ( mInterface->hasFeature(KIPI::ImagesHasTime)) { - QDomElement kmlTimeStamp = addKmlElement(kmlGeometry, "TimeStamp"); + TQDomElement kmlTimeStamp = addKmlElement(kmlGeometry, "TimeStamp"); addKmlTextElement(kmlTimeStamp, "when", (info.time()).toString("yyyy-MM-ddThh:mm:ssZ")); } - QString my_description; + TQString my_description; if (m_optimize_googlemap) { my_description = "<img src=\"" + m_UrlDestDir + m_imageDir + fullFileName + "\">"; @@ -301,22 +301,22 @@ void kmlExport::generateImagesthumb(KIPI::Interface* interface, const KURL& imag my_description += "<br/>" + info.description() ; } addKmlTextElement(kmlPlacemark, "description", my_description); - logInfo(i18n("Creation of placemark '%1'").arg(fullFileName)); + logInfo(i18n("Creation of placemark '%1'").tqarg(fullFileName)); // Save icon - QString iconFileName = "thumb_" + baseFileName + '.' + imageFormat.lower(); - QString destPath = m_tempDestDir + m_imageDir + iconFileName; + TQString iconFileName = "thumb_" + baseFileName + '.' + imageFormat.lower(); + TQString destPath = m_tempDestDir + m_imageDir + iconFileName; if (!icon.save(destPath, imageFormat.ascii(), 85)) { - logWarning(i18n("Could not save icon for image '%1' to '%2'").arg(path).arg(destPath)); + logWarning(i18n("Could not save icon for image '%1' to '%2'").tqarg(path).tqarg(destPath)); } else { - //logInfo(i18n("Creation of icon '%1'").arg(iconFileName)); + //logInfo(i18n("Creation of icon '%1'").tqarg(iconFileName)); // style et icon - QDomElement kmlStyle = addKmlElement(kmlPlacemark, "Style"); - QDomElement kmlIconStyle = addKmlElement(kmlStyle, "IconStyle"); - QDomElement kmlIcon = addKmlElement(kmlIconStyle, "Icon"); + TQDomElement kmlStyle = addKmlElement(kmlPlacemark, "Style"); + TQDomElement kmlIconStyle = addKmlElement(kmlStyle, "IconStyle"); + TQDomElement kmlIcon = addKmlElement(kmlIconStyle, "Icon"); if (m_optimize_googlemap) { addKmlTextElement(kmlIcon, "href", m_UrlDestDir + m_imageDir + iconFileName); @@ -325,16 +325,16 @@ void kmlExport::generateImagesthumb(KIPI::Interface* interface, const KURL& imag { addKmlTextElement(kmlIcon, "href", m_imageDir + iconFileName); } - QDomElement kmlBallonStyle = addKmlElement(kmlStyle, "BalloonStyle"); + TQDomElement kmlBallonStyle = addKmlElement(kmlStyle, "BalloonStyle"); addKmlTextElement(kmlBallonStyle, "text", "$[description]"); } } } /*! -\fn kmlExport::addTrack(QDomElement &kmlAlbum) +\fn kmlExport::addTrack(TQDomElement &kmlAlbum) */ -void kmlExport::addTrack(QDomElement &kmlAlbum) +void kmlExport::addTrack(TQDomElement &kmlAlbum) { if( m_GPXFile.isEmpty() ) { @@ -347,28 +347,28 @@ void kmlExport::addTrack(QDomElement &kmlAlbum) if (!ret) { - logError(i18n("Cannot parse %1 GPX file!").arg(m_GPXFile)); + logError(i18n("Cannot parse %1 GPX file!").tqarg(m_GPXFile)); return; } if (m_gpxParser.numPoints() <= 0) { logError(i18n("The %1 GPX file do not have a date-time track to use!") - .arg(m_GPXFile)); + .tqarg(m_GPXFile)); return; } // create a folder that will contain tracks and points - QDomElement kmlFolder = addKmlElement(kmlAlbum, "Folder"); + TQDomElement kmlFolder = addKmlElement(kmlAlbum, "Folder"); addKmlTextElement(kmlFolder, "name", i18n("Tracks")); if (!m_optimize_googlemap) { // style of points and track - QDomElement kmlTrackStyle = addKmlElement(kmlAlbum, "Style"); + TQDomElement kmlTrackStyle = addKmlElement(kmlAlbum, "Style"); kmlTrackStyle.setAttribute("id","track"); - QDomElement kmlIconStyle = addKmlElement(kmlTrackStyle, "IconStyle"); - QDomElement kmlIcon = addKmlElement(kmlIconStyle, "Icon"); + TQDomElement kmlIconStyle = addKmlElement(kmlTrackStyle, "IconStyle"); + TQDomElement kmlIcon = addKmlElement(kmlIconStyle, "Icon"); //! FIXME is there a way to be sure of the location of the icon? addKmlTextElement(kmlIcon, "href", "http://maps.google.com/mapfiles/kml/pal4/icon60.png"); @@ -376,17 +376,17 @@ void kmlExport::addTrack(QDomElement &kmlAlbum) } // linetrack style - QDomElement kmlLineTrackStyle = addKmlElement(kmlAlbum, "Style"); + TQDomElement kmlLineTrackStyle = addKmlElement(kmlAlbum, "Style"); kmlLineTrackStyle.setAttribute("id","linetrack"); - QDomElement kmlLineStyle = addKmlElement(kmlLineTrackStyle, "LineStyle"); + TQDomElement kmlLineStyle = addKmlElement(kmlLineTrackStyle, "LineStyle"); // the KML color is not #RRGGBB but AABBGGRR - QString KMLColorValue = QString("%1%2%3%4") - .arg((int)m_GPXOpacity*256/100, 2, 16) - .arg((&m_GPXColor)->blue(), 2, 16) - .arg((&m_GPXColor)->green(), 2, 16) - .arg((&m_GPXColor)->red(), 2, 16); + TQString KMLColorValue = TQString("%1%2%3%4") + .tqarg((int)m_GPXOpacity*256/100, 2, 16) + .tqarg((&m_GPXColor)->blue(), 2, 16) + .tqarg((&m_GPXColor)->green(), 2, 16) + .tqarg((&m_GPXColor)->red(), 2, 16); addKmlTextElement(kmlLineStyle, "color", KMLColorValue); - addKmlTextElement(kmlLineStyle, "width", QString("%1").arg(m_LineWidth) ); + addKmlTextElement(kmlLineStyle, "width", TQString("%1").tqarg(m_LineWidth) ); m_gpxParser.CreateTrackLine(kmlAlbum, *kmlDocument, m_GPXAltitudeMode); } @@ -403,16 +403,16 @@ void kmlExport::generate() KIPI::ImageCollection selection = m_interface->currentSelection(); KIPI::ImageCollection album = m_interface->currentAlbum(); // create the document, and it's root - kmlDocument = new QDomDocument(""); - QDomImplementation impl; - QDomProcessingInstruction instr = kmlDocument->createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\""); + kmlDocument = new TQDomDocument(""); + TQDomImplementation impl; + TQDomProcessingInstruction instr = kmlDocument->createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\""); kmlDocument->appendChild(instr); - QDomElement kmlRoot = kmlDocument->createElementNS( "http://earth.google.com/kml/2.1","kml"); + TQDomElement kmlRoot = kmlDocument->createElementNS( "http://earth.google.com/kml/2.1","kml"); kmlDocument->appendChild( kmlRoot ); - QDomElement kmlAlbum = addKmlElement( kmlRoot, "Document"); - QDomElement kmlName= addKmlTextElement( kmlAlbum, "name", album.name()); - QDomElement kmlDescription = addKmlHtmlElement( kmlAlbum, "description", "Created with kmlexport <a href=\"http://www.kipi-plugins.org/\">kipi-plugin</a>"); + TQDomElement kmlAlbum = addKmlElement( kmlRoot, "Document"); + TQDomElement kmlName= addKmlTextElement( kmlAlbum, "name", album.name()); + TQDomElement kmlDescription = addKmlHtmlElement( kmlAlbum, "description", "Created with kmlexport <a href=\"http://www.kipi-plugins.org/\">kipi-plugin</a>"); if (m_GPXtracks) { @@ -440,26 +440,26 @@ void kmlExport::generate() } else { - logWarning(i18n("No position data for '%1'").arg(info.title())); + logWarning(i18n("No position data for '%1'").tqarg(info.title())); defectImage++; } m_progressDialog->setProgress(pos, count); - qApp->processEvents(); + tqApp->processEvents(); } if (defectImage) { /** @todo if defectImage==count there are no pictures exported, does it worst to continue? */ - QWidget* parent = KApplication::kApplication()->mainWidget(); - KMessageBox::information(parent, i18n("No position data for 1 picture", + TQWidget* tqparent = KApplication::kApplication()->mainWidget(); + KMessageBox::information(tqparent, i18n("No position data for 1 picture", "No position data for %n pictures", defectImage)); } /** @todo change to kml or kmz if compressed */ - QFile file( m_tempDestDir + m_KMLFileName + ".kml"); + TQFile file( m_tempDestDir + m_KMLFileName + ".kml"); /** @todo handle file opening problems */ file.open( IO_WriteOnly ); - QTextStream stream( &file ); // we will serialize the data into the file + TQTextStream stream( &file ); // we will serialize the data into the file stream << kmlDocument->toString(); file.close(); @@ -498,23 +498,23 @@ int kmlExport::getConfig() m_GPXAltitudeMode = config.readNumEntry("GPX Altitude Mode", 0); KStandardDirs dir; - m_tempDestDir = dir.saveLocation("tmp", "kipi-kmlrexportplugin-" + QString::number(getpid()) + '/'); + m_tempDestDir = dir.saveLocation("tmp", "kipi-kmlrexportplugin-" + TQString::number(getpid()) + '/'); m_imageDir = "images/"; m_googlemapSize = 32; return 1; } -void kmlExport::logInfo(const QString& msg) +void kmlExport::logInfo(const TQString& msg) { m_progressDialog->addedAction(msg, KIPI::ProgressMessage); } -void kmlExport::logError(const QString& msg) +void kmlExport::logError(const TQString& msg) { m_progressDialog->addedAction(msg, KIPI::ErrorMessage); } -void kmlExport::logWarning(const QString& msg) +void kmlExport::logWarning(const TQString& msg) { m_progressDialog->addedAction(msg, KIPI::WarningMessage); // mWarnings=true; diff --git a/kipi-plugins/gpssync/kmlexport.h b/kipi-plugins/gpssync/kmlexport.h index 0dc32f2..2ef558d 100644 --- a/kipi-plugins/gpssync/kmlexport.h +++ b/kipi-plugins/gpssync/kmlexport.h @@ -23,17 +23,17 @@ #ifndef KIPIKMLEXPORTKMLEXPORT_H #define KIPIKMLEXPORTKMLEXPORT_H -// Qt includes. +// TQt includes. -#include <qcolor.h> -#include <qdir.h> -#include <qdom.h> +#include <tqcolor.h> +#include <tqdir.h> +#include <tqdom.h> // Local includes. #include "kmlgpsdataparser.h" -class QImage; +class TQImage; namespace KIPI { @@ -57,14 +57,14 @@ public: kmlExport(KIPI::Interface* interface); ~kmlExport(); - bool createDir(QDir dir); + bool createDir(TQDir dir); /*! generate the kml element for pictures with tumbnails * @param interface the kipi interface * @param KURL the URL of the picture * @param kmlAlbum the album used */ - void generateImagesthumb(KIPI::Interface* interface, const KURL&, QDomElement &kmlAlbum); + void generateImagesthumb(KIPI::Interface* interface, const KURL&, TQDomElement &kmlAlbum); /*! Produce a web-friendly file name * otherwise, while google earth works fine, maps.google.com may not find pictures and thumbnail @@ -72,14 +72,14 @@ public: * @param the filename * @return the webifyed filename */ - QString webifyFileName(const QString &fileName); + TQString webifyFileName(const TQString &fileName); /*! Generate a square thumbnail from @fullImage of @size x @size pixels * @param fullImage the original image * @param size the size of the thumbnail * @return the thumbnail */ - QImage generateSquareThumbnail(const QImage& fullImage, int size); + TQImage generateSquareThumbnail(const TQImage& fullImage, int size); /*! Generate a square thumbnail from @fullImage of @size x @size pixels * with a white border @@ -87,8 +87,8 @@ public: * @param size the size of the thumbnail * @return the thumbnail */ - QImage generateBorderedThumbnail(const QImage& fullImage, int size); - void addTrack(QDomElement &kmlAlbum); + TQImage generateBorderedThumbnail(const TQImage& fullImage, int size); + void addTrack(TQDomElement &kmlAlbum); void generate(); int getConfig(); @@ -108,27 +108,27 @@ public: int m_GPXAltitudeMode; /** directory used in kmldocument structure */ - QString m_imageDir; - QString m_GPXFile; - QString m_UrlDestDir; + TQString m_imageDir; + TQString m_GPXFile; + TQString m_UrlDestDir; /** temporary directory where everything will be created */ - QString m_tempDestDir; + TQString m_tempDestDir; /** directory selected by user*/ - QString m_baseDestDir; + TQString m_baseDestDir; - QString m_imgdir; - QString m_KMLFileName; + TQString m_imgdir; + TQString m_KMLFileName; - QColor m_GPXColor; + TQColor m_GPXColor; KIPI::Interface *m_interface; private: - /*! the root document, used to create all QDomElements */ - QDomDocument *kmlDocument; + /*! the root document, used to create all TQDomElements */ + TQDomDocument *kmlDocument; /*! the GPS parsed data */ KMLGPSDataParser m_gpxParser; @@ -137,54 +137,54 @@ private: private: - void logInfo(const QString& msg); - void logError(const QString& msg); - void logWarning(const QString& msg); + void logInfo(const TQString& msg); + void logError(const TQString& msg); + void logWarning(const TQString& msg); /*! - * \fn KIPIKMLExport::kmlExport::addKmlElement(QDomElement target, QString tag) + * \fn KIPIKMLExport::kmlExport::addKmlElement(TQDomElement target, TQString tag) * Add a new element - * @param target the parent element to which add the element + * @param target the tqparent element to which add the element * @param tag the new element name * @return the New element */ - QDomElement addKmlElement(QDomElement &target, QString tag) + TQDomElement addKmlElement(TQDomElement &target, TQString tag) { - QDomElement kmlElement = kmlDocument->createElement( tag ); + TQDomElement kmlElement = kmlDocument->createElement( tag ); target.appendChild( kmlElement ); return kmlElement; } /*! - * \fn KIPIKMLExport::kmlExport::addKmlTextElement(QDomElement target, QString tag, QString text) + * \fn KIPIKMLExport::kmlExport::addKmlTextElement(TQDomElement target, TQString tag, TQString text) * Add a new element with a text - * @param target the parent element to which add the element + * @param target the tqparent element to which add the element * @param tag the new element name * @param text the text content of the new element * @return the New element */ - QDomElement addKmlTextElement(QDomElement &target, QString tag, QString text) + TQDomElement addKmlTextElement(TQDomElement &target, TQString tag, TQString text) { - QDomElement kmlElement = kmlDocument->createElement( tag ); + TQDomElement kmlElement = kmlDocument->createElement( tag ); target.appendChild( kmlElement ); - QDomText kmlTextElement = kmlDocument->createTextNode( text ); + TQDomText kmlTextElement = kmlDocument->createTextNode( text ); kmlElement.appendChild( kmlTextElement ); return kmlElement; } /*! - * \fn KIPIKMLExport::kmlExport::addKmlHtmlElement(QDomElement target, QString tag, QString text) + * \fn KIPIKMLExport::kmlExport::addKmlHtmlElement(TQDomElement target, TQString tag, TQString text) * Add a new element with html content (html entities are escaped and text is wrapped in a CDATA section) - * @param target the parent element to which add the element + * @param target the tqparent element to which add the element * @param tag the new element name * @param text the HTML content of the new element * @return the New element */ - QDomElement addKmlHtmlElement(QDomElement &target, QString tag, QString text) + TQDomElement addKmlHtmlElement(TQDomElement &target, TQString tag, TQString text) { - QDomElement kmlElement = kmlDocument->createElement( tag ); + TQDomElement kmlElement = kmlDocument->createElement( tag ); target.appendChild( kmlElement ); - QDomText kmlTextElement = kmlDocument->createCDATASection( text ); + TQDomText kmlTextElement = kmlDocument->createCDATASection( text ); kmlElement.appendChild( kmlTextElement ); return kmlElement; } diff --git a/kipi-plugins/gpssync/kmlexportconfig.cpp b/kipi-plugins/gpssync/kmlexportconfig.cpp index 7e991ef..f885f77 100644 --- a/kipi-plugins/gpssync/kmlexportconfig.cpp +++ b/kipi-plugins/gpssync/kmlexportconfig.cpp @@ -20,19 +20,19 @@ * * ============================================================ */ -// Qt includes. - -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +// TQt includes. + +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> // KDE includes. @@ -59,53 +59,53 @@ namespace KIPIGPSSyncPlugin { /* - * Constructs a KIPIKMLExport::KMLExportConfig which is a child of 'parent', with the + * Constructs a KIPIKMLExport::KMLExportConfig which is a child of 'tqparent', with the * name 'name'.' */ -KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) +KMLExportConfig::KMLExportConfig( TQWidget* tqparent, const char* name) : KDialogBase(Plain, i18n("KML Export"), Help|Ok|Cancel, Ok, - parent, 0, true, false) + tqparent, 0, true, false) { if ( !name ) setName( "KMLExportConfig" ); - setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, - (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) ); - KMLExportConfigLayout = new QGridLayout ( plainPage(), 1, 3, 0, spacingHint()); + tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, + (TQSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) ); + KMLExportConfigLayout = new TQGridLayout ( plainPage(), 1, 3, 0, spacingHint()); // -------------------------------------------------------------- // Target preferences - TargetPreferenceGroupBox = new QGroupBox(0, Qt::Vertical, i18n( "Target Preferences" ), plainPage()); - TargetPreferenceGroupBoxLayout = new QGridLayout( TargetPreferenceGroupBox->layout(), 6, 5, KDialog::spacingHint()); - TargetPreferenceGroupBoxLayout->setAlignment( Qt::AlignTop ); + TargetPreferenceGroupBox = new TQGroupBox(0, Qt::Vertical, i18n( "Target Preferences" ), plainPage()); + TargetPreferenceGroupBoxLayout = new TQGridLayout( TargetPreferenceGroupBox->tqlayout(), 6, 5, KDialog::spacingHint()); + TargetPreferenceGroupBoxLayout->tqsetAlignment( TQt::AlignTop ); // target type - buttonGroupTargetType = new QButtonGroup(0, Qt::Vertical, i18n( "Target Type" ), TargetPreferenceGroupBox, "buttonGroupTargetType" ); - buttonGroupTargetTypeLayout = new QGridLayout( buttonGroupTargetType->layout(), 2, 1, KDialog::spacingHint() ); - buttonGroupTargetTypeLayout->setAlignment( Qt::AlignTop ); + buttonGroupTargetType = new TQButtonGroup(0, Qt::Vertical, i18n( "Target Type" ), TargetPreferenceGroupBox, "buttonGroupTargetType" ); + buttonGroupTargetTypeLayout = new TQGridLayout( buttonGroupTargetType->tqlayout(), 2, 1, KDialog::spacingHint() ); + buttonGroupTargetTypeLayout->tqsetAlignment( TQt::AlignTop ); - LocalTargetRadioButton_ = new QRadioButton( i18n( "&Local or web target used by GoogleEarth" ), + LocalTargetRadioButton_ = new TQRadioButton( i18n( "&Local or web target used by GoogleEarth" ), buttonGroupTargetType, "LocalTargetRadioButton_" ); LocalTargetRadioButton_->setChecked( true ); buttonGroupTargetTypeLayout->addWidget( LocalTargetRadioButton_, 0, 0 ); - GoogleMapTargetRadioButton_ = new QRadioButton( i18n( "Web target used by GoogleMap" ), + GoogleMapTargetRadioButton_ = new TQRadioButton( i18n( "Web target used by GoogleMap" ), buttonGroupTargetType, "GoogleMapTargetRadioButton_" ); buttonGroupTargetTypeLayout->addWidget( GoogleMapTargetRadioButton_, 1, 0 ); - QToolTip::add( GoogleMapTargetRadioButton_, i18n( + TQToolTip::add( GoogleMapTargetRadioButton_, i18n( "When using GoogleMap, all image must have complete URL, icons are squared and when drawing a track, only linetrack is exported" ) ); // -------------------------------------------------------------- // target preference, suite TargetPreferenceGroupBoxLayout->addMultiCellWidget( buttonGroupTargetType, 0, 1, 0, 4 ); - QLabel *AltitudeLabel_ = new QLabel(i18n("Picture altitude" ), + TQLabel *AltitudeLabel_ = new TQLabel(i18n("Picture altitude" ), TargetPreferenceGroupBox, "AltitudeLabel_"); TargetPreferenceGroupBoxLayout->addMultiCellWidget( AltitudeLabel_, 2, 2, 0, 4 ); - AltitudeCB_ = new QComboBox( false, TargetPreferenceGroupBox ); + AltitudeCB_ = new TQComboBox( false, TargetPreferenceGroupBox ); AltitudeCB_->insertItem(i18n("clamp to ground")); AltitudeCB_->insertItem(i18n("relative to ground")); AltitudeCB_->insertItem(i18n("absolute")); - QWhatsThis::add(AltitudeCB_, i18n("<p>Specifies how pictures are displayed" + TQWhatsThis::add(AltitudeCB_, i18n("<p>Specifies how pictures are displayed" "<dl><dt>clamp to ground (default)</dt>" "<dd>Indicates to ignore an altitude specification</dd>" "<dt>relative to ground</dt>" @@ -116,40 +116,40 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) "of the actual elevation of the terrain beneath the element.</dd></dl>")); TargetPreferenceGroupBoxLayout->addMultiCellWidget( AltitudeCB_, 2, 2, 2, 4 ); - destinationDirectoryLabel_ = new QLabel( i18n( "Destination directory" ), + destinationDirectoryLabel_ = new TQLabel( i18n( "Destination directory" ), TargetPreferenceGroupBox, "destinationDirectoryLabel_" ); TargetPreferenceGroupBoxLayout->addMultiCellWidget( destinationDirectoryLabel_, 3, 3, 0, 2 ); - // DestinationDirectory_ = new QLineEdit( TargetPreferenceGroupBox, "DestinationDirectory_" ); + // DestinationDirectory_ = new TQLineEdit( TargetPreferenceGroupBox, "DestinationDirectory_" ); DestinationDirectory_= new KURLRequester( TargetPreferenceGroupBox, "DestinationDirectory_"); DestinationDirectory_->setCaption(i18n("Select a directory to save the kml file and pictures")); DestinationDirectory_->setMode(KFile::Directory | KFile::LocalOnly ); TargetPreferenceGroupBoxLayout->addMultiCellWidget( DestinationDirectory_, 3, 3, 3, 4 ); - DestinationUrlLabel_ = new QLabel( i18n( "Destination URL" ), + DestinationUrlLabel_ = new TQLabel( i18n( "Destination URL" ), TargetPreferenceGroupBox, "DestinationUrlLabel_" ); TargetPreferenceGroupBoxLayout->addMultiCellWidget( DestinationUrlLabel_, 4, 4, 0, 1 ); - DestinationURL_ = new QLineEdit( TargetPreferenceGroupBox, "DestinationURL_" ); + DestinationURL_ = new TQLineEdit( TargetPreferenceGroupBox, "DestinationURL_" ); TargetPreferenceGroupBoxLayout->addMultiCellWidget( DestinationURL_, 4, 4, 2, 4 ); - FileNameLabel_ = new QLabel( i18n( "File name" ), + FileNameLabel_ = new TQLabel( i18n( "File name" ), TargetPreferenceGroupBox, "FileNameLabel_" ); TargetPreferenceGroupBoxLayout->addWidget( FileNameLabel_, 5, 0 ); - FileName_ = new QLineEdit( TargetPreferenceGroupBox, "FileName_" ); + FileName_ = new TQLineEdit( TargetPreferenceGroupBox, "FileName_" ); TargetPreferenceGroupBoxLayout->addMultiCellWidget( FileName_, 5, 5, 1, 4 ); KMLExportConfigLayout->addWidget( TargetPreferenceGroupBox, 0, 0 ); // -------------------------------------------------------------- // Sizes - QGroupBox *SizeGroupBox = new QGroupBox(0, Qt::Vertical, i18n( "Sizes" ), plainPage() ); + TQGroupBox *SizeGroupBox = new TQGroupBox(0, Qt::Vertical, i18n( "Sizes" ), plainPage() ); SizeGroupBox->setColumnLayout(0, Qt::Vertical ); - SizeGroupBoxLayout = new QGridLayout( SizeGroupBox->layout(), 2, 3, KDialog::spacingHint() ); - SizeGroupBoxLayout->setAlignment( Qt::AlignTop ); + SizeGroupBoxLayout = new TQGridLayout( SizeGroupBox->tqlayout(), 2, 3, KDialog::spacingHint() ); + SizeGroupBoxLayout->tqsetAlignment( TQt::AlignTop ); - IconSizeLabel = new QLabel( i18n( "Icon size" ), + IconSizeLabel = new TQLabel( i18n( "Icon size" ), SizeGroupBox, "IconSizeLabel" ); SizeGroupBoxLayout->addWidget( IconSizeLabel, 0, 0 ); @@ -157,10 +157,10 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) IconSizeInput_->setValue( 33 ); SizeGroupBoxLayout->addWidget( IconSizeInput_, 0, 1 ); - spacer3 = new QSpacerItem( 191, 21, QSizePolicy::Expanding, QSizePolicy::Minimum ); + spacer3 = new TQSpacerItem( 191, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); SizeGroupBoxLayout->addItem( spacer3, 0, 2 ); - ImageSizeLabel = new QLabel( i18n( "Image size" ), + ImageSizeLabel = new TQLabel( i18n( "Image size" ), SizeGroupBox, "ImageSizeLabel" ); SizeGroupBoxLayout->addWidget( ImageSizeLabel, 1, 0 ); @@ -168,35 +168,35 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) ImageSizeInput_->setValue( 320 ); SizeGroupBoxLayout->addWidget( ImageSizeInput_, 1, 1 ); - spacer4 = new QSpacerItem( 191, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + spacer4 = new TQSpacerItem( 191, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); SizeGroupBoxLayout->addItem( spacer4, 1, 2 ); KMLExportConfigLayout->addWidget( SizeGroupBox, 1, 0 ); // -------------------------------------------------------------- // GPX Tracks - QGroupBox *GPXTracksGroupBox = new QGroupBox(0, Qt::Vertical, i18n( "GPX Tracks" ), plainPage()); - QGridLayout *GPXTracksGroupBoxLayout = new QGridLayout(GPXTracksGroupBox->layout(), 5, 4, + TQGroupBox *GPXTracksGroupBox = new TQGroupBox(0, Qt::Vertical, i18n( "GPX Tracks" ), plainPage()); + TQGridLayout *GPXTracksGroupBoxLayout = new TQGridLayout(GPXTracksGroupBox->tqlayout(), 5, 4, KDialog::spacingHint()); - GPXTracksGroupBoxLayout->setAlignment( Qt::AlignTop ); + GPXTracksGroupBoxLayout->tqsetAlignment( TQt::AlignTop ); // add a gpx track checkbox - GPXTracksCheckBox_ = new QCheckBox( i18n( "Draw GPX track" ), GPXTracksGroupBox, "GPXTracksCheckBox"); + GPXTracksCheckBox_ = new TQCheckBox( i18n( "Draw GPX track" ), GPXTracksGroupBox, "GPXTracksCheckBox"); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXTracksCheckBox_, 0, 0, 0, 3); // file selector - GPXFileLabel_ = new QLabel( i18n( "GPX file" ), + GPXFileLabel_ = new TQLabel( i18n( "GPX file" ), GPXTracksGroupBox, "GPXFileLabel_" ); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXFileLabel_, 1, 1, 0, 0); GPXFileKURLRequester_ = new KURLRequester( GPXTracksGroupBox, "GPXFileKURLRequester" ); - GPXFileKURLRequester_->setFilter(i18n("%1|GPS Exchange Format").arg("*.gpx")); + GPXFileKURLRequester_->setFilter(i18n("%1|GPS Exchange Format").tqarg("*.gpx")); GPXFileKURLRequester_->setCaption(i18n("Select GPX File to Load")); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXFileKURLRequester_, 1, 1, 1, 3); - timeZoneLabel_ = new QLabel(i18n("Time zone"), GPXTracksGroupBox); + timeZoneLabel_ = new TQLabel(i18n("Time zone"), GPXTracksGroupBox); GPXTracksGroupBoxLayout->addMultiCellWidget( timeZoneLabel_, 2, 2, 0, 0); - timeZoneCB = new QComboBox( false, GPXTracksGroupBox ); + timeZoneCB = new TQComboBox( false, GPXTracksGroupBox ); timeZoneCB->insertItem(i18n("GMT-12:00"), 0); timeZoneCB->insertItem(i18n("GMT-11:00"), 1); timeZoneCB->insertItem(i18n("GMT-10:00"), 2); @@ -224,39 +224,39 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) timeZoneCB->insertItem(i18n("GMT+12:00"), 24); timeZoneCB->insertItem(i18n("GMT+13:00"), 25); timeZoneCB->insertItem(i18n("GMT+14:00"), 26); - QWhatsThis::add(timeZoneCB, i18n("<p>Sets the time zone of the camera during " + TQWhatsThis::add(timeZoneCB, i18n("<p>Sets the time zone of the camera during " "picture shooting, so that the time stamps of the GPS " "can be converted to match the local time")); GPXTracksGroupBoxLayout->addMultiCellWidget( timeZoneCB, 2, 2, 1, 3); - GPXLineWidthLabel_ = new QLabel( i18n( "Track width" ), + GPXLineWidthLabel_ = new TQLabel( i18n( "Track width" ), GPXTracksGroupBox, "GPXLineWidthLabel_" ); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXLineWidthLabel_, 3, 3, 0, 0); GPXLineWidthInput_ = new KIntNumInput( GPXTracksGroupBox, "GPXLineWidthInput_" ); GPXLineWidthInput_->setValue( 4 ); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXLineWidthInput_, 3, 3, 1, 3); - GPXColorLabel_ = new QLabel( i18n( "Track color" ), + GPXColorLabel_ = new TQLabel( i18n( "Track color" ), GPXTracksGroupBox, "GPXColorLabel_" ); GPXTracksGroupBoxLayout->addWidget( GPXColorLabel_, 4, 0 ); - GPXTrackColor_ = new KColorButton(QColor("#ffffff"), GPXTracksGroupBox); + GPXTrackColor_ = new KColorButton(TQColor("#ffffff"), GPXTracksGroupBox); GPXTracksGroupBoxLayout->addWidget( GPXTrackColor_, 4, 1 ); GPXTracksOpacityInput_ = new KIntNumInput( GPXTracksGroupBox , "GPXTracksOpacityInput_" ); GPXTracksOpacityInput_->setRange( 0, 100, 1, false ); GPXTracksOpacityInput_->setValue( 100 ); GPXTracksOpacityInput_->setLabel( i18n( "Opacity:" ), AlignVCenter); - GPXTracksOpacityInput_->setSuffix( QString::fromAscii( "%" ) ); + GPXTracksOpacityInput_->setSuffix( TQString::fromAscii( "%" ) ); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXTracksOpacityInput_, 4, 4, 2, 3); - GPXAltitudeLabel_ = new QLabel( i18n( "Track altitude" ), + GPXAltitudeLabel_ = new TQLabel( i18n( "Track altitude" ), GPXTracksGroupBox, "GPXAltitudeLabel_" ); GPXTracksGroupBoxLayout->addMultiCellWidget( GPXAltitudeLabel_, 5, 5, 0, 0); - GPXAltitudeCB_ = new QComboBox( false, GPXTracksGroupBox ); + GPXAltitudeCB_ = new TQComboBox( false, GPXTracksGroupBox ); GPXAltitudeCB_->insertItem(i18n("clamp to ground")); GPXAltitudeCB_->insertItem(i18n("relative to ground")); GPXAltitudeCB_->insertItem(i18n("absolute")); - QWhatsThis::add(GPXAltitudeCB_, i18n("<p>Specifies how the points are displayed" + TQWhatsThis::add(GPXAltitudeCB_, i18n("<p>Specifies how the points are displayed" "<dl><dt>clamp to ground (default)</dt>" "<dd>Indicates to ignore an altitude specification</dd>" "<dt>relative to ground</dt>" @@ -270,11 +270,11 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) KMLExportConfigLayout->addWidget( GPXTracksGroupBox, 2, 0 ); - connect( GoogleMapTargetRadioButton_, SIGNAL( toggled(bool) ), - this, SLOT( GoogleMapTargetRadioButton__toggled(bool) ) ); + connect( GoogleMapTargetRadioButton_, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( GoogleMapTargetRadioButton__toggled(bool) ) ); - connect( GPXTracksCheckBox_, SIGNAL( toggled(bool) ), - this, SLOT( KMLTracksCheckButton__toggled(bool) ) ); + connect( GPXTracksCheckBox_, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( KMLTracksCheckButton__toggled(bool) ) ); // -------------------------------------------------------------- // About data and help button. @@ -289,7 +289,7 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // -------------------------------------------------------------- @@ -311,7 +311,7 @@ KMLExportConfig::KMLExportConfig( QWidget* parent, const char* name) */ KMLExportConfig::~KMLExportConfig() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us if(config_) delete config_; delete m_about; @@ -389,13 +389,13 @@ void KMLExportConfig::saveSettings() config_->writeEntry("optimize_googlemap", GoogleMapTargetRadioButton_->isChecked()); config_->writeEntry("iconSize", IconSizeInput_->value()); config_->writeEntry("size", ImageSizeInput_->value()); - QString destination = DestinationDirectory_->url(); + TQString destination = DestinationDirectory_->url(); if (!destination.endsWith("/")) { destination.append("/"); } config_->writeEntry("baseDestDir",destination); - QString url = DestinationURL_->text(); + TQString url = DestinationURL_->text(); if (!url.endsWith("/")) { url.append("/"); @@ -409,7 +409,7 @@ void KMLExportConfig::saveSettings() config_->writeEntry("GPXFile", GPXFileKURLRequester_->lineEdit()->originalText()); config_->writeEntry("Time Zone", timeZoneCB->currentItem() ); config_->writeEntry("Line Width", GPXLineWidthInput_->value()); - config_->writeEntry("Track Color", GPXTrackColor_->color().name () ); + config_->writeEntry("Track Color", TQString(GPXTrackColor_->color().name()) ); config_->writeEntry("Track Opacity", GPXTracksOpacityInput_->value() ); config_->writeEntry("GPX Altitude Mode", GPXAltitudeCB_->currentItem() ); @@ -423,16 +423,16 @@ void KMLExportConfig::readSettings() int iconSize; // int googlemapSize; int size; - QString UrlDestDir; - QString baseDestDir; - QString KMLFileName; + TQString UrlDestDir; + TQString baseDestDir; + TQString KMLFileName; int AltitudeMode; bool GPXtracks; - QString GPXFile; + TQString GPXFile; int TimeZone; int LineWidth; - QString GPXColor; + TQString GPXColor; int GPXOpacity; int GPXAltitudeMode; diff --git a/kipi-plugins/gpssync/kmlexportconfig.h b/kipi-plugins/gpssync/kmlexportconfig.h index 54841b7..3d2f7a8 100644 --- a/kipi-plugins/gpssync/kmlexportconfig.h +++ b/kipi-plugins/gpssync/kmlexportconfig.h @@ -27,15 +27,15 @@ #include <kdialogbase.h> -class QButtonGroup; -class QCheckBox; -class QComboBox; -class QGridLayout; -class QGroupBox; -class QLabel; -class QLineEdit; -class QRadioButton; -class QSpacerItem; +class TQButtonGroup; +class TQCheckBox; +class TQComboBox; +class TQGridLayout; +class TQGroupBox; +class TQLabel; +class TQLineEdit; +class TQRadioButton; +class TQSpacerItem; class KColorButton; class KIntNumInput; @@ -52,41 +52,42 @@ namespace KIPIGPSSyncPlugin class KMLExportConfig : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit KMLExportConfig( QWidget* parent = 0, const char* name = 0); + explicit KMLExportConfig( TQWidget* tqparent = 0, const char* name = 0); ~KMLExportConfig(); public: - QLabel *ImageSizeLabel; - QLabel *IconSizeLabel; - QLabel *destinationDirectoryLabel_; - QLabel *FileNameLabel_; - QLabel *DestinationUrlLabel_; - QLabel *GPXFileLabel_; - QLabel *timeZoneLabel_; - QLabel *GPXLineWidthLabel_; - QLabel *GPXColorLabel_; - QLabel *GPXTracksOpacityLabel_; - QLabel *GPXAltitudeLabel_; + TQLabel *ImageSizeLabel; + TQLabel *IconSizeLabel; + TQLabel *destinationDirectoryLabel_; + TQLabel *FileNameLabel_; + TQLabel *DestinationUrlLabel_; + TQLabel *GPXFileLabel_; + TQLabel *timeZoneLabel_; + TQLabel *GPXLineWidthLabel_; + TQLabel *GPXColorLabel_; + TQLabel *GPXTracksOpacityLabel_; + TQLabel *GPXAltitudeLabel_; - QGroupBox *TargetPreferenceGroupBox; + TQGroupBox *TargetPreferenceGroupBox; - QButtonGroup *buttonGroupTargetType; + TQButtonGroup *buttonGroupTargetType; - QRadioButton *LocalTargetRadioButton_; - QRadioButton *GoogleMapTargetRadioButton_; + TQRadioButton *LocalTargetRadioButton_; + TQRadioButton *GoogleMapTargetRadioButton_; - QLineEdit *DestinationURL_; - QLineEdit *FileName_; + TQLineEdit *DestinationURL_; + TQLineEdit *FileName_; - QCheckBox *GPXTracksCheckBox_; + TQCheckBox *GPXTracksCheckBox_; - QComboBox *AltitudeCB_; - QComboBox *timeZoneCB; - QComboBox *GPXAltitudeCB_; + TQComboBox *AltitudeCB_; + TQComboBox *timeZoneCB; + TQComboBox *GPXAltitudeCB_; KColorButton *GPXTrackColor_; @@ -109,13 +110,13 @@ signals: protected: - QSpacerItem *spacer3; - QSpacerItem *spacer4; + TQSpacerItem *spacer3; + TQSpacerItem *spacer4; - QGridLayout *KMLExportConfigLayout; - QGridLayout *SizeGroupBoxLayout; - QGridLayout *TargetPreferenceGroupBoxLayout; - QGridLayout *buttonGroupTargetTypeLayout; + TQGridLayout *KMLExportConfigLayout; + TQGridLayout *SizeGroupBoxLayout; + TQGridLayout *TargetPreferenceGroupBoxLayout; + TQGridLayout *buttonGroupTargetTypeLayout; KConfig *config_; diff --git a/kipi-plugins/gpssync/kmlgpsdataparser.cpp b/kipi-plugins/gpssync/kmlgpsdataparser.cpp index 4a796a9..cb3a25d 100644 --- a/kipi-plugins/gpssync/kmlgpsdataparser.cpp +++ b/kipi-plugins/gpssync/kmlgpsdataparser.cpp @@ -41,30 +41,30 @@ KMLGPSDataParser::~KMLGPSDataParser() { } -QString KMLGPSDataParser::lineString() +TQString KMLGPSDataParser::lineString() { - QString line = ""; + TQString line = ""; // cache the end to not recalculate it with large number of points GPSDataMap::ConstIterator end (m_GPSDataMap.constEnd()); for (GPSDataMap::ConstIterator it = m_GPSDataMap.constBegin(); it != end; ++it ) { - line += QString("%1,%2,%3 ").arg(it.data().longitude()).arg(it.data().latitude()).arg(it.data().altitude()); + line += TQString("%1,%2,%3 ").tqarg(it.data().longitude()).tqarg(it.data().latitude()).tqarg(it.data().altitude()); } return line; } /*! -\fn void KIPIGPSSyncPlugin::KMLGPSDataParser::CreateTrackLine(QDomElement &parent, QDomDocument &root, int altitudeMode) +\fn void KIPIGPSSyncPlugin::KMLGPSDataParser::CreateTrackLine(TQDomElement &tqparent, TQDomDocument &root, int altitudeMode) */ -void KIPIGPSSyncPlugin::KMLGPSDataParser::CreateTrackLine(QDomElement &parent, QDomDocument &root, int altitudeMode) +void KIPIGPSSyncPlugin::KMLGPSDataParser::CreateTrackLine(TQDomElement &tqparent, TQDomDocument &root, int altitudeMode) { kmlDocument = &root; // add the linetrack - QDomElement kmlPlacemark = addKmlElement(parent, "Placemark"); + TQDomElement kmlPlacemark = addKmlElement(tqparent, "Placemark"); addKmlTextElement(kmlPlacemark, "name", i18n("Track")); - QDomElement kmlLineString = addKmlElement(kmlPlacemark, "LineString"); + TQDomElement kmlLineString = addKmlElement(kmlPlacemark, "LineString"); addKmlTextElement(kmlLineString, "coordinates", lineString()); addKmlTextElement(kmlPlacemark, "styleUrl", "#linetrack"); if (altitudeMode == 2 ) @@ -82,16 +82,16 @@ void KIPIGPSSyncPlugin::KMLGPSDataParser::CreateTrackLine(QDomElement &parent, Q } /*! -\fn void KIPIGPSSyncPlugin::KMLGPSDataParser::CreateTrackPoints(QDomElement &parent, QDomDocument &root, int timeZone, int altitudeMode) +\fn void KIPIGPSSyncPlugin::KMLGPSDataParser::CreateTrackPoints(TQDomElement &tqparent, TQDomDocument &root, int timeZone, int altitudeMode) */ -void KIPIGPSSyncPlugin::KMLGPSDataParser::CreateTrackPoints(QDomElement &parent, QDomDocument &root, +void KIPIGPSSyncPlugin::KMLGPSDataParser::CreateTrackPoints(TQDomElement &tqparent, TQDomDocument &root, int timeZone, int altitudeMode) { kmlDocument = &root; kdDebug( 51001 ) << "creation d'un trackpoint" << endl; // create the points - QDomElement kmlPointsFolder = addKmlElement(parent, "Folder"); + TQDomElement kmlPointsFolder = addKmlElement(tqparent, "Folder"); addKmlTextElement(kmlPointsFolder, "name", i18n("Points")); addKmlTextElement(kmlPointsFolder, "visibility", "0"); addKmlTextElement(kmlPointsFolder, "open", "0"); @@ -101,27 +101,27 @@ void KIPIGPSSyncPlugin::KMLGPSDataParser::CreateTrackPoints(QDomElement &parent, for (GPSDataMap::ConstIterator it = m_GPSDataMap.constBegin(); it != end; ++it, i++) { - QDomElement kmlPointPlacemark = addKmlElement(kmlPointsFolder, "Placemark"); - addKmlTextElement(kmlPointPlacemark, "name", QString("%1 %2 ").arg(i18n("Point")).arg(i)); + TQDomElement kmlPointPlacemark = addKmlElement(kmlPointsFolder, "Placemark"); + addKmlTextElement(kmlPointPlacemark, "name", TQString("%1 %2 ").tqarg(i18n("Point")).tqarg(i)); addKmlTextElement(kmlPointPlacemark, "styleUrl", "#track"); - QDomElement kmlTimeStamp = addKmlElement(kmlPointPlacemark, "TimeStamp"); + TQDomElement kmlTimeStamp = addKmlElement(kmlPointPlacemark, "TimeStamp"); // GPS device are sync in time by satellite using GMT time. // If the camera time is different than GMT time, we want to // convert the GPS time to localtime of the picture to be display // in the same timeframe - QDateTime GPSLocalizedTime = it.key().addSecs(timeZone*3600); + TQDateTime GPSLocalizedTime = it.key().addSecs(timeZone*3600); addKmlTextElement(kmlTimeStamp, "when", GPSLocalizedTime.toString("yyyy-MM-ddThh:mm:ssZ")); - QDomElement kmlGeometry = addKmlElement(kmlPointPlacemark, "Point"); + TQDomElement kmlGeometry = addKmlElement(kmlPointPlacemark, "Point"); addKmlTextElement(kmlPointPlacemark, "visibility", "0"); if (it.data().latitude()) { addKmlTextElement(kmlGeometry, "coordinates", - QString("%1,%2,%3").arg(it.data().longitude()).arg(it.data().latitude()).arg(it.data().altitude())); + TQString("%1,%2,%3").tqarg(it.data().longitude()).tqarg(it.data().latitude()).tqarg(it.data().altitude())); } else { - addKmlTextElement(kmlGeometry, "coordinates", QString("%1,%2").arg(it.data().longitude()).arg(it.data().latitude())); + addKmlTextElement(kmlGeometry, "coordinates", TQString("%1,%2").tqarg(it.data().longitude()).tqarg(it.data().latitude())); } if (altitudeMode == 2 ) { diff --git a/kipi-plugins/gpssync/kmlgpsdataparser.h b/kipi-plugins/gpssync/kmlgpsdataparser.h index e3e271e..b570274 100644 --- a/kipi-plugins/gpssync/kmlgpsdataparser.h +++ b/kipi-plugins/gpssync/kmlgpsdataparser.h @@ -27,9 +27,9 @@ #include "gpsdataparser.h" -// Qt includes. +// TQt includes. -#include <qdom.h> +#include <tqdom.h> namespace KIPIGPSSyncPlugin { @@ -48,55 +48,55 @@ public: /*! KIPIGPSSyncPlugin::KMLGPSDataParser::lineString() * @return the string containing the time ordered point (lon,lat,alt) */ - QString lineString(); + TQString lineString(); /*! Create a KML Element that will contain the linetrace of the GPS - * @param parent the QDomElement to which the track will be added - * @param root the QDomDocument used to create all elements + * @param tqparent the TQDomElement to which the track will be added + * @param root the TQDomDocument used to create all elements * @param altitudeMode altitude mode of the line and points */ - void CreateTrackLine(QDomElement &parent, QDomDocument &root, int altitudeMode); + void CreateTrackLine(TQDomElement &tqparent, TQDomDocument &root, int altitudeMode); /*! Create a KML Element that will contain the points and of the GPS - * @param parent the QDomElement to which the track will be added - * @param root the QDomDocument used to create all elements + * @param tqparent the TQDomElement to which the track will be added + * @param root the TQDomDocument used to create all elements * @param timeZone the Timezone of the pictures * @param altitudeMode altitude mode of the line and points */ - void CreateTrackPoints(QDomElement &parent, QDomDocument &root, int timeZone, int altitudeMode); + void CreateTrackPoints(TQDomElement &tqparent, TQDomDocument &root, int timeZone, int altitudeMode); private: /*! @todo maybe initialize it in the constructor */ - /*! the root document, used to create all QDomElements */ - QDomDocument *kmlDocument; + /*! the root document, used to create all TQDomElements */ + TQDomDocument *kmlDocument; /*! - \fn QDomElement KIPIGPSSyncPlugin::KMLGPSDataParser::addKmlElement(QDomElement target, QString tag) + \fn TQDomElement KIPIGPSSyncPlugin::KMLGPSDataParser::addKmlElement(TQDomElement target, TQString tag) * Add a new element - * @param target the parent element to which add the element + * @param target the tqparent element to which add the element * @param tag the new element name * @return the New element */ - QDomElement addKmlElement(QDomElement &target, QString tag) + TQDomElement addKmlElement(TQDomElement &target, TQString tag) { - QDomElement kmlElement = kmlDocument->createElement( tag ); + TQDomElement kmlElement = kmlDocument->createElement( tag ); target.appendChild( kmlElement ); return kmlElement; } /*! - \fn QDomElement KIPIGPSSyncPlugin::KMLGPSDataParser::addKmlTextElement(QDomElement target, QString tag, QString text) + \fn TQDomElement KIPIGPSSyncPlugin::KMLGPSDataParser::addKmlTextElement(TQDomElement target, TQString tag, TQString text) * Add a new element with a text - * @param target the parent element to which add the element + * @param target the tqparent element to which add the element * @param tag the new element name * @param text the text content of the new element * @return the New element */ - QDomElement addKmlTextElement(QDomElement &target, QString tag, QString text) + TQDomElement addKmlTextElement(TQDomElement &target, TQString tag, TQString text) { - QDomElement kmlElement = kmlDocument->createElement( tag ); + TQDomElement kmlElement = kmlDocument->createElement( tag ); target.appendChild( kmlElement ); - QDomText kmlTextElement = kmlDocument->createTextNode( text ); + TQDomText kmlTextElement = kmlDocument->createTextNode( text ); kmlElement.appendChild( kmlTextElement ); return kmlElement; } diff --git a/kipi-plugins/gpssync/plugin_gpssync.cpp b/kipi-plugins/gpssync/plugin_gpssync.cpp index 15c7f51..760508b 100644 --- a/kipi-plugins/gpssync/plugin_gpssync.cpp +++ b/kipi-plugins/gpssync/plugin_gpssync.cpp @@ -22,9 +22,9 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qfileinfo.h> +#include <tqfileinfo.h> // KDE includes. @@ -60,13 +60,13 @@ typedef KGenericFactory<Plugin_GPSSync> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_gpssync, Factory("kipiplugin_gpssync")) -Plugin_GPSSync::Plugin_GPSSync(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "GPSSync") +Plugin_GPSSync::Plugin_GPSSync(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "GPSSync") { kdDebug( 51001 ) << "Plugin_GPSSync plugin loaded" << endl; } -void Plugin_GPSSync::setup( QWidget* widget ) +void Plugin_GPSSync::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -79,7 +79,7 @@ void Plugin_GPSSync::setup( QWidget* widget ) "gpsimagetag", 0, this, - SLOT(slotGPSSync()), + TQT_SLOT(slotGPSSync()), actionCollection(), "gpssync")); @@ -87,7 +87,7 @@ void Plugin_GPSSync::setup( QWidget* widget ) 0, 0, this, - SLOT(slotGPSEdit()), + TQT_SLOT(slotGPSEdit()), actionCollection(), "gpsedit")); @@ -95,7 +95,7 @@ void Plugin_GPSSync::setup( QWidget* widget ) 0, 0, this, - SLOT(slotGPSRemove()), + TQT_SLOT(slotGPSRemove()), actionCollection(), "gpsremove")); @@ -106,13 +106,13 @@ void Plugin_GPSSync::setup( QWidget* widget ) "www", // icon 0, // do never set shortcuts from plugins. this, - SLOT(slotKMLExport()), + TQT_SLOT(slotKMLExport()), actionCollection(), "kmlexport"); addAction( m_actionKMLExport ); - m_interface = dynamic_cast< KIPI::Interface* >( parent() ); + m_interface = dynamic_cast< KIPI::Interface* >( tqparent() ); if ( !m_interface ) { @@ -123,11 +123,11 @@ void Plugin_GPSSync::setup( QWidget* widget ) KIPI::ImageCollection selection = m_interface->currentSelection(); m_action_geolocation->setEnabled( selection.isValid() && !selection.images().isEmpty() ); - connect( m_interface, SIGNAL(selectionChanged(bool)), - m_action_geolocation, SLOT(setEnabled(bool))); + connect( m_interface, TQT_SIGNAL(selectionChanged(bool)), + m_action_geolocation, TQT_SLOT(setEnabled(bool))); } -bool Plugin_GPSSync::checkBinaries(QString &gpsBabelVersion) +bool Plugin_GPSSync::checkBinaries(TQString &gpsBabelVersion) { KIPIGPSSyncPlugin::GPSBabelBinary gpsBabelBinary; gpsBabelVersion = gpsBabelBinary.version(); @@ -135,16 +135,16 @@ bool Plugin_GPSSync::checkBinaries(QString &gpsBabelVersion) if (!gpsBabelBinary.isAvailable()) { KMessageBox::information( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("<qt><p>Unable to find the gpsbabel executable:<br> " "This program is required by this plugin to support GPS data file decoding. " "Please install gpsbabel as a package from your distributor " "or <a href=\"%1\">download the source</a>.</p>" "<p>Note: at least, gpsbabel version %2 is required by this plugin.</p></qt>") - .arg("http://www.gpsbabel.org") - .arg(gpsBabelBinary.minimalVersion()), - QString::null, - QString::null, + .tqarg("http://www.gpsbabel.org") + .tqarg(gpsBabelBinary.minimalVersion()), + TQString(), + TQString(), KMessageBox::Notify | KMessageBox::AllowLink); return false; } @@ -152,7 +152,7 @@ bool Plugin_GPSSync::checkBinaries(QString &gpsBabelVersion) if (!gpsBabelBinary.versionIsRight()) { KMessageBox::information( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("<qt><p>gpsbabel executable is not up to date:<br> " "The version %1 of gpsbabel have been found on your computer. " "This version is too old to run properly with this plugin. " @@ -160,11 +160,11 @@ bool Plugin_GPSSync::checkBinaries(QString &gpsBabelVersion) "or <a href=\"%2\">download the source</a>.</p>" "<p>Note: at least, gpsbabel version %3 is required by this " "plugin</p></qt>") - .arg(gpsBabelVersion) - .arg("http://www.gpsbabel.org") - .arg(gpsBabelBinary.minimalVersion()), - QString::null, - QString::null, + .tqarg(gpsBabelVersion) + .tqarg("http://www.gpsbabel.org") + .tqarg(gpsBabelBinary.minimalVersion()), + TQString(), + TQString(), KMessageBox::Notify | KMessageBox::AllowLink); return false; } @@ -180,13 +180,13 @@ void Plugin_GPSSync::slotGPSSync() return; /* NOTE: this plugin do not use yet GPSBabel to convert GPS data file to GPX - QString gpsBabelVersion; + TQString gpsBabelVersion; if (!checkBinaries(gpsBabelVersion)) return; */ KIPIGPSSyncPlugin::GPSSyncDialog *dialog = new KIPIGPSSyncPlugin::GPSSyncDialog( - m_interface, kapp->activeWindow()); + m_interface, TQT_TQWIDGET(kapp->activeWindow())); dialog->setImages( images.images() ); dialog->show(); @@ -206,7 +206,7 @@ void Plugin_GPSSync::slotGPSEdit() bool hasGPSInfo = exiv2Iface.getGPSInfo(alt, lat, lng); KIPIGPSSyncPlugin::GPSDataContainer gpsData(alt, lat, lng, false); - KIPIGPSSyncPlugin::GPSEditDialog dlg(kapp->activeWindow(), + KIPIGPSSyncPlugin::GPSEditDialog dlg(TQT_TQWIDGET(kapp->activeWindow()), gpsData, img.fileName(), hasGPSInfo); if (dlg.exec() == KDialogBase::Accepted) @@ -214,7 +214,7 @@ void Plugin_GPSSync::slotGPSEdit() gpsData = dlg.getGPSInfo(); KURL::List imageURLs = images.images(); KURL::List updatedURLs; - QStringList errorFiles; + TQStringList errorFiles; for( KURL::List::iterator it = imageURLs.begin() ; it != imageURLs.end(); ++it) @@ -245,7 +245,7 @@ void Plugin_GPSSync::slotGPSEdit() if (!errorFiles.isEmpty()) { KMessageBox::errorList( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Unable to save geographical coordinates into:"), errorFiles, i18n("Edit Geographical Coordinates")); @@ -261,7 +261,7 @@ void Plugin_GPSSync::slotGPSRemove() return; if (KMessageBox::warningYesNo( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Geographical coordinates will be definitively removed from all selected images.\n" "Do you want to continue ?"), i18n("Remove Geographical Coordinates")) != KMessageBox::Yes) @@ -269,7 +269,7 @@ void Plugin_GPSSync::slotGPSRemove() KURL::List imageURLs = images.images(); KURL::List updatedURLs; - QStringList errorFiles; + TQStringList errorFiles; for( KURL::List::iterator it = imageURLs.begin() ; it != imageURLs.end(); ++it) @@ -296,7 +296,7 @@ void Plugin_GPSSync::slotGPSRemove() if (!errorFiles.isEmpty()) { KMessageBox::errorList( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Unable to remove geographical coordinates from:"), errorFiles, i18n("Remove Geographical Coordinates")); @@ -314,9 +314,9 @@ void Plugin_GPSSync::slotKMLExport() else { KIPIGPSSyncPlugin::KMLExportConfig *kmlExportConfigGui = new KIPIGPSSyncPlugin::KMLExportConfig( - kapp->activeWindow(), i18n("KMLExport").ascii()); - connect(kmlExportConfigGui, SIGNAL(okButtonClicked()), - this, SLOT(slotKMLGenerate())); + TQT_TQWIDGET(kapp->activeWindow()), i18n("KMLExport").ascii()); + connect(kmlExportConfigGui, TQT_SIGNAL(okButtonClicked()), + this, TQT_SLOT(slotKMLGenerate())); kmlExportConfigGui->show(); } } diff --git a/kipi-plugins/gpssync/plugin_gpssync.h b/kipi-plugins/gpssync/plugin_gpssync.h index c12105c..5562db8 100644 --- a/kipi-plugins/gpssync/plugin_gpssync.h +++ b/kipi-plugins/gpssync/plugin_gpssync.h @@ -35,13 +35,14 @@ class KAction; class Plugin_GPSSync : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_GPSSync(QObject *parent, const char* name, const QStringList &args); + Plugin_GPSSync(TQObject *tqparent, const char* name, const TQStringList &args); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* ); + virtual void setup( TQWidget* ); protected slots: @@ -53,7 +54,7 @@ protected slots: private: - bool checkBinaries(QString &gpsBabelVersion); + bool checkBinaries(TQString &gpsBabelVersion); private: diff --git a/kipi-plugins/helloworld/plugin_helloworld.cpp b/kipi-plugins/helloworld/plugin_helloworld.cpp index ec58253..c3c01f1 100644 --- a/kipi-plugins/helloworld/plugin_helloworld.cpp +++ b/kipi-plugins/helloworld/plugin_helloworld.cpp @@ -45,15 +45,15 @@ typedef KGenericFactory<Plugin_HelloWorld> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_helloworld, Factory("kipiplugin_helloworld")); -Plugin_HelloWorld::Plugin_HelloWorld(QObject *parent, +Plugin_HelloWorld::Plugin_HelloWorld(TQObject *tqparent, const char*, - const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "HelloWorld") + const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "HelloWorld") { kdDebug( 51001 ) << "Plugin_HelloWorld plugin loaded" << endl; } -void Plugin_HelloWorld::setup( QWidget* widget ) +void Plugin_HelloWorld::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -62,13 +62,13 @@ void Plugin_HelloWorld::setup( QWidget* widget ) "misc", 0, // do never set shortcuts from plugins. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "helloworld"); addAction( m_actionHelloWorld ); - m_interface = dynamic_cast< KIPI::Interface* >( parent() ); + m_interface = dynamic_cast< KIPI::Interface* >( tqparent() ); if ( !m_interface ) { diff --git a/kipi-plugins/helloworld/plugin_helloworld.h b/kipi-plugins/helloworld/plugin_helloworld.h index 0af3b9e..bf260da 100644 --- a/kipi-plugins/helloworld/plugin_helloworld.h +++ b/kipi-plugins/helloworld/plugin_helloworld.h @@ -31,19 +31,20 @@ class KAction; class Plugin_HelloWorld : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: // Notice the constructor - // takes three arguments QObject *parent (the parent of this object), + // takes three arguments TQObject *tqparent (the tqparent of this object), // const char* name (the name of this object) and - // const QStringList &args (the arguments passed). - Plugin_HelloWorld(QObject *parent, + // const TQStringList &args (the arguments passed). + Plugin_HelloWorld(TQObject *tqparent, const char* name, - const QStringList &args); + const TQStringList &args); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); private slots: diff --git a/kipi-plugins/htmlexport/THEME_HOWTO b/kipi-plugins/htmlexport/THEME_HOWTO index 689b9e5..b217e7e 100644 --- a/kipi-plugins/htmlexport/THEME_HOWTO +++ b/kipi-plugins/htmlexport/THEME_HOWTO @@ -39,7 +39,7 @@ It's a .ini-style file and looks like this: Url=http://example.com/themes/helloworld We use a desktop file format so that entries can be translated. If you look at -the desktop file for one of the themes shipped with the plugin, you will find +the desktop file for one of the themes shipped with the plugin, you will tqfind something like this: [Desktop Entry] @@ -78,7 +78,7 @@ Rename the desktop file accordingly: cd snow2 mv snow.desktop snow2.desktop -Edit "snow2.desktop": Remove all the `Name[...]` entries and replace `Name=Snow` +Edit "snow2.desktop": Remove all the `Name[...]` entries and tqreplace `Name=Snow` with `Name=Snow 2`. You are done, you can now open your favorite KIPI enabled application and start the diff --git a/kipi-plugins/htmlexport/abstractthemeparameter.cpp b/kipi-plugins/htmlexport/abstractthemeparameter.cpp index 7432ce8..2ba5e3f 100644 --- a/kipi-plugins/htmlexport/abstractthemeparameter.cpp +++ b/kipi-plugins/htmlexport/abstractthemeparameter.cpp @@ -30,9 +30,9 @@ static const char* DEFAULT_VALUE_KEY = "Default"; namespace KIPIHTMLExport { struct AbstractThemeParameter::Private { - QCString mInternalName; - QString mName; - QString mDefaultValue; + TQCString mInternalName; + TQString mName; + TQString mDefaultValue; }; AbstractThemeParameter::AbstractThemeParameter() { @@ -45,24 +45,24 @@ AbstractThemeParameter::~AbstractThemeParameter() { } -void AbstractThemeParameter::init(const QCString& internalName, const KConfigBase* configFile) { +void AbstractThemeParameter::init(const TQCString& internalName, const KConfigBase* configFile) { d->mInternalName = internalName; d->mName = configFile->readEntry(NAME_KEY); d->mDefaultValue = configFile->readEntry(DEFAULT_VALUE_KEY); } -QCString AbstractThemeParameter::internalName() const { +TQCString AbstractThemeParameter::internalName() const { return d->mInternalName; } -QString AbstractThemeParameter::name() const { +TQString AbstractThemeParameter::name() const { return d->mName; } -QString AbstractThemeParameter::defaultValue() const { +TQString AbstractThemeParameter::defaultValue() const { return d->mDefaultValue; } diff --git a/kipi-plugins/htmlexport/abstractthemeparameter.h b/kipi-plugins/htmlexport/abstractthemeparameter.h index 7c6393a..5127232 100644 --- a/kipi-plugins/htmlexport/abstractthemeparameter.h +++ b/kipi-plugins/htmlexport/abstractthemeparameter.h @@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA #ifndef ABSTRACTTHEMEPARAMETER_H #define ABSTRACTTHEMEPARAMETER_H -class QCString; -class QString; -class QWidget; +class TQCString; +class TQString; +class TQWidget; class KConfigBase; namespace KIPIHTMLExport { @@ -42,25 +42,25 @@ public: * Reads theme parameters from configFile. Initializes the internalName, * name and defaultValue fields. */ - virtual void init(const QCString& internalName, const KConfigBase* configFile); + virtual void init(const TQCString& internalName, const KConfigBase* configFile); - QCString internalName() const; + TQCString internalName() const; - QString name() const; + TQString name() const; - QString defaultValue() const; + TQString defaultValue() const; /** - * This method should return a QWidget representing the parameter, + * This method should return a TQWidget representing the parameter, * initialized with value. */ - virtual QWidget* createWidget(QWidget* parent, const QString& value) const = 0; + virtual TQWidget* createWidget(TQWidget* tqparent, const TQString& value) const = 0; /** * The opposite of createWidget: given a widget previously created with * createWidget, this method returns the current widget value. */ - virtual QString valueFromWidget(QWidget*) const = 0; + virtual TQString valueFromWidget(TQWidget*) const = 0; private: class Private; diff --git a/kipi-plugins/htmlexport/colorthemeparameter.cpp b/kipi-plugins/htmlexport/colorthemeparameter.cpp index c7905be..9df77e0 100644 --- a/kipi-plugins/htmlexport/colorthemeparameter.cpp +++ b/kipi-plugins/htmlexport/colorthemeparameter.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA // Self #include "colorthemeparameter.h" -// Qt +// TQt // KDE #include <kcolorbutton.h> @@ -31,15 +31,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA namespace KIPIHTMLExport { -QWidget* ColorThemeParameter::createWidget(QWidget* parent, const QString& value) const { - KColorButton* button = new KColorButton(parent); - QColor color(value); +TQWidget* ColorThemeParameter::createWidget(TQWidget* tqparent, const TQString& value) const { + KColorButton* button = new KColorButton(tqparent); + TQColor color(value); button->setColor(color); return button; } -QString ColorThemeParameter::valueFromWidget(QWidget* widget) const { +TQString ColorThemeParameter::valueFromWidget(TQWidget* widget) const { KColorButton* button = static_cast<KColorButton*>(widget); return button->color().name(); } diff --git a/kipi-plugins/htmlexport/colorthemeparameter.h b/kipi-plugins/htmlexport/colorthemeparameter.h index 6ba0577..5a62395 100644 --- a/kipi-plugins/htmlexport/colorthemeparameter.h +++ b/kipi-plugins/htmlexport/colorthemeparameter.h @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA #ifndef COLORTHEMEPARAMETER_H #define COLORTHEMEPARAMETER_H -// Qt +// TQt // KDE @@ -36,8 +36,8 @@ namespace KIPIHTMLExport { */ class ColorThemeParameter : public AbstractThemeParameter { public: - virtual QWidget* createWidget(QWidget* parent, const QString& value) const; - virtual QString valueFromWidget(QWidget*) const; + virtual TQWidget* createWidget(TQWidget* tqparent, const TQString& value) const; + virtual TQString valueFromWidget(TQWidget*) const; }; diff --git a/kipi-plugins/htmlexport/galleryinfo.cpp b/kipi-plugins/htmlexport/galleryinfo.cpp index 26c26a3..e529213 100644 --- a/kipi-plugins/htmlexport/galleryinfo.cpp +++ b/kipi-plugins/htmlexport/galleryinfo.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA // Self #include "galleryinfo.h" -// Qt +// TQt // KDE #include <kconfigbase.h> @@ -32,26 +32,26 @@ namespace KIPIHTMLExport { static const char* THEME_GROUP_PREFIX="Theme "; -QString GalleryInfo::getThemeParameterValue( - const QString& theme, - const QString& parameter, - const QString& defaultValue) const +TQString GalleryInfo::getThemeParameterValue( + const TQString& theme, + const TQString& parameter, + const TQString& defaultValue) const { - QString groupName = THEME_GROUP_PREFIX + theme; + TQString groupName = THEME_GROUP_PREFIX + theme; KConfigGroupSaver saver(config(), groupName); return config()->readEntry(parameter, defaultValue); } void GalleryInfo::setThemeParameterValue( - const QString& theme, - const QString& parameter, - const QString& value) + const TQString& theme, + const TQString& parameter, + const TQString& value) { // FIXME: This is hackish, but config() is const :'( KConfig* localConfig = const_cast<KConfig*>(config()); - QString groupName = THEME_GROUP_PREFIX + theme; + TQString groupName = THEME_GROUP_PREFIX + theme; KConfigGroupSaver saver(localConfig, groupName); return localConfig->writeEntry(parameter, value); } diff --git a/kipi-plugins/htmlexport/galleryinfo.h b/kipi-plugins/htmlexport/galleryinfo.h index f65e7bc..f4c4a4b 100644 --- a/kipi-plugins/htmlexport/galleryinfo.h +++ b/kipi-plugins/htmlexport/galleryinfo.h @@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA #ifndef GALLERYINFO_H #define GALLERYINFO_H -// Qt -#include <qvaluelist.h> +// TQt +#include <tqvaluelist.h> // KDE #include <kurl.h> @@ -43,25 +43,25 @@ namespace KIPIHTMLExport { class GalleryInfo : public Config { public: /** - * Convenience method to get destURL as a KURL rather than a QString + * Convenience method to get destURL as a KURL rather than a TQString */ KURL destKURL() const { return KURL(destURL()); } - QString fullFormatString() const { + TQString fullFormatString() const { return getEnumString("fullFormat"); } - QString thumbnailFormatString() const { + TQString thumbnailFormatString() const { return getEnumString("thumbnailFormat"); } - QValueList<KIPI::ImageCollection> mCollectionList; + TQValueList<KIPI::ImageCollection> mCollectionList; - QString getThemeParameterValue(const QString& theme, const QString& parameter, const QString& defaultValue) const; + TQString getThemeParameterValue(const TQString& theme, const TQString& parameter, const TQString& defaultValue) const; - void setThemeParameterValue(const QString& theme, const QString& parameter, const QString& value); + void setThemeParameterValue(const TQString& theme, const TQString& parameter, const TQString& value); private: @@ -69,18 +69,18 @@ private: * KConfigXT enums are mapped to ints. * This method returns the string associated to the enum value. */ - QString getEnumString(const QString& itemName) const { + TQString getEnumString(const TQString& itemName) const { // findItem is not marked const :-( GalleryInfo* that=const_cast<GalleryInfo*>(this); KConfigSkeletonItem* tmp=that->findItem(itemName); KConfigSkeleton::ItemEnum* item=dynamic_cast<KConfigSkeleton::ItemEnum*>(tmp); Q_ASSERT(item); - if (!item) return QString::null; + if (!item) return TQString(); int value=item->value(); - QValueList<KConfigSkeleton::ItemEnum::Choice> lst=item->choices(); - QValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator + TQValueList<KConfigSkeleton::ItemEnum::Choice> lst=item->choices(); + TQValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it=lst.begin(), end=lst.end(); for (int pos=0; it!=end; ++it, pos++) { @@ -88,7 +88,7 @@ private: return (*it).name; } } - return QString::null; + return TQString(); } }; diff --git a/kipi-plugins/htmlexport/generator.cpp b/kipi-plugins/htmlexport/generator.cpp index 4ae73a4..4844aa7 100644 --- a/kipi-plugins/htmlexport/generator.cpp +++ b/kipi-plugins/htmlexport/generator.cpp @@ -21,11 +21,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Self #include "generator.moc" -// Qt -#include <qdir.h> -#include <qfile.h> -#include <qpainter.h> -#include <qregexp.h> +// TQt +#include <tqdir.h> +#include <tqfile.h> +#include <tqpainter.h> +#include <tqregexp.h> // KDE #include <kaboutdata.h> @@ -56,17 +56,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. namespace KIPIHTMLExport { -typedef QMap<QCString,QCString> XsltParameterMap; +typedef TQMap<TQCString,TQCString> XsltParameterMap; /** * Produce a web-friendly file name */ -QString webifyFileName(QString fileName) { +TQString webifyFileName(TQString fileName) { fileName=fileName.lower(); // Remove potentially troublesome chars - fileName=fileName.replace(QRegExp("[^-0-9a-z]+"), "_"); + fileName=fileName.tqreplace(TQRegExp("[^-0-9a-z]+"), "_"); return fileName; } @@ -77,11 +77,11 @@ QString webifyFileName(QString fileName) { */ class UniqueNameHelper { public: - QString makeNameUnique(QString name) { - QString nameBase = name; + TQString makeNameUnique(TQString name) { + TQString nameBase = name; int count=2; - while (mList.findIndex(name)!=-1) { - name = nameBase + QString::number(count); + while (mList.tqfindIndex(name)!=-1) { + name = nameBase + TQString::number(count); ++count; }; @@ -90,7 +90,7 @@ public: } private: - QStringList mList; + TQStringList mList; }; @@ -101,24 +101,24 @@ private: * a'bc => "a'bc" * a"'bc => concat('a"', "'", 'bc') */ -QCString makeXsltParam(const QString& txt) { - QString param; +TQCString makeXsltParam(const TQString& txt) { + TQString param; static const char apos='\''; static const char quote='"'; - if (txt.find(apos)==-1) { + if (txt.tqfind(apos)==-1) { // First or second case: no apos param= apos + txt + apos; - } else if (txt.find(quote)==-1) { + } else if (txt.tqfind(quote)==-1) { // Third case: only apos, no quote param= quote + txt + quote; } else { // Forth case: both apos and quote :-( - QStringList lst=QStringList::split(apos, txt, true /*allowEmptyEntries*/); + TQStringList lst=TQStringList::split(apos, txt, true /*allowEmptyEntries*/); - QStringList::Iterator it=lst.begin(), end=lst.end(); + TQStringList::Iterator it=lst.begin(), end=lst.end(); param= "concat("; param+= apos + *it + apos; ++it; @@ -136,14 +136,14 @@ QCString makeXsltParam(const QString& txt) { /** * Genearate a square thumbnail from @fullImage of @size x @size pixels */ -QImage generateSquareThumbnail(const QImage& fullImage, int size) { - QImage image = fullImage.smoothScale(size, size, QImage::ScaleMax); +TQImage generateSquareThumbnail(const TQImage& fullImage, int size) { + TQImage image = fullImage.smoothScale(size, size, TQ_ScaleMax); if (image.width() == size && image.height() == size) { return image; } - QPixmap croppedPix(size, size); - QPainter painter(&croppedPix); + TQPixmap croppedPix(size, size); + TQPainter painter(&croppedPix); int sx=0, sy=0; if (image.width()>size) { @@ -166,13 +166,13 @@ struct Generator::Private { // State info bool mWarnings; - QString mXMLFileName; + TQString mXMLFileName; UniqueNameHelper mUniqueNameHelper; bool init() { mTheme=Theme::findByInternalName(mInfo->theme()); if (!mTheme) { - logError( i18n("Could not find theme in '%1'").arg(mInfo->theme()) ); + logError( i18n("Could not find theme in '%1'").tqarg(mInfo->theme()) ); return false; } return true; @@ -186,7 +186,7 @@ struct Generator::Private { KURL destURL=mInfo->destKURL(); destURL.addPath(srcURL.filename()); - if (QFile::exists(destURL.path())) { + if (TQFile::exists(destURL.path())) { KIO::NetAccess::del(destURL, mProgressDialog); } bool ok=KIO::NetAccess::dircopy(srcURL, destURL, mProgressDialog); @@ -197,14 +197,14 @@ struct Generator::Private { return true; } - bool writeDataToFile(const QByteArray& data, const QString& destPath) { - QFile destFile(destPath); + bool writeDataToFile(const TQByteArray& data, const TQString& destPath) { + TQFile destFile(destPath); if (!destFile.open(IO_WriteOnly)) { - logWarning(i18n("Could not open file '%1' for writing").arg(destPath)); + logWarning(i18n("Could not open file '%1' for writing").tqarg(destPath)); return false; } - if (destFile.writeBlock(data) != (Q_LONG)data.size()) { - logWarning(i18n("Could not save image to file '%1'").arg(destPath)); + if (destFile.writeBlock(data) != (TQ_LONG)data.size()) { + logWarning(i18n("Could not save image to file '%1'").tqarg(destPath)); return false; } return true; @@ -213,7 +213,7 @@ struct Generator::Private { /** * Helper class for generateImageAndXMLForURL */ - void appendImageElementToXML(XMLWriter& xmlWriter, const QString& elementName, const QString& fileName, const QImage& image) { + void appendImageElementToXML(XMLWriter& xmlWriter, const TQString& elementName, const TQString& fileName, const TQImage& image) { XMLAttributeList attrList; attrList.append("fileName", fileName); attrList.append("width", image.width()); @@ -226,54 +226,54 @@ struct Generator::Private { * Generate images (full and thumbnail) for imageURL * Fills xmlWriter with info about this image */ - void generateImageAndXMLForURL(XMLWriter& xmlWriter, const QString& destDir, const KURL& imageURL) { + void generateImageAndXMLForURL(XMLWriter& xmlWriter, const TQString& destDir, const KURL& imageURL) { KIPI::ImageInfo info=mInterface->info(imageURL); // Load image - QString path=imageURL.path(); - QFile imageFile(path); + TQString path=imageURL.path(); + TQFile imageFile(path); if (!imageFile.open(IO_ReadOnly)) { - logWarning(i18n("Could not read image '%1'").arg(path)); + logWarning(i18n("Could not read image '%1'").tqarg(path)); return; } - QString imageFormat = QImageIO::imageFormat(&imageFile); + TQString imageFormat = TQImageIO::imageFormat(TQT_TQIODEVICE(&imageFile)); if (imageFormat.isEmpty()) { - logWarning(i18n("Format of image '%1' is unknown").arg(path)); + logWarning(i18n("Format of image '%1' is unknown").tqarg(path)); return; } imageFile.close(); imageFile.open(IO_ReadOnly); - QByteArray imageData = imageFile.readAll(); - QImage originalImage; + TQByteArray imageData = imageFile.readAll(); + TQImage originalImage; if (!originalImage.loadFromData(imageData) ) { - logWarning(i18n("Error loading image '%1'").arg(path)); + logWarning(i18n("Error loading image '%1'").tqarg(path)); return; } // Process images - QImage fullImage = originalImage; + TQImage fullImage = originalImage; if (!mInfo->useOriginalImageAsFullImage()) { if (mInfo->fullResize()) { int size = mInfo->fullSize(); - fullImage = fullImage.smoothScale(size, size, QImage::ScaleMin); + fullImage = fullImage.smoothScale(size, size, TQ_ScaleMin); } if (info.angle() != 0) { - QWMatrix matrix; + TQWMatrix matrix; matrix.rotate(info.angle()); fullImage = fullImage.xForm(matrix); } } - QImage thumbnail = generateSquareThumbnail(fullImage, mInfo->thumbnailSize()); + TQImage thumbnail = generateSquareThumbnail(fullImage, mInfo->thumbnailSize()); // Save images - QString baseFileName = webifyFileName(info.title()); + TQString baseFileName = webifyFileName(info.title()); baseFileName = mUniqueNameHelper.makeNameUnique(baseFileName); // Save full - QString fullFileName; + TQString fullFileName; if (mInfo->useOriginalImageAsFullImage()) { fullFileName = baseFileName + "." + imageFormat.lower(); if (!writeDataToFile(imageData, destDir + "/" + fullFileName)) { @@ -282,15 +282,15 @@ struct Generator::Private { } else { fullFileName = baseFileName + "." + mInfo->fullFormatString().lower(); - QString destPath = destDir + "/" + fullFileName; + TQString destPath = destDir + "/" + fullFileName; if (!fullImage.save(destPath, mInfo->fullFormatString().ascii(), mInfo->fullQuality())) { - logWarning(i18n("Could not save image '%1' to '%2'").arg(path).arg(destPath)); + logWarning(i18n("Could not save image '%1' to '%2'").tqarg(path).tqarg(destPath)); return; } } // Save original - QString originalFileName; + TQString originalFileName; if (mInfo->copyOriginalImage()) { originalFileName = "original_" + fullFileName; if (!writeDataToFile(imageData, destDir + "/" + originalFileName)) { @@ -299,10 +299,10 @@ struct Generator::Private { } // Save thumbnail - QString thumbnailFileName = "thumb_" + baseFileName + "." + mInfo->thumbnailFormatString().lower(); - QString destPath = destDir + "/" + thumbnailFileName; + TQString thumbnailFileName = "thumb_" + baseFileName + "." + mInfo->thumbnailFormatString().lower(); + TQString destPath = destDir + "/" + thumbnailFileName; if (!thumbnail.save(destPath, mInfo->thumbnailFormatString().ascii(), mInfo->thumbnailQuality())) { - logWarning(i18n("Could not save thumbnail for image '%1' to '%2'").arg(path).arg(destPath)); + logWarning(i18n("Could not save thumbnail for image '%1' to '%2'").tqarg(path).tqarg(destPath)); return; } @@ -320,7 +320,7 @@ struct Generator::Private { bool generateImagesAndXML() { - QString baseDestDir=mInfo->destKURL().path(); + TQString baseDestDir=mInfo->destKURL().path(); if (!createDir(baseDestDir)) return false; mXMLFileName=baseDestDir + "/gallery.xml"; @@ -333,14 +333,14 @@ struct Generator::Private { XMLElement collectionsX(xmlWriter, "collections"); // Loop on collections - QValueList<KIPI::ImageCollection>::Iterator collectionIt=mInfo->mCollectionList.begin(); - QValueList<KIPI::ImageCollection>::Iterator collectionEnd=mInfo->mCollectionList.end(); + TQValueList<KIPI::ImageCollection>::Iterator collectionIt=mInfo->mCollectionList.begin(); + TQValueList<KIPI::ImageCollection>::Iterator collectionEnd=mInfo->mCollectionList.end(); for (; collectionIt!=collectionEnd; ++collectionIt) { KIPI::ImageCollection collection=*collectionIt; - logInfo( i18n("Generating files for \"%1\"").arg(collection.name()) ); + logInfo( i18n("Generating files for \"%1\"").tqarg(collection.name()) ); - QString collectionFileName = webifyFileName(collection.name()); - QString destDir = baseDestDir + "/" + collectionFileName; + TQString collectionFileName = webifyFileName(collection.name()); + TQString destDir = baseDestDir + "/" + collectionFileName; if (!createDir(destDir)) return false; XMLElement collectionX(xmlWriter, "collection"); @@ -356,7 +356,7 @@ struct Generator::Private { int count = imageList.count(); for (; it!=end; ++it, ++pos) { mProgressDialog->setProgress(pos, count); - qApp->processEvents(); + tqApp->processEvents(); generateImageAndXMLForURL(xmlWriter, destDir, *it); } @@ -382,14 +382,14 @@ struct Generator::Private { */ void addThemeParameters(XsltParameterMap& map) { Theme::ParameterList parameterList = mTheme->parameterList(); - QString themeInternalName = mTheme->internalName(); + TQString themeInternalName = mTheme->internalName(); Theme::ParameterList::ConstIterator it = parameterList.begin(), end = parameterList.end(); for (; it!=end; ++it) { AbstractThemeParameter* themeParameter = *it; - QCString internalName = themeParameter->internalName(); - QString value = mInfo->getThemeParameterValue( + TQCString internalName = themeParameter->internalName(); + TQString value = mInfo->getThemeParameterValue( themeInternalName, internalName, themeParameter->defaultValue()); @@ -402,17 +402,17 @@ struct Generator::Private { bool generateHTML() { logInfo(i18n("Generating HTML files")); - QString xsltFileName=mTheme->directory() + "/template.xsl"; + TQString xsltFileName=mTheme->directory() + "/template.xsl"; CWrapper<xsltStylesheetPtr, xsltFreeStylesheet> xslt= xsltParseStylesheetFile( (const xmlChar*) xsltFileName.local8Bit().data() ); if (!xslt) { - logError(i18n("Could not load XSL file '%1'").arg(xsltFileName)); + logError(i18n("Could not load XSL file '%1'").tqarg(xsltFileName)); return false; } CWrapper<xmlDocPtr, xmlFreeDoc> xmlGallery=xmlParseFile( mXMLFileName.local8Bit().data() ); if (!xmlGallery) { - logError(i18n("Could not load XML file '%1'").arg(mXMLFileName)); + logError(i18n("Could not load XML file '%1'").tqarg(mXMLFileName)); return false; } @@ -435,12 +435,12 @@ struct Generator::Private { // Move to the destination dir, so that external documents get correctly // produced - QString oldCD=QDir::currentDirPath(); - QDir::setCurrent(mInfo->destKURL().path()); + TQString oldCD=TQDir::currentDirPath(); + TQDir::setCurrent(mInfo->destKURL().path()); CWrapper<xmlDocPtr, xmlFreeDoc> xmlOutput= xsltApplyStylesheet(xslt, xmlGallery, params); - QDir::setCurrent(oldCD); + TQDir::setCurrent(oldCD); //delete []params; if (!xmlOutput) { @@ -448,10 +448,10 @@ struct Generator::Private { return false; } - QString destFileName=mInfo->destKURL().path() + "/index.html"; + TQString destFileName=mInfo->destKURL().path() + "/index.html"; FILE* file=fopen(destFileName.local8Bit().data(), "w"); if (!file) { - logError(i18n("Could not open '%1' for writing").arg(destFileName)); + logError(i18n("Could not open '%1' for writing").tqarg(destFileName)); return false; } xsltSaveResultToFile(file, xmlOutput, xslt); @@ -461,15 +461,15 @@ struct Generator::Private { } - bool createDir(const QString& dirName) { - QStringList parts = QStringList::split('/', dirName); - QStringList::ConstIterator it = parts.begin(), end = parts.end(); - QDir dir = QDir::root(); + bool createDir(const TQString& dirName) { + TQStringList parts = TQStringList::split('/', dirName); + TQStringList::ConstIterator it = parts.begin(), end = parts.end(); + TQDir dir = TQDir::root(); for( ;it!=end; ++it) { - QString part = *it; + TQString part = *it; if (!dir.exists(part)) { if (!dir.mkdir(part)) { - logError(i18n("Could not create folder '%1' in '%2'").arg(part).arg(dir.absPath())); + logError(i18n("Could not create folder '%1' in '%2'").tqarg(part).tqarg(dir.absPath())); return false; } } @@ -479,22 +479,22 @@ struct Generator::Private { } - void logInfo(const QString& msg) { + void logInfo(const TQString& msg) { mProgressDialog->addedAction(msg, KIPI::ProgressMessage); } - void logError(const QString& msg) { + void logError(const TQString& msg) { mProgressDialog->addedAction(msg, KIPI::ErrorMessage); } - void logWarning(const QString& msg) { + void logWarning(const TQString& msg) { mProgressDialog->addedAction(msg, KIPI::WarningMessage); mWarnings=true; } }; Generator::Generator(KIPI::Interface* interface, GalleryInfo* info, KIPI::BatchProgressDialog* progressDialog) -: QObject() { +: TQObject() { d=new Private; d->mInterface=interface; d->mInfo=info; @@ -511,7 +511,7 @@ Generator::~Generator() { bool Generator::run() { if (!d->init()) return false; - QString destDir=d->mInfo->destKURL().path(); + TQString destDir=d->mInfo->destKURL().path(); if (!d->createDir(destDir)) return false; if (!d->copyTheme()) return false; diff --git a/kipi-plugins/htmlexport/generator.h b/kipi-plugins/htmlexport/generator.h index a85f99c..99ddd6f 100644 --- a/kipi-plugins/htmlexport/generator.h +++ b/kipi-plugins/htmlexport/generator.h @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef GENERATOR_H #define GENERATOR_H -#include <qobject.h> +#include <tqobject.h> namespace KIPI { class BatchProgressDialog; @@ -37,8 +37,9 @@ class GalleryInfo; * This class is responsible for generating the HTML and scaling the images * according to the settings specified by the user. */ -class Generator : public QObject { +class Generator : public TQObject { Q_OBJECT + TQ_OBJECT public: Generator(KIPI::Interface*, GalleryInfo*, KIPI::BatchProgressDialog*); ~Generator(); diff --git a/kipi-plugins/htmlexport/imagesettingspage.ui b/kipi-plugins/htmlexport/imagesettingspage.ui index e15009c..80278e4 100644 --- a/kipi-plugins/htmlexport/imagesettingspage.ui +++ b/kipi-plugins/htmlexport/imagesettingspage.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ImageSettingsPage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ImageSettingsPage</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -45,7 +45,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>58</width> <height>20</height> @@ -62,7 +62,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -79,14 +79,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>104</height> </size> </property> </spacer> - <widget class="QLabel" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -109,7 +109,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -126,14 +126,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="1" column="1" rowspan="1" colspan="2"> + <widget class="TQButtonGroup" row="1" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_useOriginalImageAsFullImage</cstring> </property> @@ -150,7 +150,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>radioButton3</cstring> </property> @@ -161,7 +161,7 @@ <bool>true</bool> </property> </widget> - <widget class="QFrame" row="1" column="1"> + <widget class="TQFrame" row="1" column="1"> <property name="name"> <cstring>frame6</cstring> </property> @@ -178,7 +178,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>kcfg_fullResize</cstring> </property> @@ -189,7 +189,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2_2_2_2</cstring> </property> @@ -200,7 +200,7 @@ <cstring>kcfg_fullFormat</cstring> </property> </widget> - <widget class="QSpinBox" row="0" column="4"> + <widget class="TQSpinBox" row="0" column="4"> <property name="name"> <cstring>kcfg_fullQuality</cstring> </property> @@ -208,7 +208,7 @@ <number>100</number> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <item> <property name="text"> <string>JPEG</string> @@ -223,7 +223,7 @@ <cstring>kcfg_fullFormat</cstring> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -244,14 +244,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>kcfg_fullSize</cstring> </property> @@ -265,7 +265,7 @@ <number>800</number> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="5"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="5"> <property name="name"> <cstring>kcfg_copyOriginalImage</cstring> </property> @@ -288,7 +288,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -305,14 +305,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>19</height> </size> </property> </spacer> - <widget class="QRadioButton" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>radioButton4</cstring> </property> @@ -332,22 +332,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="4" column="1" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="4" column="1" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>kcfg_thumbnailSize</cstring> </property> @@ -361,7 +361,7 @@ <number>160</number> </property> </widget> - <widget class="QSpinBox" row="0" column="4"> + <widget class="TQSpinBox" row="0" column="4"> <property name="name"> <cstring>kcfg_thumbnailQuality</cstring> </property> @@ -369,7 +369,7 @@ <number>100</number> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -380,7 +380,7 @@ <cstring>kcfg_thumbnailQuality</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2_2_2</cstring> </property> @@ -401,14 +401,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <item> <property name="text"> <string>JPEG</string> @@ -423,7 +423,7 @@ <cstring>kcfg_thumbnailFormat</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -452,5 +452,5 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kipi-plugins/htmlexport/intthemeparameter.cpp b/kipi-plugins/htmlexport/intthemeparameter.cpp index 710f040..87472bd 100644 --- a/kipi-plugins/htmlexport/intthemeparameter.cpp +++ b/kipi-plugins/htmlexport/intthemeparameter.cpp @@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA // Self #include "intthemeparameter.h" -// Qt -#include <qspinbox.h> +// TQt +#include <tqspinbox.h> // KDE #include <kconfigbase.h> @@ -51,7 +51,7 @@ IntThemeParameter::~IntThemeParameter() { } -void IntThemeParameter::init(const QCString& internalName, const KConfigBase* configFile) { +void IntThemeParameter::init(const TQCString& internalName, const KConfigBase* configFile) { AbstractThemeParameter::init(internalName, configFile); d->mMinValue = configFile->readNumEntry(MIN_VALUE_KEY, 0); @@ -59,8 +59,8 @@ void IntThemeParameter::init(const QCString& internalName, const KConfigBase* co } -QWidget* IntThemeParameter::createWidget(QWidget* parent, const QString& value) const { - QSpinBox* spinBox = new QSpinBox(parent); +TQWidget* IntThemeParameter::createWidget(TQWidget* tqparent, const TQString& value) const { + TQSpinBox* spinBox = new TQSpinBox(tqparent); spinBox->setValue(value.toInt()); spinBox->setMinValue(d->mMinValue); spinBox->setMaxValue(d->mMaxValue); @@ -68,9 +68,9 @@ QWidget* IntThemeParameter::createWidget(QWidget* parent, const QString& value) } -QString IntThemeParameter::valueFromWidget(QWidget* widget) const { - QSpinBox* spinBox = static_cast<QSpinBox*>(widget); - return QString::number(spinBox->value()); +TQString IntThemeParameter::valueFromWidget(TQWidget* widget) const { + TQSpinBox* spinBox = static_cast<TQSpinBox*>(widget); + return TQString::number(spinBox->value()); } diff --git a/kipi-plugins/htmlexport/intthemeparameter.h b/kipi-plugins/htmlexport/intthemeparameter.h index 4db06d1..802ccde 100644 --- a/kipi-plugins/htmlexport/intthemeparameter.h +++ b/kipi-plugins/htmlexport/intthemeparameter.h @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA #ifndef INTTHEMEPARAMETER_H #define INTTHEMEPARAMETER_H -// Qt +// TQt // KDE @@ -39,9 +39,9 @@ public: IntThemeParameter(); ~IntThemeParameter(); - virtual void init(const QCString& internalName, const KConfigBase* configFile); - virtual QWidget* createWidget(QWidget* parent, const QString& value) const; - virtual QString valueFromWidget(QWidget*) const; + virtual void init(const TQCString& internalName, const KConfigBase* configFile); + virtual TQWidget* createWidget(TQWidget* tqparent, const TQString& value) const; + virtual TQString valueFromWidget(TQWidget*) const; private: class Private; diff --git a/kipi-plugins/htmlexport/listthemeparameter.cpp b/kipi-plugins/htmlexport/listthemeparameter.cpp index 234f427..7a49b6d 100644 --- a/kipi-plugins/htmlexport/listthemeparameter.cpp +++ b/kipi-plugins/htmlexport/listthemeparameter.cpp @@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA // Self #include "listthemeparameter.h" -// Qt -#include <qcombobox.h> +// TQt +#include <tqcombobox.h> // KDE #include <kconfigbase.h> @@ -33,8 +33,8 @@ static const char* ITEM_VALUE_KEY = "Value_"; static const char* ITEM_CAPTION_KEY = "Caption_"; struct ListThemeParameter::Private { - QStringList mOrderedValueList; - QMap<QString, QString> mContentMap; + TQStringList mOrderedValueList; + TQMap<TQString, TQString> mContentMap; }; ListThemeParameter::ListThemeParameter() { @@ -45,33 +45,33 @@ ListThemeParameter::~ListThemeParameter() { delete d; } -void ListThemeParameter::init(const QCString& internalName, const KConfigBase* configFile) { +void ListThemeParameter::init(const TQCString& internalName, const KConfigBase* configFile) { AbstractThemeParameter::init(internalName, configFile); for (int pos=0;; ++pos) { - QString valueKey = QString("%1%2").arg(ITEM_VALUE_KEY).arg(pos); - QString captionKey = QString("%1%2").arg(ITEM_CAPTION_KEY).arg(pos); + TQString valueKey = TQString("%1%2").tqarg(ITEM_VALUE_KEY).tqarg(pos); + TQString captionKey = TQString("%1%2").tqarg(ITEM_CAPTION_KEY).tqarg(pos); if (!configFile->hasKey(valueKey) || !configFile->hasKey(captionKey)) { break; } - QString value = configFile->readEntry(valueKey); - QString caption = configFile->readEntry(captionKey); + TQString value = configFile->readEntry(valueKey); + TQString caption = configFile->readEntry(captionKey); d->mOrderedValueList << value; d->mContentMap[value] = caption; } } -QWidget* ListThemeParameter::createWidget(QWidget* parent, const QString& widgetDefaultValue) const { - QComboBox* comboBox = new QComboBox(parent); +TQWidget* ListThemeParameter::createWidget(TQWidget* tqparent, const TQString& widgetDefaultValue) const { + TQComboBox* comboBox = new TQComboBox(tqparent); - QStringList::ConstIterator + TQStringList::ConstIterator it = d->mOrderedValueList.begin(), end = d->mOrderedValueList.end(); for (;it!=end; ++it) { - QString value = *it; - QString caption = d->mContentMap[value]; + TQString value = *it; + TQString caption = d->mContentMap[value]; comboBox->insertItem(caption); if (value == widgetDefaultValue) { comboBox->setCurrentItem(comboBox->count() - 1); @@ -81,9 +81,9 @@ QWidget* ListThemeParameter::createWidget(QWidget* parent, const QString& widget return comboBox; } -QString ListThemeParameter::valueFromWidget(QWidget* widget) const { +TQString ListThemeParameter::valueFromWidget(TQWidget* widget) const { Q_ASSERT(widget); - QComboBox* comboBox = static_cast<QComboBox*>(widget); + TQComboBox* comboBox = static_cast<TQComboBox*>(widget); return d->mOrderedValueList[comboBox->currentItem()]; } diff --git a/kipi-plugins/htmlexport/listthemeparameter.h b/kipi-plugins/htmlexport/listthemeparameter.h index 10c5939..eae31d8 100644 --- a/kipi-plugins/htmlexport/listthemeparameter.h +++ b/kipi-plugins/htmlexport/listthemeparameter.h @@ -35,9 +35,9 @@ public: ListThemeParameter(); ~ListThemeParameter(); - virtual void init(const QCString& internalName, const KConfigBase* configFile); - virtual QWidget* createWidget(QWidget* parent, const QString& value) const; - virtual QString valueFromWidget(QWidget*) const; + virtual void init(const TQCString& internalName, const KConfigBase* configFile); + virtual TQWidget* createWidget(TQWidget* tqparent, const TQString& value) const; + virtual TQString valueFromWidget(TQWidget*) const; private: struct Private; diff --git a/kipi-plugins/htmlexport/outputpage.ui b/kipi-plugins/htmlexport/outputpage.ui index 4c1f6f6..08944e7 100644 --- a/kipi-plugins/htmlexport/outputpage.ui +++ b/kipi-plugins/htmlexport/outputpage.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>OutputPage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>OutputPage</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,15 +19,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -45,7 +45,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_openInBrowser</cstring> </property> @@ -63,7 +63,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>51</height> @@ -74,7 +74,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kipi-plugins/htmlexport/plugin.cpp b/kipi-plugins/htmlexport/plugin.cpp index 7b95aab..659e10f 100644 --- a/kipi-plugins/htmlexport/plugin.cpp +++ b/kipi-plugins/htmlexport/plugin.cpp @@ -49,8 +49,8 @@ struct Plugin::Private { }; -Plugin::Plugin(QObject *parent, const char*, const QStringList&) -: KIPI::Plugin(Factory::instance(), parent, "HTMLExport") +Plugin::Plugin(TQObject *tqparent, const char*, const TQStringList&) +: KIPI::Plugin(Factory::instance(), tqparent, "HTMLExport") { d=new Private; d->mAction=0; @@ -62,27 +62,27 @@ Plugin::~Plugin() { } -void Plugin::setup( QWidget* widget ) { +void Plugin::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); d->mAction = new KAction(i18n("HTML Gallery..."), "www", 0, - this, SLOT(slotActivate()), + this, TQT_SLOT(slotActivate()), actionCollection(), "htmlexport"); addAction(d->mAction); } void Plugin::slotActivate() { - KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( parent() ); + KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( tqparent() ); Q_ASSERT(interface); GalleryInfo info; info.readConfig(); - QWidget* parent=KApplication::kApplication()->mainWidget(); - Wizard wizard(parent, interface, &info); - if (wizard.exec()==QDialog::Rejected) return; + TQWidget* tqparent=KApplication::kApplication()->mainWidget(); + Wizard wizard(tqparent, interface, &info); + if (wizard.exec()==TQDialog::Rejected) return; info.writeConfig(); - KIPI::BatchProgressDialog* progressDialog=new KIPI::BatchProgressDialog(parent, i18n("Generating gallery...")); + KIPI::BatchProgressDialog* progressDialog=new KIPI::BatchProgressDialog(tqparent, i18n("Generating gallery...")); Generator generator(interface, &info, progressDialog); progressDialog->show(); diff --git a/kipi-plugins/htmlexport/plugin.h b/kipi-plugins/htmlexport/plugin.h index 9327ea0..cab9e82 100644 --- a/kipi-plugins/htmlexport/plugin.h +++ b/kipi-plugins/htmlexport/plugin.h @@ -33,13 +33,14 @@ namespace KIPIHTMLExport { */ class Plugin : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin(QObject *parent, const char* name, const QStringList &args); + Plugin(TQObject *tqparent, const char* name, const TQStringList &args); virtual ~Plugin(); KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); private slots: void slotActivate(); diff --git a/kipi-plugins/htmlexport/stringthemeparameter.cpp b/kipi-plugins/htmlexport/stringthemeparameter.cpp index fb18fc4..8ad7f1c 100644 --- a/kipi-plugins/htmlexport/stringthemeparameter.cpp +++ b/kipi-plugins/htmlexport/stringthemeparameter.cpp @@ -21,24 +21,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA // Self #include "stringthemeparameter.h" -// Qt -#include <qlineedit.h> +// TQt +#include <tqlineedit.h> // KDE #include <kconfigbase.h> namespace KIPIHTMLExport { -QWidget* StringThemeParameter::createWidget(QWidget* parent, const QString& value) const { - QLineEdit* edit = new QLineEdit(parent); +TQWidget* StringThemeParameter::createWidget(TQWidget* tqparent, const TQString& value) const { + TQLineEdit* edit = new TQLineEdit(tqparent); edit->setText(value); return edit; } -QString StringThemeParameter::valueFromWidget(QWidget* widget) const { +TQString StringThemeParameter::valueFromWidget(TQWidget* widget) const { Q_ASSERT(widget); - QLineEdit* edit = static_cast<QLineEdit*>(widget); + TQLineEdit* edit = static_cast<TQLineEdit*>(widget); return edit->text(); } diff --git a/kipi-plugins/htmlexport/stringthemeparameter.h b/kipi-plugins/htmlexport/stringthemeparameter.h index 89d661a..26bbe6c 100644 --- a/kipi-plugins/htmlexport/stringthemeparameter.h +++ b/kipi-plugins/htmlexport/stringthemeparameter.h @@ -31,8 +31,8 @@ namespace KIPIHTMLExport { */ class StringThemeParameter : public AbstractThemeParameter { public: - virtual QWidget* createWidget(QWidget* parent, const QString& value) const; - virtual QString valueFromWidget(QWidget*) const; + virtual TQWidget* createWidget(TQWidget* tqparent, const TQString& value) const; + virtual TQString valueFromWidget(TQWidget*) const; }; } // namespace diff --git a/kipi-plugins/htmlexport/theme.cpp b/kipi-plugins/htmlexport/theme.cpp index ee70a9b..ebb4d97 100644 --- a/kipi-plugins/htmlexport/theme.cpp +++ b/kipi-plugins/htmlexport/theme.cpp @@ -22,9 +22,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA // Self #include "theme.h" -// Qt -#include <qfile.h> -#include <qtextstream.h> +// TQt +#include <tqfile.h> +#include <tqtextstream.h> // KDE #include <kdebug.h> @@ -62,18 +62,18 @@ struct Theme::Private { * Return the list of parameters defined in the desktop file. We need to * parse the file ourself to preserve parameter order. */ - QStringList readParameterNameList(const QString& desktopFileName) { - QStringList list; - QFile file(desktopFileName); + TQStringList readParameterNameList(const TQString& desktopFileName) { + TQStringList list; + TQFile file(desktopFileName); if (!file.open(IO_ReadOnly)) { - return QStringList(); + return TQStringList(); } - QTextStream stream(&file); - stream.setEncoding(QTextStream::UnicodeUTF8); - QString prefix = QString("[") + PARAMETER_GROUP_PREFIX; + TQTextStream stream(&file); + stream.setEncoding(TQTextStream::UnicodeUTF8); + TQString prefix = TQString("[") + PARAMETER_GROUP_PREFIX; while (!stream.atEnd()) { - QString line = stream.readLine(); + TQString line = stream.readLine(); line = line.stripWhiteSpace(); if (!line.startsWith(prefix)) { continue; @@ -90,22 +90,22 @@ struct Theme::Private { return list; } - void init(const QString& desktopFileName) { + void init(const TQString& desktopFileName) { mDesktopFile=new KDesktopFile(desktopFileName, true /*read only*/); mURL.setPath(desktopFileName); - QStringList parameterNameList = readParameterNameList(desktopFileName); + TQStringList parameterNameList = readParameterNameList(desktopFileName); readParameters(parameterNameList); } - void readParameters(const QStringList& list) { - QStringList::ConstIterator it=list.begin(), end=list.end(); + void readParameters(const TQStringList& list) { + TQStringList::ConstIterator it=list.begin(), end=list.end(); for (;it!=end; ++it) { - QString group = PARAMETER_GROUP_PREFIX + *it; - QCString internalName = (*it).utf8(); + TQString group = PARAMETER_GROUP_PREFIX + *it; + TQCString internalName = (*it).utf8(); KConfigGroupSaver saver(mDesktopFile, group); - QString type = mDesktopFile->readEntry(PARAMETER_TYPE_KEY); + TQString type = mDesktopFile->readEntry(PARAMETER_TYPE_KEY); AbstractThemeParameter* parameter; if (type == STRING_PARAMETER_TYPE) { parameter = new StringThemeParameter(); @@ -139,14 +139,14 @@ Theme::~Theme() { const Theme::List& Theme::getList() { if (sList.isEmpty()) { - QStringList internalNameList; - QStringList list=KGlobal::instance()->dirs()->findAllResources("data", "kipiplugin_htmlexport/themes/*/*.desktop"); - QStringList::Iterator it=list.begin(), end=list.end(); + TQStringList internalNameList; + TQStringList list=KGlobal::instance()->dirs()->findAllResources("data", "kipiplugin_htmlexport/themes/*/*.desktop"); + TQStringList::Iterator it=list.begin(), end=list.end(); for (;it!=end; ++it) { Theme* theme=new Theme; theme->d->init(*it); - QString internalName = theme->internalName(); - if (!internalNameList.contains(internalName)) { + TQString internalName = theme->internalName(); + if (!internalNameList.tqcontains(internalName)) { sList << Theme::Ptr(theme); internalNameList << internalName; } @@ -156,7 +156,7 @@ const Theme::List& Theme::getList() { } -Theme::Ptr Theme::findByInternalName(const QString& internalName) { +Theme::Ptr Theme::findByInternalName(const TQString& internalName) { const Theme::List& lst=getList(); Theme::List::ConstIterator it=lst.begin(), end=lst.end(); for (; it!=end; ++it) { @@ -169,35 +169,35 @@ Theme::Ptr Theme::findByInternalName(const QString& internalName) { } -QString Theme::internalName() const { +TQString Theme::internalName() const { KURL url = d->mURL; url.setFileName(""); return url.fileName(); } -QString Theme::name() const { +TQString Theme::name() const { return d->mDesktopFile->readName(); } -QString Theme::comment() const { +TQString Theme::comment() const { return d->mDesktopFile->readComment(); } -QString Theme::directory() const { +TQString Theme::directory() const { return d->mURL.directory(); } -QString Theme::authorName() const { +TQString Theme::authorName() const { KConfigGroupSaver saver(d->mDesktopFile, AUTHOR_GROUP); return d->mDesktopFile->readEntry("Name"); } -QString Theme::authorUrl() const { +TQString Theme::authorUrl() const { KConfigGroupSaver saver(d->mDesktopFile, AUTHOR_GROUP); return d->mDesktopFile->readEntry("Url"); } diff --git a/kipi-plugins/htmlexport/theme.h b/kipi-plugins/htmlexport/theme.h index 438bc47..0619097 100644 --- a/kipi-plugins/htmlexport/theme.h +++ b/kipi-plugins/htmlexport/theme.h @@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA #ifndef THEME_H #define THEME_H -// Qt -#include <qstring.h> -#include <qvaluelist.h> +// TQt +#include <tqstring.h> +#include <tqvaluelist.h> // KDE #include <ksharedptr.h> @@ -40,24 +40,24 @@ class AbstractThemeParameter; class Theme : public KShared { public: typedef KSharedPtr<Theme> Ptr; - typedef QValueList<Ptr> List; - typedef QValueList<AbstractThemeParameter*> ParameterList; + typedef TQValueList<Ptr> List; + typedef TQValueList<AbstractThemeParameter*> ParameterList; ~Theme(); /** * Internal theme name == name of theme folder */ - QString internalName() const; - QString name() const; - QString comment() const; + TQString internalName() const; + TQString name() const; + TQString comment() const; - QString authorName() const; - QString authorUrl() const; + TQString authorName() const; + TQString authorUrl() const; /** * Theme directory on hard disk */ - QString directory() const; + TQString directory() const; ParameterList parameterList() const; @@ -65,7 +65,7 @@ public: * Returns the list of available themes */ static const List& getList(); - static Ptr findByInternalName(const QString& internalName); + static Ptr findByInternalName(const TQString& internalName); private: Theme(); diff --git a/kipi-plugins/htmlexport/themepage.ui b/kipi-plugins/htmlexport/themepage.ui index 635443c..80eb559 100644 --- a/kipi-plugins/htmlexport/themepage.ui +++ b/kipi-plugins/htmlexport/themepage.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>ThemePage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ThemePage</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -33,7 +33,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistbox.h</includehint> <includehint>ktextbrowser.h</includehint> diff --git a/kipi-plugins/htmlexport/themeparameterspage.ui b/kipi-plugins/htmlexport/themeparameterspage.ui index 0c0fc73..e50469c 100644 --- a/kipi-plugins/htmlexport/themeparameterspage.ui +++ b/kipi-plugins/htmlexport/themeparameterspage.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ThemeParametersPage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ThemeParametersPage</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -37,7 +37,7 @@ <property name="text"> <string>In this page, you can change some theme parameters. Depending on the theme, different parameters are available.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -51,14 +51,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QFrame" row="2" column="1"> + <widget class="TQFrame" row="2" column="1"> <property name="name"> <cstring>content</cstring> </property> @@ -79,7 +79,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -88,5 +88,5 @@ </spacer> </grid> </widget> -<layoutdefaults spacing="6" margin="0"/> +<tqlayoutdefaults spacing="6" margin="0"/> </UI> diff --git a/kipi-plugins/htmlexport/wizard.cpp b/kipi-plugins/htmlexport/wizard.cpp index 3f8660b..6833f4c 100644 --- a/kipi-plugins/htmlexport/wizard.cpp +++ b/kipi-plugins/htmlexport/wizard.cpp @@ -21,16 +21,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA // Self #include "wizard.moc" -// Qt -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qobjectlist.h> -#include <qpainter.h> -#include <qspinbox.h> +// TQt +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqobjectlist.h> +#include <tqpainter.h> +#include <tqspinbox.h> // KDE #include <kconfigdialogmanager.h> @@ -63,10 +63,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA namespace KIPIHTMLExport { -class ThemeListBoxItem : public QListBoxText { +class ThemeListBoxItem : public TQListBoxText { public: - ThemeListBoxItem(QListBox* list, Theme::Ptr theme) - : QListBoxText(list, theme->name()) + ThemeListBoxItem(TQListBox* list, Theme::Ptr theme) + : TQListBoxText(list, theme->name()) , mTheme(theme) {} @@ -84,7 +84,7 @@ struct Wizard::Private { ImageSettingsPage* mImageSettingsPage; OutputPage* mOutputPage; KIPIPlugins::KPAboutData* mAbout; - QMap<QCString, QWidget*> mThemeParameterWidgetFromName; + TQMap<TQCString, TQWidget*> mThemeParameterWidgetFromName; void initThemePage() { KListBox* listBox=mThemePage->mThemeList; @@ -101,72 +101,72 @@ struct Wizard::Private { void fillThemeParametersPage(Theme::Ptr theme) { // Delete any previous widgets - QFrame* content = mThemeParametersPage->content; - if (content->layout()) { + TQFrame* content = mThemeParametersPage->content; + if (content->tqlayout()) { // Setting recursiveSearch to false is very important, if we don't // we will end up deleting subwidgets of our child widgets - QObjectList* list = content->queryList("QWidget", 0 /*objName*/, + TQObjectList* list = content->queryList(TQWIDGET_OBJECT_NAME_STRING, 0 /*objName*/, false /*regexpMatch*/, false /*recursiveSearch*/); - QObjectListIterator it(*list); + TQObjectListIterator it(*list); for( ; it.current(); ++it) { delete it.current(); } - delete content->layout(); + delete content->tqlayout(); } mThemeParameterWidgetFromName.clear(); - // Create layout. We need to recreate it everytime, to get rid of + // Create tqlayout. We need to recreate it everytime, to get rid of // spacers - QGridLayout* layout = new QGridLayout(content, 0, 3); - layout->setSpacing(KDialog::spacingHint()); + TQGridLayout* tqlayout = new TQGridLayout(content, 0, 3); + tqlayout->setSpacing(KDialog::spacingHint()); // Create widgets Theme::ParameterList parameterList = theme->parameterList(); - QString themeInternalName = theme->internalName(); + TQString themeInternalName = theme->internalName(); Theme::ParameterList::ConstIterator it = parameterList.begin(), end = parameterList.end(); for (; it!=end; ++it) { AbstractThemeParameter* themeParameter = *it; - QCString internalName = themeParameter->internalName(); - QString value = mInfo->getThemeParameterValue( + TQCString internalName = themeParameter->internalName(); + TQString value = mInfo->getThemeParameterValue( themeInternalName, internalName, themeParameter->defaultValue()); - QString name = themeParameter->name(); - name = i18n("'%1' is a label for a theme parameter", "%1:").arg(name); + TQString name = themeParameter->name(); + name = i18n("'%1' is a label for a theme parameter", "%1:").tqarg(name); - QLabel* label = new QLabel(name, content); - QWidget* widget = themeParameter->createWidget(content, value); + TQLabel* label = new TQLabel(name, content); + TQWidget* widget = themeParameter->createWidget(content, value); label->setBuddy(widget); - int row = layout->numRows(); - layout->addWidget(label, row, 0); + int row = tqlayout->numRows(); + tqlayout->addWidget(label, row, 0); - if (widget->sizePolicy().expanding() & QSizePolicy::Horizontally) { + if (widget->tqsizePolicy().expanding() & TQSizePolicy::Horizontally) { // Widget wants full width - layout->addMultiCellWidget(widget, row, row, 1, 2); + tqlayout->addMultiCellWidget(widget, row, row, 1, 2); } else { // Widget doesn't like to be stretched, add a spacer next to it - layout->addWidget(widget, row, 1); - QSpacerItem* spacer = new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum); - layout->addItem(spacer, row, 2); + tqlayout->addWidget(widget, row, 1); + TQSpacerItem* spacer = new TQSpacerItem(1, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum); + tqlayout->addItem(spacer, row, 2); } mThemeParameterWidgetFromName[internalName] = widget; } // Add spacer at the end, so that widgets aren't spread on the whole - // parent height - QSpacerItem* spacer = new QSpacerItem(1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); - layout->addItem(spacer, layout->numRows(), 0); + // tqparent height + TQSpacerItem* spacer = new TQSpacerItem(1, 1, TQSizePolicy::Minimum, TQSizePolicy::Expanding); + tqlayout->addItem(spacer, tqlayout->numRows(), 0); } }; -Wizard::Wizard(QWidget* parent, KIPI::Interface* interface, GalleryInfo* info) -: KWizard(parent) +Wizard::Wizard(TQWidget* tqparent, KIPI::Interface* interface, GalleryInfo* info) +: KWizard(tqparent) { d=new Private; d->mInfo=info; @@ -184,7 +184,7 @@ Wizard::Wizard(QWidget* parent, KIPI::Interface* interface, GalleryInfo* info) // Help button KHelpMenu* helpMenu = new KHelpMenu(this, d->mAbout, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(showHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(showHelp()), 0, -1, 0); helpButton()->setPopup( helpMenu->menu() ); d->mCollectionSelector=new KIPI::ImageCollectionSelector(this, interface); @@ -193,8 +193,8 @@ Wizard::Wizard(QWidget* parent, KIPI::Interface* interface, GalleryInfo* info) d->mThemePage=new ThemePage(this); d->initThemePage(); addPage(d->mThemePage, i18n("Theme")); - connect(d->mThemePage->mThemeList, SIGNAL(selectionChanged()), - this, SLOT(slotThemeSelectionChanged()) ); + connect(d->mThemePage->mThemeList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotThemeSelectionChanged()) ); d->mThemeParametersPage = new ThemeParametersPage(this); addPage(d->mThemeParametersPage, i18n("Theme Parameters")); @@ -206,8 +206,8 @@ Wizard::Wizard(QWidget* parent, KIPI::Interface* interface, GalleryInfo* info) d->mOutputPage->kcfg_destURL->setMode(KFile::Directory); addPage(d->mOutputPage, i18n("Output")); - connect(d->mOutputPage->kcfg_destURL, SIGNAL(textChanged(const QString&)), - this, SLOT(updateFinishButton()) ); + connect(d->mOutputPage->kcfg_destURL, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(updateFinishButton()) ); d->mConfigManager=new KConfigDialogManager(this, d->mInfo); d->mConfigManager->updateWidgets(); @@ -239,15 +239,15 @@ void Wizard::slotThemeSelectionChanged() { if (listBox->selectedItem()) { Theme::Ptr theme=static_cast<ThemeListBoxItem*>(listBox->selectedItem())->mTheme; - QString url=theme->authorUrl(); - QString author=theme->authorName(); + TQString url=theme->authorUrl(); + TQString author=theme->authorName(); if (!url.isEmpty()) { - author=QString("<a href='%1'>%2</a>").arg(url).arg(author); + author=TQString("<a href='%1'>%2</a>").tqarg(url).tqarg(author); } - QString txt= - QString("<b>%1</b><br><br>%2<br><br>").arg(theme->name(), theme->comment()) - + i18n("Author: %1").arg(author); + TQString txt= + TQString("<b>%1</b><br><br>%2<br><br>").tqarg(theme->name(), theme->comment()) + + i18n("Author: %1").tqarg(author); browser->setText(txt); setNextEnabled(d->mThemePage, true); @@ -270,7 +270,7 @@ void Wizard::accept() { d->mInfo->mCollectionList=d->mCollectionSelector->selectedImageCollections(); Theme::Ptr theme=static_cast<ThemeListBoxItem*>(d->mThemePage->mThemeList->selectedItem())->mTheme; - QString themeInternalName = theme->internalName(); + TQString themeInternalName = theme->internalName(); d->mInfo->setTheme(themeInternalName); Theme::ParameterList parameterList = theme->parameterList(); @@ -279,9 +279,9 @@ void Wizard::accept() { end = parameterList.end(); for (; it!=end; ++it) { AbstractThemeParameter* themeParameter = *it; - QCString parameterInternalName = themeParameter->internalName(); - QWidget* widget = d->mThemeParameterWidgetFromName[parameterInternalName]; - QString value = themeParameter->valueFromWidget(widget); + TQCString parameterInternalName = themeParameter->internalName(); + TQWidget* widget = d->mThemeParameterWidgetFromName[parameterInternalName]; + TQString value = themeParameter->valueFromWidget(widget); d->mInfo->setThemeParameterValue( themeInternalName, diff --git a/kipi-plugins/htmlexport/wizard.h b/kipi-plugins/htmlexport/wizard.h index 23749ad..d7e0bbd 100644 --- a/kipi-plugins/htmlexport/wizard.h +++ b/kipi-plugins/htmlexport/wizard.h @@ -37,8 +37,9 @@ class GalleryInfo; */ class Wizard : public KWizard { Q_OBJECT + TQ_OBJECT public: - Wizard(QWidget* parent, KIPI::Interface* interface, GalleryInfo* info); + Wizard(TQWidget* tqparent, KIPI::Interface* interface, GalleryInfo* info); ~Wizard(); protected slots: diff --git a/kipi-plugins/htmlexport/xmlutils.h b/kipi-plugins/htmlexport/xmlutils.h index baca26a..8f066ae 100644 --- a/kipi-plugins/htmlexport/xmlutils.h +++ b/kipi-plugins/htmlexport/xmlutils.h @@ -66,7 +66,7 @@ private: */ class XMLWriter { public: - bool open(const QString& name) { + bool open(const TQString& name) { xmlTextWriterPtr ptr=xmlNewTextWriterFilename(name.local8Bit(), 0); if (!ptr) return false; mWriter.assign(ptr); @@ -86,12 +86,12 @@ public: return mWriter; } - void writeElement(const char* element, const QString& value) { + void writeElement(const char* element, const TQString& value) { xmlTextWriterWriteElement(mWriter, BAD_CAST element, BAD_CAST value.utf8().data()); } void writeElement(const char* element, int value) { - writeElement(element, QString::number(value)); + writeElement(element, TQString::number(value)); } private: @@ -103,7 +103,7 @@ private: * A list of attributes for an XML element. To be used with @ref XMLElement */ class XMLAttributeList { - typedef QMap<QString, QString> Map; + typedef TQMap<TQString, TQString> Map; public: void write(XMLWriter& writer) const { Map::const_iterator it=mMap.begin(); @@ -115,12 +115,12 @@ public: } } - void append(const QString& key, const QString& value) { + void append(const TQString& key, const TQString& value) { mMap[key]=value; } - void append(const QString& key, int value) { - mMap[key]=QString::number(value); + void append(const TQString& key, int value) { + mMap[key]=TQString::number(value); } private: @@ -133,7 +133,7 @@ private: */ class XMLElement { public: - XMLElement(XMLWriter& writer, const QString& element, const XMLAttributeList* attributeList=0) + XMLElement(XMLWriter& writer, const TQString& element, const XMLAttributeList* attributeList=0) : mWriter(writer) { xmlTextWriterStartElement(writer, BAD_CAST element.ascii()); diff --git a/kipi-plugins/imageviewer/help.ui b/kipi-plugins/imageviewer/help.ui index c35a135..6eefef5 100644 --- a/kipi-plugins/imageviewer/help.ui +++ b/kipi-plugins/imageviewer/help.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KIPIviewer::HelpDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>HelpDialog</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -18,11 +18,11 @@ <property name="modal"> <bool>false</bool> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton1</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>260</x> <y>500</y> @@ -37,11 +37,11 @@ <string>Alt+K</string> </property> </widget> - <widget class="QTextBrowser"> + <widget class="TQTextBrowser"> <property name="name"> <cstring>textBrowser2</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>10</y> @@ -115,8 +115,8 @@ <slot>close()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>pushButton1_clicked()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kipi-plugins/imageviewer/plugin_viewer.cpp b/kipi-plugins/imageviewer/plugin_viewer.cpp index 9c9ebe1..b7f9c67 100644 --- a/kipi-plugins/imageviewer/plugin_viewer.cpp +++ b/kipi-plugins/imageviewer/plugin_viewer.cpp @@ -24,7 +24,7 @@ #include <kurl.h> // QT includes -#include <qmessagebox.h> +#include <tqmessagebox.h> // kipi includes #include <libkipi/imageinfo.h> @@ -38,17 +38,17 @@ typedef KGenericFactory<Plugin_viewer> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_viewer, Factory("kipiplugin_viewer")) -Plugin_viewer::Plugin_viewer( QObject *parent, const char* name, const QStringList& ) - :KIPI::Plugin::Plugin( Factory::instance(), parent, name ) +Plugin_viewer::Plugin_viewer( TQObject *tqparent, const char* name, const TQStringList& ) + :KIPI::Plugin::Plugin( Factory::instance(), tqparent, name ) { kdDebug(51001) << "image viewer plugin loaded" << endl; } -void Plugin_viewer::setup( QWidget* widget ) +void Plugin_viewer::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -60,7 +60,7 @@ void Plugin_viewer::setup( QWidget* widget ) "ViewerWidget", 0, // do never set shortcuts from plugins. this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "viewer"); addAction(actionViewer); @@ -87,7 +87,7 @@ KIPI::Category Plugin_viewer::category( KAction* action ) const */ void Plugin_viewer::slotActivate() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -105,12 +105,12 @@ void Plugin_viewer::slotActivate() case KIPIviewer::oglNoRectangularTexture: kdError( 51000 ) << "GL_ARB_texture_rectangle not supported" << endl; delete widget; - QMessageBox::critical(new QWidget(),"OpenGL error","GL_ARB_texture_rectangle not supported"); + TQMessageBox::critical(new TQWidget(),"OpenGL error","GL_ARB_texture_rectangle not supported"); break; case KIPIviewer::oglNoContext: kdError( 51000 ) << "no OpenGL context found" << endl; delete widget; - QMessageBox::critical(new QWidget(),"OpenGL error","no OpenGL context found"); + TQMessageBox::critical(new TQWidget(),"OpenGL error","no OpenGL context found"); } } diff --git a/kipi-plugins/imageviewer/plugin_viewer.h b/kipi-plugins/imageviewer/plugin_viewer.h index 5ae5547..9ca7b23 100644 --- a/kipi-plugins/imageviewer/plugin_viewer.h +++ b/kipi-plugins/imageviewer/plugin_viewer.h @@ -38,9 +38,10 @@ class KAction; class Plugin_viewer :public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_viewer( QObject *parent, const char* name, const QStringList& ); - virtual void setup( QWidget* widget ); + Plugin_viewer( TQObject *tqparent, const char* name, const TQStringList& ); + virtual void setup( TQWidget* widget ); virtual KIPI::Category category( KAction* action ) const; protected: diff --git a/kipi-plugins/imageviewer/texture.cpp b/kipi-plugins/imageviewer/texture.cpp index 3581be2..065578c 100644 --- a/kipi-plugins/imageviewer/texture.cpp +++ b/kipi-plugins/imageviewer/texture.cpp @@ -20,9 +20,9 @@ #undef PERFORMANCE_ANALYSIS -// Qt includes -#include <qwmatrix.h> -#include <qfileinfo.h> +// TQt includes +#include <tqwmatrix.h> +#include <tqfileinfo.h> //KDE includes #include <kdebug.h> @@ -85,7 +85,7 @@ int Texture::width() /*! - \fn Texture::load(QString fn, QSize size, GLuint tn) + \fn Texture::load(TQString fn, TQSize size, GLuint tn) \brief load file from disc and save it in texture \param fn filename to load \param size size of image which is downloaded to texture mem @@ -93,7 +93,7 @@ int Texture::width() if "size" is set to image size, scaling is only performed by the GPU but not by the CPU, however the AGP usage to texture memory is increased (20MB for a 5mp image) */ -bool Texture::load(QString fn, QSize size, GLuint tn) +bool Texture::load(TQString fn, TQSize size, GLuint tn) { filename=fn; initial_size=size; @@ -101,23 +101,23 @@ bool Texture::load(QString fn, QSize size, GLuint tn) // check if its a RAW file. #if KDCRAW_VERSION < 0x000106 - QString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); + TQString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); #else - QString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); + TQString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); #endif - QFileInfo fileInfo(fn); - if (rawFilesExt.upper().contains( fileInfo.extension(false).upper() )) { + TQFileInfo fileInfo(fn); + if (rawFilesExt.upper().tqcontains( fileInfo.extension(false).upper() )) { // it's a RAW file, use the libkdcraw loader KDcrawIface::KDcraw::loadDcrawPreview(qimage, fn); } else { // use the standard loader - qimage=QImage(fn); + qimage=TQImage(fn); } //handle rotation KIPI::ImageInfo info = kipiInterface->info(filename); if (info.angle() != 0) { - QWMatrix r; + TQWMatrix r; r.rotate(info.angle()); qimage=qimage.xForm(r); kdDebug(51000) << "image rotated by " << info.angle() << " degree" << endl; @@ -134,15 +134,15 @@ bool Texture::load(QString fn, QSize size, GLuint tn) } /*! - \fn Texture::load(QImage im, QSize size, GLuint tn) - \brief copy file from QImage to texture + \fn Texture::load(TQImage im, TQSize size, GLuint tn) + \brief copy file from TQImage to texture \param im Qimage to be copied from \param size size of image which is downloaded to texture mem \param tn texture id generated by glGenTexture if "size" is set to image size, scaling is only performed by the GPU but not by the CPU, however the AGP usage to texture memory is increased (20MB for a 5mp image) */ -bool Texture::load(QImage im, QSize size, GLuint tn) +bool Texture::load(TQImage im, TQSize size, GLuint tn) { qimage=im; initial_size=size; @@ -164,9 +164,9 @@ bool Texture::_load() int h=initial_size.height(); if (w==0 || w>qimage.width() || h>qimage.height()) { - glimage=QGLWidget::convertToGLFormat(qimage); + glimage=TQGLWidget::convertToGLFormat(qimage); } else { - glimage=QGLWidget::convertToGLFormat(qimage.scale(w,h,QImage::ScaleMin)); + glimage=TQGLWidget::convertToGLFormat(qimage.scale(w,h,TQ_ScaleMin)); } w=glimage.width(); @@ -202,13 +202,13 @@ GLuint Texture::texnr() /*! - \fn Texture::zoom(float delta, QPoint mousepos) + \fn Texture::zoom(float delta, TQPoint mousepos) \brief calculate new tex coords on zooming \param delta delta between previous zoom and current zoom \param mousepos mouse position returned by QT \TODO rename mousepos to something more generic */ -void Texture::zoom(float delta, QPoint mousepos) +void Texture::zoom(float delta, TQPoint mousepos) //u: start in texture, u=[0..1], u=0 is begin, u=1 is end of texture //z=[0..1], z=1 -> no zoom //l: length of tex in glFrustum coordinate system @@ -324,10 +324,10 @@ void Texture::setViewport(int w, int h) /*! - \fn Texture::move(QPoint diff) + \fn Texture::move(TQPoint diff) new tex coordinates have to be calculated if the view is panned */ -void Texture::move(QPoint diff) +void Texture::move(TQPoint diff) { ux=ux-diff.x()/float(display_x)*z*rdx/rtx; uy=uy+diff.y()/float(display_y)*z*rdy/rty; @@ -358,22 +358,22 @@ void Texture::reset() if ((rtx>=rty) && (rty/rtx > rdy/rdx)) { zoomdelta=z-rty; } - QPoint p = QPoint(display_x/2,display_y/2); + TQPoint p = TQPoint(display_x/2,display_y/2); zoom(1.0-zoomdelta,p); calcVertex(); } /*! - \fn Texture::setSize(QSize size) - \param size desired texture size. QSize(0,0) will take the full image + \fn Texture::setSize(TQSize size) + \param size desired texture size. TQSize(0,0) will take the full image \return true if size has changed, false otherwise set new texture size in order to reduce AGP bandwidth */ -bool Texture::setSize(QSize size) +bool Texture::setSize(TQSize size) { //don't allow larger textures than the original image. the image will be upsampled by - //OpenGL if necessary and not by QImage::scale + //OpenGL if necessary and not by TQImage::scale size=size.boundedTo(qimage.size()); if (glimage.width()==size.width()) { @@ -384,9 +384,9 @@ bool Texture::setSize(QSize size) int h=size.height(); if (w==0) { - glimage=QGLWidget::convertToGLFormat(qimage); + glimage=TQGLWidget::convertToGLFormat(qimage); } else { - glimage=QGLWidget::convertToGLFormat(qimage.scale(w,h,QImage::ScaleMin)); + glimage=TQGLWidget::convertToGLFormat(qimage.scale(w,h,TQ_ScaleMin)); } //recalculate half-texel offset @@ -404,7 +404,7 @@ bool Texture::setSize(QSize size) */ void Texture::rotate() { - QWMatrix r; + TQWMatrix r; r.rotate(rotate_list[rotate_idx%4]); qimage=qimage.xForm(r); _load(); @@ -436,5 +436,5 @@ void Texture::zoomToOriginal() zoomfactorToOriginal=float(display_y)/qimage.height(); } - zoom(zoomfactorToOriginal,QPoint(display_x/2,display_y/2)); + zoom(zoomfactorToOriginal,TQPoint(display_x/2,display_y/2)); } diff --git a/kipi-plugins/imageviewer/texture.h b/kipi-plugins/imageviewer/texture.h index 47fbfdd..a19fcf6 100644 --- a/kipi-plugins/imageviewer/texture.h +++ b/kipi-plugins/imageviewer/texture.h @@ -22,10 +22,10 @@ #define TEXTURE_H //QT includes -#include <qgl.h> -#include <qstring.h> -#include <qdatetime.h> -#include <qimage.h> +#include <tqgl.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqimage.h> // libkipi includes @@ -45,8 +45,8 @@ public: ~Texture(); int height(); int width(); - bool load(QString fn, QSize size, GLuint tn); - bool load(QImage im, QSize size, GLuint tn); + bool load(TQString fn, TQSize size, GLuint tn); + bool load(TQImage im, TQSize size, GLuint tn); GLvoid * data(); GLuint texnr(); GLfloat vertex_bottom(); @@ -54,10 +54,10 @@ public: GLfloat vertex_left(); GLfloat vertex_right(); void setViewport(int w, int h); - void zoom(float delta, QPoint mousepos); + void zoom(float delta, TQPoint mousepos); void reset(); - void move(QPoint diff); - bool setSize(QSize size); + void move(TQPoint diff); + bool setSize(TQSize size); void rotate(); void zoomToOriginal(); @@ -67,9 +67,9 @@ protected: int display_x, display_y; GLuint _texnr; - QSize initial_size; - QString filename; - QImage qimage, glimage; + TQSize initial_size; + TQString filename; + TQImage qimage, glimage; float rdx,rdy,z,ux,uy,rtx,rty; float vtop, vbottom, vleft, vright; int rotate_list[4], rotate_idx; diff --git a/kipi-plugins/imageviewer/timer.cpp b/kipi-plugins/imageviewer/timer.cpp index 5c8d818..959a89e 100644 --- a/kipi-plugins/imageviewer/timer.cpp +++ b/kipi-plugins/imageviewer/timer.cpp @@ -32,7 +32,7 @@ void Timer::start() meantime=0; } -void Timer::at(QString s) +void Timer::at(TQString s) { meantime=timer.elapsed()-meantime; kdDebug(51000) << "stopwatch:"<< s << ": " << meantime << " ms overall: " << timer.elapsed() << " ms" << endl; diff --git a/kipi-plugins/imageviewer/timer.h b/kipi-plugins/imageviewer/timer.h index f05e222..9a8ee76 100644 --- a/kipi-plugins/imageviewer/timer.h +++ b/kipi-plugins/imageviewer/timer.h @@ -19,8 +19,8 @@ ***************************************************************************/ #ifndef TIMER_H #define TIMER_H -#include <qstring.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqdatetime.h> /** * @short convenience class for profiling @@ -34,9 +34,9 @@ public: Timer(); ~Timer(); void start(); - void at(QString s); + void at(TQString s); protected: - QTime timer; + TQTime timer; int meantime; }; }; //namespace KIPIviewer diff --git a/kipi-plugins/imageviewer/viewerwidget.cpp b/kipi-plugins/imageviewer/viewerwidget.cpp index 082d27f..b0e51c8 100644 --- a/kipi-plugins/imageviewer/viewerwidget.cpp +++ b/kipi-plugins/imageviewer/viewerwidget.cpp @@ -21,12 +21,12 @@ #undef PERFORMANCE_ANALYSIS // global includes -#include <qgl.h> +#include <tqgl.h> #include <iostream> -#include <qlabel.h> +#include <tqlabel.h> #include <klocale.h> -#include <qdragobject.h> -#include <qbitmap.h> +#include <tqdragobject.h> +#include <tqbitmap.h> #include <kdebug.h> #include <kiconloader.h> #include <kstandarddirs.h> @@ -53,7 +53,7 @@ ViewerWidget::ViewerWidget(KIPI::Interface* i) { KURL::List myfiles; //pics which are displayed in imageviewer - QString selectedImage; //selected pic in hostapp + TQString selectedImage; //selected pic in hostapp int foundNumber=0; file_idx=0; //index of picture to be displayed @@ -72,12 +72,12 @@ ViewerWidget::ViewerWidget(KIPI::Interface* i) { myfiles = selection.images(); } - // populate QStringList::files + // populate TQStringList::files for(KURL::List::Iterator it = myfiles.begin(); it != myfiles.end();it++) { // find selected image in album in order to determine the first displayed image // in case one image was selected and the entire album was loaded - QString s = (*it).path(); + TQString s = (*it).path(); if ( s==selectedImage ) { kdDebug(51000) << "selected img " << selectedImage << " has idx=" << foundNumber << endl; file_idx=foundNumber; @@ -85,7 +85,7 @@ ViewerWidget::ViewerWidget(KIPI::Interface* i) { // only add images to files KMimeType::Ptr type = KMimeType::findByURL(s); - bool isImage=type->name().find("image")>=0; + bool isImage=type->name().tqfind("image")>=0; if ( isImage ) { files.append(s); @@ -109,26 +109,26 @@ ViewerWidget::ViewerWidget(KIPI::Interface* i) { zoomfactor_keyboard = 1.05; // load cursors for zooming and panning - QString file; + TQString file; file = locate( "data", "kipiplugin_imageviewer/pics/zoom.png" ); - zoomCursor=QCursor(file); + zoomCursor=TQCursor(file); file = locate( "data", "kipiplugin_imageviewer/pics/hand.png" ); - moveCursor=QCursor(file); + moveCursor=TQCursor(file); - // get path of nullImage in case QImage can't load the image + // get path of nullImage in case TQImage can't load the image nullImage = locate( "data", "kipiplugin_imageviewer/pics/nullImage.png" ); showFullScreen(); // let the cursor dissapear after 2sec of inactivity - connect( &timerMouseMove, SIGNAL(timeout()),this, SLOT( timeoutMouseMove()) ); + connect( &timerMouseMove, TQT_SIGNAL(timeout()),this, TQT_SLOT( timeoutMouseMove()) ); timerMouseMove.start(2000); setMouseTracking(true); // while zooming is performed, the image is downsampled to zoomsize. This seems to // be the optimal way for a PentiumM 1.4G, Nvidia FX5200. For a faster setup, this might // not be necessary anymore - zoomsize=QSize(1024,768); + zoomsize=TQSize(1024,768); // other initialisations wheelAction = changeImage; @@ -159,7 +159,7 @@ void ViewerWidget::initializeGL() { */ void ViewerWidget::paintGL() { //prepare 1st image - //this test has to be performed here since QWidget::width() is only updated now + //this test has to be performed here since TQWidget::width() is only updated now if (firstImage) { texture=loadImage(file_idx); texture->reset(); @@ -239,13 +239,13 @@ void ViewerWidget::drawImage(Texture * texture) /*! - \fn ViewerWidget::keyPressEvent(QKeyEvent *k) + \fn ViewerWidget::keyPressEvent(TQKeyEvent *k) Handle all keyboard events. All events which are not handled trigger a help window. */ -void ViewerWidget::keyPressEvent(QKeyEvent *k) +void ViewerWidget::keyPressEvent(TQKeyEvent *k) { - QPoint middlepoint; + TQPoint middlepoint; switch (k->key()) { // next image @@ -308,7 +308,7 @@ void ViewerWidget::keyPressEvent(QKeyEvent *k) // zoom in case Key_Plus: - middlepoint = QPoint(width()/2,height()/2); + middlepoint = TQPoint(width()/2,height()/2); if (texture->setSize( zoomsize )) { downloadTex(texture); //load full resolution image }; @@ -317,7 +317,7 @@ void ViewerWidget::keyPressEvent(QKeyEvent *k) // zoom out case Key_Minus: - middlepoint = QPoint(width()/2,height()/2); + middlepoint = TQPoint(width()/2,height()/2); if (texture->setSize( zoomsize )) downloadTex(texture); //load full resolution image zoom(1, middlepoint, zoomfactor_keyboard); @@ -349,22 +349,22 @@ void ViewerWidget::keyPressEvent(QKeyEvent *k) //key is not bound to any action, therefore show help dialog to enlighten the user default: - QDialog * h = new HelpDialog(0,0,Qt::WStyle_StaysOnTop); + TQDialog * h = new HelpDialog(0,0,TQt::WStyle_StaysOnTop); h->show(); } } /*! - \fn ViewerWidget::keyReleaseEvent ( QKeyEvent * e ) + \fn ViewerWidget::keyReleaseEvent ( TQKeyEvent * e ) */ -void ViewerWidget::keyReleaseEvent ( QKeyEvent * e ) +void ViewerWidget::keyReleaseEvent ( TQKeyEvent * e ) { switch (e->key()) { case Key_Plus: case Key_Minus: if (!e->isAutoRepeat()) { unsetCursor(); - if (texture->setSize(QSize(0,0))) { + if (texture->setSize(TQSize(0,0))) { downloadTex(texture); //load full resolution image } updateGL(); @@ -409,7 +409,7 @@ void ViewerWidget::downloadTex(Texture * tex) /*! \fn ViewerWidget::loadImage(int file_index) - \param file_index index to QStringList files + \param file_index index to TQStringList files load files[file_index] into a texture object if it is not already cached */ Texture * ViewerWidget::loadImage(int file_index) @@ -423,13 +423,13 @@ Texture * ViewerWidget::loadImage(int file_index) } else { // image is net yet loaded - QString f = files[file_index]; + TQString f = files[file_index]; kdDebug(51000) << "loading image " << f << "(idx=" << file_index << ") to cache@" << imod << endl; cache[imod].file_index=file_index; // handle non-loadable images - if (!cache[imod].texture->load(f,QSize(width(),height()),tex[0])) { - cache[imod].texture->load(nullImage,QSize(width(),height()),tex[0]); + if (!cache[imod].texture->load(f,TQSize(width(),height()),tex[0])) { + cache[imod].texture->load(nullImage,TQSize(width(),height()),tex[0]); } cache[imod].texture->setViewport(width(),height()); @@ -439,9 +439,9 @@ Texture * ViewerWidget::loadImage(int file_index) /*! - \fn ViewerWidget::wheelEvent ( QWheelEvent * e ) + \fn ViewerWidget::wheelEvent ( TQWheelEvent * e ) */ -void ViewerWidget::wheelEvent ( QWheelEvent * e ) +void ViewerWidget::wheelEvent ( TQWheelEvent * e ) { switch(wheelAction) { // mousewheel triggers zoom @@ -462,9 +462,9 @@ void ViewerWidget::wheelEvent ( QWheelEvent * e ) /*! - \fn ViewerWidget::mousePressEvent ( QMouseEvent * e ) + \fn ViewerWidget::mousePressEvent ( TQMouseEvent * e ) */ -void ViewerWidget::mousePressEvent ( QMouseEvent * e ) +void ViewerWidget::mousePressEvent ( TQMouseEvent * e ) { // begin zoom // scale down texture for fast zooming @@ -488,13 +488,13 @@ void ViewerWidget::mousePressEvent ( QMouseEvent * e ) /*! - \fn ViewerWidget::mouseMoveEvent ( QMouseEvent * e ) + \fn ViewerWidget::mouseMoveEvent ( TQMouseEvent * e ) */ -void ViewerWidget::mouseMoveEvent ( QMouseEvent * e ) +void ViewerWidget::mouseMoveEvent ( TQMouseEvent * e ) { if ( e->state() == LeftButton ) { //panning - QPoint diff=e->pos()-startdrag; + TQPoint diff=e->pos()-startdrag; texture->move(diff); updateGL(); startdrag=e->pos(); @@ -598,7 +598,7 @@ void ViewerWidget::nextImage() /*! - \fn ViewerWidget::zoom(int mdelta, QPos pos) + \fn ViewerWidget::zoom(int mdelta, TQPos pos) \param mdelta delta of mouse movement: mdelta>0: zoom in mdelta<0: zoom out @@ -606,7 +606,7 @@ void ViewerWidget::nextImage() \param pos position of mouse \param factor zoom factor:scrollwheel needs a higher factor that right click mouse move. factor=1 -> no zoom */ -void ViewerWidget::zoom(int mdelta, QPoint pos, float factor) +void ViewerWidget::zoom(int mdelta, TQPoint pos, float factor) { if (mdelta==0) { //do nothing @@ -629,10 +629,10 @@ void ViewerWidget::zoom(int mdelta, QPoint pos, float factor) /*! - \fn ViewerWidget::mouseDoubleClickEvent(QMouseEvent * e ) + \fn ViewerWidget::mouseDoubleClickEvent(TQMouseEvent * e ) a double click resets the view (zoom and move) */ -void ViewerWidget::mouseDoubleClickEvent(QMouseEvent * ) +void ViewerWidget::mouseDoubleClickEvent(TQMouseEvent * ) { texture->reset(); updateGL(); @@ -640,13 +640,13 @@ void ViewerWidget::mouseDoubleClickEvent(QMouseEvent * ) /*! - \fn ViewerWidget::mouseReleaseEvent(QMouseEvent * e) + \fn ViewerWidget::mouseReleaseEvent(TQMouseEvent * e) */ -void ViewerWidget::mouseReleaseEvent(QMouseEvent * ) +void ViewerWidget::mouseReleaseEvent(TQMouseEvent * ) { timerMouseMove.start(2000); unsetCursor(); - if (texture->setSize(QSize(0,0))) { //load full resolution image + if (texture->setSize(TQSize(0,0))) { //load full resolution image downloadTex(texture); } updateGL(); @@ -659,7 +659,7 @@ void ViewerWidget::mouseReleaseEvent(QMouseEvent * ) */ void ViewerWidget::timeoutMouseMove() { - setCursor (QCursor (blankCursor)); + setCursor (TQCursor (blankCursor)); } @@ -680,8 +680,8 @@ OGLstate ViewerWidget::getOGLstate() } //GL_ARB_texture_rectangle is not supported - QString s = QString ( ( char* ) glGetString ( GL_EXTENSIONS ) ); - if ( !s.contains ( "GL_ARB_texture_rectangle",false ) ) { + TQString s = TQString ( ( char* ) glGetString ( GL_EXTENSIONS ) ); + if ( !s.tqcontains ( "GL_ARB_texture_rectangle",false ) ) { return oglNoRectangularTexture; } diff --git a/kipi-plugins/imageviewer/viewerwidget.h b/kipi-plugins/imageviewer/viewerwidget.h index 6ea093c..3b7afe9 100644 --- a/kipi-plugins/imageviewer/viewerwidget.h +++ b/kipi-plugins/imageviewer/viewerwidget.h @@ -22,16 +22,16 @@ #define _VIEWERWIDGET_H_ //QT includes -#include <qgl.h> -#include <qdir.h> -#include <qimage.h> -#include <qdatetime.h> +#include <tqgl.h> +#include <tqdir.h> +#include <tqimage.h> +#include <tqdatetime.h> #include <iostream> #include <kurl.h> #include <kmimetype.h> -#include <qregexp.h> -#include <qcursor.h> -#include <qtimer.h> +#include <tqregexp.h> +#include <tqcursor.h> +#include <tqtimer.h> //kipi includes #include <libkipi/imageinfo.h> @@ -59,9 +59,10 @@ enum OGLstate { oglOK, oglNoRectangularTexture, oglNoContext }; -class ViewerWidget : public QGLWidget +class ViewerWidget : public TQGLWidget { Q_OBJECT + TQ_OBJECT public: ViewerWidget(KIPI::Interface*); @@ -81,9 +82,9 @@ public: Texture * loadImage(int file_index); void prevImage(); void nextImage(); - void zoom(int mdelta, QPoint pos, float factor); - virtual void mouseReleaseEvent(QMouseEvent * e); - virtual void keyReleaseEvent ( QKeyEvent * e ); + void zoom(int mdelta, TQPoint pos, float factor); + virtual void mouseReleaseEvent(TQMouseEvent * e); + virtual void keyReleaseEvent ( TQKeyEvent * e ); OGLstate getOGLstate(); protected: @@ -99,29 +100,29 @@ protected: Texture * texture; unsigned int old_file_idx,file_idx,idx, oldidx; float ratio_view_y,ratio_view_x,delta; - QTime timer; - QDir directory; - QStringList files; + TQTime timer; + TQDir directory; + TQStringList files; unsigned char * imageJPEGLIB; Cache cache[CACHESIZE]; GLuint tex[3]; float vertex_height,vertex_width,vertex_left,vertex_top,vertex_right,vertex_bottom; - QPoint startdrag, previous_pos; + TQPoint startdrag, previous_pos; WheelAction wheelAction; bool firstImage; - QSize zoomsize; - QTimer timerMouseMove; - QCursor moveCursor, zoomCursor; + TQSize zoomsize; + TQTimer timerMouseMove; + TQCursor moveCursor, zoomCursor; float zoomfactor_scrollwheel, zoomfactor_mousemove, zoomfactor_keyboard; - QString nullImage; + TQString nullImage; KIPI::Interface * kipiInterface; protected: - virtual void keyPressEvent(QKeyEvent *k); - virtual void wheelEvent ( QWheelEvent * e ); - virtual void mouseMoveEvent ( QMouseEvent * e ); - virtual void mousePressEvent ( QMouseEvent * e ); - virtual void mouseDoubleClickEvent(QMouseEvent * e ); + virtual void keyPressEvent(TQKeyEvent *k); + virtual void wheelEvent ( TQWheelEvent * e ); + virtual void mouseMoveEvent ( TQMouseEvent * e ); + virtual void mousePressEvent ( TQMouseEvent * e ); + virtual void mouseDoubleClickEvent(TQMouseEvent * e ); private slots: void timeoutMouseMove(); }; diff --git a/kipi-plugins/ipodexport/imagelist.cpp b/kipi-plugins/ipodexport/imagelist.cpp index 443fa96..5f534d4 100644 --- a/kipi-plugins/ipodexport/imagelist.cpp +++ b/kipi-plugins/ipodexport/imagelist.cpp @@ -12,12 +12,12 @@ * * ***************************************************************************/ -#include <qapplication.h> -#include <qevent.h> -#include <qdragobject.h> -#include <qfileinfo.h> -#include <qpainter.h> -#include <qsimplerichtext.h> +#include <tqapplication.h> +#include <tqevent.h> +#include <tqdragobject.h> +#include <tqfileinfo.h> +#include <tqpainter.h> +#include <tqsimplerichtext.h> #include <klocale.h> @@ -27,8 +27,8 @@ using namespace IpodExport; ///////////////////////////////////////////////////////////////////////////////////////////// -ImageList::ImageList( ListType type, QWidget *parent, const char *name ) - : KListView( parent, name ) +ImageList::ImageList( ListType type, TQWidget *tqparent, const char *name ) + : KListView( tqparent, name ) , m_type( type ) { if( type == ImageList::UploadType ) @@ -43,23 +43,23 @@ ImageList::ImageList( ListType type, QWidget *parent, const char *name ) addColumn( i18n("Albums") ); setRootIsDecorated( true ); // show expand icons setSorting( -1 ); - setSelectionMode( QListView::Single ); + setSelectionMode( TQListView::Single ); } setItemMargin( 3 ); - setResizeMode( QListView::LastColumn ); + setResizeMode( TQListView::LastColumn ); setAllColumnsShowFocus( true ); } void -ImageList::viewportPaintEvent( QPaintEvent *e ) +ImageList::viewportPaintEvent( TQPaintEvent *e ) { if( e ) KListView::viewportPaintEvent( e ); if( !childCount() && e ) { - QPainter p( viewport() ); - QString minimumText; + TQPainter p( viewport() ); + TQString minimumText; if( m_type == UploadType ) { @@ -80,7 +80,7 @@ ImageList::viewportPaintEvent( QPaintEvent *e ) "can be transferred to the iPod." "</div>" ) ); } - QSimpleRichText t( minimumText, QApplication::font() ); + TQSimpleRichText t( minimumText, TQApplication::font() ); if ( t.width()+30 >= viewport()->width() || t.height()+30 >= viewport()->height() ) //too big, giving up @@ -91,48 +91,48 @@ ImageList::viewportPaintEvent( QPaintEvent *e ) const uint x = (viewport()->width() - w - 30) / 2 ; const uint y = (viewport()->height() - h - 30) / 2 ; - p.setBrush( colorGroup().background() ); + p.setBrush( tqcolorGroup().background() ); p.drawRoundRect( x, y, w+30, h+30, (8*200)/w, (8*200)/h ); - t.draw( &p, x+15, y+15, QRect(), colorGroup() ); + t.draw( &p, x+15, y+15, TQRect(), tqcolorGroup() ); } } -void ImageList::dragEnterEvent( QDragEnterEvent *e ) +void ImageList::dragEnterEvent( TQDragEnterEvent *e ) { - e->accept( QUriDrag::canDecode(e) ); + e->accept( TQUriDrag::canDecode(e) ); } -bool ImageList::acceptDrag( QDropEvent* e ) const +bool ImageList::acceptDrag( TQDropEvent* e ) const { - return QUriDrag::canDecode( e ); + return TQUriDrag::canDecode( e ); } -void ImageList::contentsDropEvent( QDropEvent *e ) +void ImageList::contentsDropEvent( TQDropEvent *e ) { droppedImagesItems( e ); } -void ImageList::dropEvent( QDropEvent *e ) +void ImageList::dropEvent( TQDropEvent *e ) { droppedImagesItems( e ); } -void ImageList::droppedImagesItems( QDropEvent *e ) +void ImageList::droppedImagesItems( TQDropEvent *e ) { - QStrList strList; - QStringList filesPath; + TQStrList strList; + TQStringList filesPath; - if ( !QUriDrag::decode(e, strList) ) return; + if ( !TQUriDrag::decode(e, strList) ) return; - QStrList stringList; - QStrListIterator it(strList); + TQStrList stringList; + TQStrListIterator it(strList); char *str; while ( (str = it.current()) != 0 ) { - QString filePath = QUriDrag::uriToLocalFile(str); - QFileInfo fileInfo(filePath); + TQString filePath = TQUriDrag::uriToLocalFile(str); + TQFileInfo fileInfo(filePath); if( fileInfo.isFile() && fileInfo.exists() ) filesPath.append( fileInfo.filePath() ); diff --git a/kipi-plugins/ipodexport/imagelist.h b/kipi-plugins/ipodexport/imagelist.h index 351ed5a..1d92a81 100644 --- a/kipi-plugins/ipodexport/imagelist.h +++ b/kipi-plugins/ipodexport/imagelist.h @@ -32,24 +32,25 @@ namespace IpodExport class ImageList : public KListView { Q_OBJECT + TQ_OBJECT public: enum ListType { UploadType, IpodType }; - ImageList( ListType=UploadType, QWidget *parent=0, const char *name=0 ); + ImageList( ListType=UploadType, TQWidget *tqparent=0, const char *name=0 ); ListType getType() const { return m_type; } signals: - void addedDropItems( QStringList filesPath ); + void addedDropItems( TQStringList filesPath ); protected: - bool acceptDrag( QDropEvent *e ) const; - void contentsDropEvent( QDropEvent *e ); - void dragEnterEvent( QDragEnterEvent *e ); - void dropEvent( QDropEvent *e ); - void droppedImagesItems( QDropEvent *e ); - void viewportPaintEvent( QPaintEvent *e ); + bool acceptDrag( TQDropEvent *e ) const; + void contentsDropEvent( TQDropEvent *e ); + void dragEnterEvent( TQDragEnterEvent *e ); + void dropEvent( TQDropEvent *e ); + void droppedImagesItems( TQDropEvent *e ); + void viewportPaintEvent( TQPaintEvent *e ); private: ListType m_type; diff --git a/kipi-plugins/ipodexport/imagelistitem.h b/kipi-plugins/ipodexport/imagelistitem.h index 3751025..388a995 100644 --- a/kipi-plugins/ipodexport/imagelistitem.h +++ b/kipi-plugins/ipodexport/imagelistitem.h @@ -18,7 +18,7 @@ extern "C" { #include <gpod/itdb.h> } -#include <qstring.h> +#include <tqstring.h> #include <klistview.h> #include <klocale.h> @@ -29,17 +29,17 @@ namespace IpodExport { public: - ImageListItem( QListView *parent, QString const & pathSrc, QString const & name ) - : KListViewItem( parent, QString::null/*set below*/, name ) + ImageListItem( TQListView *tqparent, TQString const & pathSrc, TQString const & name ) + : KListViewItem( tqparent, TQString()/*set below*/, name ) , m_pathSrc( pathSrc ) { setText( 0, pathSrc.section('/', -2, -2) ); } - QString pathSrc() const { return m_pathSrc; } + TQString pathSrc() const { return m_pathSrc; } private: - QString m_pathSrc; + TQString m_pathSrc; }; } diff --git a/kipi-plugins/ipodexport/ipodexportdialog.cpp b/kipi-plugins/ipodexport/ipodexportdialog.cpp index c5d9581..c6a4556 100644 --- a/kipi-plugins/ipodexport/ipodexportdialog.cpp +++ b/kipi-plugins/ipodexport/ipodexportdialog.cpp @@ -17,19 +17,19 @@ #include "ipodexportdialog.h" #include "ipodlistitem.h" -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qframe.h> -#include <qhgroupbox.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qvgroupbox.h> -#include <qwhatsthis.h> -#include <qwmatrix.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqframe.h> +#include <tqhgroupbox.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqvgroupbox.h> +#include <tqwhatsthis.h> +#include <tqwmatrix.h> #include <kdebug.h> #include <kfileitem.h> @@ -57,9 +57,9 @@ UploadDialog::UploadDialog( #if KIPI_PLUGIN KIPI::Interface* interface, #endif - QString caption, QWidget *parent ) + TQString caption, TQWidget *tqparent ) : KDialogBase( KDialogBase::Plain, caption, /*Help|*/Close, - Cancel, parent, "TripodDialog", false, false ) + Cancel, tqparent, "TripodDialog", false, false ) #if KIPI_PLUGIN , m_interface( interface ) #endif @@ -69,46 +69,46 @@ UploadDialog::UploadDialog( , m_transferring( false ) , m_destinationAlbum( 0 ) , m_ipodAlbumList( 0 ) - , m_mountPoint( QString::null ) - , m_deviceNode( QString::null ) + , m_mountPoint( TQString() ) + , m_deviceNode( TQString() ) { s_instance = this; - QWidget *box = plainPage(); - QVBoxLayout *dvlay = new QVBoxLayout( box, 6 ); + TQWidget *box = plainPage(); + TQVBoxLayout *dvlay = new TQVBoxLayout( box, 6 ); dvlay->setMargin( 2 ); m_ipodHeader = new IpodHeader( box ); dvlay->addWidget( m_ipodHeader ); - m_destinationBox = new QHGroupBox( i18n("iPod"), box ); + m_destinationBox = new TQHGroupBox( i18n("iPod"), box ); m_ipodAlbumList = new ImageList( ImageList::IpodType, m_destinationBox ); m_ipodAlbumList->setMinimumHeight( 80 ); - QWidget *buttons = new QWidget( m_destinationBox ); - QVBoxLayout *buttonLayout = new QVBoxLayout( buttons, 0, spacingHint() ); + TQWidget *buttons = new TQWidget( m_destinationBox ); + TQVBoxLayout *buttonLayout = new TQVBoxLayout( buttons, 0, spacingHint() ); - m_createAlbumButton = new QPushButton( i18n("&New..."), buttons, "addAlbumButton"); - QWhatsThis::add( m_createAlbumButton, i18n("Create a new photo album on the iPod.")); + m_createAlbumButton = new TQPushButton( i18n("&New..."), buttons, "addAlbumButton"); + TQWhatsThis::add( m_createAlbumButton, i18n("Create a new photo album on the iPod.")); - m_removeAlbumButton = new QPushButton( i18n("&Remove"), buttons, "remAlbumButton"); - m_renameAlbumButton = new QPushButton( i18n("R&ename..."), buttons, "renameAlbumsButton"); + m_removeAlbumButton = new TQPushButton( i18n("&Remove"), buttons, "remAlbumButton"); + m_renameAlbumButton = new TQPushButton( i18n("R&ename..."), buttons, "renameAlbumsButton"); m_removeAlbumButton->setEnabled( false ); m_renameAlbumButton->setEnabled( false ); - QWhatsThis::add( m_removeAlbumButton, i18n("Remove the selected photos or albums from the iPod.")); - QWhatsThis::add( m_renameAlbumButton, i18n("Rename the selected photo album on the iPod.")); + TQWhatsThis::add( m_removeAlbumButton, i18n("Remove the selected photos or albums from the iPod.")); + TQWhatsThis::add( m_renameAlbumButton, i18n("Rename the selected photo album on the iPod.")); - QLabel *ipod_icon = new QLabel( buttons ); + TQLabel *ipod_icon = new TQLabel( buttons ); ipod_icon->setPixmap( KGlobal::iconLoader()->loadIcon( "ipod", KIcon::Desktop, KIcon::SizeHuge ) ); - m_ipodPreview = new QLabel( buttons ); + m_ipodPreview = new TQLabel( buttons ); m_ipodPreview->setFixedHeight( 80 ); - m_ipodPreview->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - m_ipodPreview->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); + m_ipodPreview->tqsetAlignment( TQt::AlignHCenter | TQt::AlignVCenter ); + m_ipodPreview->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); buttonLayout->addWidget( m_createAlbumButton ); buttonLayout->addWidget( m_removeAlbumButton ); @@ -119,35 +119,35 @@ UploadDialog::UploadDialog( dvlay->addWidget( m_destinationBox ); - m_urlListBox = new QHGroupBox( i18n("Hard Disk"), box ); - QWidget* urlBox = new QWidget( m_urlListBox ); - QHBoxLayout* urlLayout = new QHBoxLayout( urlBox, 0, spacingHint() ); + m_urlListBox = new TQHGroupBox( i18n("Hard Disk"), box ); + TQWidget* urlBox = new TQWidget( m_urlListBox ); + TQHBoxLayout* urlLayout = new TQHBoxLayout( urlBox, 0, spacingHint() ); m_uploadList = new ImageList( ImageList::UploadType, urlBox ); m_uploadList->setMinimumHeight( 80 ); urlLayout->addWidget( m_uploadList ); - m_uploadList->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::MinimumExpanding ); + m_uploadList->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::MinimumExpanding ); - QVBoxLayout* uploadPaneLayout = new QVBoxLayout( urlLayout ); - m_addImagesButton = new QPushButton ( i18n( "&Add..." ), urlBox ); + TQVBoxLayout* uploadPaneLayout = new TQVBoxLayout( urlLayout ); + m_addImagesButton = new TQPushButton ( i18n( "&Add..." ), urlBox ); uploadPaneLayout->addWidget( m_addImagesButton ); - QWhatsThis::add( m_addImagesButton, i18n("Add images to be queued for the iPod.") ); + TQWhatsThis::add( m_addImagesButton, i18n("Add images to be queued for the iPod.") ); - m_remImagesButton = new QPushButton ( i18n( "&Remove" ), urlBox ); + m_remImagesButton = new TQPushButton ( i18n( "&Remove" ), urlBox ); uploadPaneLayout->addWidget( m_remImagesButton ); - QWhatsThis::add( m_remImagesButton, i18n("Remove selected image from the list.") ); + TQWhatsThis::add( m_remImagesButton, i18n("Remove selected image from the list.") ); - m_transferImagesButton = new QPushButton( i18n( "&Transfer" ), urlBox ); + m_transferImagesButton = new TQPushButton( i18n( "&Transfer" ), urlBox ); uploadPaneLayout->addWidget( m_transferImagesButton ); - QWhatsThis::add( m_transferImagesButton, i18n("Transfer images to the selected iPod album.") ); + TQWhatsThis::add( m_transferImagesButton, i18n("Transfer images to the selected iPod album.") ); - m_imagePreview = new QLabel( urlBox ); + m_imagePreview = new TQLabel( urlBox ); m_imagePreview->setFixedHeight( 80 ); - m_imagePreview->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - m_imagePreview->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); - QWhatsThis::add( m_imagePreview, i18n( "The preview of the selected image in the list." ) ); + m_imagePreview->tqsetAlignment( TQt::AlignHCenter | TQt::AlignVCenter ); + m_imagePreview->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); + TQWhatsThis::add( m_imagePreview, i18n( "The preview of the selected image in the list." ) ); - QLabel *hdd_icon = new QLabel( urlBox ); + TQLabel *hdd_icon = new TQLabel( urlBox ); hdd_icon->setPixmap( KGlobal::iconLoader()->loadIcon( "system", KIcon::Desktop, KIcon::SizeHuge ) ); uploadPaneLayout->addWidget( m_imagePreview ); @@ -177,17 +177,17 @@ UploadDialog::UploadDialog( /// connect the signals & slots - connect( m_createAlbumButton, SIGNAL( clicked() ), SLOT( createIpodAlbum() ) ); - connect( m_removeAlbumButton, SIGNAL( clicked() ), SLOT( deleteIpodAlbum() ) ); - connect( m_renameAlbumButton, SIGNAL( clicked() ), SLOT( renameIpodAlbum() ) ); + connect( m_createAlbumButton, TQT_SIGNAL( clicked() ), TQT_SLOT( createIpodAlbum() ) ); + connect( m_removeAlbumButton, TQT_SIGNAL( clicked() ), TQT_SLOT( deleteIpodAlbum() ) ); + connect( m_renameAlbumButton, TQT_SIGNAL( clicked() ), TQT_SLOT( renameIpodAlbum() ) ); - connect( m_uploadList, SIGNAL( addedDropItems(QStringList) ), SLOT( addDropItems(QStringList) ) ); - connect( m_uploadList, SIGNAL( currentChanged(QListViewItem*) ), SLOT( imageSelected(QListViewItem*) ) ); - connect( m_ipodAlbumList, SIGNAL( currentChanged(QListViewItem*) ), SLOT( ipodItemSelected(QListViewItem*) ) ); + connect( m_uploadList, TQT_SIGNAL( addedDropItems(TQStringList) ), TQT_SLOT( addDropItems(TQStringList) ) ); + connect( m_uploadList, TQT_SIGNAL( currentChanged(TQListViewItem*) ), TQT_SLOT( imageSelected(TQListViewItem*) ) ); + connect( m_ipodAlbumList, TQT_SIGNAL( currentChanged(TQListViewItem*) ), TQT_SLOT( ipodItemSelected(TQListViewItem*) ) ); - connect( m_addImagesButton, SIGNAL( clicked() ), SLOT( imagesFilesButtonAdd() ) ); - connect( m_remImagesButton, SIGNAL( clicked() ), SLOT( imagesFilesButtonRem() ) ); - connect( m_transferImagesButton, SIGNAL( clicked() ), SLOT( startTransfer() ) ); + connect( m_addImagesButton, TQT_SIGNAL( clicked() ), TQT_SLOT( imagesFilesButtonAdd() ) ); + connect( m_remImagesButton, TQT_SIGNAL( clicked() ), TQT_SLOT( imagesFilesButtonRem() ) ); + connect( m_transferImagesButton, TQT_SIGNAL( clicked() ), TQT_SLOT( startTransfer() ) ); } void @@ -224,7 +224,7 @@ UploadDialog::getIpodAlbumPhotos( IpodAlbumItem *item, Itdb_PhotoAlbum *album ) Itdb_Artwork *photo = (Itdb_Artwork*)it->data; gint photo_id = photo->id; last = new IpodPhotoItem( item, last, photo ); - last->setText( 0, QString::number( photo_id ) ); + last->setText( 0, TQString::number( photo_id ) ); last->setPixmap( 0, KGlobal::iconLoader()->loadIcon( "image", KIcon::Toolbar, KIcon::SizeSmall ) ); } } @@ -265,7 +265,7 @@ UploadDialog::enableButtons() enableButton( KDialogBase::Close, !m_transferring ); - const QListViewItem *ipodSelection = m_ipodAlbumList->selectedItem(); + const TQListViewItem *ipodSelection = m_ipodAlbumList->selectedItem(); const bool isMasterLibrary = ( ipodSelection == m_ipodAlbumList->firstChild() ); m_removeAlbumButton->setEnabled( ipodSelection && !isMasterLibrary ); @@ -278,7 +278,7 @@ UploadDialog::startTransfer() if( !m_itdb || !m_uploadList->childCount() ) return; - QListViewItem *selected = m_ipodAlbumList->selectedItem(); + TQListViewItem *selected = m_ipodAlbumList->selectedItem(); if( !selected || selected->depth() != 0 /*not album*/) return; @@ -293,12 +293,12 @@ UploadDialog::startTransfer() GError *err = 0; - while( QListViewItem *item = m_uploadList->firstChild() ) + while( TQListViewItem *item = m_uploadList->firstChild() ) { #define item static_cast<ImageListItem*>(item) debug() << "Uploading " << item->pathSrc() << " to ipod album " << album->name << endl; - Itdb_Artwork *art = itdb_photodb_add_photo( m_itdb, QFile::encodeName( item->pathSrc() ), 0, 0, &err ); + Itdb_Artwork *art = itdb_photodb_add_photo( m_itdb, TQFile::encodeName( item->pathSrc() ), 0, 0, &err ); if( !art ) { if( err ) @@ -330,7 +330,7 @@ UploadDialog::startTransfer() } void -UploadDialog::ipodItemSelected( QListViewItem *item ) +UploadDialog::ipodItemSelected( TQListViewItem *item ) { m_ipodPreview->clear(); @@ -355,16 +355,16 @@ UploadDialog::ipodItemSelected( QListViewItem *item ) // GdkPixbuf *buf = itdb_thumb_get_gdk_pixbuf( m_itdb->device, thumb ); // int size = 0; -// QImage *image = buf->convertToImage(); +// TQImage *image = buf->convertToImage(); // debug() << "image size: " << image->size() << endl; // -// QPixmap pix; +// TQPixmap pix; // pix.convertFromImage( image ); // m_ipodPreview->setPixmap( pix ); } void -UploadDialog::imageSelected( QListViewItem *item ) +UploadDialog::imageSelected( TQListViewItem *item ) { if( !item || m_uploadList->childCount() == 0 || m_transferring ) { @@ -377,28 +377,28 @@ UploadDialog::imageSelected( QListViewItem *item ) m_imagePreview->clear(); - QString IdemIndexed = "file:" + pitem->pathSrc(); + TQString IdemIndexed = "file:" + pitem->pathSrc(); KURL url( IdemIndexed ); KIO::PreviewJob* m_thumbJob = KIO::filePreview( url, m_imagePreview->height() ); - connect( m_thumbJob, SIGNAL( gotPreview(const KFileItem*, const QPixmap&) ), - this, SLOT( gotImagePreview(const KFileItem*, const QPixmap&) ) ); + connect( m_thumbJob, TQT_SIGNAL( gotPreview(const KFileItem*, const TQPixmap&) ), + this, TQT_SLOT( gotImagePreview(const KFileItem*, const TQPixmap&) ) ); } void -UploadDialog::gotImagePreview( const KFileItem* url, const QPixmap &pixmap ) +UploadDialog::gotImagePreview( const KFileItem* url, const TQPixmap &pixmap ) { #if KIPI_PLUGIN - QPixmap pix( pixmap ); + TQPixmap pix( pixmap ); // Rotate the thumbnail compared to the angle the host application dictate KIPI::ImageInfo info = m_interface->info( url->url() ); if ( info.angle() != 0 ) { - QImage img = pix.convertToImage(); - QWMatrix matrix; + TQImage img = pix.convertToImage(); + TQWMatrix matrix; matrix.rotate( info.angle() ); img = img.xForm( matrix ); @@ -415,13 +415,13 @@ UploadDialog::gotImagePreview( const KFileItem* url, const QPixmap &pixmap ) void UploadDialog::imagesFilesButtonAdd() { - QStringList fileList; + TQStringList fileList; KURL::List urls; #if KIPI_PLUGIN urls = KIPI::ImageDialog::getImageURLs( this, m_interface ); #else - const QString filter = QString( "*.jpg *.jpeg *.jpe *.tiff *.gif *.png *.bmp|" + i18n("Image files") ); - KFileDialog dlg( QString::null, filter, this, "addImagesDlg", true ); + const TQString filter = TQString( "*.jpg *.jpeg *.jpe *.tiff *.gif *.png *.bmp|" + i18n("Image files") ); + KFileDialog dlg( TQString(), filter, this, "addImagesDlg", true ); dlg.setCaption( i18n("Add Images") ); dlg.setMode( KFile::Files | KFile::Directory ); dlg.exec(); @@ -438,9 +438,9 @@ UploadDialog::imagesFilesButtonAdd() void UploadDialog::imagesFilesButtonRem() { - QPtrList<QListViewItem> selected = m_uploadList->selectedItems(); + TQPtrList<TQListViewItem> selected = m_uploadList->selectedItems(); - for( QListViewItem *it = selected.first(); it; it = selected.next() ) + for( TQListViewItem *it = selected.first(); it; it = selected.next() ) delete it; enableButton( KDialogBase::User1, m_uploadList->childCount() > 0 ); @@ -449,7 +449,7 @@ UploadDialog::imagesFilesButtonRem() void UploadDialog::createIpodAlbum() { - QString helper; + TQString helper; #if KIPI_PLUGIN KIPI::ImageCollection album = m_interface->currentAlbum(); if( album.isValid() ) @@ -457,7 +457,7 @@ UploadDialog::createIpodAlbum() #endif bool ok = false; - QString newAlbum = KInputDialog::getText( i18n("New iPod Photo Album"), + TQString newAlbum = KInputDialog::getText( i18n("New iPod Photo Album"), i18n("Create a new album:"), helper, &ok, this ); if( ok ) @@ -466,7 +466,7 @@ UploadDialog::createIpodAlbum() IpodAlbumItem *last = static_cast<IpodAlbumItem*>(m_ipodAlbumList->lastItem()); // FIXME?? O(n) - Itdb_PhotoAlbum *photoAlbum = itdb_photodb_photoalbum_create( m_itdb, QFile::encodeName( newAlbum ), -1/*end*/ ); + Itdb_PhotoAlbum *photoAlbum = itdb_photodb_photoalbum_create( m_itdb, TQFile::encodeName( newAlbum ), -1/*end*/ ); // add the new album to the list view IpodAlbumItem *i = new IpodAlbumItem( m_ipodAlbumList, last, photoAlbum ); i->setPixmap( 0, KGlobal::iconLoader()->loadIcon( "folder", KIcon::Toolbar, KIcon::SizeSmall ) ); @@ -488,7 +488,7 @@ UploadDialog::renameIpodAlbum() if( !selected || selected->depth() != 0 ) return; bool ok = false; - QString newName = KInputDialog::getText( i18n("Rename iPod Photo Album"), + TQString newName = KInputDialog::getText( i18n("Rename iPod Photo Album"), i18n("New album title:"), selected->text(0), &ok, this ); if( ok ) @@ -506,7 +506,7 @@ bool UploadDialog::deleteIpodPhoto( IpodPhotoItem *photo ) if( !photo ) return false; - IpodAlbumItem *album = static_cast<IpodAlbumItem *>( photo->parent() ); + IpodAlbumItem *album = static_cast<IpodAlbumItem *>( photo->tqparent() ); if( !album ) return false; @@ -525,10 +525,10 @@ bool UploadDialog::deleteIpodPhoto( IpodPhotoItem *photo ) // if we remove from the library, remove from all sub albums too if( photo_album->album_type == 0x01 ) // master album { - for( QListViewItem *albumIt = m_ipodAlbumList->firstChild()->nextSibling(); //skip library + for( TQListViewItem *albumIt = m_ipodAlbumList->firstChild()->nextSibling(); //skip library albumIt; albumIt = albumIt->nextSibling() ) { - for( QListViewItem *photoIt = albumIt->firstChild(); + for( TQListViewItem *photoIt = albumIt->firstChild(); photoIt; photoIt = photoIt->nextSibling() ) { if( photoIt->text(0) == photo->text(0) ) @@ -553,7 +553,7 @@ bool UploadDialog::deleteIpodAlbum( IpodAlbumItem *album ) void UploadDialog::deleteIpodAlbum() { - QListViewItem *selected = m_ipodAlbumList->selectedItem(); + TQListViewItem *selected = m_ipodAlbumList->selectedItem(); if( !selected ) return; bool result = false; @@ -576,19 +576,19 @@ UploadDialog::deleteIpodAlbum() } void -UploadDialog::addDropItems( QStringList filesPath ) +UploadDialog::addDropItems( TQStringList filesPath ) { if( filesPath.isEmpty() ) return; - for( QStringList::Iterator it = filesPath.begin() ; it != filesPath.end() ; ++it ) + for( TQStringList::Iterator it = filesPath.begin() ; it != filesPath.end() ; ++it ) { - QString currentDropFile = *it; + TQString currentDropFile = *it; // Check if the new item already exist in the list. bool itemExists = false; - QListViewItemIterator it2( m_uploadList ); + TQListViewItemIterator it2( m_uploadList ); while( it2.current() ) { @@ -610,9 +610,9 @@ UploadDialog::addDropItems( QStringList filesPath ) } void -UploadDialog::addUrlToList( QString file ) +UploadDialog::addUrlToList( TQString file ) { - QFileInfo *fi = new QFileInfo( file ); + TQFileInfo *fi = new TQFileInfo( file ); new ImageListItem( m_uploadList, file.section('/', 0, -1), fi->fileName() ); @@ -637,8 +637,8 @@ UploadDialog::openDevice() mountiter != currentmountpoints.end(); ++mountiter ) { - QString devicenode = (*mountiter)->mountedFrom(); - QString mountpoint = (*mountiter)->mountPoint(); + TQString devicenode = (*mountiter)->mountedFrom(); + TQString mountpoint = (*mountiter)->mountPoint(); if( !m_mountPoint.isEmpty() && mountpoint != m_mountPoint ) @@ -655,8 +655,8 @@ UploadDialog::openDevice() continue; /// Detecting whether an iPod exists. - QString path = QString( itdb_get_control_dir( QFile::encodeName( mountpoint ) ) ); - QDir d( path ); + TQString path = TQString( itdb_get_control_dir( TQFile::encodeName( mountpoint ) ) ); + TQDir d( path ); if( path.isEmpty() || !d.exists() ) continue; @@ -668,7 +668,7 @@ UploadDialog::openDevice() /// Try and parse it to determine whether we have initialised the iPod. ipodFound = true; GError *err = 0; - m_itdb = itdb_photodb_parse( QFile::encodeName( mountpoint ), &err ); + m_itdb = itdb_photodb_parse( TQFile::encodeName( mountpoint ), &err ); if( err ) { g_error_free( err ); @@ -699,15 +699,15 @@ UploadDialog::openDevice() { debug() << "could not find iTunesDB on device mounted at " << m_mountPoint << endl; - QString msg = i18n( "An iPod photo database could not be found on device mounted at %1. " - "Should I try to initialize your iPod photo database?" ).arg( m_mountPoint ); + TQString msg = i18n( "An iPod photo database could not be found on device mounted at %1. " + "Should I try to initialize your iPod photo database?" ).tqarg( m_mountPoint ); if( KMessageBox::warningContinueCancel( this, msg, i18n( "Initialize iPod Photo Database?" ), KGuiItem(i18n("&Initialize"), "new") ) == KMessageBox::Continue ) { - m_itdb = itdb_photodb_create( QFile::encodeName( m_mountPoint ) ); - itdb_device_set_mountpoint( m_itdb->device, QFile::encodeName( m_mountPoint ) ); + m_itdb = itdb_photodb_create( TQFile::encodeName( m_mountPoint ) ); + itdb_device_set_mountpoint( m_itdb->device, TQFile::encodeName( m_mountPoint ) ); if( !m_itdb ) { @@ -743,12 +743,12 @@ UploadDialog::photoFromId( const uint id ) return 0; } -QString UploadDialog::ipodModel() const +TQString UploadDialog::ipodModel() const { if( m_ipodInfo ) - return QString( itdb_info_get_ipod_model_name_string( m_ipodInfo->ipod_model ) ); + return TQString( itdb_info_get_ipod_model_name_string( m_ipodInfo->ipod_model ) ); - return QString::null; + return TQString(); } @@ -764,18 +764,18 @@ void UploadDialog::refreshDevices() if( !openDevice() ) { m_ipodHeader->setViewType( IpodHeader::NoIpod ); - connect( m_ipodHeader, SIGNAL( refreshDevices() ), SLOT( refreshDevices() ) ); + connect( m_ipodHeader, TQT_SIGNAL( refreshDevices() ), TQT_SLOT( refreshDevices() ) ); } else //device opened! hooray! { m_ipodInfo = const_cast<Itdb_IpodInfo*>( itdb_device_get_ipod_info( m_itdb->device ) ); - const QString model = ipodModel(); + const TQString model = ipodModel(); if( !m_ipodInfo || model.isEmpty() || model == "Invalid" ) { debug() << "the ipod model must be set before photos can be added" << endl; m_ipodHeader->setViewType( IpodHeader::IncompatibleIpod ); - connect( m_ipodHeader, SIGNAL( updateSysInfo() ), SLOT( updateSysInfo() ) ); + connect( m_ipodHeader, TQT_SIGNAL( updateSysInfo() ), TQT_SLOT( updateSysInfo() ) ); return; } else diff --git a/kipi-plugins/ipodexport/ipodexportdialog.h b/kipi-plugins/ipodexport/ipodexportdialog.h index 6cdd861..ef43b75 100644 --- a/kipi-plugins/ipodexport/ipodexportdialog.h +++ b/kipi-plugins/ipodexport/ipodexportdialog.h @@ -26,10 +26,10 @@ extern "C" { #include <libkipi/interface.h> #endif -class QCheckBox; -class QHGroupBox; -class QLabel; -class QPushButton; +class TQCheckBox; +class TQHGroupBox; +class TQLabel; +class TQPushButton; class KComboBox; class KFileItem; class KLineEdit; @@ -48,13 +48,14 @@ class IpodHeader; class UploadDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: UploadDialog( #if KIPI_PLUGIN KIPI::Interface* interface, #endif - QString caption, QWidget *parent=0 ); + TQString caption, TQWidget *tqparent=0 ); ~UploadDialog() { @@ -64,20 +65,20 @@ class UploadDialog : public KDialogBase static UploadDialog *instance() { return s_instance; } - QString ipodModel() const; - QString mountPoint() { return m_mountPoint; } - QString deviceNode() { return m_deviceNode; } + TQString ipodModel() const; + TQString mountPoint() { return m_mountPoint; } + TQString deviceNode() { return m_deviceNode; } private slots: void startTransfer(); - void addDropItems( QStringList filesPath ); + void addDropItems( TQStringList filesPath ); - void imageSelected( QListViewItem *item ); - void gotImagePreview( const KFileItem* , const QPixmap &pixmap ); + void imageSelected( TQListViewItem *item ); + void gotImagePreview( const KFileItem* , const TQPixmap &pixmap ); - void ipodItemSelected( QListViewItem *item ); - void ipodShowContextMenu( QListViewItem * ) { } + void ipodItemSelected( TQListViewItem *item ); + void ipodShowContextMenu( TQListViewItem * ) { } void imagesFilesButtonAdd(); void imagesFilesButtonRem(); @@ -90,7 +91,7 @@ class UploadDialog : public KDialogBase void updateSysInfo(); private: - void addUrlToList( QString file ); + void addUrlToList( TQString file ); bool deleteIpodAlbum( IpodAlbumItem *album ); bool deleteIpodPhoto( IpodPhotoItem *photo ); void enableButtons(); @@ -109,24 +110,24 @@ class UploadDialog : public KDialogBase IpodHeader *m_ipodHeader; bool m_transferring; - QListViewItem *m_destinationAlbum; + TQListViewItem *m_destinationAlbum; - QPushButton *m_createAlbumButton; - QPushButton *m_removeAlbumButton; - QPushButton *m_renameAlbumButton; - QPushButton *m_addImagesButton; - QPushButton *m_remImagesButton; - QPushButton *m_transferImagesButton; + TQPushButton *m_createAlbumButton; + TQPushButton *m_removeAlbumButton; + TQPushButton *m_renameAlbumButton; + TQPushButton *m_addImagesButton; + TQPushButton *m_remImagesButton; + TQPushButton *m_transferImagesButton; ImageList *m_uploadList; KListView *m_ipodAlbumList; - QLabel *m_imagePreview; - QLabel *m_ipodPreview; + TQLabel *m_imagePreview; + TQLabel *m_ipodPreview; - QHGroupBox *m_destinationBox; - QHGroupBox *m_urlListBox; + TQHGroupBox *m_destinationBox; + TQHGroupBox *m_urlListBox; - QString m_mountPoint; - QString m_deviceNode; + TQString m_mountPoint; + TQString m_deviceNode; static UploadDialog *s_instance; }; diff --git a/kipi-plugins/ipodexport/ipodheader.cpp b/kipi-plugins/ipodexport/ipodheader.cpp index 24b2d94..432f734 100644 --- a/kipi-plugins/ipodexport/ipodheader.cpp +++ b/kipi-plugins/ipodexport/ipodheader.cpp @@ -17,22 +17,22 @@ #include "klocale.h" #include "kpushbutton.h" -#include "qlabel.h" -#include "qlayout.h" +#include "tqlabel.h" +#include "tqlayout.h" using namespace IpodExport; -IpodHeader::IpodHeader( QWidget *parent, const char *name, WFlags f ) - : QFrame( parent, name, f ) +IpodHeader::IpodHeader( TQWidget *tqparent, const char *name, WFlags f ) + : TQFrame( tqparent, name, f ) { - QVBoxLayout *layout = new QVBoxLayout( this, 10/*margin*/, 5/*spacing*/ ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this, 10/*margin*/, 5/*spacing*/ ); - setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ); + tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - m_messageLabel = new QLabel( QString::null, this ); - m_messageLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ); + m_messageLabel = new TQLabel( TQString(), this ); + m_messageLabel->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - QHBoxLayout *buttonLayout = new QHBoxLayout; + TQHBoxLayout *buttonLayout = new TQHBoxLayout; m_button = new KPushButton( this ); m_button->hide(); @@ -40,8 +40,8 @@ IpodHeader::IpodHeader( QWidget *parent, const char *name, WFlags f ) buttonLayout->addWidget( m_button ); buttonLayout->addStretch( 1 ); - layout->addWidget( m_messageLabel ); - layout->addLayout( buttonLayout ); + tqlayout->addWidget( m_messageLabel ); + tqlayout->addLayout( buttonLayout ); } void IpodHeader::setViewType( ViewType view ) @@ -71,54 +71,54 @@ void IpodHeader::setNoIpod() { m_messageLabel->setText( i18n("<p align=\"center\"><b>No iPod was detected</b></p>" ) ); - setPaletteBackgroundColor( QColor(147,18,18) ); - m_messageLabel->setPaletteBackgroundColor( QColor(147,18,18) ); - m_messageLabel->setPaletteForegroundColor( Qt::white ); + setPaletteBackgroundColor( TQColor(147,18,18) ); + m_messageLabel->setPaletteBackgroundColor( TQColor(147,18,18) ); + m_messageLabel->setPaletteForegroundColor( TQt::white ); m_button->setText( i18n( "Refresh" ) ); m_button->show(); m_button->disconnect(); - connect( m_button, SIGNAL( clicked() ), SIGNAL( refreshDevices() ) ); + connect( m_button, TQT_SIGNAL( clicked() ), TQT_SIGNAL( refreshDevices() ) ); } void IpodHeader::setIncompatibleIpod() { - const QString modelType = UploadDialog::instance()->ipodModel(); + const TQString modelType = UploadDialog::instance()->ipodModel(); - m_messageLabel->setText( i18n("<p align=\"center\"><b>Your iPod (%1) does not seem to support artwork.</b></p>" ).arg( modelType ) ); + m_messageLabel->setText( i18n("<p align=\"center\"><b>Your iPod (%1) does not seem to support artwork.</b></p>" ).tqarg( modelType ) ); - setPaletteBackgroundColor( QColor(225,150,0) ); - m_messageLabel->setPaletteBackgroundColor( QColor(225,150,0) ); - m_messageLabel->setPaletteForegroundColor( Qt::white ); + setPaletteBackgroundColor( TQColor(225,150,0) ); + m_messageLabel->setPaletteBackgroundColor( TQColor(225,150,0) ); + m_messageLabel->setPaletteForegroundColor( TQt::white ); m_button->setText( i18n( "Set iPod Model" ) ); // m_button->show(); m_button->hide(); // FIXME its not implemented! m_button->disconnect(); - connect( m_button, SIGNAL( clicked() ), SIGNAL( updateSysInfo() ) ); + connect( m_button, TQT_SIGNAL( clicked() ), TQT_SIGNAL( updateSysInfo() ) ); } void IpodHeader::setValidIpod() { - const QString modelType = UploadDialog::instance()->ipodModel(); - const QString mountPoint = UploadDialog::instance()->mountPoint(); + const TQString modelType = UploadDialog::instance()->ipodModel(); + const TQString mountPoint = UploadDialog::instance()->mountPoint(); if( !mountPoint.isEmpty() ) { m_messageLabel->setText( i18n("<p align=\"center\"><b>iPod %1 detected at: %2</b></p>" ) - .arg( modelType, mountPoint ) ); + .tqarg( modelType, mountPoint ) ); } else { m_messageLabel->setText( i18n("<p align=\"center\"><b>iPod %1 detected</b></p>" ) - .arg( modelType ) ); + .tqarg( modelType ) ); } - setPaletteBackgroundColor( QColor(0,98,0) ); - m_messageLabel->setPaletteBackgroundColor( QColor(0,98,0) ); - m_messageLabel->setPaletteForegroundColor( Qt::white ); + setPaletteBackgroundColor( TQColor(0,98,0) ); + m_messageLabel->setPaletteBackgroundColor( TQColor(0,98,0) ); + m_messageLabel->setPaletteForegroundColor( TQt::white ); m_button->hide(); } diff --git a/kipi-plugins/ipodexport/ipodheader.h b/kipi-plugins/ipodexport/ipodheader.h index 7678682..8e9d53a 100644 --- a/kipi-plugins/ipodexport/ipodheader.h +++ b/kipi-plugins/ipodexport/ipodheader.h @@ -14,20 +14,21 @@ #ifndef IPOD_HEADER_H #define IPOD_HEADER_H -#include <qframe.h> //baseclass +#include <tqframe.h> //baseclass -class QLabel; +class TQLabel; class KPushButton; namespace IpodExport { -class IpodHeader : public QFrame +class IpodHeader : public TQFrame { Q_OBJECT + TQ_OBJECT public: - IpodHeader( QWidget *parent=0, const char *name=0, WFlags f=0 ); + IpodHeader( TQWidget *tqparent=0, const char *name=0, WFlags f=0 ); ~IpodHeader() { } enum ViewType { NoIpod, IncompatibleIpod, ValidIpod }; @@ -47,7 +48,7 @@ class IpodHeader : public QFrame ViewType m_viewType; KPushButton *m_button; - QLabel *m_messageLabel; + TQLabel *m_messageLabel; }; diff --git a/kipi-plugins/ipodexport/ipodlistitem.cpp b/kipi-plugins/ipodexport/ipodlistitem.cpp index 6c6d950..4fd15ce 100644 --- a/kipi-plugins/ipodexport/ipodlistitem.cpp +++ b/kipi-plugins/ipodexport/ipodlistitem.cpp @@ -22,8 +22,8 @@ using namespace IpodExport; /// Class IpodAlbumItem //////////////////////////////////////////// -IpodAlbumItem::IpodAlbumItem( QListView *parent, QListViewItem *after, Itdb_PhotoAlbum *pa ) - : KListViewItem( parent, after ) +IpodAlbumItem::IpodAlbumItem( TQListView *tqparent, TQListViewItem *after, Itdb_PhotoAlbum *pa ) + : KListViewItem( tqparent, after ) , m_photoAlbum( pa ) { // don't use setName, as it writes to the ipod @@ -38,7 +38,7 @@ void IpodAlbumItem::setPhotoAlbum( Itdb_PhotoAlbum *pa ) m_photoAlbum = pa; } -void IpodAlbumItem::setName( const QString & name ) +void IpodAlbumItem::setName( const TQString & name ) { if( name == m_name ) return; @@ -55,9 +55,9 @@ void IpodAlbumItem::setName( const QString & name ) /// Class IpodPhotoItem //////////////////////////////////////////// -IpodPhotoItem::IpodPhotoItem( IpodAlbumItem *parent, IpodPhotoItem *after, +IpodPhotoItem::IpodPhotoItem( IpodAlbumItem *tqparent, IpodPhotoItem *after, Itdb_Artwork *art ) - : KListViewItem( parent, after ) + : KListViewItem( tqparent, after ) , m_artwork( art ) { } diff --git a/kipi-plugins/ipodexport/ipodlistitem.h b/kipi-plugins/ipodexport/ipodlistitem.h index 9684a63..a366b4b 100644 --- a/kipi-plugins/ipodexport/ipodlistitem.h +++ b/kipi-plugins/ipodexport/ipodlistitem.h @@ -26,23 +26,23 @@ namespace IpodExport class IpodAlbumItem : public KListViewItem { public: - IpodAlbumItem( QListView *parent, QListViewItem *after, Itdb_PhotoAlbum *pa ); + IpodAlbumItem( TQListView *tqparent, TQListViewItem *after, Itdb_PhotoAlbum *pa ); - QString name() const { return m_name; } + TQString name() const { return m_name; } Itdb_PhotoAlbum *photoAlbum() const { return m_photoAlbum; } void setPhotoAlbum( Itdb_PhotoAlbum *pa ); - void setName( const QString & name ); + void setName( const TQString & name ); private: - QString m_name; + TQString m_name; Itdb_PhotoAlbum *m_photoAlbum; }; class IpodPhotoItem : public KListViewItem { public: - IpodPhotoItem( IpodAlbumItem *parent, IpodPhotoItem *after, Itdb_Artwork *art ); + IpodPhotoItem( IpodAlbumItem *tqparent, IpodPhotoItem *after, Itdb_Artwork *art ); Itdb_Artwork *artwork() const { return m_artwork; } void setArtwork( Itdb_Artwork *art ); diff --git a/kipi-plugins/ipodexport/plugin_ipodexport.cpp b/kipi-plugins/ipodexport/plugin_ipodexport.cpp index 4f1f2e9..91e2ee8 100644 --- a/kipi-plugins/ipodexport/plugin_ipodexport.cpp +++ b/kipi-plugins/ipodexport/plugin_ipodexport.cpp @@ -36,25 +36,25 @@ typedef KGenericFactory<Plugin_iPodExport> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_ipodexport, Factory("kipiplugin_ipodexport")); -Plugin_iPodExport::Plugin_iPodExport( QObject *parent, const char*, const QStringList& ) - : KIPI::Plugin( Factory::instance(), parent, "iPodExport") +Plugin_iPodExport::Plugin_iPodExport( TQObject *tqparent, const char*, const TQStringList& ) + : KIPI::Plugin( Factory::instance(), tqparent, "iPodExport") { kdDebug( 51001 ) << "Plugin_iPodExport plugin loaded" << endl; g_type_init(); } -void Plugin_iPodExport::setup( QWidget* widget ) +void Plugin_iPodExport::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); // this is our action shown in the menubar/toolbar of the mainwindow m_actionImageUpload = new KAction( i18n( "Export to iPod..." ), "ipod_unmount", 0, this, - SLOT( slotImageUpload() ), actionCollection(), "connectipod"); + TQT_SLOT( slotImageUpload() ), actionCollection(), "connectipod"); addAction( m_actionImageUpload ); - m_interface = dynamic_cast< KIPI::Interface* >( parent() ); + m_interface = dynamic_cast< KIPI::Interface* >( tqparent() ); } KIPI::Category Plugin_iPodExport::category( KAction* action ) const @@ -69,7 +69,7 @@ KIPI::Category Plugin_iPodExport::category( KAction* action ) const void Plugin_iPodExport::slotImageUpload() { IpodExport::UploadDialog *dlg = new IpodExport::UploadDialog( m_interface, i18n("iPod Export"), - kapp->activeWindow() ); + TQT_TQWIDGET(kapp->activeWindow()) ); dlg->setMinimumWidth( 460 ); dlg->show(); } diff --git a/kipi-plugins/ipodexport/plugin_ipodexport.h b/kipi-plugins/ipodexport/plugin_ipodexport.h index f72b108..d94af5c 100644 --- a/kipi-plugins/ipodexport/plugin_ipodexport.h +++ b/kipi-plugins/ipodexport/plugin_ipodexport.h @@ -22,13 +22,14 @@ class KAction; class Plugin_iPodExport : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_iPodExport( QObject *parent, const char* name, const QStringList &args); + Plugin_iPodExport( TQObject *tqparent, const char* name, const TQStringList &args); ~Plugin_iPodExport() { } virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); private slots: void slotImageUpload(); diff --git a/kipi-plugins/jpeglossless/actions.h b/kipi-plugins/jpeglossless/actions.h index bc4fc77..90d7a66 100644 --- a/kipi-plugins/jpeglossless/actions.h +++ b/kipi-plugins/jpeglossless/actions.h @@ -63,8 +63,8 @@ public: bool starting; bool success; - QString fileName; - QString errString; + TQString fileName; + TQString errString; Action action; }; diff --git a/kipi-plugins/jpeglossless/actionthread.cpp b/kipi-plugins/jpeglossless/actionthread.cpp index 7e85426..660990f 100644 --- a/kipi-plugins/jpeglossless/actionthread.cpp +++ b/kipi-plugins/jpeglossless/actionthread.cpp @@ -27,11 +27,11 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qapplication.h> -#include <qdir.h> -#include <qdeepcopy.h> +#include <tqapplication.h> +#include <tqdir.h> +#include <tqdeepcopy.h> // KDE includes. @@ -48,8 +48,8 @@ namespace KIPIJPEGLossLessPlugin { -ActionThread::ActionThread( KIPI::Interface* interface, QObject *parent) - : QThread(), m_parent(parent), m_interface( interface ) +ActionThread::ActionThread( KIPI::Interface* interface, TQObject *tqparent) + : TQThread(), m_parent(tqparent), m_interface( interface ) { } @@ -106,7 +106,7 @@ void ActionThread::rotate(const KURL::List& urlList, RotateAction val) */ Task *t = new Task; - t->filePath = QDeepCopy<QString>((*it).path()); //deep copy + t->filePath = TQDeepCopy<TQString>((*it).path()); //deep copy t->action = Rotate; t->rotAction = val; m_taskQueue.enqueue(t); @@ -130,7 +130,7 @@ void ActionThread::flip(const KURL::List& urlList, FlipAction val) } Task *t = new Task; - t->filePath = QDeepCopy<QString>((*it).path()); //deep copy + t->filePath = TQDeepCopy<TQString>((*it).path()); //deep copy t->action = Flip; t->flipAction = val; m_taskQueue.enqueue(t); @@ -143,7 +143,7 @@ void ActionThread::convert2grayscale(const KURL::List& urlList) it != urlList.end(); ++it ) { Task *t = new Task; - t->filePath = QDeepCopy<QString>((*it).path()); //deep copy + t->filePath = TQDeepCopy<TQString>((*it).path()); //deep copy t->action = GrayScale; m_taskQueue.enqueue(t); } @@ -161,7 +161,7 @@ void ActionThread::run() Task *t = m_taskQueue.dequeue(); if (!t) continue; - QString errString; + TQString errString; EventData *d = new EventData; @@ -172,7 +172,7 @@ void ActionThread::run() d->action = Rotate; d->fileName = t->filePath; d->starting = true; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); bool result = true; ImageRotate imageRotate; @@ -183,7 +183,7 @@ void ActionThread::run() r->fileName = t->filePath; r->success = result; r->errString = errString; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, r)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, r)); break; } case Flip: @@ -191,7 +191,7 @@ void ActionThread::run() d->action = Flip; d->fileName = t->filePath; d->starting = true; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); ImageFlip imageFlip; bool result = imageFlip.flip(t->filePath, t->flipAction, errString); @@ -201,7 +201,7 @@ void ActionThread::run() r->fileName = t->filePath; r->success = result; r->errString = errString; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, r)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, r)); break; } case GrayScale: @@ -209,7 +209,7 @@ void ActionThread::run() d->action = GrayScale; d->fileName = t->filePath; d->starting = true; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); ImageGrayScale imageGrayScale; bool result = imageGrayScale.image2GrayScale(t->filePath, errString); @@ -219,7 +219,7 @@ void ActionThread::run() r->fileName = t->filePath; r->success = result; r->errString = errString; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, r)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, r)); break; } default: diff --git a/kipi-plugins/jpeglossless/actionthread.h b/kipi-plugins/jpeglossless/actionthread.h index 5f41751..fb81edf 100644 --- a/kipi-plugins/jpeglossless/actionthread.h +++ b/kipi-plugins/jpeglossless/actionthread.h @@ -30,11 +30,11 @@ #ifndef ACTIONTHREAD_H #define ACTIONTHREAD_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qthread.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqthread.h> +#include <tqstringlist.h> // KDE includes. @@ -49,16 +49,16 @@ #include "actions.h" #include "mtqueue.h" -class QObject; +class TQObject; namespace KIPIJPEGLossLessPlugin { -class ActionThread : public QThread +class ActionThread : public TQThread { public: - ActionThread( KIPI::Interface* interface, QObject *parent); + ActionThread( KIPI::Interface* interface, TQObject *tqparent); ~ActionThread(); void rotate(const KURL::List& urlList, RotateAction val); @@ -74,7 +74,7 @@ private: struct Task_ { - QString filePath; + TQString filePath; Action action; RotateAction rotAction; FlipAction flipAction; @@ -82,7 +82,7 @@ private: typedef struct Task_ Task; - QObject *m_parent; + TQObject *m_parent; MTQueue<Task> m_taskQueue; diff --git a/kipi-plugins/jpeglossless/convert2grayscale.cpp b/kipi-plugins/jpeglossless/convert2grayscale.cpp index 66cbbfa..4c865c1 100644 --- a/kipi-plugins/jpeglossless/convert2grayscale.cpp +++ b/kipi-plugins/jpeglossless/convert2grayscale.cpp @@ -40,13 +40,13 @@ extern "C" #include <jpeglib.h> } -// Qt includes. +// TQt includes. -#include <qimage.h> -#include <qstring.h> -#include <qwmatrix.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqimage.h> +#include <tqstring.h> +#include <tqwmatrix.h> +#include <tqfile.h> +#include <tqfileinfo.h> // KDE includes. @@ -66,9 +66,9 @@ namespace KIPIJPEGLossLessPlugin { ImageGrayScale::ImageGrayScale() - : QObject() + : TQObject() { - m_tmpFile = new KTempFile(QString(), QString("kipiplugin-grayscale")); + m_tmpFile = new KTempFile(TQString(), TQString("kipiplugin-grayscale")); m_tmpFile->setAutoDelete(true); } @@ -77,9 +77,9 @@ ImageGrayScale::~ImageGrayScale() delete m_tmpFile; } -bool ImageGrayScale::image2GrayScale(const QString& src, QString& err) +bool ImageGrayScale::image2GrayScale(const TQString& src, TQString& err) { - QFileInfo fi(src); + TQFileInfo fi(src); if (!fi.exists() || !fi.isReadable() || !fi.isWritable()) { @@ -93,7 +93,7 @@ bool ImageGrayScale::image2GrayScale(const QString& src, QString& err) return false; } - QString tmp = m_tmpFile->name(); + TQString tmp = m_tmpFile->name(); if (Utils::isRAW(src)) { @@ -128,7 +128,7 @@ bool ImageGrayScale::image2GrayScale(const QString& src, QString& err) return true; } -bool ImageGrayScale::image2GrayScaleJPEG(const QString& src, const QString& dest, QString& err) +bool ImageGrayScale::image2GrayScaleJPEG(const TQString& src, const TQString& dest, TQString& err) { JCOPY_OPTION copyoption = JCOPYOPT_ALL; jpeg_transform_info transformoption; @@ -155,7 +155,7 @@ bool ImageGrayScale::image2GrayScaleJPEG(const QString& src, const QString& dest FILE *input_file; FILE *output_file; - input_file = fopen(QFile::encodeName(src), "rb"); + input_file = fopen(TQFile::encodeName(src), "rb"); if (!input_file) { qDebug("Image2GrayScale: Error in opening input file"); @@ -163,7 +163,7 @@ bool ImageGrayScale::image2GrayScaleJPEG(const QString& src, const QString& dest return false; } - output_file = fopen(QFile::encodeName(dest), "wb"); + output_file = fopen(TQFile::encodeName(dest), "wb"); if (!output_file) { fclose(input_file); @@ -202,7 +202,7 @@ bool ImageGrayScale::image2GrayScaleJPEG(const QString& src, const QString& dest // Start compressor (note no image data is actually written here) jpeg_write_coefficients(&dstinfo, dst_coef_arrays); - // Copy to the output file any extra markers that we want to preserve (merging from src file with Qt tmp file) + // Copy to the output file any extra markers that we want to preserve (merging from src file with TQt tmp file) jcopy_markers_execute(&srcinfo, &dstinfo, copyoption); // Execute the actual jpeg transformations @@ -220,22 +220,22 @@ bool ImageGrayScale::image2GrayScaleJPEG(const QString& src, const QString& dest return true; } -bool ImageGrayScale::image2GrayScaleImageMagick(const QString& src, const QString& dest, QString& err) +bool ImageGrayScale::image2GrayScaleImageMagick(const TQString& src, const TQString& dest, TQString& err) { KProcess process; process.clearArguments(); process << "convert"; process << "-verbose"; process << "-type" << "Grayscale"; - process << src + QString("[0]") << dest; + process << src + TQString("[0]") << dest; qDebug("ImageMagick Command line args:"); - QValueList<QCString> args = process.args(); - for (QValueList<QCString>::iterator it = args.begin(); it != args.end(); ++it) + TQValueList<TQCString> args = process.args(); + for (TQValueList<TQCString>::iterator it = args.begin(); it != args.end(); ++it) qDebug("%s", (const char*)(*it)); - connect(&process, SIGNAL(receivedStderr(KProcess *, char*, int)), - this, SLOT(slotReadStderr(KProcess*, char*, int))); + connect(&process, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)), + this, TQT_SLOT(slotReadStderr(KProcess*, char*, int))); if (!process.start(KProcess::Block, KProcess::Stderr)) return false; @@ -258,13 +258,13 @@ bool ImageGrayScale::image2GrayScaleImageMagick(const QString& src, const QStrin } // Processing error ! - err = i18n("Cannot convert to gray scale: %1").arg(m_stdErr.replace('\n', ' ')); + err = i18n("Cannot convert to gray scale: %1").tqarg(m_stdErr.tqreplace('\n', ' ')); return false; } void ImageGrayScale::slotReadStderr(KProcess*, char* buffer, int buflen) { - m_stdErr.append(QString::fromLocal8Bit(buffer, buflen)); + m_stdErr.append(TQString::fromLocal8Bit(buffer, buflen)); } } // NameSpace KIPIJPEGLossLessPlugin diff --git a/kipi-plugins/jpeglossless/convert2grayscale.h b/kipi-plugins/jpeglossless/convert2grayscale.h index 6d264f8..8be16f5 100644 --- a/kipi-plugins/jpeglossless/convert2grayscale.h +++ b/kipi-plugins/jpeglossless/convert2grayscale.h @@ -24,10 +24,10 @@ #ifndef convert2grayscale_H #define convert2grayscale_H -// Qt includes. +// TQt includes. -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class KTempFile; class KProcess; @@ -35,16 +35,17 @@ class KProcess; namespace KIPIJPEGLossLessPlugin { -class ImageGrayScale : public QObject +class ImageGrayScale : public TQObject { Q_OBJECT + TQ_OBJECT public: ImageGrayScale(); ~ImageGrayScale(); - bool image2GrayScale(const QString& src, QString& err); + bool image2GrayScale(const TQString& src, TQString& err); private slots: @@ -52,12 +53,12 @@ private slots: private: - bool image2GrayScaleJPEG(const QString& src, const QString& dest, QString& err); - bool image2GrayScaleImageMagick(const QString& src, const QString& dest, QString& err); + bool image2GrayScaleJPEG(const TQString& src, const TQString& dest, TQString& err); + bool image2GrayScaleImageMagick(const TQString& src, const TQString& dest, TQString& err); private: - QString m_stdErr; + TQString m_stdErr; KTempFile *m_tmpFile; }; diff --git a/kipi-plugins/jpeglossless/imageflip.cpp b/kipi-plugins/jpeglossless/imageflip.cpp index 4d08a67..b3a2e9b 100644 --- a/kipi-plugins/jpeglossless/imageflip.cpp +++ b/kipi-plugins/jpeglossless/imageflip.cpp @@ -40,12 +40,12 @@ extern "C" #include <jpeglib.h> } -// Qt includes. +// TQt includes. -#include <qimage.h> -#include <qstring.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqimage.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqfileinfo.h> // KDE includes. @@ -66,9 +66,9 @@ namespace KIPIJPEGLossLessPlugin { ImageFlip::ImageFlip() - : QObject() + : TQObject() { - m_tmpFile = new KTempFile(QString(), QString("kipiplugin-flip")); + m_tmpFile = new KTempFile(TQString(), TQString("kipiplugin-flip")); m_tmpFile->setAutoDelete(true); } @@ -77,9 +77,9 @@ ImageFlip::~ImageFlip() delete m_tmpFile; } -bool ImageFlip::flip(const QString& src, FlipAction action, QString& err) +bool ImageFlip::flip(const TQString& src, FlipAction action, TQString& err) { - QFileInfo fi(src); + TQFileInfo fi(src); if (!fi.exists() || !fi.isReadable() || !fi.isWritable()) { @@ -93,7 +93,7 @@ bool ImageFlip::flip(const QString& src, FlipAction action, QString& err) return false; } - QString tmp = m_tmpFile->name(); + TQString tmp = m_tmpFile->name(); if (Utils::isRAW(src)) { @@ -128,7 +128,7 @@ bool ImageFlip::flip(const QString& src, FlipAction action, QString& err) return true; } -bool ImageFlip::flipJPEG(const QString& src, const QString& dest, FlipAction action, QString& err) +bool ImageFlip::flipJPEG(const TQString& src, const TQString& dest, FlipAction action, TQString& err) { Matrix transform=Matrix::none; @@ -155,7 +155,7 @@ bool ImageFlip::flipJPEG(const QString& src, const QString& dest, FlipAction act return transformJPEG(src, dest, transform, err); } -bool ImageFlip::flipImageMagick(const QString& src, const QString& dest, FlipAction action, QString& err) +bool ImageFlip::flipImageMagick(const TQString& src, const TQString& dest, FlipAction action, TQString& err) { KProcess process; process.clearArguments(); @@ -182,15 +182,15 @@ bool ImageFlip::flipImageMagick(const QString& src, const QString& dest, FlipAct } } - process << src + QString("[0]") << dest; + process << src + TQString("[0]") << dest; qDebug("ImageMagick Command line args:"); - QValueList<QCString> args = process.args(); - for (QValueList<QCString>::iterator it = args.begin(); it != args.end(); ++it) + TQValueList<TQCString> args = process.args(); + for (TQValueList<TQCString>::iterator it = args.begin(); it != args.end(); ++it) qDebug("%s", (const char*)(*it)); - connect(&process, SIGNAL(receivedStderr(KProcess *, char*, int)), - this, SLOT(slotReadStderr(KProcess*, char*, int))); + connect(&process, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)), + this, TQT_SLOT(slotReadStderr(KProcess*, char*, int))); if (!process.start(KProcess::Block, KProcess::Stderr)) return false; @@ -213,13 +213,13 @@ bool ImageFlip::flipImageMagick(const QString& src, const QString& dest, FlipAct } // Processing error ! - err = i18n("Cannot flip: %1").arg(m_stdErr.replace('\n', ' ')); + err = i18n("Cannot flip: %1").tqarg(m_stdErr.tqreplace('\n', ' ')); return false; } void ImageFlip::slotReadStderr(KProcess*, char* buffer, int buflen) { - m_stdErr.append(QString::fromLocal8Bit(buffer, buflen)); + m_stdErr.append(TQString::fromLocal8Bit(buffer, buflen)); } } // NameSpace KIPIJPEGLossLessPlugin diff --git a/kipi-plugins/jpeglossless/imageflip.h b/kipi-plugins/jpeglossless/imageflip.h index ff787fd..a91d70f 100644 --- a/kipi-plugins/jpeglossless/imageflip.h +++ b/kipi-plugins/jpeglossless/imageflip.h @@ -28,10 +28,10 @@ #include "actions.h" -// Qt includes. +// TQt includes. -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class KTempFile; class KProcess; @@ -39,16 +39,17 @@ class KProcess; namespace KIPIJPEGLossLessPlugin { -class ImageFlip : public QObject +class ImageFlip : public TQObject { Q_OBJECT + TQ_OBJECT public: ImageFlip(); ~ImageFlip(); - bool flip(const QString& src, FlipAction action, QString& err); + bool flip(const TQString& src, FlipAction action, TQString& err); private slots: @@ -56,12 +57,12 @@ private slots: private: - bool flipJPEG(const QString& src, const QString& dest, FlipAction action, QString& err); - bool flipImageMagick(const QString& src, const QString& dest, FlipAction action, QString& err); + bool flipJPEG(const TQString& src, const TQString& dest, FlipAction action, TQString& err); + bool flipImageMagick(const TQString& src, const TQString& dest, FlipAction action, TQString& err); private: - QString m_stdErr; + TQString m_stdErr; KTempFile *m_tmpFile; }; diff --git a/kipi-plugins/jpeglossless/imagerotate.cpp b/kipi-plugins/jpeglossless/imagerotate.cpp index cff301e..3115c16 100644 --- a/kipi-plugins/jpeglossless/imagerotate.cpp +++ b/kipi-plugins/jpeglossless/imagerotate.cpp @@ -41,12 +41,12 @@ extern "C" #include <jpeglib.h> } -// Qt includes. +// TQt includes. -#include <qimage.h> -#include <qwmatrix.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqimage.h> +#include <tqwmatrix.h> +#include <tqfile.h> +#include <tqfileinfo.h> // KDE includes. @@ -67,9 +67,9 @@ namespace KIPIJPEGLossLessPlugin { ImageRotate::ImageRotate() - : QObject() + : TQObject() { - m_tmpFile = new KTempFile(QString(), QString("kipiplugin-rotate")); + m_tmpFile = new KTempFile(TQString(), TQString("kipiplugin-rotate")); m_tmpFile->setAutoDelete(true); } @@ -78,9 +78,9 @@ ImageRotate::~ImageRotate() delete m_tmpFile; } -bool ImageRotate::rotate(const QString& src, RotateAction angle, QString& err) +bool ImageRotate::rotate(const TQString& src, RotateAction angle, TQString& err) { - QFileInfo fi(src); + TQFileInfo fi(src); if (!fi.exists() || !fi.isReadable() || !fi.isWritable()) { @@ -94,7 +94,7 @@ bool ImageRotate::rotate(const QString& src, RotateAction angle, QString& err) return false; } - QString tmp = m_tmpFile->name(); + TQString tmp = m_tmpFile->name(); if (Utils::isRAW(src)) { @@ -104,7 +104,7 @@ bool ImageRotate::rotate(const QString& src, RotateAction angle, QString& err) else if (Utils::isJPEG(src)) { if (!rotateJPEG(src, tmp, angle, err)) { - if (err == "nothing to do") { err=QString::null; return true; } + if (err == "nothing to do") { err=TQString(); return true; } return false; } } @@ -131,7 +131,7 @@ bool ImageRotate::rotate(const QString& src, RotateAction angle, QString& err) return true; } -bool ImageRotate::rotateJPEG(const QString& src, const QString& dest, RotateAction angle, QString& err) +bool ImageRotate::rotateJPEG(const TQString& src, const TQString& dest, RotateAction angle, TQString& err) { Matrix transform=Matrix::none; @@ -168,8 +168,8 @@ bool ImageRotate::rotateJPEG(const QString& src, const QString& dest, RotateActi return transformJPEG(src, dest, transform, err); } -bool ImageRotate::rotateImageMagick(const QString& src, const QString& dest, - RotateAction angle, QString& err) +bool ImageRotate::rotateImageMagick(const TQString& src, const TQString& dest, + RotateAction angle, TQString& err) { KProcess process; process.clearArguments(); @@ -206,15 +206,15 @@ bool ImageRotate::rotateImageMagick(const QString& src, const QString& dest, } } - process << src + QString("[0]") << dest; + process << src + TQString("[0]") << dest; qDebug("ImageMagick Command line args:"); - QValueList<QCString> args = process.args(); - for (QValueList<QCString>::iterator it = args.begin(); it != args.end(); ++it) + TQValueList<TQCString> args = process.args(); + for (TQValueList<TQCString>::iterator it = args.begin(); it != args.end(); ++it) qDebug("%s", (const char*)(*it)); - connect(&process, SIGNAL(receivedStderr(KProcess *, char*, int)), - this, SLOT(slotReadStderr(KProcess*, char*, int))); + connect(&process, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)), + this, TQT_SLOT(slotReadStderr(KProcess*, char*, int))); if (!process.start(KProcess::Block, KProcess::Stderr)) return false; @@ -237,13 +237,13 @@ bool ImageRotate::rotateImageMagick(const QString& src, const QString& dest, } // Processing error ! - err = i18n("Cannot rotate: %1").arg(m_stdErr.replace('\n', ' ')); + err = i18n("Cannot rotate: %1").tqarg(m_stdErr.tqreplace('\n', ' ')); return false; } void ImageRotate::slotReadStderr(KProcess*, char* buffer, int buflen) { - m_stdErr.append(QString::fromLocal8Bit(buffer, buflen)); + m_stdErr.append(TQString::fromLocal8Bit(buffer, buflen)); } } // NameSpace KIPIJPEGLossLessPlugin diff --git a/kipi-plugins/jpeglossless/imagerotate.h b/kipi-plugins/jpeglossless/imagerotate.h index aaa27c0..8e4ff22 100644 --- a/kipi-plugins/jpeglossless/imagerotate.h +++ b/kipi-plugins/jpeglossless/imagerotate.h @@ -29,10 +29,10 @@ #include "actions.h" -// Qt includes. +// TQt includes. -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class KTempFile; class KProcess; @@ -40,16 +40,17 @@ class KProcess; namespace KIPIJPEGLossLessPlugin { -class ImageRotate : public QObject +class ImageRotate : public TQObject { Q_OBJECT + TQ_OBJECT public: ImageRotate(); ~ImageRotate(); - bool rotate(const QString& src, RotateAction angle, QString& err); + bool rotate(const TQString& src, RotateAction angle, TQString& err); private slots: @@ -57,12 +58,12 @@ private slots: private: - bool rotateJPEG(const QString& src, const QString& dest, RotateAction angle, QString& err); - bool rotateImageMagick(const QString& src, const QString& dest, RotateAction angle, QString& err); + bool rotateJPEG(const TQString& src, const TQString& dest, RotateAction angle, TQString& err); + bool rotateImageMagick(const TQString& src, const TQString& dest, RotateAction angle, TQString& err); private: - QString m_stdErr; + TQString m_stdErr; KTempFile *m_tmpFile; }; diff --git a/kipi-plugins/jpeglossless/jpegint.h b/kipi-plugins/jpeglossless/jpegint.h index 95b00d4..9d00c59 100644 --- a/kipi-plugins/jpeglossless/jpegint.h +++ b/kipi-plugins/jpeglossless/jpegint.h @@ -43,9 +43,9 @@ typedef enum { /* Operating modes for buffer controllers */ /* Master control module */ struct jpeg_comp_master { - JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); - JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); - JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); + JTQT_METHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); + JTQT_METHOD(void, pass_startup, (j_compress_ptr cinfo)); + JTQT_METHOD(void, finish_pass, (j_compress_ptr cinfo)); /* State variables made visible to other modules */ boolean call_pass_startup; /* True if pass_startup must be called */ @@ -54,16 +54,16 @@ struct jpeg_comp_master { /* Main buffer control (downsampled-data buffer) */ struct jpeg_c_main_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, process_data, (j_compress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JTQT_METHOD(void, process_data, (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); }; /* Compression preprocessing (downsampling input buffer control) */ struct jpeg_c_prep_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JTQT_METHOD(void, pre_process_data, (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail, @@ -74,23 +74,23 @@ struct jpeg_c_prep_controller { /* Coefficient buffer control */ struct jpeg_c_coef_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JTQT_METHOD(boolean, compress_data, (j_compress_ptr cinfo, JSAMPIMAGE input_buf)); }; /* Colorspace conversion */ struct jpeg_color_converter { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - JMETHOD(void, color_convert, (j_compress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo)); + JTQT_METHOD(void, color_convert, (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows)); }; /* Downsampling */ struct jpeg_downsampler { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - JMETHOD(void, downsample, (j_compress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo)); + JTQT_METHOD(void, downsample, (j_compress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION in_row_index, JSAMPIMAGE output_buf, JDIMENSION out_row_group_index)); @@ -100,9 +100,9 @@ struct jpeg_downsampler { /* Forward DCT (also controls coefficient quantization) */ struct jpeg_forward_dct { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo)); /* perhaps this should be an array??? */ - JMETHOD(void, forward_DCT, (j_compress_ptr cinfo, + JTQT_METHOD(void, forward_DCT, (j_compress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY sample_data, JBLOCKROW coef_blocks, JDIMENSION start_row, JDIMENSION start_col, @@ -111,23 +111,23 @@ struct jpeg_forward_dct { /* Entropy encoding */ struct jpeg_entropy_encoder { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); - JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data)); - JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); + JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); + JTQT_METHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data)); + JTQT_METHOD(void, finish_pass, (j_compress_ptr cinfo)); }; /* Marker writing */ struct jpeg_marker_writer { - JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); - JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); + JTQT_METHOD(void, write_file_header, (j_compress_ptr cinfo)); + JTQT_METHOD(void, write_frame_header, (j_compress_ptr cinfo)); + JTQT_METHOD(void, write_scan_header, (j_compress_ptr cinfo)); + JTQT_METHOD(void, write_file_trailer, (j_compress_ptr cinfo)); + JTQT_METHOD(void, write_tables_only, (j_compress_ptr cinfo)); /* These routines are exported to allow insertion of extra markers */ /* Probably only COM and APPn markers should be written this way */ - JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, + JTQT_METHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, unsigned int datalen)); - JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); + JTQT_METHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); }; @@ -135,8 +135,8 @@ struct jpeg_marker_writer { /* Master control module */ struct jpeg_decomp_master { - JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); /* State variables made visible to other modules */ boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ @@ -144,10 +144,10 @@ struct jpeg_decomp_master { /* Input control module */ struct jpeg_input_controller { - JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); - JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); - JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(int, consume_input, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); /* State variables made visible to other modules */ boolean has_multiple_scans; /* True if file has multiple scans */ @@ -156,18 +156,18 @@ struct jpeg_input_controller { /* Main buffer control (downsampled-data buffer) */ struct jpeg_d_main_controller { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, process_data, (j_decompress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JTQT_METHOD(void, process_data, (j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); }; /* Coefficient buffer control */ struct jpeg_d_coef_controller { - JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); - JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); - JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); - JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, + JTQT_METHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(int, consume_data, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, start_output_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(int, decompress_data, (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); /* Pointer to array of coefficient virtual arrays, or NULL if none */ jvirt_barray_ptr *coef_arrays; @@ -175,8 +175,8 @@ struct jpeg_d_coef_controller { /* Decompression postprocessing (color quantization buffer control) */ struct jpeg_d_post_controller { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JTQT_METHOD(void, post_process_data, (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, @@ -187,12 +187,12 @@ struct jpeg_d_post_controller { /* Marker reading & parsing */ struct jpeg_marker_reader { - JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); /* Read markers until SOS or EOI. * Returns same codes as are defined for jpeg_consume_input: * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. */ - JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); + JTQT_METHOD(int, read_markers, (j_decompress_ptr cinfo)); /* Read a restart marker --- exported for use by entropy decoder only */ jpeg_marker_parser_method read_restart_marker; @@ -207,8 +207,8 @@ struct jpeg_marker_reader { /* Entropy decoding */ struct jpeg_entropy_decoder { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)); /* This is here to share code between baseline and progressive decoders; */ @@ -217,21 +217,21 @@ struct jpeg_entropy_decoder { }; /* Inverse DCT (also performs dequantization) */ -typedef JMETHOD(void, inverse_DCT_method_ptr, +typedef JTQT_METHOD(void, inverse_DCT_method_ptr, (j_decompress_ptr cinfo, jpeg_component_info * compptr, JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); struct jpeg_inverse_dct { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo)); /* It is useful to allow each component to have a separate IDCT method. */ inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; }; /* Upsampling (note that upsampler must also call color converter) */ struct jpeg_upsampler { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, upsample, (j_decompress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, upsample, (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, @@ -244,20 +244,20 @@ struct jpeg_upsampler { /* Colorspace conversion */ struct jpeg_color_deconverter { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, color_convert, (j_decompress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, color_convert, (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)); }; /* Color quantization or color precision reduction */ struct jpeg_color_quantizer { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); - JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, + JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); + JTQT_METHOD(void, color_quantize, (j_decompress_ptr cinfo, JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)); - JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, finish_pass, (j_decompress_ptr cinfo)); + JTQT_METHOD(void, new_color_map, (j_decompress_ptr cinfo)); }; diff --git a/kipi-plugins/jpeglossless/jpegtransform.cpp b/kipi-plugins/jpeglossless/jpegtransform.cpp index 7009e47..4f883d4 100644 --- a/kipi-plugins/jpeglossless/jpegtransform.cpp +++ b/kipi-plugins/jpeglossless/jpegtransform.cpp @@ -41,11 +41,11 @@ extern "C" #include <jpeglib.h> } -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qwmatrix.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqwmatrix.h> +#include <tqfile.h> // KDE includes. @@ -119,11 +119,11 @@ static void jpegtransform_jpeg_output_message(j_common_ptr cinfo) #endif } -bool transformJPEG(const QString& src, const QString& destGiven, - Matrix &userAction, QString& err) +bool transformJPEG(const TQString& src, const TQString& destGiven, + Matrix &userAction, TQString& err) { //may be modified - QString dest(destGiven); + TQString dest(destGiven); JCOPY_OPTION copyoption = JCOPYOPT_ALL; jpeg_transform_info transformoption; @@ -155,7 +155,7 @@ bool transformJPEG(const QString& src, const QString& destGiven, FILE *input_file; FILE *output_file; - input_file = fopen(QFile::encodeName(src), "rb"); + input_file = fopen(TQFile::encodeName(src), "rb"); if (!input_file) { qDebug("ImageRotate/ImageFlip: Error in opening input file"); @@ -163,7 +163,7 @@ bool transformJPEG(const QString& src, const QString& destGiven, return false; } - output_file = fopen(QFile::encodeName(dest), "wb"); + output_file = fopen(TQFile::encodeName(dest), "wb"); if (!output_file) { fclose(input_file); @@ -219,7 +219,7 @@ bool transformJPEG(const QString& src, const QString& destGiven, dest=tempFile.name(); } - output_file = fopen(QFile::encodeName(dest), "wb"); + output_file = fopen(TQFile::encodeName(dest), "wb"); if (!output_file) { fclose(input_file); @@ -277,7 +277,7 @@ bool transformJPEG(const QString& src, const QString& destGiven, dstinfo.err = jpeg_std_error(&jdsterr); jpeg_create_compress(&dstinfo); - input_file = fopen(QFile::encodeName(dest), "rb"); + input_file = fopen(TQFile::encodeName(dest), "rb"); if (!input_file) { qDebug("ImageRotate/ImageFlip: Error in opening input file"); @@ -285,7 +285,7 @@ bool transformJPEG(const QString& src, const QString& destGiven, return false; } - output_file = fopen(QFile::encodeName(destGiven), "wb"); + output_file = fopen(TQFile::encodeName(destGiven), "wb"); if (!output_file) { fclose(input_file); @@ -338,16 +338,16 @@ bool transformJPEG(const QString& src, const QString& destGiven, fclose(output_file); // Unlink temp file - unlink(QFile::encodeName(dest)); + unlink(TQFile::encodeName(dest)); } // And set finaly update the metadata to target file. - QImage img(destGiven); - QImage exifThumbnail = img.scale(160, 120, QImage::ScaleMin); + TQImage img(destGiven); + TQImage exifThumbnail = img.scale(160, 120, TQ_ScaleMin); exiv2Iface.load(destGiven); exiv2Iface.setImageOrientation(KExiv2Iface::KExiv2::ORIENTATION_NORMAL); - exiv2Iface.setImageProgramId(QString("Kipi-plugins"), QString(kipiplugins_version)); + exiv2Iface.setImageProgramId(TQString("Kipi-plugins"), TQString(kipiplugins_version)); exiv2Iface.setImageDimensions(img.size()); exiv2Iface.setExifThumbnail(exifThumbnail); exiv2Iface.save(destGiven); diff --git a/kipi-plugins/jpeglossless/jpegtransform.h b/kipi-plugins/jpeglossless/jpegtransform.h index 1cf76f2..e04c2a2 100644 --- a/kipi-plugins/jpeglossless/jpegtransform.h +++ b/kipi-plugins/jpeglossless/jpegtransform.h @@ -25,9 +25,9 @@ #ifndef JPEGTRANSFORM_H #define JPEGTRANSFORM_H -// Qt includes. +// TQt includes. -#include <qstring.h> +#include <tqstring.h> // LibKExiv2 includes. @@ -49,7 +49,7 @@ namespace KIPIJPEGLossLessPlugin cares for both composing (180+90=270) and eliminating (180+180=no action), as well as the non-commutative nature of the operations (vflip+90 is not 90+vflip) - All 2D transformations can be described by a 2x3 matrix, see QWMatrix. + All 2D transformations can be described by a 2x3 matrix, see TQWMatrix. All transformations needed here - rotate 90, 180, 270, flipV, flipH - can be described in a 2x2 matrix with the values 0,1,-1 (because flipping is expressed by changing the sign only, @@ -121,7 +121,7 @@ protected: }; -bool transformJPEG(const QString& src, const QString& dest, Matrix &action, QString& err); +bool transformJPEG(const TQString& src, const TQString& dest, Matrix &action, TQString& err); void convertTransform(Matrix &action, JXFORM_CODE &flip, JXFORM_CODE &rotate); diff --git a/kipi-plugins/jpeglossless/mtqueue.h b/kipi-plugins/jpeglossless/mtqueue.h index 209ade5..80af490 100644 --- a/kipi-plugins/jpeglossless/mtqueue.h +++ b/kipi-plugins/jpeglossless/mtqueue.h @@ -25,10 +25,10 @@ #ifndef MTQUEUE_H #define MTQUEUE_H -// Qt includes. +// TQt includes. -#include <qptrqueue.h> -#include <qmutex.h> +#include <tqptrqueue.h> +#include <tqmutex.h> namespace KIPIJPEGLossLessPlugin { @@ -80,8 +80,8 @@ public: private: - QPtrQueue<Type> m_queue; - QMutex m_mutex; + TQPtrQueue<Type> m_queue; + TQMutex m_mutex; }; } // NameSpace KIPIJPEGLossLessPlugin diff --git a/kipi-plugins/jpeglossless/plugin_jpeglossless.cpp b/kipi-plugins/jpeglossless/plugin_jpeglossless.cpp index 71fd86e..959fe05 100644 --- a/kipi-plugins/jpeglossless/plugin_jpeglossless.cpp +++ b/kipi-plugins/jpeglossless/plugin_jpeglossless.cpp @@ -26,9 +26,9 @@ #include <iostream> -// Qt includes. +// TQt includes. -#include <qdir.h> +#include <tqdir.h> // KDE includes. @@ -59,8 +59,8 @@ typedef KGenericFactory<Plugin_JPEGLossless> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_jpeglossless, Factory("kipiplugin_jpeglossless")) -Plugin_JPEGLossless::Plugin_JPEGLossless(QObject *parent, const char*, const QStringList &) - : KIPI::Plugin( Factory::instance(), parent, "JPEGLossless") +Plugin_JPEGLossless::Plugin_JPEGLossless(TQObject *tqparent, const char*, const TQStringList &) + : KIPI::Plugin( Factory::instance(), tqparent, "JPEGLossless") { m_total = 0; m_current = 0; @@ -75,14 +75,14 @@ Plugin_JPEGLossless::Plugin_JPEGLossless(QObject *parent, const char*, const QSt kdDebug( 51001 ) << "Plugin_JPEGLossless plugin loaded" << endl; } -void Plugin_JPEGLossless::setup( QWidget* widget ) +void Plugin_JPEGLossless::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); m_action_AutoExif = new KAction(i18n("Auto Rotate/Flip Using Exif Information"), 0, 0, this, - SLOT(slotRotate()), + TQT_SLOT(slotRotate()), actionCollection(), "rotate_exif"); @@ -95,14 +95,14 @@ void Plugin_JPEGLossless::setup( QWidget* widget ) "rotate_ccw", SHIFT+CTRL+Key_Left, this, - SLOT(slotRotate()), + TQT_SLOT(slotRotate()), actionCollection(), "rotate_ccw") ); m_action_RotateImage->insert( new KAction(i18n("Right"), "rotate_cw", SHIFT+CTRL+Key_Right, this, - SLOT(slotRotate()), + TQT_SLOT(slotRotate()), actionCollection(), "rotate_cw") ); @@ -115,7 +115,7 @@ void Plugin_JPEGLossless::setup( QWidget* widget ) 0, CTRL+Key_Asterisk, this, - SLOT(slotFlip()), + TQT_SLOT(slotFlip()), actionCollection(), "flip_horizontal") ); @@ -123,7 +123,7 @@ void Plugin_JPEGLossless::setup( QWidget* widget ) 0, CTRL+Key_Slash, this, - SLOT(slotFlip()), + TQT_SLOT(slotFlip()), actionCollection(), "flip_vertical") ); @@ -131,7 +131,7 @@ void Plugin_JPEGLossless::setup( QWidget* widget ) "grayscaleconvert", 0, this, - SLOT(slotConvert2GrayScale()), + TQT_SLOT(slotConvert2GrayScale()), actionCollection(), "jpeglossless_convert2grayscale"); @@ -140,7 +140,7 @@ void Plugin_JPEGLossless::setup( QWidget* widget ) addAction( m_action_FlipImage ); addAction( m_action_Convert2GrayScale ); - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -155,17 +155,17 @@ void Plugin_JPEGLossless::setup( QWidget* widget ) m_thread = new KIPIJPEGLossLessPlugin::ActionThread(interface, this); - connect( interface, SIGNAL( selectionChanged( bool ) ), - m_action_AutoExif, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( selectionChanged( bool ) ), + m_action_AutoExif, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( selectionChanged( bool ) ), - m_action_RotateImage, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( selectionChanged( bool ) ), + m_action_RotateImage, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( selectionChanged( bool ) ), - m_action_FlipImage, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( selectionChanged( bool ) ), + m_action_FlipImage, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( selectionChanged( bool ) ), - m_action_Convert2GrayScale, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( selectionChanged( bool ) ), + m_action_Convert2GrayScale, TQT_SLOT( setEnabled( bool ) ) ); } Plugin_JPEGLossless::~Plugin_JPEGLossless() @@ -179,8 +179,8 @@ void Plugin_JPEGLossless::slotFlip() KURL::List items = images(); if (items.count() <= 0) return; - QString from(sender()->name()); - QString title; + TQString from(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()); + TQString title; bool proceed = false; if (from == "flip_horizontal") @@ -212,11 +212,11 @@ void Plugin_JPEGLossless::slotFlip() m_progressDlg = 0; } - m_progressDlg = new KIPI::BatchProgressDialog(kapp->activeWindow(), - i18n("Flip images %1").arg(title)); + m_progressDlg = new KIPI::BatchProgressDialog(TQT_TQWIDGET(kapp->activeWindow()), + i18n("Flip images %1").tqarg(title)); - connect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + connect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); m_progressDlg->show(); @@ -229,8 +229,8 @@ void Plugin_JPEGLossless::slotRotate() KURL::List items = images(); if (items.count() <= 0) return; - QString from(sender()->name()); - QString title; + TQString from(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()); + TQString title; bool proceed = false; if (from == "rotate_cw") @@ -268,11 +268,11 @@ void Plugin_JPEGLossless::slotRotate() m_progressDlg = 0; } - m_progressDlg = new KIPI::BatchProgressDialog(kapp->activeWindow(), - i18n("Rotate images %1").arg(title)); + m_progressDlg = new KIPI::BatchProgressDialog(TQT_TQWIDGET(kapp->activeWindow()), + i18n("Rotate images %1").tqarg(title)); - connect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + connect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); m_progressDlg->show(); @@ -284,12 +284,12 @@ void Plugin_JPEGLossless::slotConvert2GrayScale() { KURL::List items = images(); if (items.count() <= 0 || - KMessageBox::No==KMessageBox::warningYesNo(kapp->activeWindow(), + KMessageBox::No==KMessageBox::warningYesNo(TQT_TQWIDGET(kapp->activeWindow()), i18n("<p>Are you sure you wish to convert the selected image(s) to " "black and white? This operation <b>cannot</b> be undone.</p>"))) return; - QString from(sender()->name()); + TQString from(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()); m_total = items.count(); m_current = 0; @@ -301,11 +301,11 @@ void Plugin_JPEGLossless::slotConvert2GrayScale() m_progressDlg = 0; } - m_progressDlg = new KIPI::BatchProgressDialog(kapp->activeWindow(), + m_progressDlg = new KIPI::BatchProgressDialog(TQT_TQWIDGET(kapp->activeWindow()), i18n("Convert images to black & white")); - connect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + connect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); m_progressDlg->show(); @@ -318,7 +318,7 @@ void Plugin_JPEGLossless::slotCancel() { m_thread->cancel(); - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -329,14 +329,14 @@ void Plugin_JPEGLossless::slotCancel() interface->refreshImages( m_images ); } -void Plugin_JPEGLossless::customEvent(QCustomEvent *event) +void Plugin_JPEGLossless::customEvent(TQCustomEvent *event) { if (!event) return; KIPIJPEGLossLessPlugin::EventData *d = (KIPIJPEGLossLessPlugin::EventData*) event->data(); if (!d) return; - QString text; + TQString text; if (d->starting) { @@ -344,17 +344,17 @@ void Plugin_JPEGLossless::customEvent(QCustomEvent *event) { case(KIPIJPEGLossLessPlugin::Rotate): { - text = i18n("Rotating Image \"%1\"").arg(d->fileName.section('/', -1)); + text = i18n("Rotating Image \"%1\"").tqarg(d->fileName.section('/', -1)); break; } case(KIPIJPEGLossLessPlugin::Flip): { - text = i18n("Flipping Image \"%1\"").arg(d->fileName.section('/', -1)); + text = i18n("Flipping Image \"%1\"").tqarg(d->fileName.section('/', -1)); break; } case(KIPIJPEGLossLessPlugin::GrayScale): { - text = i18n("Converting to Black & White \"%1\"").arg(d->fileName.section('/', -1)); + text = i18n("Converting to Black & White \"%1\"").tqarg(d->fileName.section('/', -1)); break; } default: @@ -445,8 +445,8 @@ void Plugin_JPEGLossless::customEvent(QCustomEvent *event) m_progressDlg->setButtonCancelText( i18n("&Close") ); #endif - disconnect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + disconnect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); } else { @@ -455,7 +455,7 @@ void Plugin_JPEGLossless::customEvent(QCustomEvent *event) m_progressDlg = 0; } - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -484,7 +484,7 @@ KIPI::Category Plugin_JPEGLossless::category( KAction* action ) const KURL::List Plugin_JPEGLossless::images() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { diff --git a/kipi-plugins/jpeglossless/plugin_jpeglossless.h b/kipi-plugins/jpeglossless/plugin_jpeglossless.h index 71dd22c..c718698 100644 --- a/kipi-plugins/jpeglossless/plugin_jpeglossless.h +++ b/kipi-plugins/jpeglossless/plugin_jpeglossless.h @@ -30,7 +30,7 @@ #include <libkipi/plugin.h> #include <libkipi/imagecollection.h> -class QCustomEvent; +class TQCustomEvent; class KActionMenu; class KAction; @@ -43,18 +43,19 @@ class ProgressDlg; class Plugin_JPEGLossless : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_JPEGLossless(QObject *parent, const char* name, const QStringList &args); + Plugin_JPEGLossless(TQObject *tqparent, const char* name, const TQStringList &args); ~Plugin_JPEGLossless(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); protected: - void customEvent(QCustomEvent *event); + void customEvent(TQCustomEvent *event); KURL::List images(); private slots: diff --git a/kipi-plugins/jpeglossless/transupp.cpp b/kipi-plugins/jpeglossless/transupp.cpp index 6552364..156ac08 100644 --- a/kipi-plugins/jpeglossless/transupp.cpp +++ b/kipi-plugins/jpeglossless/transupp.cpp @@ -40,7 +40,7 @@ namespace KIPIJPEGLossLessPlugin * or recompression of the image. * Thanks to Guido Vollbeding for the initial design and code of this feature. * - * Horizontal flipping is done in-place, using a single top-to-bottom + *Qt::Horizontal flipping is done in-place, using a single top-to-bottom * pass through the virtual source array. It will thus be much the * fastest option for images larger than main memory. * @@ -75,7 +75,7 @@ namespace KIPIJPEGLossLessPlugin LOCAL(void) do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, jvirt_barray_ptr *src_coef_arrays) -/* Horizontal flip; done in-place, so no separate dest array is required */ +/*Qt::Horizontal flip; done in-place, so no separate dest array is required */ { JDIMENSION MCU_cols, comp_width, blk_x, blk_y; int ci, k, offset_y; @@ -84,7 +84,7 @@ do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JCOEF temp1, temp2; jpeg_component_info *compptr; - /* Horizontal mirroring of DCT blocks is accomplished by swapping + /*Qt::Horizontal mirroring of DCT blocks is accomplished by swapping * pairs of blocks in-place. Within a DCT block, we perform horizontal * mirroring by changing the signs of odd-numbered columns. * Partial iMCUs at the right edge are left untouched. @@ -125,7 +125,7 @@ LOCAL(void) do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) -/* Vertical flip */ +/*Qt::Vertical flip */ { JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; int ci, i, j, offset_y; @@ -242,7 +242,7 @@ do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, jvirt_barray_ptr *dst_coef_arrays) /* 90 degree rotation is equivalent to * 1. Transposing the image; - * 2. Horizontal mirroring. + * 2.Qt::Horizontal mirroring. * These two steps are merged into a single processing routine. */ { @@ -305,7 +305,7 @@ do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* 270 degree rotation is equivalent to - * 1. Horizontal mirroring; + * 1.Qt::Horizontal mirroring; * 2. Transposing the image. * These two steps are merged into a single processing routine. */ @@ -369,8 +369,8 @@ do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, jvirt_barray_ptr *src_coef_arrays, jvirt_barray_ptr *dst_coef_arrays) /* 180 degree rotation is equivalent to - * 1. Vertical mirroring; - * 2. Horizontal mirroring. + * 1.Qt::Vertical mirroring; + * 2.Qt::Horizontal mirroring. * These two steps are merged into a single processing routine. */ { @@ -473,9 +473,9 @@ do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, * 1. 180 degree rotation; * 2. Transposition; * or - * 1. Horizontal mirroring; + * 1.Qt::Horizontal mirroring; * 2. Transposition; - * 3. Horizontal mirroring. + * 3.Qt::Horizontal mirroring. * These steps are merged into a single processing routine. */ { diff --git a/kipi-plugins/jpeglossless/utils.cpp b/kipi-plugins/jpeglossless/utils.cpp index b050bde..d7b5b1a 100644 --- a/kipi-plugins/jpeglossless/utils.cpp +++ b/kipi-plugins/jpeglossless/utils.cpp @@ -36,13 +36,13 @@ extern "C" #include <unistd.h> } -// Qt includes. +// TQt includes. -#include <qfileinfo.h> -#include <qimage.h> -#include <qstring.h> -#include <qfile.h> -#include <qdir.h> +#include <tqfileinfo.h> +#include <tqimage.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqdir.h> // KDE includes. @@ -73,8 +73,8 @@ extern "C" namespace KIPIJPEGLossLessPlugin { -Utils::Utils(QObject *parent) - : QObject(parent) +Utils::Utils(TQObject *tqparent) + : TQObject(tqparent) { } @@ -82,54 +82,54 @@ Utils::~Utils() { } -bool Utils::updateMetadataImageMagick(const QString& src, QString& err) +bool Utils::updateMetadataImageMagick(const TQString& src, TQString& err) { - QFileInfo finfo(src); + TQFileInfo finfo(src); if (src.isEmpty() || !finfo.isReadable()) { err = i18n("unable to open source file"); return false; } - QImage img(src); - QImage iptcPreview = img.scale(1280, 1024, QImage::ScaleMin); - QImage exifThumbnail = iptcPreview.scale(160, 120, QImage::ScaleMin); + TQImage img(src); + TQImage iptcPreview = img.scale(1280, 1024, TQ_ScaleMin); + TQImage exifThumbnail = iptcPreview.scale(160, 120, TQ_ScaleMin); KExiv2Iface::KExiv2 meta; meta.load(src); meta.setImageOrientation(KExiv2Iface::KExiv2::ORIENTATION_NORMAL); - meta.setImageProgramId(QString("Kipi-plugins"), QString(kipiplugins_version)); + meta.setImageProgramId(TQString("Kipi-plugins"), TQString(kipiplugins_version)); meta.setImageDimensions(img.size()); meta.setExifThumbnail(exifThumbnail); meta.setImagePreview(iptcPreview); - QByteArray ba = meta.getExif(); + TQByteArray ba = meta.getExif(); const uchar exifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; - QByteArray exifData = QByteArray(ba.size() + sizeof(exifHeader)); + TQByteArray exifData = TQByteArray(ba.size() + sizeof(exifHeader)); memcpy(exifData.data(), exifHeader, sizeof(exifHeader)); memcpy(exifData.data()+sizeof(exifHeader), ba.data(), ba.size()); - QByteArray iptcData = meta.getIptc(true); + TQByteArray iptcData = meta.getIptc(true); - KTempFile exifTemp(QString(), "kipipluginsiptc.app1"); + KTempFile exifTemp(TQString(), "kipipluginsiptc.app1"); exifTemp.setAutoDelete(true); - QFile *exifFile = exifTemp.file(); + TQFile *exifFile = exifTemp.file(); if ( !exifFile ) { err = i18n("unable to open temp file"); return false; } - QDataStream streamExif( exifFile ); + TQDataStream streamExif( exifFile ); streamExif.writeRawBytes(exifData.data(), exifData.size()); exifFile->close(); - KTempFile iptcTemp(QString(), "kipipluginsiptc.8bim"); + KTempFile iptcTemp(TQString(), "kipipluginsiptc.8bim"); iptcTemp.setAutoDelete(true); - QFile *iptcFile = iptcTemp.file(); + TQFile *iptcFile = iptcTemp.file(); if ( !iptcFile ) { err = i18n("Cannot rotate: unable to open temp file"); return false; } - QDataStream streamIptc( iptcFile ); + TQDataStream streamIptc( iptcFile ); streamIptc.writeRawBytes(iptcData.data(), iptcData.size()); iptcFile->close(); @@ -144,15 +144,15 @@ bool Utils::updateMetadataImageMagick(const QString& src, QString& err) process << "-profile"; process << iptcTemp.name(); - process << src + QString("[0]"); + process << src + TQString("[0]"); qDebug("ImageMagick Command line args:"); - QValueList<QCString> args = process.args(); - for (QValueList<QCString>::iterator it = args.begin(); it != args.end(); ++it) + TQValueList<TQCString> args = process.args(); + for (TQValueList<TQCString>::iterator it = args.begin(); it != args.end(); ++it) qDebug("%s", (const char*)(*it)); - connect(&process, SIGNAL(receivedStderr(KProcess *, char*, int)), - this, SLOT(slotReadStderr(KProcess*, char*, int))); + connect(&process, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)), + this, TQT_SLOT(slotReadStderr(KProcess*, char*, int))); if (!process.start(KProcess::Block, KProcess::Stderr)) return false; @@ -175,40 +175,40 @@ bool Utils::updateMetadataImageMagick(const QString& src, QString& err) } // Processing error ! - err = i18n("Cannot update metadata: %1").arg(m_stdErr.replace('\n', ' ')); + err = i18n("Cannot update metadata: %1").tqarg(m_stdErr.tqreplace('\n', ' ')); return false; } void Utils::slotReadStderr(KProcess*, char* buffer, int buflen) { - m_stdErr.append(QString::fromLocal8Bit(buffer, buflen)); + m_stdErr.append(TQString::fromLocal8Bit(buffer, buflen)); } -bool Utils::isJPEG(const QString& file) +bool Utils::isJPEG(const TQString& file) { - QString format = QString(QImageIO::imageFormat(file)).upper(); + TQString format = TQString(TQImageIO::imageFormat(file)).upper(); return format=="JPEG"; } -bool Utils::isRAW(const QString& file) +bool Utils::isRAW(const TQString& file) { #if KDCRAW_VERSION < 0x000106 - QString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); + TQString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); #else - QString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); + TQString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); #endif - QFileInfo fileInfo(file); - if (rawFilesExt.upper().contains( fileInfo.extension(false).upper() )) + TQFileInfo fileInfo(file); + if (rawFilesExt.upper().tqcontains( fileInfo.extension(false).upper() )) return true; return false; } -bool Utils::CopyFile(const QString& src, const QString& dst) +bool Utils::CopyFile(const TQString& src, const TQString& dst) { - QFile sFile(src); - QFile dFile(dst); + TQFile sFile(src); + TQFile dFile(dst); if ( !sFile.open(IO_ReadOnly) ) return false; @@ -222,10 +222,10 @@ bool Utils::CopyFile(const QString& src, const QString& dst) const int MAX_IPC_SIZE = (1024*32); char buffer[MAX_IPC_SIZE]; - Q_LONG len; + TQ_LONG len; while ((len = sFile.readBlock(buffer, MAX_IPC_SIZE)) != 0) { - if (len == -1 || dFile.writeBlock(buffer, (Q_ULONG)len) == -1) + if (len == -1 || dFile.writeBlock(buffer, (TQ_ULONG)len) == -1) { sFile.close(); dFile.close(); @@ -239,10 +239,10 @@ bool Utils::CopyFile(const QString& src, const QString& dst) return true; } -bool Utils::MoveFile(const QString& src, const QString& dst) +bool Utils::MoveFile(const TQString& src, const TQString& dst) { struct stat stbuf; - if (::stat(QFile::encodeName(dst), &stbuf) != 0) + if (::stat(TQFile::encodeName(dst), &stbuf) != 0) { qDebug("KIPIJPEGLossLessPlugin:MoveFile: failed to stat src"); return false; @@ -254,32 +254,32 @@ bool Utils::MoveFile(const QString& src, const QString& dst) struct utimbuf timbuf; timbuf.actime = stbuf.st_atime; timbuf.modtime = stbuf.st_mtime; - if (::utime(QFile::encodeName(dst), &timbuf) != 0) + if (::utime(TQFile::encodeName(dst), &timbuf) != 0) { qDebug("KIPIJPEGLossLessPlugin:MoveFile: failed to update dst time"); } - if (::unlink(QFile::encodeName(src).data()) != 0) + if (::unlink(TQFile::encodeName(src).data()) != 0) { qDebug("KIPIJPEGLossLessPlugin:MoveFile: failed to unlink src"); } return true; } -bool Utils::deleteDir(const QString& dirPath) +bool Utils::deleteDir(const TQString& dirPath) { - QDir dir(dirPath); + TQDir dir(dirPath); if (!dir.exists()) return false; - dir.setFilter(QDir::Dirs | QDir::Files | QDir::NoSymLinks); + dir.setFilter(TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks); - const QFileInfoList* infoList = dir.entryInfoList(); + const TQFileInfoList* infoList = dir.entryInfoList(); if (!infoList) return false; - QFileInfoListIterator it(*infoList); - QFileInfo* fi; + TQFileInfoListIterator it(*infoList); + TQFileInfo* fi; while( (fi = it.current()) ) { diff --git a/kipi-plugins/jpeglossless/utils.h b/kipi-plugins/jpeglossless/utils.h index b9040d6..43c10ac 100644 --- a/kipi-plugins/jpeglossless/utils.h +++ b/kipi-plugins/jpeglossless/utils.h @@ -25,48 +25,49 @@ #ifndef UTILS_H #define UTILS_H -// Qt includes. +// TQt includes. -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class KProcess; namespace KIPIJPEGLossLessPlugin { -class Utils : public QObject +class Utils : public TQObject { Q_OBJECT + TQ_OBJECT public: - Utils(QObject *parent); + Utils(TQObject *tqparent); ~Utils(); - bool updateMetadataImageMagick(const QString& src, QString& err); + bool updateMetadataImageMagick(const TQString& src, TQString& err); public: // Static methods. /** Test if a file is a JPEG file. */ - static bool isJPEG(const QString& file); + static bool isJPEG(const TQString& file); /** Test if a file is a RAW file supported by dcraw. */ - static bool isRAW(const QString& file); + static bool isRAW(const TQString& file); /** POSIX Compliant File Copy and Move - Can't use KIO based operations as we need to use these in a thread */ - static bool CopyFile(const QString& src, const QString& dst); - static bool MoveFile(const QString& src, const QString& dst); + static bool CopyFile(const TQString& src, const TQString& dst); + static bool MoveFile(const TQString& src, const TQString& dst); /** Thread-safe recursive dir deletion. */ - static bool deleteDir(const QString& dirPath); + static bool deleteDir(const TQString& dirPath); private slots: @@ -74,7 +75,7 @@ private slots: private: - QString m_stdErr; + TQString m_stdErr; }; } // NameSpace KIPIJPEGLossLessPlugin diff --git a/kipi-plugins/kameraklient/camerafolderitem.cpp b/kipi-plugins/kameraklient/camerafolderitem.cpp index 67fb9a4..6ab0fa7 100644 --- a/kipi-plugins/kameraklient/camerafolderitem.cpp +++ b/kipi-plugins/kameraklient/camerafolderitem.cpp @@ -27,14 +27,14 @@ namespace KIPIKameraKlientPlugin { -CameraFolderItem::CameraFolderItem(KListView* parent, const QString& name) : KListViewItem(parent, name) { +CameraFolderItem::CameraFolderItem(KListView* tqparent, const TQString& name) : KListViewItem(tqparent, name) { setPixmap(0, SmallIcon("folder")); virtualFolder_ = true; count_ = 0; name_ = name; } -CameraFolderItem::CameraFolderItem(KListViewItem* parent, const QString& folderName, const QString& folderPath) : KListViewItem(parent, folderName) { +CameraFolderItem::CameraFolderItem(KListViewItem* tqparent, const TQString& folderName, const TQString& folderPath) : KListViewItem(tqparent, folderName) { setPixmap(0, SmallIcon("folder")); folderName_ = folderName; folderPath_ = folderPath; @@ -50,22 +50,22 @@ bool CameraFolderItem::isVirtualFolder() { return virtualFolder_; } -QString CameraFolderItem::folderName() { +TQString CameraFolderItem::folderName() { return folderName_; } -QString CameraFolderItem::folderPath() { +TQString CameraFolderItem::folderPath() { return folderPath_; } void CameraFolderItem::changeCount(int val) { count_ += val; - setText(0, name_ + " (" + QString::number(count_) + ")"); + setText(0, name_ + " (" + TQString::number(count_) + ")"); } void CameraFolderItem::setCount(int val) { count_ = val; - setText(0, name_ + " (" + QString::number(count_) + ")"); + setText(0, name_ + " (" + TQString::number(count_) + ")"); } int CameraFolderItem::count() { diff --git a/kipi-plugins/kameraklient/camerafolderitem.h b/kipi-plugins/kameraklient/camerafolderitem.h index 7294c87..17eb0cc 100644 --- a/kipi-plugins/kameraklient/camerafolderitem.h +++ b/kipi-plugins/kameraklient/camerafolderitem.h @@ -23,27 +23,27 @@ #define CAMERAFOLDERITEM_H #include <klistview.h> -#include <qstring.h> +#include <tqstring.h> namespace KIPIKameraKlientPlugin { class CameraFolderItem : public KListViewItem { public: - CameraFolderItem(KListView* parent, const QString& name); - CameraFolderItem(KListViewItem* parent, const QString& folderName, const QString& folderPath); + CameraFolderItem(KListView* tqparent, const TQString& name); + CameraFolderItem(KListViewItem* tqparent, const TQString& folderName, const TQString& folderPath); ~CameraFolderItem(); - QString folderName(); - QString folderPath(); + TQString folderName(); + TQString folderPath(); bool isVirtualFolder(); void changeCount(int val); void setCount(int val); int count(); private: - QString folderName_; - QString folderPath_; - QString name_; + TQString folderName_; + TQString folderPath_; + TQString name_; bool virtualFolder_; int count_; }; diff --git a/kipi-plugins/kameraklient/camerafolderview.cpp b/kipi-plugins/kameraklient/camerafolderview.cpp index ae30fae..c7d31b6 100644 --- a/kipi-plugins/kameraklient/camerafolderview.cpp +++ b/kipi-plugins/kameraklient/camerafolderview.cpp @@ -29,7 +29,7 @@ namespace KIPIKameraKlientPlugin { -CameraFolderView::CameraFolderView(QWidget* parent) : KListView(parent) { +CameraFolderView::CameraFolderView(TQWidget* tqparent) : KListView(tqparent) { addColumn(i18n("Camera Folders")); setFullWidth(true); setDragEnabled(false); @@ -47,29 +47,29 @@ CameraFolderView::~CameraFolderView() { } void CameraFolderView::setupConnections() { - connect(this, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectionChanged(QListViewItem*))); + connect(this, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQListViewItem*))); } -void CameraFolderView::addVirtualFolder(const QString& name) { +void CameraFolderView::addVirtualFolder(const TQString& name) { cameraName_ = name; virtualFolder_ = new CameraFolderItem(this, cameraName_); virtualFolder_->setOpen(true); } -void CameraFolderView::addRootFolder(const QString& folder) { +void CameraFolderView::addRootFolder(const TQString& folder) { rootFolder_ = new CameraFolderItem(virtualFolder_, folder, folder); rootFolder_->setOpen(true); } -CameraFolderItem* CameraFolderView::addFolder(const QString& folder, const QString& subFolder) { - CameraFolderItem *parentItem = findFolder(folder); - if (parentItem) { - QString path(folder); +CameraFolderItem* CameraFolderView::addFolder(const TQString& folder, const TQString& subFolder) { + CameraFolderItem *tqparentItem = findFolder(folder); + if (tqparentItem) { + TQString path(folder); if (!folder.endsWith("/")) { path += "/"; } path += subFolder; - CameraFolderItem* item = new CameraFolderItem(parentItem, subFolder, path); + CameraFolderItem* item = new CameraFolderItem(tqparentItem, subFolder, path); item->setOpen(true); return item; } else { @@ -77,8 +77,8 @@ CameraFolderItem* CameraFolderView::addFolder(const QString& folder, const QStri } } -CameraFolderItem* CameraFolderView::findFolder(const QString& folderPath) { - QListViewItemIterator it(this); +CameraFolderItem* CameraFolderView::findFolder(const TQString& folderPath) { + TQListViewItemIterator it(this); for( ; it.current(); ++it) { CameraFolderItem* item = static_cast<CameraFolderItem*>(it.current()); if (item->folderPath() == folderPath) { @@ -88,7 +88,7 @@ CameraFolderItem* CameraFolderView::findFolder(const QString& folderPath) { return 0; } -void CameraFolderView::slotSelectionChanged(QListViewItem* item) { +void CameraFolderView::slotSelectionChanged(TQListViewItem* item) { if (!item) { return; } diff --git a/kipi-plugins/kameraklient/camerafolderview.h b/kipi-plugins/kameraklient/camerafolderview.h index e2208bb..9940c20 100644 --- a/kipi-plugins/kameraklient/camerafolderview.h +++ b/kipi-plugins/kameraklient/camerafolderview.h @@ -22,8 +22,8 @@ #ifndef CAMERAFOLDERVIEW_H #define CAMERAFOLDERVIEW_H -// Qt -#include <qstring.h> +// TQt +#include <tqstring.h> // KDE #include <klistview.h> @@ -34,20 +34,21 @@ class CameraFolderItem; class CameraFolderView : public KListView { Q_OBJECT + TQ_OBJECT public: - CameraFolderView(QWidget* parent); + CameraFolderView(TQWidget* tqparent); ~CameraFolderView(); - void addVirtualFolder(const QString& name); - void addRootFolder(const QString& folder); - CameraFolderItem* addFolder(const QString& folder, const QString& subFolder); - CameraFolderItem* findFolder(const QString& folderPath); + void addVirtualFolder(const TQString& name); + void addRootFolder(const TQString& folder); + CameraFolderItem* addFolder(const TQString& folder, const TQString& subFolder); + CameraFolderItem* findFolder(const TQString& folderPath); CameraFolderItem* virtualFolder(); CameraFolderItem* rootFolder(); virtual void clear(); private: - QString cameraName_; + TQString cameraName_; CameraFolderItem *virtualFolder_; CameraFolderItem *rootFolder_; @@ -55,7 +56,7 @@ private: void setupConnections(); private slots: - void slotSelectionChanged(QListViewItem* item); + void slotSelectionChanged(TQListViewItem* item); signals: void signalFolderChanged(CameraFolderItem*); diff --git a/kipi-plugins/kameraklient/cameraiconitem.cpp b/kipi-plugins/kameraklient/cameraiconitem.cpp index 77c4e1b..1bca459 100644 --- a/kipi-plugins/kameraklient/cameraiconitem.cpp +++ b/kipi-plugins/kameraklient/cameraiconitem.cpp @@ -19,12 +19,12 @@ * * ============================================================ */ -// Qt -#include <qstring.h> -#include <qpixmap.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpalette.h> +// TQt +#include <tqstring.h> +#include <tqpixmap.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpalette.h> // Local #include "gpfileiteminfo.h" #include "cameraiconview.h" @@ -58,10 +58,10 @@ const char* CameraIconItem::new_xpm[] = { " @ "}; -QPixmap* CameraIconItem::newEmblem = 0; +TQPixmap* CameraIconItem::newEmblem = 0; -CameraIconItem::CameraIconItem(ThumbView* parent, const GPFileItemInfo* fileInfo, const QPixmap& pixmap) - : ThumbItem(parent, fileInfo->name, pixmap), fileInfo_(fileInfo) { +CameraIconItem::CameraIconItem(ThumbView* tqparent, const GPFileItemInfo* fileInfo, const TQPixmap& pixmap) + : ThumbItem(tqparent, fileInfo->name, pixmap), fileInfo_(fileInfo) { pixWidth_ = pixmap.width(); pixHeight_ = pixmap.height(); loadNewEmblem(); @@ -80,20 +80,20 @@ const GPFileItemInfo* CameraIconItem::fileInfo() { void CameraIconItem::loadNewEmblem() { if (!newEmblem) { - newEmblem = new QPixmap(new_xpm); + newEmblem = new TQPixmap(new_xpm); } } -void CameraIconItem::setPixmap(const QImage& thumb) { +void CameraIconItem::setPixmap(const TQImage& thumb) { int size = pixmap()->width(); pixWidth_ = thumb.width(); pixHeight_ = thumb.height(); - QPainter painter; + TQPainter painter; painter.begin(pixmap()); - painter.fillRect(0, 0, size, size, QBrush(iconView()->colorGroup().base())); + painter.fillRect(0, 0, size, size, TQBrush(iconView()->tqcolorGroup().base())); painter.drawImage((size-thumb.width())/2, (size-thumb.height())/2, thumb); painter.end(); - repaint(); + tqrepaint(); } } // NameSpace KIPIKameraKlientPlugin diff --git a/kipi-plugins/kameraklient/cameraiconitem.h b/kipi-plugins/kameraklient/cameraiconitem.h index 0d67140..63d7924 100644 --- a/kipi-plugins/kameraklient/cameraiconitem.h +++ b/kipi-plugins/kameraklient/cameraiconitem.h @@ -24,11 +24,11 @@ #include "thumbitem.h" -class QString; -class QPixmap; -class QImage; -class QPainter; -class QColorGroup; +class TQString; +class TQPixmap; +class TQImage; +class TQPainter; +class TQColorGroup; namespace KIPIKameraKlientPlugin { @@ -40,16 +40,16 @@ class CameraIconItem : public ThumbItem { friend class CameraIconView; public: - CameraIconItem(ThumbView* parent, const GPFileItemInfo* fileInfo, const QPixmap& pixmap); + CameraIconItem(ThumbView* tqparent, const GPFileItemInfo* fileInfo, const TQPixmap& pixmap); ~CameraIconItem(); const GPFileItemInfo* fileInfo(); - void setPixmap(const QImage& thumb); + void setPixmap(const TQImage& thumb); private: void loadNewEmblem(); const GPFileItemInfo* fileInfo_; int pixWidth_, pixHeight_; - static QPixmap* newEmblem; + static TQPixmap* newEmblem; static const char* new_xpm[]; }; diff --git a/kipi-plugins/kameraklient/cameraiconview.cpp b/kipi-plugins/kameraklient/cameraiconview.cpp index 7d5d542..5cc6fa5 100644 --- a/kipi-plugins/kameraklient/cameraiconview.cpp +++ b/kipi-plugins/kameraklient/cameraiconview.cpp @@ -19,15 +19,15 @@ * * ============================================================ */ -// Qt -#include <qimage.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qrect.h> -#include <qpalette.h> -#include <qpoint.h> -#include <qpopupmenu.h> -#include <qvaluevector.h> +// TQt +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqrect.h> +#include <tqpalette.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> +#include <tqvaluevector.h> // KDE #include <klocale.h> #include <kiconloader.h> @@ -50,13 +50,13 @@ const int THUMBSIZE = 120; class CameraIconViewPrivate { public: - QPixmap imagePix; - QPixmap audioPix; - QPixmap videoPix; - QPixmap unknownPix; + TQPixmap imagePix; + TQPixmap audioPix; + TQPixmap videoPix; + TQPixmap unknownPix; }; -CameraIconView::CameraIconView(QWidget *parent) : ThumbView(parent) { +CameraIconView::CameraIconView(TQWidget *tqparent) : ThumbView(tqparent) { d = new CameraIconViewPrivate; setThumbnailSize(); } @@ -68,14 +68,14 @@ CameraIconView::~CameraIconView() { void CameraIconView::setThumbnailSize() { int w = THUMBSIZE; int h = THUMBSIZE; - QString iconfile = locate("data", "documents"); - QImage image(iconfile); + TQString iconfile = locate("data", "documents"); + TQImage image(iconfile); double scale = double(w-10) / double(image.width()); - image = image.smoothScale(w-10, h-10, QImage::ScaleMin); - QPixmap pix(w, h); - pix.fill(colorGroup().base()); - QPainter p(&pix); - p.fillRect(0, 0, w, h, QBrush(colorGroup().base())); + image = image.smoothScale(w-10, h-10, TQ_ScaleMin); + TQPixmap pix(w, h); + pix.fill(tqcolorGroup().base()); + TQPainter p(&pix); + p.fillRect(0, 0, w, h, TQBrush(tqcolorGroup().base())); if(!image.isNull()) { p.drawImage((w-image.width())/2, (h-image.height())/2, image); } @@ -90,13 +90,13 @@ void CameraIconView::setThumbnailSize() { createPixmap(d->unknownPix, "document", scale); } -void CameraIconView::createPixmap(QPixmap& pix, const QString& icon, double scale) { - QString iconfile = locate("data", icon); - QImage mimeImg(iconfile); - mimeImg = mimeImg.smoothScale((int) (mimeImg.width()*scale), (int) (mimeImg.height()*scale), QImage::ScaleMin); +void CameraIconView::createPixmap(TQPixmap& pix, const TQString& icon, double scale) { + TQString iconfile = locate("data", icon); + TQImage mimeImg(iconfile); + mimeImg = mimeImg.smoothScale((int) (mimeImg.width()*scale), (int) (mimeImg.height()*scale), TQ_ScaleMin); int w = THUMBSIZE; int h = THUMBSIZE; - QPainter p(&pix); + TQPainter p(&pix); if (!mimeImg.isNull()) { p.drawImage((w-mimeImg.width())/2, (h-mimeImg.height())/2, mimeImg); } @@ -104,12 +104,12 @@ void CameraIconView::createPixmap(QPixmap& pix, const QString& icon, double scal } CameraIconItem* CameraIconView::addItem(const GPFileItemInfo* fileInfo) { - QPixmap& pix = d->unknownPix; - if(fileInfo->mime.contains("image")) { + TQPixmap& pix = d->unknownPix; + if(fileInfo->mime.tqcontains("image")) { pix = d->imagePix; - } else if(fileInfo->mime.contains("audio")) { + } else if(fileInfo->mime.tqcontains("audio")) { pix = d->audioPix; - } else if(fileInfo->mime.contains("video")) { + } else if(fileInfo->mime.tqcontains("video")) { pix = d->videoPix; } else { pix = d->unknownPix; @@ -123,7 +123,7 @@ void CameraIconView::clear() { emit signalCleared(); } -void CameraIconView::setThumbnail(CameraIconItem* iconItem, const QImage& thumbnail) { +void CameraIconView::setThumbnail(CameraIconItem* iconItem, const TQImage& thumbnail) { if (!iconItem) { return; } @@ -136,7 +136,7 @@ void CameraIconView::markDownloaded(CameraIconItem* iconItem) { } GPFileItemInfo *fileInfo = const_cast<GPFileItemInfo*>(iconItem->fileInfo()); fileInfo->downloaded = 1; - iconItem->repaint(); + iconItem->tqrepaint(); } } // NameSpace KIPIKameraKlientPlugin diff --git a/kipi-plugins/kameraklient/cameraiconview.h b/kipi-plugins/kameraklient/cameraiconview.h index d64814b..953ec1c 100644 --- a/kipi-plugins/kameraklient/cameraiconview.h +++ b/kipi-plugins/kameraklient/cameraiconview.h @@ -24,11 +24,11 @@ #include "thumbview.h" -class QString; -class QPainter; -class QImage; -class QPixmap; -class QPoint; +class TQString; +class TQPainter; +class TQImage; +class TQPixmap; +class TQPoint; namespace KIPIKameraKlientPlugin { @@ -40,18 +40,19 @@ class CameraIconViewPrivate; class CameraIconView : public ThumbView { Q_OBJECT + TQ_OBJECT public: - CameraIconView(QWidget *parent); + CameraIconView(TQWidget *tqparent); ~CameraIconView(); void setThumbnailSize(); CameraIconItem* addItem(const GPFileItemInfo* fileInfo); - void setThumbnail(CameraIconItem* iconItem, const QImage& thumbnail); + void setThumbnail(CameraIconItem* iconItem, const TQImage& thumbnail); void markDownloaded(CameraIconItem* iconItem); virtual void clear(); private: - void createPixmap(QPixmap& pix, const QString& icon, double scale); + void createPixmap(TQPixmap& pix, const TQString& icon, double scale); private: CameraIconViewPrivate *d; diff --git a/kipi-plugins/kameraklient/cameralist.cpp b/kipi-plugins/kameraklient/cameralist.cpp index 2477a3f..5110c9a 100644 --- a/kipi-plugins/kameraklient/cameralist.cpp +++ b/kipi-plugins/kameraklient/cameralist.cpp @@ -19,11 +19,11 @@ * * ============================================================ */ -// Qt -#include <qdom.h> -#include <qfile.h> -#include <qstring.h> -#include <qtextstream.h> +// TQt +#include <tqdom.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqtextstream.h> // Local #include "cameralist.h" #include "cameratype.h" @@ -39,12 +39,12 @@ CameraList* CameraList::instance() { class CameraListPrivate { public: - QPtrList<CameraType> clist; - QString file; + TQPtrList<CameraType> clist; + TQString file; bool modified; }; -CameraList::CameraList(QObject *parent, const QString& file) : QObject(parent) { +CameraList::CameraList(TQObject *tqparent, const TQString& file) : TQObject(tqparent) { d = new CameraListPrivate; d->clist.setAutoDelete(true); d->file = file; @@ -61,28 +61,28 @@ CameraList::~CameraList() { bool CameraList::load() { d->modified = false; - QFile cfile(d->file); + TQFile cfile(d->file); if(!cfile.open(IO_ReadOnly)) { return false; } - QDomDocument doc("cameralist"); + TQDomDocument doc("cameralist"); if(!doc.setContent(&cfile)) { return false; } - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); if(docElem.tagName()!="cameralist") { return false; } - for(QDomNode n = docElem.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement e = n.toElement(); + for(TQDomNode n = docElem.firstChild(); !n.isNull(); n = n.nextSibling()) { + TQDomElement e = n.toElement(); if (e.isNull()) { continue; } if (e.tagName() != "item") { continue; } - QString model = e.attribute("model"); - QString port = e.attribute("port"); + TQString model = e.attribute("model"); + TQString port = e.attribute("port"); CameraType *ctype = new CameraType(model, port); insertPrivate(ctype); } @@ -94,21 +94,21 @@ bool CameraList::close() { if (!d->modified) { return true; } - QDomDocument doc("cameralist"); - doc.setContent(QString("<!DOCTYPE XMLCameraList><cameralist version=\"1.0\" client=\"kipiplugin_kameraklietnt\"/>")); - QDomElement docElem=doc.documentElement(); + TQDomDocument doc("cameralist"); + doc.setContent(TQString("<!DOCTYPE XMLCameraList><cameralist version=\"1.0\" client=\"kipiplugin_kameraklietnt\"/>")); + TQDomElement docElem=doc.documentElement(); for (CameraType *ctype = d->clist.first(); ctype; ctype = d->clist.next()) { - QDomElement elem = doc.createElement("item"); + TQDomElement elem = doc.createElement("item"); elem.setAttribute("model", ctype->model()); elem.setAttribute("port", ctype->port()); docElem.appendChild(elem); } - QFile cfile(d->file); + TQFile cfile(d->file); if (!cfile.open(IO_WriteOnly)) { return false; } - QTextStream stream(&cfile); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&cfile); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << doc.toString(); cfile.close(); return true; @@ -146,11 +146,11 @@ void CameraList::removePrivate(CameraType* ctype) { emit signalCameraListChanged(); } -QPtrList<CameraType>* CameraList::cameraList() { +TQPtrList<CameraType>* CameraList::cameraList() { return &d->clist; } -CameraType* CameraList::find(const QString& model) { +CameraType* CameraList::tqfind(const TQString& model) { for (CameraType *ctype = d->clist.first(); ctype; ctype = d->clist.next()) { if (ctype->model() == model) { return ctype; diff --git a/kipi-plugins/kameraklient/cameralist.h b/kipi-plugins/kameraklient/cameralist.h index e6dda49..264a579 100644 --- a/kipi-plugins/kameraklient/cameralist.h +++ b/kipi-plugins/kameraklient/cameralist.h @@ -22,10 +22,10 @@ #ifndef CAMERALIST_H #define CAMERALIST_H -#include <qptrlist.h> -#include <qobject.h> +#include <tqptrlist.h> +#include <tqobject.h> -class QString; +class TQString; namespace KIPIKameraKlientPlugin { @@ -33,19 +33,20 @@ namespace KIPIKameraKlientPlugin class CameraType; class CameraListPrivate; -class CameraList : public QObject { +class CameraList : public TQObject { Q_OBJECT + TQ_OBJECT public: - CameraList(QObject *parent, const QString& file); + CameraList(TQObject *tqparent, const TQString& file); ~CameraList(); bool load(); bool close(); void insert(CameraType* ctype); void remove(CameraType* ctype); - CameraType* find(const QString& title); + CameraType* tqfind(const TQString& title); void clear(); - QPtrList<CameraType>* cameraList(); + TQPtrList<CameraType>* cameraList(); static CameraList* instance(); private: diff --git a/kipi-plugins/kameraklient/cameraselection.cpp b/kipi-plugins/kameraklient/cameraselection.cpp index 0579d9e..85bd040 100644 --- a/kipi-plugins/kameraklient/cameraselection.cpp +++ b/kipi-plugins/kameraklient/cameraselection.cpp @@ -13,20 +13,20 @@ * GNU General Public License for more details. * * ============================================================ */ -// Qt includes. - -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> -#include <qlayout.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qframe.h> +// TQt includes. + +#include <tqcombobox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> +#include <tqlayout.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqframe.h> // KDE includes. @@ -51,8 +51,8 @@ namespace KIPIKameraKlientPlugin { -CameraSelection::CameraSelection(QWidget* parent) - : KDialogBase(parent, 0, true, i18n("Camera Selection"), +CameraSelection::CameraSelection(TQWidget* tqparent) + : KDialogBase(tqparent, 0, true, i18n("Camera Selection"), Help|Ok|Cancel, Ok, true) { // About data and help button. @@ -73,74 +73,74 @@ CameraSelection::CameraSelection(QWidget* parent) helpButton_ = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); helpButton_->setPopup( helpMenu->menu() ); - QWidget *page = new QWidget(this); + TQWidget *page = new TQWidget(this); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout(page, 5, 5); + TQVBoxLayout *topLayout = new TQVBoxLayout(page, 5, 5); //--------------------------------------------- - QGroupBox* mainBox = new QGroupBox(page); + TQGroupBox* mainBox = new TQGroupBox(page); mainBox->setTitle(i18n("Camera Configuration")); mainBox->setColumnLayout(0, Qt::Vertical ); - mainBox->layout()->setSpacing( 5 ); - mainBox->layout()->setMargin( 5 ); - QGridLayout* mainBoxLayout = new QGridLayout(mainBox->layout()); - mainBoxLayout->setAlignment(Qt::AlignTop); + mainBox->tqlayout()->setSpacing( 5 ); + mainBox->tqlayout()->setMargin( 5 ); + TQGridLayout* mainBoxLayout = new TQGridLayout(mainBox->tqlayout()); + mainBoxLayout->tqsetAlignment(TQt::AlignTop); - listView_ = new QListView( mainBox ); + listView_ = new TQListView( mainBox ); listView_->addColumn( i18n("Cameras") ); - listView_->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + listView_->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); mainBoxLayout->addMultiCellWidget(listView_, 0, 4, 0, 0); - portButtonGroup_ = new QVButtonGroup(mainBox); + portButtonGroup_ = new TQVButtonGroup(mainBox); portButtonGroup_->setTitle(i18n("Camera Port Type")); portButtonGroup_->setRadioButtonExclusive(true); - portButtonGroup_->layout()->setSpacing(5); - portButtonGroup_->layout()->setMargin(5); + portButtonGroup_->tqlayout()->setSpacing(5); + portButtonGroup_->tqlayout()->setMargin(5); - usbButton_ = new QRadioButton(portButtonGroup_); + usbButton_ = new TQRadioButton(portButtonGroup_); usbButton_->setText( i18n("USB")); - serialButton_ = new QRadioButton( portButtonGroup_ ); + serialButton_ = new TQRadioButton( portButtonGroup_ ); serialButton_->setText( i18n("Serial")); mainBoxLayout->addWidget(portButtonGroup_, 1, 1); - QGroupBox* portPathBox = new QGroupBox(mainBox); + TQGroupBox* portPathBox = new TQGroupBox(mainBox); portPathBox->setTitle( i18n("Camera Port Path")); portPathBox->setColumnLayout(0, Qt::Vertical ); - portPathBox->layout()->setSpacing( 5 ); - portPathBox->layout()->setMargin( 5 ); - QVBoxLayout* portPathBoxLayout = new QVBoxLayout( portPathBox->layout() ); - portPathBoxLayout->setAlignment( Qt::AlignTop ); + portPathBox->tqlayout()->setSpacing( 5 ); + portPathBox->tqlayout()->setMargin( 5 ); + TQVBoxLayout* portPathBoxLayout = new TQVBoxLayout( portPathBox->tqlayout() ); + portPathBoxLayout->tqsetAlignment( TQt::AlignTop ); - QLabel* portPathLabel_ = new QLabel( portPathBox); + TQLabel* portPathLabel_ = new TQLabel( portPathBox); portPathLabel_->setText( i18n("only for serial port\n" "cameras")); portPathBoxLayout->addWidget( portPathLabel_ ); - portPathComboBox_ = new QComboBox( false, portPathBox ); + portPathComboBox_ = new TQComboBox( false, portPathBox ); portPathComboBox_->setDuplicatesEnabled( FALSE ); portPathBoxLayout->addWidget(portPathComboBox_); mainBoxLayout->addWidget(portPathBox, 2, 1); - QSpacerItem* spacer = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding); + TQSpacerItem* spacer = new TQSpacerItem(20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding); mainBoxLayout->addItem(spacer, 4, 1); topLayout->addWidget( mainBox ); // Connections -------------------------------------------------- - connect(listView_, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(slotSelectionChanged(QListViewItem *))); + connect(listView_, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(slotSelectionChanged(TQListViewItem *))); - connect(portButtonGroup_, SIGNAL(clicked(int)), this, SLOT(slotPortChanged())); + connect(portButtonGroup_, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotPortChanged())); - connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked())); + connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOkClicked())); // Initialize -------------------------------------------------- @@ -158,18 +158,18 @@ void CameraSelection::slotHelp() "kipi-plugins"); } -void CameraSelection::setCamera(const QString& model, const QString& port) { - QString camModel(model); - QListViewItem* item = listView_->findItem(camModel, 0); +void CameraSelection::setCamera(const TQString& model, const TQString& port) { + TQString camModel(model); + TQListViewItem* item = listView_->tqfindItem(camModel, 0); if (!item) { return; } listView_->setSelected(item, true); listView_->ensureItemVisible(item); - if (port.contains("usb")) { + if (port.tqcontains("usb")) { usbButton_->setChecked(true); - } else if (port.contains("serial")) { + } else if (port.tqcontains("serial")) { serialButton_->setChecked(true); for (int i=0; i<portPathComboBox_->count(); i++) { if (port == portPathComboBox_->text(i)) { @@ -182,17 +182,17 @@ void CameraSelection::setCamera(const QString& model, const QString& port) { void CameraSelection::getCameraList() { int count = 0; - QStringList clist; + TQStringList clist; GPIface::getSupportedCameras(count, clist); - QString cname; + TQString cname; for (int i=0; i<count; i++) { cname = clist[i]; - new QListViewItem(listView_, cname); + new TQListViewItem(listView_, cname); } } void CameraSelection::getSerialPortList() { - QStringList plist; + TQStringList plist; GPIface::getSupportedPorts(plist); serialPortList_.clear(); for (unsigned int i=0; i<plist.count(); i++) { @@ -202,14 +202,14 @@ void CameraSelection::getSerialPortList() { } } -void CameraSelection::slotSelectionChanged(QListViewItem *item) { +void CameraSelection::slotSelectionChanged(TQListViewItem *item) { if (!item) { return; } - QString model(item->text(0)); - QStringList plist; + TQString model(item->text(0)); + TQStringList plist; GPIface::getCameraSupportedPorts(model, plist); - if (plist.contains("serial")) { + if (plist.tqcontains("serial")) { serialButton_->setEnabled(true); serialButton_->setChecked(true); } else { @@ -217,7 +217,7 @@ void CameraSelection::slotSelectionChanged(QListViewItem *item) { serialButton_->setChecked(false); serialButton_->setEnabled(false); } - if (plist.contains("usb")) { + if (plist.tqcontains("usb")) { usbButton_->setEnabled(true); usbButton_->setChecked(true); } else { @@ -232,7 +232,7 @@ void CameraSelection::slotPortChanged() { if (usbButton_->isChecked()) { portPathComboBox_->setEnabled(true); portPathComboBox_->clear(); - portPathComboBox_->insertItem( QString("usb:"), 0 ); + portPathComboBox_->insertItem( TQString("usb:"), 0 ); portPathComboBox_->setEnabled(false); return; } @@ -243,17 +243,17 @@ void CameraSelection::slotPortChanged() { } } -QString CameraSelection::currentModel() { - QListViewItem* item = listView_->currentItem(); +TQString CameraSelection::currentModel() { + TQListViewItem* item = listView_->currentItem(); if(!item) { - return QString::null; + return TQString(); } - QString model(item->text(0)); + TQString model(item->text(0)); return model; } -QString CameraSelection::currentPortPath() { +TQString CameraSelection::currentPortPath() { return portPathComboBox_->currentText(); } diff --git a/kipi-plugins/kameraklient/cameraselection.h b/kipi-plugins/kameraklient/cameraselection.h index 81d427d..d632a36 100644 --- a/kipi-plugins/kameraklient/cameraselection.h +++ b/kipi-plugins/kameraklient/cameraselection.h @@ -16,10 +16,10 @@ #ifndef CAMERASELECTION_H #define CAMERASELECTION_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> // KDE includes. @@ -29,14 +29,14 @@ #include "kpaboutdata.h" -class QComboBox; -class QListView; -class QListViewItem; -class QRadioButton; -class QVButtonGroup; -class QLabel; -class QLineEdit; -class QPushButton; +class TQComboBox; +class TQListView; +class TQListViewItem; +class TQRadioButton; +class TQVButtonGroup; +class TQLabel; +class TQLineEdit; +class TQPushButton; namespace KIPIKameraKlientPlugin { @@ -44,48 +44,49 @@ namespace KIPIKameraKlientPlugin class CameraSelection : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CameraSelection( QWidget* parent = 0 ); + CameraSelection( TQWidget* tqparent = 0 ); ~CameraSelection(); - void setCamera(const QString& model, const QString& port); - QString currentModel(); - QString currentPortPath(); + void setCamera(const TQString& model, const TQString& port); + TQString currentModel(); + TQString currentPortPath(); private: void getCameraList(); void getSerialPortList(); - QListView* listView_; + TQListView* listView_; - QVButtonGroup* portButtonGroup_; + TQVButtonGroup* portButtonGroup_; - QRadioButton* usbButton_; - QRadioButton* serialButton_; + TQRadioButton* usbButton_; + TQRadioButton* serialButton_; - QLabel* portPathLabel_; + TQLabel* portPathLabel_; - QComboBox* portPathComboBox_; + TQComboBox* portPathComboBox_; - QStringList serialPortList_; + TQStringList serialPortList_; - QPushButton* helpButton_; + TQPushButton* helpButton_; KIPIPlugins::KPAboutData* m_about; private slots: - void slotSelectionChanged(QListViewItem *item); + void slotSelectionChanged(TQListViewItem *item); void slotPortChanged(); void slotOkClicked(); void slotHelp(); signals: - void signalOkClicked(const QString& model, const QString& port); + void signalOkClicked(const TQString& model, const TQString& port); }; } // NameSpace KIPIKameraKlientPlugin diff --git a/kipi-plugins/kameraklient/cameratype.cpp b/kipi-plugins/kameraklient/cameratype.cpp index 6cc7ebc..a729472 100644 --- a/kipi-plugins/kameraklient/cameratype.cpp +++ b/kipi-plugins/kameraklient/cameratype.cpp @@ -29,7 +29,7 @@ CameraType::CameraType() { valid_ = false; } -CameraType::CameraType(const QString& model, const QString& port) { +CameraType::CameraType(const TQString& model, const TQString& port) { model_ = model; port_ = port; valid_ = true; @@ -53,19 +53,19 @@ CameraType& CameraType::operator=(const CameraType& ctype) { return *this; } -void CameraType::setModel(const QString& model) { +void CameraType::setModel(const TQString& model) { model_ = model; } -void CameraType::setPort(const QString& port) { +void CameraType::setPort(const TQString& port) { port_ = port; } -QString CameraType::model() const { +TQString CameraType::model() const { return model_; } -QString CameraType::port() const { +TQString CameraType::port() const { return port_; } diff --git a/kipi-plugins/kameraklient/cameratype.h b/kipi-plugins/kameraklient/cameratype.h index 68fef23..b2f2eb7 100644 --- a/kipi-plugins/kameraklient/cameratype.h +++ b/kipi-plugins/kameraklient/cameratype.h @@ -22,7 +22,7 @@ #ifndef CAMERATYPE_H #define CAMERATYPE_H -#include <qstring.h> +#include <tqstring.h> namespace KIPIKameraKlientPlugin { @@ -30,20 +30,20 @@ namespace KIPIKameraKlientPlugin class CameraType { public: CameraType(); - CameraType(const QString& model, const QString& port); + CameraType(const TQString& model, const TQString& port); ~CameraType(); CameraType(const CameraType& ctype); CameraType& operator=(const CameraType& type); - void setModel(const QString& model); - void setPort(const QString& port); + void setModel(const TQString& model); + void setPort(const TQString& port); void setValid(bool valid); - QString model() const; - QString port() const; + TQString model() const; + TQString port() const; bool valid(); private: - QString model_; - QString port_; + TQString model_; + TQString port_; bool valid_; }; diff --git a/kipi-plugins/kameraklient/cameraui.cpp b/kipi-plugins/kameraklient/cameraui.cpp index cbe55bb..ab9d4bf 100644 --- a/kipi-plugins/kameraklient/cameraui.cpp +++ b/kipi-plugins/kameraklient/cameraui.cpp @@ -30,21 +30,21 @@ * * ============================================================ */ -// Qt includes. - -#include <qcombobox.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qsplitter.h> -#include <qstringlist.h> -#include <qtooltip.h> -#include <qvaluelist.h> -#include <qvbox.h> -#include <qpushbutton.h> -#include <qframe.h> +// TQt includes. + +#include <tqcombobox.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqsplitter.h> +#include <tqstringlist.h> +#include <tqtooltip.h> +#include <tqvaluelist.h> +#include <tqvbox.h> +#include <tqpushbutton.h> +#include <tqframe.h> // KDE includes @@ -97,51 +97,51 @@ namespace KIPIKameraKlientPlugin { -CameraUI::CameraUI() : QWidget() +CameraUI::CameraUI() : TQWidget() { - setWFlags(Qt::WDestructiveClose); + setWFlags(TQt::WDestructiveClose); resize(700, 440); setMinimumSize(600, 400); - mCameraList = new CameraList(this, locateLocal("data", "kipi/cameras.xml")); + mCameraList = new CameraList(TQT_TQOBJECT(this), locateLocal("data", "kipi/cameras.xml")); mCameraType = new CameraType(); //--------------------------------------------- - QVBoxLayout *dvlay = new QVBoxLayout( this, 6 ); - QHBoxLayout* mMainBoxLayout = new QHBoxLayout(dvlay); - mMainBoxLayout->setResizeMode(QLayout::FreeResize); - QVBoxLayout* mLeftBoxLayout = new QVBoxLayout(mMainBoxLayout, 0); - QVBoxLayout* mBtnBoxLayout = new QVBoxLayout(mMainBoxLayout, 4); + TQVBoxLayout *dvlay = new TQVBoxLayout( this, 6 ); + TQHBoxLayout* mMainBoxLayout = new TQHBoxLayout(dvlay); + mMainBoxLayout->setResizeMode(TQLayout::FreeResize); + TQVBoxLayout* mLeftBoxLayout = new TQVBoxLayout(mMainBoxLayout, 0); + TQVBoxLayout* mBtnBoxLayout = new TQVBoxLayout(mMainBoxLayout, 4); mBtnBoxLayout->setMargin(2); // create Button Box ---------------------------------------------------------------------- - mCameraSetupBtn = new QPushButton(i18n("Setup"), this); - mCameraSetupBtn->setMinimumSize(QSize(100, 0)); + mCameraSetupBtn = new TQPushButton(i18n("Setup"), this); + mCameraSetupBtn->setMinimumSize(TQSize(100, 0)); mBtnBoxLayout->addWidget(mCameraSetupBtn); - mCameraStopBtn = new QPushButton(i18n("Stop"), this); - mCameraStopBtn->setMinimumSize(QSize(100, 0)); + mCameraStopBtn = new TQPushButton(i18n("Stop"), this); + mCameraStopBtn->setMinimumSize(TQSize(100, 0)); mBtnBoxLayout->addWidget(mCameraStopBtn); - mCameraDownloadBtn = new QPushButton(i18n("Download"), this); - mCameraDownloadBtn->setMinimumSize(QSize(100, 0)); + mCameraDownloadBtn = new TQPushButton(i18n("Download"), this); + mCameraDownloadBtn->setMinimumSize(TQSize(100, 0)); mBtnBoxLayout->addWidget(mCameraDownloadBtn); - mCameraUploadBtn = new QPushButton(i18n("Upload"), this); - mCameraUploadBtn->setMinimumSize(QSize(100, 0)); + mCameraUploadBtn = new TQPushButton(i18n("Upload"), this); + mCameraUploadBtn->setMinimumSize(TQSize(100, 0)); mBtnBoxLayout->addWidget(mCameraUploadBtn); - mCameraDeleteBtn = new QPushButton(i18n("Delete"), this); - mCameraDeleteBtn->setMinimumSize(QSize(100, 0)); + mCameraDeleteBtn = new TQPushButton(i18n("Delete"), this); + mCameraDeleteBtn->setMinimumSize(TQSize(100, 0)); mBtnBoxLayout->addWidget(mCameraDeleteBtn); - QSpacerItem* mBtnSpacer = new QSpacerItem(0, 20, QSizePolicy::Minimum, QSizePolicy::Expanding); + TQSpacerItem* mBtnSpacer = new TQSpacerItem(0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding); mBtnBoxLayout->addItem(mBtnSpacer); - mDialogCloseBtn = new QPushButton(i18n("Close"), this); - mDialogCloseBtn->setMinimumSize(QSize(100, 0)); + mDialogCloseBtn = new TQPushButton(i18n("Close"), this); + mDialogCloseBtn->setMinimumSize(TQSize(100, 0)); mBtnBoxLayout->addWidget(mDialogCloseBtn); // About data and help button --------------------------------------------------- - mhelpButton = new QPushButton(i18n("&Help"), this); - mhelpButton->setMinimumSize(QSize(100, 0)); + mhelpButton = new TQPushButton(i18n("&Help"), this); + mhelpButton->setMinimumSize(TQSize(100, 0)); mBtnBoxLayout->addWidget(mhelpButton); m_about = new KIPIPlugins::KPAboutData(I18N_NOOP("KameraKlient"), @@ -159,51 +159,51 @@ CameraUI::CameraUI() : QWidget() KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); mhelpButton->setPopup( helpMenu->menu() ); // create Camera Box----------------------------------------------------------------------- - QHBoxLayout* mCameraBoxLayout = new QHBoxLayout(mLeftBoxLayout, 4); + TQHBoxLayout* mCameraBoxLayout = new TQHBoxLayout(mLeftBoxLayout, 4); mCameraBoxLayout->setMargin(4); - mCameraConnectBtn = new QPushButton(i18n("Connect"), this); + mCameraConnectBtn = new TQPushButton(i18n("Connect"), this); mCameraBoxLayout->addWidget(mCameraConnectBtn); - mCameraComboBox = new QComboBox(this, "camera"); - mCameraComboBox->setInsertionPolicy(QComboBox::AtBottom); - mCameraComboBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); + mCameraComboBox = new TQComboBox(this, "camera"); + mCameraComboBox->setInsertionPolicy(TQComboBox::AtBottom); + mCameraComboBox->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); mCameraBoxLayout->addWidget(mCameraComboBox); // create Download Directory Camera Box --------------------------------------------------- - QHBoxLayout *mDownloadDirectoryBoxLayout = new QHBoxLayout(mLeftBoxLayout, 4); + TQHBoxLayout *mDownloadDirectoryBoxLayout = new TQHBoxLayout(mLeftBoxLayout, 4); mDownloadDirectoryBoxLayout->setMargin(4); - QLabel* mDownloadDirectoryLabel = new QLabel(i18n("Download to: "), this); + TQLabel* mDownloadDirectoryLabel = new TQLabel(i18n("Download to: "), this); mDownloadDirectoryBoxLayout->addWidget(mDownloadDirectoryLabel); - mDownloadDirectoryEdit = new QLineEdit(this); - mDownloadDirectoryEdit->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); + mDownloadDirectoryEdit = new TQLineEdit(this); + mDownloadDirectoryEdit->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); mDownloadDirectoryEdit->setReadOnly(true); mDownloadDirectoryBoxLayout->addWidget(mDownloadDirectoryEdit); - mChangeDownloadDirectoryBtn = new QPushButton(i18n("&Change"), this); + mChangeDownloadDirectoryBtn = new TQPushButton(i18n("&Change"), this); mDownloadDirectoryBoxLayout->addWidget(mChangeDownloadDirectoryBtn); // ------------------------- - mSplitter = new QSplitter(this); + mSplitter = new TQSplitter(this); mLeftBoxLayout->addWidget(mSplitter); - mSplitter->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + mSplitter->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); mFolderView = new CameraFolderView(mSplitter); mIconView = new CameraIconView(mSplitter); mSplitter->setOpaqueResize(true); - mSplitter->setResizeMode(mFolderView, QSplitter::Stretch); - mSplitter->setResizeMode(mIconView, QSplitter::Stretch); - container_ = new GPFileItemContainer(this, mFolderView, mIconView); - efilter_ = new GPEventFilter(this); - controller_ = new GPController(this, *mCameraType); + mSplitter->setResizeMode(mFolderView, TQSplitter::Stretch); + mSplitter->setResizeMode(mIconView, TQSplitter::Stretch); + container_ = new GPFileItemContainer(TQT_TQOBJECT(this), mFolderView, mIconView); + efilter_ = new GPEventFilter(TQT_TQOBJECT(this)); + controller_ = new GPController(TQT_TQOBJECT(this), *mCameraType); controller_->start(); cameraConnected_ = false; - // create Status Bar ----------------------------------------------------------------------------- + // create tqStatus Bar ----------------------------------------------------------------------------- mStatusBar = new KStatusBar(this); mLeftBoxLayout->addWidget(mStatusBar); - mStatusLabel = new QLabel(mStatusBar); + mStatusLabel = new TQLabel(mStatusBar); mStatusLabel->setText(i18n("Ready")); mStatusBar->addWidget(mStatusLabel, 7, true); mProgressBar = new KProgress(mStatusBar); @@ -243,38 +243,38 @@ void CameraUI::setupAccel() { mCameraUIAccel = new KAccel(this); mCameraUIAccel->insert("Select All", i18n("Select All"), i18n("Select all the images from the camera."), - CTRL+Key_A, this, SLOT(slotSelectAll())); + CTRL+Key_A, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll())); mCameraUIAccel->insert("Select None", i18n("Select None"), i18n("Deselect all the images from the camera."), - CTRL+Key_U, this, SLOT(slotSelectNone())); + CTRL+Key_U, TQT_TQOBJECT(this), TQT_SLOT(slotSelectNone())); mCameraUIAccel->insert("Invert Selection", i18n("Invert Selection"), i18n("Invert the selection."), - CTRL+Key_Asterisk, this, SLOT(slotSelectInvert())); + CTRL+Key_Asterisk, TQT_TQOBJECT(this), TQT_SLOT(slotSelectInvert())); mCameraUIAccel->insert("Select New", i18n("Select New Items"), i18n("Select all the that were not previously downloaded."), - CTRL+Key_Slash, this, SLOT(slotSelectNew())); + CTRL+Key_Slash, TQT_TQOBJECT(this), TQT_SLOT(slotSelectNew())); setCameraConnected(false); } void CameraUI::setupConnections() { - connect(this, SIGNAL(signalStatusMsg(const QString&)), this, SLOT(slotSetStatusMsg(const QString&))); - connect(this, SIGNAL(signalProgressVal(int)), this, SLOT(slotSetProgressVal(int))); - connect(this, SIGNAL(signalBusy(bool)), this, SLOT(slotBusy(bool))); - connect(efilter_, SIGNAL(signalStatusMsg(const QString&)), this, SIGNAL(signalStatusMsg(const QString&))); - connect(efilter_, SIGNAL(signalProgressVal(int)), this, SIGNAL(signalProgressVal(int))); - connect(efilter_, SIGNAL(signalBusy(bool)), this, SIGNAL(signalBusy(bool))); - connect(mFolderView, SIGNAL(signalFolderChanged(CameraFolderItem*)), this, SLOT(slotFolderSelected(CameraFolderItem*))); - connect(mIconView, SIGNAL(signalDownloadSelectedItems()), this, SLOT(slotCameraDownloadSelected())); - connect(mIconView, SIGNAL(signalDeleteSelectedItems()), this, SLOT(slotCameraDeleteSelected())); - connect(mChangeDownloadDirectoryBtn, SIGNAL(pressed()), this, SLOT(slotChangeDownloadDirectory())); - connect(mCameraList, SIGNAL(signalCameraListChanged()), this, SLOT(slotSyncCameraComboBox())); - connect(mCameraConnectBtn, SIGNAL(pressed()), this, SLOT(slotCameraConnectToggle())); - connect(mCameraSetupBtn, SIGNAL(pressed()), this, SLOT(slotSetupCamera())); - connect(mCameraStopBtn, SIGNAL(pressed()), this, SLOT(slotCameraCancel())); - connect(mCameraDownloadBtn, SIGNAL(pressed()), this, SLOT(slotCameraDownloadSelected())); - connect(mCameraUploadBtn, SIGNAL(pressed()), this, SLOT(slotCameraUpload())); - connect(mCameraDeleteBtn, SIGNAL(pressed()), this, SLOT(slotCameraDeleteSelected())); - connect(mDialogCloseBtn, SIGNAL(pressed()), this, SLOT(close())); + connect(this, TQT_SIGNAL(signalStatusMsg(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotSetStatusMsg(const TQString&))); + connect(this, TQT_SIGNAL(signalProgressVal(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetProgressVal(int))); + connect(this, TQT_SIGNAL(signalBusy(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotBusy(bool))); + connect(efilter_, TQT_SIGNAL(signalStatusMsg(const TQString&)), TQT_TQOBJECT(this), TQT_SIGNAL(signalStatusMsg(const TQString&))); + connect(efilter_, TQT_SIGNAL(signalProgressVal(int)), TQT_TQOBJECT(this), TQT_SIGNAL(signalProgressVal(int))); + connect(efilter_, TQT_SIGNAL(signalBusy(bool)), TQT_TQOBJECT(this), TQT_SIGNAL(signalBusy(bool))); + connect(mFolderView, TQT_SIGNAL(signalFolderChanged(CameraFolderItem*)), TQT_TQOBJECT(this), TQT_SLOT(slotFolderSelected(CameraFolderItem*))); + connect(mIconView, TQT_SIGNAL(signalDownloadSelectedItems()), TQT_TQOBJECT(this), TQT_SLOT(slotCameraDownloadSelected())); + connect(mIconView, TQT_SIGNAL(signalDeleteSelectedItems()), TQT_TQOBJECT(this), TQT_SLOT(slotCameraDeleteSelected())); + connect(mChangeDownloadDirectoryBtn, TQT_SIGNAL(pressed()), TQT_TQOBJECT(this), TQT_SLOT(slotChangeDownloadDirectory())); + connect(mCameraList, TQT_SIGNAL(signalCameraListChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotSyncCameraComboBox())); + connect(mCameraConnectBtn, TQT_SIGNAL(pressed()), TQT_TQOBJECT(this), TQT_SLOT(slotCameraConnectToggle())); + connect(mCameraSetupBtn, TQT_SIGNAL(pressed()), TQT_TQOBJECT(this), TQT_SLOT(slotSetupCamera())); + connect(mCameraStopBtn, TQT_SIGNAL(pressed()), TQT_TQOBJECT(this), TQT_SLOT(slotCameraCancel())); + connect(mCameraDownloadBtn, TQT_SIGNAL(pressed()), TQT_TQOBJECT(this), TQT_SLOT(slotCameraDownloadSelected())); + connect(mCameraUploadBtn, TQT_SIGNAL(pressed()), TQT_TQOBJECT(this), TQT_SLOT(slotCameraUpload())); + connect(mCameraDeleteBtn, TQT_SIGNAL(pressed()), TQT_TQOBJECT(this), TQT_SLOT(slotCameraDeleteSelected())); + connect(mDialogCloseBtn, TQT_SIGNAL(pressed()), TQT_TQOBJECT(this), TQT_SLOT(close())); } void CameraUI::setCameraConnected(bool val) { @@ -290,7 +290,7 @@ void CameraUI::setCameraConnected(bool val) { } } -void CameraUI::slotSetStatusMsg(const QString& msg) { +void CameraUI::slotSetStatusMsg(const TQString& msg) { mStatusLabel->setText(msg); } @@ -319,7 +319,7 @@ void CameraUI::slotSetupCamera() { void CameraUI::slotSyncCameraComboBox() { mCameraComboBox->clear(); - QPtrList<CameraType>* mCameraTypeList = mCameraList->cameraList(); + TQPtrList<CameraType>* mCameraTypeList = mCameraList->cameraList(); for(mCameraTypeList->first(); mCameraTypeList->current(); mCameraTypeList->next()) { mCameraComboBox->insertItem(mCameraTypeList->current()->model()); } @@ -328,7 +328,7 @@ void CameraUI::slotSyncCameraComboBox() { void CameraUI::setCameraType(const CameraType& ctype) { *mCameraType = ctype; delete controller_; - controller_ = new GPController(this, *mCameraType); + controller_ = new GPController(TQT_TQOBJECT(this), *mCameraType); controller_->start(); } @@ -344,12 +344,12 @@ void CameraUI::cameraInitialized(bool val) { } } -void CameraUI::cameraSubFolder(const QString& folder, const QString& subFolder) { +void CameraUI::cameraSubFolder(const TQString& folder, const TQString& subFolder) { container_->addFolder(folder, subFolder); } -void CameraUI::cameraNewItems(const QString& folder, const GPFileItemInfoList& infoList) { - QListViewItem *item = mFolderView->currentItem(); +void CameraUI::cameraNewItems(const TQString& folder, const GPFileItemInfoList& infoList) { + TQListViewItem *item = mFolderView->currentItem(); if (!item) { return; } @@ -360,14 +360,14 @@ void CameraUI::cameraNewItems(const QString& folder, const GPFileItemInfoList& i container_->addFiles(folder, infoList); GPFileItemInfoList::const_iterator it; for (it = infoList.begin(); it != infoList.end(); ++it) { - if ((*it).mime.contains("image")) { + if ((*it).mime.tqcontains("image")) { controller_->requestGetThumbnail(folder, (*it).name); } } } void CameraUI::cameraNewItems(const GPFileItemInfoList& infoList) { - QListViewItem *item = mFolderView->currentItem(); + TQListViewItem *item = mFolderView->currentItem(); if (!item) { return; } @@ -378,13 +378,13 @@ void CameraUI::cameraNewItems(const GPFileItemInfoList& infoList) { container_->addFiles(infoList); GPFileItemInfoList::const_iterator it; for (it = infoList.begin(); it != infoList.end(); ++it) { - if ((*it).mime.contains("image")) { + if ((*it).mime.tqcontains("image")) { controller_->requestGetThumbnail((*it).folder, (*it).name); } } } -void CameraUI::cameraNewThumbnail(const QString& folder, const QString& itemName, const QImage& thumbnail) { +void CameraUI::cameraNewThumbnail(const TQString& folder, const TQString& itemName, const TQImage& thumbnail) { CameraIconItem *iconItem = container_->findItem(folder, itemName); if (!iconItem) { return; @@ -392,7 +392,7 @@ void CameraUI::cameraNewThumbnail(const QString& folder, const QString& itemName mIconView->setThumbnail(iconItem, thumbnail); } -void CameraUI::cameraDownloadedItem(const QString& folder, const QString& itemName) { +void CameraUI::cameraDownloadedItem(const TQString& folder, const TQString& itemName) { CameraIconItem *iconItem = container_->findItem(folder, itemName); if(!iconItem) { return; @@ -400,11 +400,11 @@ void CameraUI::cameraDownloadedItem(const QString& folder, const QString& itemNa mIconView->markDownloaded(iconItem); } -void CameraUI::cameraDeletedItem(const QString& folder, const QString& itemName) { +void CameraUI::cameraDeletedItem(const TQString& folder, const TQString& itemName) { container_->delFile(folder, itemName); } -void CameraUI::cameraErrorMsg(const QString& msg) { +void CameraUI::cameraErrorMsg(const TQString& msg) { DMessageBox::showMsg(msg); } @@ -413,14 +413,14 @@ void CameraUI::slotCameraConnectToggle() { KMessageBox::error(this, i18n("There is no configured camera!")); return; } - mCameraType = mCameraList->find(mCameraComboBox->currentText()); + mCameraType = mCameraList->tqfind(mCameraComboBox->currentText()); setCameraType(*mCameraType); setCameraConnected(false); if(!cameraConnected_) { controller_->requestInitialize(); } else { delete controller_; - controller_ = new GPController(this, *mCameraType); + controller_ = new GPController(TQT_TQOBJECT(this), *mCameraType); controller_->start(); cameraConnected_ = false; mIconView->clear(); @@ -432,10 +432,10 @@ void CameraUI::slotCameraDownloadSelected() { if(!cameraConnected_) { return; } - QString dir = mDownloadDirectoryEdit->text(); - QDir qdir(dir); + TQString dir = mDownloadDirectoryEdit->text(); + TQDir qdir(dir); if(!qdir.exists()) { - KMessageBox::error(this, i18n("'%1' directory does not exist.").arg(dir)); + KMessageBox::error(this, i18n("'%1' directory does not exist.").tqarg(dir)); return; } int count = 0; @@ -467,7 +467,7 @@ void CameraUI::slotCameraDeleteSelected() { if(!cameraConnected_) { return; } - QStringList deleteList; + TQStringList deleteList; for (ThumbItem *i = mIconView->firstItem(); i; i=i->nextItem()) { if(i->isSelected()) { @@ -478,7 +478,7 @@ void CameraUI::slotCameraDeleteSelected() { if (deleteList.isEmpty()) { return; } - QString warnMsg(i18n("About to delete these Image(s)\n" "Are you sure?")); + TQString warnMsg(i18n("About to delete these Image(s)\n" "Are you sure?")); if(KMessageBox::warningContinueCancelList(this, warnMsg, deleteList, i18n("Warning"), KGuiItem(i18n("Delete"),"editdelete")) == KMessageBox::Continue) { CameraIconItem *item = static_cast<CameraIconItem*>(mIconView->firstItem()); while(item) { @@ -492,25 +492,25 @@ void CameraUI::slotCameraDeleteSelected() { } void CameraUI::slotCameraUpload() { - QString reason; + TQString reason; if (! cameraReadyForUpload(reason) ) { KMessageBox::error(0, reason); return; } CameraFolderItem *folderItem = static_cast<CameraFolderItem *>(mFolderView->selectedItem()); - QStringList list = KFileDialog::getOpenFileNames(QString::null); + TQStringList list = KFileDialog::getOpenFileNames(TQString()); bool ok; - for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - QFileInfo info(*it); + for (TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + TQFileInfo info(*it); if(!info.exists()) { continue; } if(info.isDir()) { continue; } - QString uploadName = info.fileName(); + TQString uploadName = info.fileName(); while (container_->findItem(folderItem->folderPath(), uploadName)) { - QString msg(i18n("Camera Folder '%1' contains item '%2'\n Please, enter New Name").arg(folderItem->folderName()).arg(uploadName)); + TQString msg(i18n("Camera Folder '%1' contains item '%2'\n Please, enter New Name").tqarg(folderItem->folderName()).tqarg(uploadName)); uploadName = KLineEditDlg::getText(msg,uploadName,&ok,this); if(!ok){ return; @@ -559,17 +559,17 @@ void CameraUI::slotFolderSelected(CameraFolderItem *folderItem) { } } -void CameraUI::downloadOneItem(const QString& item, const QString& folder, const QString& downloadDir, bool& proceedFurther, bool& overwriteAll) { +void CameraUI::downloadOneItem(const TQString& item, const TQString& folder, const TQString& downloadDir, bool& proceedFurther, bool& overwriteAll) { proceedFurther = true; - QString saveFile(downloadDir); + TQString saveFile(downloadDir); if (!downloadDir.endsWith("/")) { saveFile += "/"; } saveFile += item; - while (QFile::exists(saveFile) && !(overwriteAll)) { + while (TQFile::exists(saveFile) && !(overwriteAll)) { bool overwrite=false; SavefileDialog *dlg = new SavefileDialog(saveFile); - if (dlg->exec()== QDialog::Rejected) { + if (dlg->exec()== TQDialog::Rejected) { delete dlg; proceedFurther = false; return; @@ -612,7 +612,7 @@ void CameraUI::downloadOneItem(const QString& item, const QString& folder, const controller_->requestDownloadItem(folder, item, saveFile); } -bool CameraUI::cameraReadyForUpload(QString& reason) { +bool CameraUI::cameraReadyForUpload(TQString& reason) { bool result = false; if (!cameraConnected_) { reason = i18n("Camera Not Initialized"); @@ -631,8 +631,8 @@ bool CameraUI::cameraReadyForUpload(QString& reason) { } void CameraUI::slotChangeDownloadDirectory() { - QString result = KFileDialog::getExistingDirectory(mDownloadDirectoryEdit->text(), this); - if(!((new QFileInfo(result))->isWritable())) { + TQString result = KFileDialog::getExistingDirectory(mDownloadDirectoryEdit->text(), this); + if(!((new TQFileInfo(result))->isWritable())) { KMessageBox::sorry(this, i18n("Sorry! The directory is not writable!")); return; } diff --git a/kipi-plugins/kameraklient/cameraui.h b/kipi-plugins/kameraklient/cameraui.h index 2fc6b52..cbb1908 100644 --- a/kipi-plugins/kameraklient/cameraui.h +++ b/kipi-plugins/kameraklient/cameraui.h @@ -23,11 +23,11 @@ #ifndef CAMERAUI_H #define CAMERAUI_H -// Qt includes. +// TQt includes. -#include <qdict.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqwidget.h> // KDE includes. @@ -39,12 +39,12 @@ #include "gpfileiteminfo.h" #include "cameratype.h" -class QComboBox; -class QImage; -class QLabel; -class QLineEdit; -class QPushButton; -class QSplitter; +class TQComboBox; +class TQImage; +class TQLabel; +class TQLineEdit; +class TQPushButton; +class TQSplitter; class KAccel; class KComboBox; @@ -72,9 +72,10 @@ class CameraIconView; class CameraFolderItem; class CameraFolderView; -class CameraUI : public QWidget +class CameraUI : public TQWidget { Q_OBJECT + TQ_OBJECT public: @@ -84,25 +85,25 @@ public: const CameraType* cameraType(); void setCameraType(const CameraType& ctype); void cameraInitialized(bool val); - void cameraSubFolder(const QString& folder, const QString& subFolder); - void cameraNewItems(const QString& folder, const GPFileItemInfoList& infoList); + void cameraSubFolder(const TQString& folder, const TQString& subFolder); + void cameraNewItems(const TQString& folder, const GPFileItemInfoList& infoList); void cameraNewItems(const GPFileItemInfoList& infoList); - void cameraNewThumbnail(const QString& folder, const QString& itemName, const QImage& thumbnail); - void cameraDownloadedItem(const QString& folder, const QString& itemName); - void cameraDeletedItem(const QString& folder, const QString& itemName); - void cameraErrorMsg(const QString& msg); + void cameraNewThumbnail(const TQString& folder, const TQString& itemName, const TQImage& thumbnail); + void cameraDownloadedItem(const TQString& folder, const TQString& itemName); + void cameraDeletedItem(const TQString& folder, const TQString& itemName); + void cameraErrorMsg(const TQString& msg); private: void setupAccel(); void setupConnections(); - bool cameraReadyForUpload(QString& reason); - void downloadOneItem(const QString& item, const QString& folder, - const QString& downloadDir, bool& proceedFurther, bool& overwriteAll); + bool cameraReadyForUpload(TQString& reason); + void downloadOneItem(const TQString& item, const TQString& folder, + const TQString& downloadDir, bool& proceedFurther, bool& overwriteAll); signals: - void signalStatusMsg(const QString&); + void signalStatusMsg(const TQString&); void signalProgressVal(int); void signalBusy(bool); @@ -120,7 +121,7 @@ public slots: private slots: - void slotSetStatusMsg(const QString& msg); + void slotSetStatusMsg(const TQString& msg); void slotSetProgressVal(int val); void slotResetStatusBar(); void slotBusy(bool val); @@ -134,21 +135,21 @@ private slots: private: - QLabel *mStatusLabel; + TQLabel *mStatusLabel; KProgress *mProgressBar; - QComboBox *mCameraComboBox; + TQComboBox *mCameraComboBox; - QPushButton *mCameraConnectBtn; - QPushButton *mCameraSetupBtn; - QPushButton *mCameraStopBtn; - QPushButton *mCameraDownloadBtn; - QPushButton *mCameraUploadBtn; - QPushButton *mCameraDeleteBtn; - QPushButton *mDialogCloseBtn; - QPushButton *mChangeDownloadDirectoryBtn; - QPushButton *mhelpButton; + TQPushButton *mCameraConnectBtn; + TQPushButton *mCameraSetupBtn; + TQPushButton *mCameraStopBtn; + TQPushButton *mCameraDownloadBtn; + TQPushButton *mCameraUploadBtn; + TQPushButton *mCameraDeleteBtn; + TQPushButton *mDialogCloseBtn; + TQPushButton *mChangeDownloadDirectoryBtn; + TQPushButton *mhelpButton; KAccel *mCameraUIAccel; @@ -168,17 +169,17 @@ private: GPFileItemContainer *container_; - QSplitter *mSplitter; + TQSplitter *mSplitter; CameraFolderView *mFolderView; CameraIconView *mIconView; - QString cameraPath_; + TQString cameraPath_; bool cameraConnected_; - QLineEdit *mDownloadDirectoryEdit; + TQLineEdit *mDownloadDirectoryEdit; KIPIPlugins::KPAboutData *m_about; }; diff --git a/kipi-plugins/kameraklient/dmessagebox.cpp b/kipi-plugins/kameraklient/dmessagebox.cpp index a25d396..f29bc85 100644 --- a/kipi-plugins/kameraklient/dmessagebox.cpp +++ b/kipi-plugins/kameraklient/dmessagebox.cpp @@ -23,14 +23,14 @@ * * ============================================================ */ -// Qt -#include <qapplication.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qtextedit.h> +// TQt +#include <tqapplication.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqtextedit.h> // KDE #include <klocale.h> #include <kapplication.h> @@ -43,53 +43,53 @@ namespace KIPIKameraKlientPlugin DMessageBox* DMessageBox::s_instance = 0; -DMessageBox::DMessageBox() : QWidget(0, 0, WShowModal | WStyle_DialogBorder| WDestructiveClose) { +DMessageBox::DMessageBox() : TQWidget(0, 0, WShowModal | WStyle_DialogBorder| WDestructiveClose) { setCaption(i18n("Error")); s_instance = this; count_ = 0; - QGridLayout *grid = new QGridLayout(this, 1, 1, 6, 11); + TQGridLayout *grid = new TQGridLayout(this, 1, 1, 6, 11); // ---------------------------------------------------- - QHBox *hbox = new QHBox(this); + TQHBox *hbox = new TQHBox(this); hbox->setSpacing(5); - QPixmap pix = KApplication::kApplication()->iconLoader()->loadIcon("error", + TQPixmap pix = KApplication::kApplication()->iconLoader()->loadIcon("error", KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true); - QLabel *pixLabel = new QLabel(hbox); + TQLabel *pixLabel = new TQLabel(hbox); pixLabel->setPixmap(pix); - pixLabel->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); - msgBox_ = new QLabel(hbox); - msgBox_->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum)); + pixLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + msgBox_ = new TQLabel(hbox); + msgBox_->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum)); grid->addMultiCellWidget(hbox, 0, 0, 0, 2); // --------------------------------------------------- - extraMsgBox_ = new QTextEdit(this); + extraMsgBox_ = new TQTextEdit(this); extraMsgBox_->setReadOnly(true); grid->addMultiCellWidget(extraMsgBox_, 1, 1, 0, 2); extraMsgBox_->hide(); // --------------------------------------------------- - QPushButton *okButton = new QPushButton(i18n("&OK"), this); + TQPushButton *okButton = new TQPushButton(i18n("&OK"), this); grid->addWidget(okButton, 2, 1); // --------------------------------------------------- - grid->addItem(new QSpacerItem(5, 10, QSizePolicy::Expanding, QSizePolicy::Minimum), 2, 0); - grid->addItem(new QSpacerItem(5, 10, QSizePolicy::Expanding, QSizePolicy::Minimum), 2, 2); + grid->addItem(new TQSpacerItem(5, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum), 2, 0); + grid->addItem(new TQSpacerItem(5, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum), 2, 2); // --------------------------------------------------- - connect(okButton, SIGNAL(clicked()), this, SLOT(slotOkClicked())); + connect(okButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOkClicked())); int W=500; int H=400; - move(QApplication::desktop()->width ()/2-(W/2), QApplication::desktop()->height()/2-(H/2)); + move(TQApplication::desktop()->width ()/2-(W/2), TQApplication::desktop()->height()/2-(H/2)); } DMessageBox::~DMessageBox() { s_instance = 0; } -void DMessageBox::appendMsg(const QString& msg) { +void DMessageBox::appendMsg(const TQString& msg) { if (count_ == 0) { mainMsg_ = msg; msgBox_->setText(msg); } else { - QString text(i18n("More errors occurred and are shown below:")); + TQString text(i18n("More errors occurred and are shown below:")); msgBox_->setText(text); extraMsgBox_->append(msg); if (extraMsgBox_->isHidden()) { @@ -103,7 +103,7 @@ void DMessageBox::slotOkClicked() { close(); } -void DMessageBox::showMsg(const QString& msg) { +void DMessageBox::showMsg(const TQString& msg) { DMessageBox* msgBox = DMessageBox::s_instance; if (!msgBox) { msgBox = new DMessageBox; diff --git a/kipi-plugins/kameraklient/dmessagebox.h b/kipi-plugins/kameraklient/dmessagebox.h index bf36d81..236de78 100644 --- a/kipi-plugins/kameraklient/dmessagebox.h +++ b/kipi-plugins/kameraklient/dmessagebox.h @@ -25,32 +25,33 @@ // Digikam Message Box // If One Message Box is already open, and more messages are posted they will be appended to the open messagebox -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> -class QLabel; -class QTextEdit; +class TQLabel; +class TQTextEdit; namespace KIPIKameraKlientPlugin { -class DMessageBox : public QWidget { +class DMessageBox : public TQWidget { Q_OBJECT + TQ_OBJECT public: DMessageBox(); ~DMessageBox(); - void appendMsg(const QString& msg); - static void showMsg(const QString& msg); + void appendMsg(const TQString& msg); + static void showMsg(const TQString& msg); private: static DMessageBox* s_instance; int count_; - QLabel *msgBox_; - QTextEdit *extraMsgBox_; - QString mainMsg_; + TQLabel *msgBox_; + TQTextEdit *extraMsgBox_; + TQString mainMsg_; private slots: void slotOkClicked(); diff --git a/kipi-plugins/kameraklient/gpcamera.cpp b/kipi-plugins/kameraklient/gpcamera.cpp index 40dcb24..6858e0e 100644 --- a/kipi-plugins/kameraklient/gpcamera.cpp +++ b/kipi-plugins/kameraklient/gpcamera.cpp @@ -19,11 +19,11 @@ * * ============================================================ */ -// Qt -#include <qstring.h> -#include <qstringlist.h> -#include <qimage.h> -#include <qfile.h> +// TQt +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqimage.h> +#include <tqfile.h> // KDE #include <kdebug.h> // Standard @@ -44,8 +44,8 @@ class GPCameraPrivate { public: Camera *camera; CameraAbilities cameraAbilities; - QString model; - QString port; + TQString model; + TQString port; bool cameraSetup; bool cameraInitialized; bool thumbnailSupport; @@ -55,7 +55,7 @@ public: bool delDirSupport; }; -GPCamera::GPCamera(const QString& model, const QString& port) { +GPCamera::GPCamera(const TQString& model, const TQString& port) { status = 0; d = new GPCameraPrivate; d->camera = 0; @@ -95,7 +95,7 @@ int GPCamera::setup() { status = 0; } - status = new GPStatus(); + status = new GPtqStatus(); gp_abilities_list_new(&abilList); gp_abilities_list_load(abilList, status->context); @@ -160,7 +160,7 @@ int GPCamera::initialize() { delete status; status = 0; } - status = new GPStatus(); + status = new GPtqStatus(); // Try and initialize the camera to see if its connected if (gp_camera_init(d->camera, status->context) != GP_OK) { gp_camera_unref(d->camera); @@ -202,14 +202,14 @@ bool GPCamera::delDirSupport() { return d->delDirSupport; } -int GPCamera::getSubFolders(const QString& folder, QValueList<QString>& subFolderList) { +int GPCamera::getSubFolders(const TQString& folder, TQValueList<TQString>& subFolderList) { ::CameraList *clist; gp_list_new(&clist); if (status) { delete status; status = 0; } - status = new GPStatus(); + status = new GPtqStatus(); if (gp_camera_folder_list_folders(d->camera, folder.latin1(), clist, status->context) != GP_OK) { gp_list_unref(clist); delete status; @@ -225,14 +225,14 @@ int GPCamera::getSubFolders(const QString& folder, QValueList<QString>& subFolde gp_list_unref(clist); return GPError; } - subFolderList.append(QString(subFolder)); + subFolderList.append(TQString(subFolder)); } gp_list_unref(clist); return GPSuccess; } -void GPCamera::getAllItemsInfo(const QString& folder, GPFileItemInfoList& infoList) { - QValueList<QString> folderList; +void GPCamera::getAllItemsInfo(const TQString& folder, GPFileItemInfoList& infoList) { + TQValueList<TQString> folderList; folderList.clear(); // Get all items in this folder first getItemsInfo(folder, infoList); @@ -240,7 +240,7 @@ void GPCamera::getAllItemsInfo(const QString& folder, GPFileItemInfoList& infoLi getSubFolders(folder, folderList); if (folderList.count() > 0) { for (unsigned int i=0; i<folderList.count(); i++) { - QString subFolder(folder); + TQString subFolder(folder); if (!subFolder.endsWith("/")) { subFolder += "/"; } @@ -250,14 +250,14 @@ void GPCamera::getAllItemsInfo(const QString& folder, GPFileItemInfoList& infoLi } } -int GPCamera::getItemsInfo(const QString& folder, GPFileItemInfoList& infoList) { +int GPCamera::getItemsInfo(const TQString& folder, GPFileItemInfoList& infoList) { ::CameraList *clist; const char *cname; if (status) { delete status; status = 0; } - status = new GPStatus; + status = new GPtqStatus; gp_list_new(&clist); if (gp_camera_folder_list_files(d->camera, folder.latin1(), clist, status->context) != GP_OK) { gp_list_unref(clist); @@ -274,7 +274,7 @@ int GPCamera::getItemsInfo(const QString& folder, GPFileItemInfoList& infoList) return GPError; } GPFileItemInfo camFileInfo; - camFileInfo.name = QString(cname); + camFileInfo.name = TQString(cname); camFileInfo.folder = folder; CameraFileInfo info; if (gp_camera_file_get_info(d->camera, folder.latin1(), cname, &info, status->context) == GP_OK) { @@ -282,7 +282,7 @@ int GPCamera::getItemsInfo(const QString& folder, GPFileItemInfoList& infoList) camFileInfo.fileInfoAvailable = true; if (info.file.fields & GP_FILE_INFO_TYPE) { - camFileInfo.mime = QString(info.file.type); + camFileInfo.mime = TQString(info.file.type); } if (info.file.fields & GP_FILE_INFO_SIZE) { camFileInfo.size = info.file.size; @@ -313,7 +313,7 @@ int GPCamera::getItemsInfo(const QString& folder, GPFileItemInfoList& infoList) } } if (info.file.fields & GP_FILE_INFO_MTIME) { - QString time = QString(asctime(localtime(&info.file.mtime))); + TQString time = TQString(asctime(localtime(&info.file.mtime))); time.truncate(time.length()-1); camFileInfo.time = time; } @@ -328,7 +328,7 @@ int GPCamera::getItemsInfo(const QString& folder, GPFileItemInfoList& infoList) return GPSuccess; } -int GPCamera::getThumbnail(const QString& folder, const QString& imageName, QImage& thumbnail) { +int GPCamera::getThumbnail(const TQString& folder, const TQString& imageName, TQImage& thumbnail) { CameraFile *cfile; const char* data; unsigned long int size; @@ -337,7 +337,7 @@ int GPCamera::getThumbnail(const QString& folder, const QString& imageName, QIma delete status; status = 0; } - status = new GPStatus; + status = new GPtqStatus; if (gp_camera_file_get(d->camera, folder.latin1(), imageName.latin1(), GP_FILE_TYPE_PREVIEW, cfile, status->context) != GP_OK) { gp_file_unref(cfile); delete status; @@ -352,14 +352,14 @@ int GPCamera::getThumbnail(const QString& folder, const QString& imageName, QIma return GPSuccess; } -int GPCamera::downloadItem(const QString& folder, const QString& itemName, const QString& saveFile) { +int GPCamera::downloadItem(const TQString& folder, const TQString& itemName, const TQString& saveFile) { CameraFile *cfile; gp_file_new(&cfile); if (status) { delete status; status = 0; } - status = new GPStatus; + status = new GPtqStatus; if (gp_camera_file_get(d->camera, folder.latin1(), itemName.latin1(), GP_FILE_TYPE_NORMAL, cfile, status->context) != GP_OK) { gp_file_unref(cfile); delete status; @@ -376,12 +376,12 @@ int GPCamera::downloadItem(const QString& folder, const QString& itemName, const return GPSuccess; } -int GPCamera::deleteItem(const QString& folder, const QString& itemName) { +int GPCamera::deleteItem(const TQString& folder, const TQString& itemName) { if (status) { delete status; status = 0; } - status = new GPStatus; + status = new GPtqStatus; if(gp_camera_file_delete(d->camera, folder.latin1(), itemName.latin1(), status->context) != GP_OK) { delete status; status = 0; @@ -393,14 +393,14 @@ int GPCamera::deleteItem(const QString& folder, const QString& itemName) { } // recursively delete all items -int GPCamera::deleteAllItems(const QString& folder) { - QValueList<QString> folderList; +int GPCamera::deleteAllItems(const TQString& folder) { + TQValueList<TQString> folderList; folderList.clear(); // Get all subfolders in this folder getSubFolders(folder, folderList); if (folderList.count() > 0) { for (unsigned int i=0; i<folderList.count(); i++) { - QString subFolder(folder); + TQString subFolder(folder); if (!subFolder.endsWith("/")) subFolder += "/"; subFolder += folderList[i]; @@ -412,7 +412,7 @@ int GPCamera::deleteAllItems(const QString& folder) { delete status; status = 0; } - status = new GPStatus; + status = new GPtqStatus; if (gp_camera_folder_delete_all(d->camera, folder.latin1(), status->context) != GP_OK) { delete status; status = 0; @@ -423,19 +423,19 @@ int GPCamera::deleteAllItems(const QString& folder) { return GPSuccess; } -int GPCamera::uploadItem(const QString& folder, const QString& itemName, const QString& localFile) { +int GPCamera::uploadItem(const TQString& folder, const TQString& itemName, const TQString& localFile) { CameraFile *cfile; gp_file_new(&cfile); - if (gp_file_open(cfile, QFile::encodeName( localFile )) != GP_OK) { + if (gp_file_open(cfile, TQFile::encodeName( localFile )) != GP_OK) { gp_file_unref(cfile); return GPError; } - gp_file_set_name(cfile, QFile::encodeName( itemName )); + gp_file_set_name(cfile, TQFile::encodeName( itemName )); if (status) { delete status; status = 0; } - status = new GPStatus; + status = new GPtqStatus; if (gp_camera_folder_put_file(d->camera, folder.latin1(), cfile, status->context) != GP_OK) { gp_file_unref(cfile); delete status; @@ -448,47 +448,47 @@ int GPCamera::uploadItem(const QString& folder, const QString& itemName, const Q return GPSuccess; } -void GPCamera::cameraSummary(QString& summary) { +void GPCamera::cameraSummary(TQString& summary) { CameraText sum; if (status) { delete status; status = 0; } - status = new GPStatus; + status = new GPtqStatus; gp_camera_get_summary(d->camera, &sum, status->context); - summary = QString(sum.text); + summary = TQString(sum.text); delete status; status = 0; } -void GPCamera::cameraManual(QString& manual) { +void GPCamera::cameraManual(TQString& manual) { CameraText man; if (status) { delete status; status = 0; } - status = new GPStatus; + status = new GPtqStatus; gp_camera_get_manual(d->camera, &man, status->context); - manual = QString(man.text); + manual = TQString(man.text); delete status; status = 0; } -void GPCamera::cameraAbout(QString& about) { +void GPCamera::cameraAbout(TQString& about) { CameraText abt; if (status) { delete status; status = 0; } - status = new GPStatus; + status = new GPtqStatus; gp_camera_get_about(d->camera, &abt, status->context); - about = QString(abt.text); + about = TQString(abt.text); delete status; status = 0; } // Static functions -void GPCamera::getSupportedCameras(int& count, QStringList& clist) { +void GPCamera::getSupportedCameras(int& count, TQStringList& clist) { clist.clear(); count = 0; @@ -511,14 +511,14 @@ void GPCamera::getSupportedCameras(int& count, QStringList& clist) { const char *cname; gp_abilities_list_get_abilities( abilList, i, &abil ); cname = abil.model; - clist.append( QString( cname ) ); + clist.append( TQString( cname ) ); } } gp_abilities_list_free( abilList ); gp_context_unref( context ); } -void GPCamera::getSupportedPorts(QStringList& plist) { +void GPCamera::getSupportedPorts(TQStringList& plist) { GPPortInfoList *list; GPPortInfo info; @@ -535,7 +535,7 @@ void GPCamera::getSupportedPorts(QStringList& plist) { gp_port_info_list_free( list ); } -void GPCamera::getCameraSupportedPorts(const QString& model, QStringList& plist) { +void GPCamera::getCameraSupportedPorts(const TQString& model, TQStringList& plist) { int i = 0; plist.clear(); @@ -561,7 +561,7 @@ void GPCamera::getCameraSupportedPorts(const QString& model, QStringList& plist) } -int GPCamera::autoDetect(QString& model, QString& port) { +int GPCamera::autoDetect(TQString& model, TQString& port) { ::CameraList *pCamList; CameraAbilitiesList *abilList; GPPortInfoList *infoList; diff --git a/kipi-plugins/kameraklient/gpcamera.h b/kipi-plugins/kameraklient/gpcamera.h index ca4ea48..864f87a 100644 --- a/kipi-plugins/kameraklient/gpcamera.h +++ b/kipi-plugins/kameraklient/gpcamera.h @@ -22,19 +22,19 @@ #ifndef GPCAMERA_H #define GPCAMERA_H -#include <qstring.h> -#include <qstringlist.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> #include "gpfileiteminfo.h" -class QImage; +class TQImage; namespace KIPIKameraKlientPlugin { class GPCameraPrivate; -class GPStatus; +class GPtqStatus; class GPCamera { @@ -47,7 +47,7 @@ public: } Errors; - GPCamera(const QString& model, const QString& port); + GPCamera(const TQString& model, const TQString& port); ~GPCamera(); bool thumbnailSupport(); @@ -60,31 +60,31 @@ public: void cancel(); - int getSubFolders(const QString& folder, QValueList<QString>& subFolderList); + int getSubFolders(const TQString& folder, TQValueList<TQString>& subFolderList); - void getAllItemsInfo(const QString& folder, GPFileItemInfoList& infoList); - int getItemsInfo(const QString& folder, GPFileItemInfoList& infoList); - int getThumbnail(const QString& folder, const QString& imageName, QImage& thumbnail); - int downloadItem(const QString& folder, const QString& itemName, const QString& saveFile); - int deleteItem(const QString& folder, const QString& itemName); + void getAllItemsInfo(const TQString& folder, GPFileItemInfoList& infoList); + int getItemsInfo(const TQString& folder, GPFileItemInfoList& infoList); + int getThumbnail(const TQString& folder, const TQString& imageName, TQImage& thumbnail); + int downloadItem(const TQString& folder, const TQString& itemName, const TQString& saveFile); + int deleteItem(const TQString& folder, const TQString& itemName); // recursively delete all items - int deleteAllItems(const QString& folder); - int uploadItem(const QString& folder, const QString& itemName, const QString& localFile); - void cameraSummary(QString& summary); - void cameraManual(QString& manual); - void cameraAbout(QString& about); + int deleteAllItems(const TQString& folder); + int uploadItem(const TQString& folder, const TQString& itemName, const TQString& localFile); + void cameraSummary(TQString& summary); + void cameraManual(TQString& manual); + void cameraAbout(TQString& about); // Static Functions - static void getSupportedCameras(int& count, QStringList& clist); - static void getSupportedPorts(QStringList& plist); - static void getCameraSupportedPorts(const QString& model, QStringList& plist); - static int autoDetect(QString& model, QString& port); + static void getSupportedCameras(int& count, TQStringList& clist); + static void getSupportedPorts(TQStringList& plist); + static void getCameraSupportedPorts(const TQString& model, TQStringList& plist); + static int autoDetect(TQString& model, TQString& port); private: int setup(); GPCameraPrivate *d; - GPStatus *status; + GPtqStatus *status; }; } // NameSpace KIPIKameraKlientPlugin diff --git a/kipi-plugins/kameraklient/gpcommand.h b/kipi-plugins/kameraklient/gpcommand.h index 08a6bd9..ad6a1a6 100644 --- a/kipi-plugins/kameraklient/gpcommand.h +++ b/kipi-plugins/kameraklient/gpcommand.h @@ -22,7 +22,7 @@ #ifndef GPCOMMAND_H #define GPCOMMAND_H -#include <qstring.h> +#include <tqstring.h> namespace KIPIKameraKlientPlugin { @@ -57,200 +57,200 @@ private: class GPCommandGetSubFolders : public GPCommand { public: - GPCommandGetSubFolders(const QString& folder) : GPCommand(GetSubFolders), folder_(folder) { + GPCommandGetSubFolders(const TQString& folder) : GPCommand(GetSubFolders), folder_(folder) { } - QString folder() const { + TQString folder() const { return folder_; } private: - QString folder_; + TQString folder_; }; class GPCommandMakeFolder : public GPCommand { public: - GPCommandMakeFolder(const QString& folder, const QString& newFolder) + GPCommandMakeFolder(const TQString& folder, const TQString& newFolder) : GPCommand(MakeFolder), folder_(folder), newFolder_(newFolder) { } - QString folder() const { + TQString folder() const { return folder_; } - QString newFolder() const { + TQString newFolder() const { return newFolder_; } private: - QString folder_; - QString newFolder_; + TQString folder_; + TQString newFolder_; }; class GPCommandDeleteFolder : public GPCommand { public: - GPCommandDeleteFolder(const QString& folder) : GPCommand(DeleteFolder), folder_(folder) { + GPCommandDeleteFolder(const TQString& folder) : GPCommand(DeleteFolder), folder_(folder) { } - QString folder() const { + TQString folder() const { return folder_; } private: - QString folder_; + TQString folder_; }; class GPCommandGetItemsInfo : public GPCommand { public: - GPCommandGetItemsInfo(const QString& folder) : GPCommand(GetItemsInfo), folder_(folder) { + GPCommandGetItemsInfo(const TQString& folder) : GPCommand(GetItemsInfo), folder_(folder) { } - QString folder() const { + TQString folder() const { return folder_; } private: - QString folder_; + TQString folder_; }; class GPCommandGetAllItemsInfo : public GPCommand { public: - GPCommandGetAllItemsInfo(const QString& folder) : GPCommand(GetAllItemsInfo), folder_(folder) { + GPCommandGetAllItemsInfo(const TQString& folder) : GPCommand(GetAllItemsInfo), folder_(folder) { } - QString folder() const { + TQString folder() const { return folder_; } private: - QString folder_; + TQString folder_; }; class GPCommandGetThumbnail : public GPCommand { public: - GPCommandGetThumbnail(const QString& folder, const QString& imageName) + GPCommandGetThumbnail(const TQString& folder, const TQString& imageName) : GPCommand(GetThumbnail), folder_(folder), imageName_(imageName) { } - QString folder() const { + TQString folder() const { return folder_; } - QString imageName() const { + TQString imageName() const { return imageName_; } private: - QString folder_; - QString imageName_; + TQString folder_; + TQString imageName_; }; class GPCommandDownloadItem : public GPCommand { public: - GPCommandDownloadItem(const QString& folder, const QString& itemName, const QString& saveFile) : GPCommand(DownloadItem), folder_(folder), itemName_(itemName), saveFile_(saveFile) { + GPCommandDownloadItem(const TQString& folder, const TQString& itemName, const TQString& saveFile) : GPCommand(DownloadItem), folder_(folder), itemName_(itemName), saveFile_(saveFile) { } - QString folder() const { + TQString folder() const { return folder_; } - QString itemName() const { + TQString itemName() const { return itemName_; } - QString saveFile() const { + TQString saveFile() const { return saveFile_; } private: - QString folder_; - QString itemName_; - QString saveFile_; + TQString folder_; + TQString itemName_; + TQString saveFile_; }; class GPCommandDeleteItem : public GPCommand { public: - GPCommandDeleteItem(const QString& folder, const QString& itemName) : GPCommand(DeleteItem), folder_(folder), itemName_(itemName) { + GPCommandDeleteItem(const TQString& folder, const TQString& itemName) : GPCommand(DeleteItem), folder_(folder), itemName_(itemName) { } - QString folder() const { + TQString folder() const { return folder_; } - QString itemName() const { + TQString itemName() const { return itemName_; } private: - QString folder_; - QString itemName_; + TQString folder_; + TQString itemName_; }; class GPCommandDeleteAllItems : public GPCommand { public: - GPCommandDeleteAllItems(const QString& rootFolder) : GPCommand(DeleteAllItems), folder_(rootFolder) { + GPCommandDeleteAllItems(const TQString& rootFolder) : GPCommand(DeleteAllItems), folder_(rootFolder) { } - QString rootFolder() const { + TQString rootFolder() const { return folder_; } private: - QString folder_; + TQString folder_; }; class GPCommandUploadItem : public GPCommand { public: - GPCommandUploadItem(const QString& folder, const QString& localFile, const QString& uploadName) : GPCommand(UploadItem), folder_(folder), localFile_(localFile), uploadName_(uploadName) { + GPCommandUploadItem(const TQString& folder, const TQString& localFile, const TQString& uploadName) : GPCommand(UploadItem), folder_(folder), localFile_(localFile), uploadName_(uploadName) { } - QString folder() const { + TQString folder() const { return folder_; } - QString localFile() const { + TQString localFile() const { return localFile_; } - QString uploadName() const { + TQString uploadName() const { return uploadName_; } private: - QString folder_; - QString localFile_; - QString uploadName_; + TQString folder_; + TQString localFile_; + TQString uploadName_; }; class GPCommandOpenItem : public GPCommand { public: - GPCommandOpenItem(const QString& folder, const QString& itemName, const QString& saveFile) : GPCommand(OpenItem), folder_(folder), itemName_(itemName), saveFile_(saveFile) { + GPCommandOpenItem(const TQString& folder, const TQString& itemName, const TQString& saveFile) : GPCommand(OpenItem), folder_(folder), itemName_(itemName), saveFile_(saveFile) { } - QString folder() const { + TQString folder() const { return folder_; } - QString itemName() const { + TQString itemName() const { return itemName_; } - QString saveFile() const { + TQString saveFile() const { return saveFile_; } private: - QString folder_; - QString itemName_; - QString saveFile_; + TQString folder_; + TQString itemName_; + TQString saveFile_; }; class GPCommandOpenItemWithService : public GPCommand { public: - GPCommandOpenItemWithService(const QString& folder, const QString& itemName, const QString& saveFile, const QString& serviceName) : GPCommand(OpenItemWithService), folder_(folder), itemName_(itemName), saveFile_(saveFile), serviceName_(serviceName) { + GPCommandOpenItemWithService(const TQString& folder, const TQString& itemName, const TQString& saveFile, const TQString& serviceName) : GPCommand(OpenItemWithService), folder_(folder), itemName_(itemName), saveFile_(saveFile), serviceName_(serviceName) { } - QString folder() const { + TQString folder() const { return folder_; } - QString itemName() const { + TQString itemName() const { return itemName_; } - QString saveFile() const { + TQString saveFile() const { return saveFile_; } - QString serviceName() const { + TQString serviceName() const { return serviceName_; } private: - QString folder_; - QString itemName_; - QString saveFile_; - QString serviceName_; + TQString folder_; + TQString itemName_; + TQString saveFile_; + TQString serviceName_; }; class GPCommandExifInfo : public GPCommand { public: - GPCommandExifInfo(const QString& folder, const QString& itemName) : GPCommand(ExifInfo), folder_(folder), itemName_(itemName) { + GPCommandExifInfo(const TQString& folder, const TQString& itemName) : GPCommand(ExifInfo), folder_(folder), itemName_(itemName) { } - QString folder() const { + TQString folder() const { return folder_; } - QString itemName() const { + TQString itemName() const { return itemName_; } private: - QString folder_; - QString itemName_; + TQString folder_; + TQString itemName_; }; } // NameSpace KIPIKameraKlientPlugin diff --git a/kipi-plugins/kameraklient/gpcontroller.cpp b/kipi-plugins/kameraklient/gpcontroller.cpp index 3565253..4d27d68 100644 --- a/kipi-plugins/kameraklient/gpcontroller.cpp +++ b/kipi-plugins/kameraklient/gpcontroller.cpp @@ -24,11 +24,11 @@ // Standard #include <iostream> -// Qt -#include <qapplication.h> -#include <qstring.h> -#include <qimage.h> -#include <qcolor.h> +// TQt +#include <tqapplication.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqcolor.h> // KDE #include <kdebug.h> #include <klocale.h> @@ -43,16 +43,16 @@ namespace KIPIKameraKlientPlugin { -GPController::GPController(QObject *parent, const CameraType& ctype) : QObject(parent) { - parent_ = parent; - camera_ = new GPCamera(QString(ctype.model().latin1()), QString(ctype.port().latin1())); +GPController::GPController(TQObject *tqparent, const CameraType& ctype) : TQObject(tqparent) { + tqparent_ = tqparent; + camera_ = new GPCamera(TQString(ctype.model().latin1()), TQString(ctype.port().latin1())); close_ = false; - connect(GPMessages::gpMessagesWrapper(), SIGNAL(statusChanged(const QString&)), - this, SLOT(slotStatusMsg(const QString&)) ); - connect(GPMessages::gpMessagesWrapper(), SIGNAL(progressChanged(int)), - this, SLOT(slotProgressVal(int)) ); - connect(GPMessages::gpMessagesWrapper(), SIGNAL(errorMessage(const QString&)), - this, SLOT(slotErrorMsg(const QString&))); + connect(GPMessages::gpMessagesWrapper(), TQT_SIGNAL(statusChanged(const TQString&)), + this, TQT_SLOT(slotStatusMsg(const TQString&)) ); + connect(GPMessages::gpMessagesWrapper(), TQT_SIGNAL(progressChanged(int)), + this, TQT_SLOT(slotProgressVal(int)) ); + connect(GPMessages::gpMessagesWrapper(), TQT_SIGNAL(errorMessage(const TQString&)), + this, TQT_SLOT(slotErrorMsg(const TQString&))); } GPController::~GPController() { @@ -68,47 +68,47 @@ void GPController::requestInitialize() { cmdQueue_.enqueue(new GPCommand(GPCommand::Init)); } -void GPController::requestGetSubFolders(const QString& folder) { +void GPController::requestGetSubFolders(const TQString& folder) { cmdQueue_.enqueue(new GPCommandGetSubFolders(folder)); } -void GPController::requestMakeFolder(const QString& folder, const QString& newFolder) { +void GPController::requestMakeFolder(const TQString& folder, const TQString& newFolder) { cmdQueue_.enqueue(new GPCommandMakeFolder(folder, newFolder)); } -void GPController::requestDeleteFolder(const QString& folder) { +void GPController::requestDeleteFolder(const TQString& folder) { cmdQueue_.enqueue(new GPCommandDeleteFolder(folder)); } -void GPController::requestGetItemsInfo(const QString& folder) { +void GPController::requestGetItemsInfo(const TQString& folder) { cmdQueue_.enqueue(new GPCommandGetItemsInfo(folder)); } -void GPController::requestGetAllItemsInfo(const QString& folder) { +void GPController::requestGetAllItemsInfo(const TQString& folder) { cmdQueue_.enqueue(new GPCommandGetAllItemsInfo(folder)); } -void GPController::requestGetThumbnail(const QString& folder, const QString& imageName) { +void GPController::requestGetThumbnail(const TQString& folder, const TQString& imageName) { cmdQueue_.enqueue(new GPCommandGetThumbnail(folder, imageName)); } -void GPController::requestDownloadItem(const QString& folder, const QString& itemName, const QString& saveFile) { +void GPController::requestDownloadItem(const TQString& folder, const TQString& itemName, const TQString& saveFile) { cmdQueue_.enqueue(new GPCommandDownloadItem(folder, itemName, saveFile)); } -void GPController::requestDeleteItem(const QString& folder, const QString& itemName) { +void GPController::requestDeleteItem(const TQString& folder, const TQString& itemName) { cmdQueue_.enqueue(new GPCommandDeleteItem(folder, itemName)); } -void GPController::requestUploadItem(const QString& folder, const QString& localFile, const QString& uploadName) { +void GPController::requestUploadItem(const TQString& folder, const TQString& localFile, const TQString& uploadName) { cmdQueue_.enqueue(new GPCommandUploadItem(folder, localFile, uploadName)); } -void GPController::requestOpenItem(const QString& folder, const QString& itemName, const QString& saveFile) { +void GPController::requestOpenItem(const TQString& folder, const TQString& itemName, const TQString& saveFile) { cmdQueue_.enqueue(new GPCommandOpenItem(folder, itemName, saveFile)); } -void GPController::requestOpenItemWithService(const QString& folder, const QString& itemName, const QString& saveFile, const QString& serviceName) { +void GPController::requestOpenItemWithService(const TQString& folder, const TQString& itemName, const TQString& saveFile, const TQString& serviceName) { cmdQueue_.enqueue(new GPCommandOpenItemWithService(folder, itemName, saveFile, serviceName)); } @@ -223,28 +223,28 @@ void GPController::initialize() { int result = camera_->initialize(); mutex_.unlock(); if (result == GPCamera::GPSuccess) { - QApplication::postEvent(parent_, new GPEvent(GPEvent::Init)); + TQApplication::postEvent(tqparent_, new GPEvent(GPEvent::Init)); } else if (result == GPCamera::GPSetup) { - QString msg(i18n("Camera Model or Port not specified correctly.\n" "Please run Setup")); + TQString msg(i18n("Camera Model or Port not specified correctly.\n" "Please run Setup")); error(msg); } else { - QString msg(i18n("Failed to initialize camera.\n" "Please ensure camera is connected properly and turned on")); + TQString msg(i18n("Failed to initialize camera.\n" "Please ensure camera is connected properly and turned on")); error(msg); } } -void GPController::getSubFolders(const QString& folder) { - QValueList<QString> subFolderList; +void GPController::getSubFolders(const TQString& folder) { + TQValueList<TQString> subFolderList; subFolderList.clear(); mutex_.lock(); int result = camera_->getSubFolders(folder, subFolderList); mutex_.unlock(); if (result == GPCamera::GPSuccess) { - QApplication::postEvent(parent_, new GPEventGetSubFolders(folder, subFolderList)); + TQApplication::postEvent(tqparent_, new GPEventGetSubFolders(folder, subFolderList)); if (subFolderList.count() > 0) { for (unsigned int i=0; i<subFolderList.count(); i++) { - QString subFolder(folder); + TQString subFolder(folder); if (subFolder.endsWith("/")) subFolder += subFolderList[i]; else @@ -254,108 +254,108 @@ void GPController::getSubFolders(const QString& folder) { } return; } else { - QString msg(i18n("Failed to get subfolder names from '%1'\n").arg(folder)); + TQString msg(i18n("Failed to get subfolder names from '%1'\n").tqarg(folder)); error(msg); return; } } -void GPController::makeFolder(const QString&, const QString&) { +void GPController::makeFolder(const TQString&, const TQString&) { } -void GPController::deleteFolder(const QString&) { +void GPController::deleteFolder(const TQString&) { } -void GPController::getItemsInfo(const QString& folder) { +void GPController::getItemsInfo(const TQString& folder) { GPFileItemInfoList infoList; infoList.clear(); mutex_.lock(); int result = camera_->getItemsInfo(folder, infoList); mutex_.unlock(); if (result == GPCamera::GPSuccess) { - QApplication::postEvent(parent_, new GPEventGetItemsInfo(folder, infoList)); + TQApplication::postEvent(tqparent_, new GPEventGetItemsInfo(folder, infoList)); } else { - QString msg(i18n("Failed to get images information from '%1'\n").arg(folder)); + TQString msg(i18n("Failed to get images information from '%1'\n").tqarg(folder)); error(msg); } } -void GPController::getAllItemsInfo(const QString& folder) { +void GPController::getAllItemsInfo(const TQString& folder) { GPFileItemInfoList infoList; infoList.clear(); mutex_.lock(); camera_->getAllItemsInfo(folder, infoList); mutex_.unlock(); - QApplication::postEvent(parent_, new GPEventGetAllItemsInfo(infoList)); + TQApplication::postEvent(tqparent_, new GPEventGetAllItemsInfo(infoList)); } -void GPController::getThumbnail(const QString& folder, const QString& imageName) { - QImage thumbnail; +void GPController::getThumbnail(const TQString& folder, const TQString& imageName) { + TQImage thumbnail; mutex_.lock(); int result = camera_->getThumbnail(folder, imageName, thumbnail); mutex_.unlock(); if (result == GPCamera::GPSuccess) { scaleHighlightThumbnail(thumbnail); - QApplication::postEvent(parent_, new GPEventGetThumbnail(folder, imageName, thumbnail)); + TQApplication::postEvent(tqparent_, new GPEventGetThumbnail(folder, imageName, thumbnail)); } else { - kdWarning() << i18n("Failed to get preview for '%1/%2'").arg(folder).arg(imageName) << endl; + kdWarning() << i18n("Failed to get preview for '%1/%2'").tqarg(folder).tqarg(imageName) << endl; } } -void GPController::downloadItem(const QString& folder, const QString& itemName, const QString& saveFile) { +void GPController::downloadItem(const TQString& folder, const TQString& itemName, const TQString& saveFile) { mutex_.lock(); int result = camera_->downloadItem(folder, itemName, saveFile); mutex_.unlock(); if (result != GPCamera::GPSuccess) { - QString msg(i18n("Failed to download '%1' from '%2'").arg(itemName).arg(folder)); + TQString msg(i18n("Failed to download '%1' from '%2'").tqarg(itemName).tqarg(folder)); error(msg); } else { - QApplication::postEvent(parent_, new GPEventDownloadItem(folder, itemName)); + TQApplication::postEvent(tqparent_, new GPEventDownloadItem(folder, itemName)); } } -void GPController::openItem(const QString& folder, const QString& itemName, const QString& saveFile) { +void GPController::openItem(const TQString& folder, const TQString& itemName, const TQString& saveFile) { mutex_.lock(); int result = camera_->downloadItem(folder, itemName, saveFile); mutex_.unlock(); if (result != GPCamera::GPSuccess) { - QString msg(i18n("Failed to open '%1'").arg(itemName)); + TQString msg(i18n("Failed to open '%1'").tqarg(itemName)); error(msg); } else { - QApplication::postEvent(parent_, new GPEventOpenItem(saveFile)); + TQApplication::postEvent(tqparent_, new GPEventOpenItem(saveFile)); } } -void GPController::openItemWithService(const QString& folder, const QString& itemName, const QString& saveFile, const QString& serviceName) { +void GPController::openItemWithService(const TQString& folder, const TQString& itemName, const TQString& saveFile, const TQString& serviceName) { mutex_.lock(); int result = camera_->downloadItem(folder, itemName, saveFile); mutex_.unlock(); if (result != GPCamera::GPSuccess) { - QString msg(i18n("Failed to open '%1'").arg(itemName)); + TQString msg(i18n("Failed to open '%1'").tqarg(itemName)); error(msg); } else { - QApplication::postEvent(parent_, new GPEventOpenItemWithService(saveFile, serviceName)); + TQApplication::postEvent(tqparent_, new GPEventOpenItemWithService(saveFile, serviceName)); } } -void GPController::deleteItem(const QString& folder, const QString& itemName) { +void GPController::deleteItem(const TQString& folder, const TQString& itemName) { mutex_.lock(); int result = camera_->deleteItem(folder, itemName); mutex_.unlock(); if (result != GPCamera::GPSuccess) { - QString msg(i18n("Failed to delete '%1'").arg(itemName)); + TQString msg(i18n("Failed to delete '%1'").tqarg(itemName)); error(msg); } else { - QApplication::postEvent(parent_, new GPEventDeleteItem(folder, itemName)); + TQApplication::postEvent(tqparent_, new GPEventDeleteItem(folder, itemName)); } } -void GPController::uploadItem(const QString& folder, const QString& uploadName, const QString& localFile) { +void GPController::uploadItem(const TQString& folder, const TQString& uploadName, const TQString& localFile) { mutex_.lock(); int result = camera_->uploadItem(folder, uploadName, localFile); mutex_.unlock(); if (result != GPCamera::GPSuccess) { - QString msg(i18n("Failed to upload '%1'").arg(localFile)); + TQString msg(i18n("Failed to upload '%1'").tqarg(localFile)); error(msg); } else { GPFileItemInfoList infoList; @@ -375,21 +375,21 @@ void GPController::uploadItem(const QString& folder, const QString& uploadName, } } if (!infoList2.isEmpty()) { - QApplication::postEvent(parent_, new GPEventGetItemsInfo(folder, infoList2)); + TQApplication::postEvent(tqparent_, new GPEventGetItemsInfo(folder, infoList2)); } } } } -void GPController::error(const QString& errorMsg) { +void GPController::error(const TQString& errorMsg) { kdWarning() << errorMsg; - QApplication::postEvent(parent_, new GPEventError(errorMsg)); + TQApplication::postEvent(tqparent_, new GPEventError(errorMsg)); } -void GPController::scaleHighlightThumbnail(QImage& thumbnail) { - thumbnail = thumbnail.smoothScale(100, 100, QImage::ScaleMin); - QColor darkColor(48, 48, 48); - QColor lightColor(215, 215, 215); +void GPController::scaleHighlightThumbnail(TQImage& thumbnail) { + thumbnail = thumbnail.smoothScale(100, 100, TQ_ScaleMin); + TQColor darkColor(48, 48, 48); + TQColor lightColor(215, 215, 215); int w = thumbnail.width(); int h = thumbnail.height(); // Right @@ -426,25 +426,25 @@ void GPController::scaleHighlightThumbnail(QImage& thumbnail) { } } -void GPController::slotStatusMsg(const QString& msg) { +void GPController::slotStatusMsg(const TQString& msg) { if (!msg.isEmpty()) { - QApplication::postEvent(parent_, new GPEventStatusMsg(msg)); + TQApplication::postEvent(tqparent_, new GPEventStatusMsg(msg)); } } void GPController::slotProgressVal(int val) { - QApplication::postEvent(parent_, new GPEventProgress(val)); + TQApplication::postEvent(tqparent_, new GPEventProgress(val)); } -void GPController::slotErrorMsg(const QString& msg) { +void GPController::slotErrorMsg(const TQString& msg) { error(msg); } void GPController::showBusy(bool val) { - QApplication::postEvent(parent_, new GPEventBusy(val)); + TQApplication::postEvent(tqparent_, new GPEventBusy(val)); } -void GPController::getInformation(QString& summary, QString& manual, QString& about) { +void GPController::getInformation(TQString& summary, TQString& manual, TQString& about) { mutex_.lock(); camera_->cameraSummary(summary); camera_->cameraManual(manual); diff --git a/kipi-plugins/kameraklient/gpcontroller.h b/kipi-plugins/kameraklient/gpcontroller.h index ab9f320..465900d 100644 --- a/kipi-plugins/kameraklient/gpcontroller.h +++ b/kipi-plugins/kameraklient/gpcontroller.h @@ -22,76 +22,77 @@ #ifndef GPCONTROLLER_H #define GPCONTROLLER_H -#include <qobject.h> -#include <qthread.h> -#include <qmutex.h> +#include <tqobject.h> +#include <tqthread.h> +#include <tqmutex.h> #include "mtqueue.h" #include "gpcommand.h" #include "cameratype.h" -class QString; -class QImage; +class TQString; +class TQImage; namespace KIPIKameraKlientPlugin { class GPCamera; -class GPController : public QObject, public QThread { +class GPController : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: - GPController(QObject *parent, const CameraType& ctype); + GPController(TQObject *tqparent, const CameraType& ctype); ~GPController(); void requestInitialize(); - void requestGetSubFolders(const QString& folder); - void requestMakeFolder(const QString& folder, const QString& newFolder); - void requestDeleteFolder(const QString& folder); - void requestGetItemsInfo(const QString& folder); - void requestGetAllItemsInfo(const QString& folder); - void requestGetThumbnail(const QString& folder, const QString& imageName); - void requestDownloadItem(const QString& folder, const QString& itemName, const QString& saveFile); - void requestDeleteItem(const QString& folder, const QString& itemName); - void requestUploadItem(const QString& folder, const QString& localFile, const QString& uploadName); - void requestOpenItem(const QString& folder, const QString& itemName, const QString& saveFile); - void requestOpenItemWithService(const QString& folder, const QString& itemName, const QString& saveFile, const QString& serviceName); + void requestGetSubFolders(const TQString& folder); + void requestMakeFolder(const TQString& folder, const TQString& newFolder); + void requestDeleteFolder(const TQString& folder); + void requestGetItemsInfo(const TQString& folder); + void requestGetAllItemsInfo(const TQString& folder); + void requestGetThumbnail(const TQString& folder, const TQString& imageName); + void requestDownloadItem(const TQString& folder, const TQString& itemName, const TQString& saveFile); + void requestDeleteItem(const TQString& folder, const TQString& itemName); + void requestUploadItem(const TQString& folder, const TQString& localFile, const TQString& uploadName); + void requestOpenItem(const TQString& folder, const TQString& itemName, const TQString& saveFile); + void requestOpenItemWithService(const TQString& folder, const TQString& itemName, const TQString& saveFile, const TQString& serviceName); void cancel(); - void getInformation(QString& summary, QString& manual, QString& about); + void getInformation(TQString& summary, TQString& manual, TQString& about); protected: void run(); private: void initialize(); - void getSubFolders(const QString& folder); - void makeFolder(const QString& folder, const QString& newFolder); - void deleteFolder(const QString& folder); - void getItemsInfo(const QString& folder); - void getAllItemsInfo(const QString& folder); - void getThumbnail(const QString& folder, const QString& imageName); - void downloadItem(const QString& folder, const QString& itemName, const QString& saveFile); - void deleteItem(const QString& folder, const QString& itemName); - void uploadItem(const QString& folder, const QString& uploadName, const QString& localFile); - void openItem(const QString& folder, const QString& itemName, const QString& saveFile); - void openItemWithService(const QString& folder, const QString& itemName, const QString& saveFile, const QString& serviceName); - void exifInfo(const QString& folder, const QString& itemName); - void error(const QString& errorMsg); - - void scaleHighlightThumbnail(QImage& thumbnail); + void getSubFolders(const TQString& folder); + void makeFolder(const TQString& folder, const TQString& newFolder); + void deleteFolder(const TQString& folder); + void getItemsInfo(const TQString& folder); + void getAllItemsInfo(const TQString& folder); + void getThumbnail(const TQString& folder, const TQString& imageName); + void downloadItem(const TQString& folder, const TQString& itemName, const TQString& saveFile); + void deleteItem(const TQString& folder, const TQString& itemName); + void uploadItem(const TQString& folder, const TQString& uploadName, const TQString& localFile); + void openItem(const TQString& folder, const TQString& itemName, const TQString& saveFile); + void openItemWithService(const TQString& folder, const TQString& itemName, const TQString& saveFile, const TQString& serviceName); + void exifInfo(const TQString& folder, const TQString& itemName); + void error(const TQString& errorMsg); + + void scaleHighlightThumbnail(TQImage& thumbnail); void showBusy(bool val); - QObject *parent_; + TQObject *tqparent_; GPCamera *camera_; - QMutex mutex_; + TQMutex mutex_; MTQueue<GPCommand> cmdQueue_; bool close_; private slots: - void slotStatusMsg(const QString& msg); + void slotStatusMsg(const TQString& msg); void slotProgressVal(int val); - void slotErrorMsg(const QString& msg); + void slotErrorMsg(const TQString& msg); }; } // NameSpace KIPIKameraKlientPlugin diff --git a/kipi-plugins/kameraklient/gpeventfilter.cpp b/kipi-plugins/kameraklient/gpeventfilter.cpp index 7eebc3e..2efc582 100644 --- a/kipi-plugins/kameraklient/gpeventfilter.cpp +++ b/kipi-plugins/kameraklient/gpeventfilter.cpp @@ -19,8 +19,8 @@ * * ============================================================ */ -// Qt -#include <qevent.h> +// TQt +#include <tqevent.h> // Local #include "cameraui.h" #include "gpeventfilter.h" @@ -29,18 +29,18 @@ namespace KIPIKameraKlientPlugin { -GPEventFilter::GPEventFilter(QObject* parent) - : QObject(parent) { - parent->installEventFilter(this); - view_ = static_cast<CameraUI *>(parent); +GPEventFilter::GPEventFilter(TQObject* tqparent) + : TQObject(tqparent) { + tqparent->installEventFilter(this); + view_ = static_cast<CameraUI *>(TQT_TQWIDGET(tqparent)); } GPEventFilter::~GPEventFilter() { } -bool GPEventFilter::eventFilter(QObject *, QEvent *e) { - if (e->type() < QCustomEvent::User) { +bool GPEventFilter::eventFilter(TQObject *, TQEvent *e) { + if (e->type() < TQCustomEvent::User) { return false; } switch (e->type()) { @@ -55,8 +55,8 @@ bool GPEventFilter::eventFilter(QObject *, QEvent *e) { } case (GPEvent::GetSubFolders): { GPEventGetSubFolders *event(static_cast<GPEventGetSubFolders *>(e)); - QString folder(event->folder()); - MTList<QString> subFolderList(event->subFolderList()); + TQString folder(event->folder()); + MTList<TQString> subFolderList(event->subFolderList()); for (int i=0; i<subFolderList.count(); i++) { view_->cameraSubFolder(folder, subFolderList[i]); } @@ -64,7 +64,7 @@ bool GPEventFilter::eventFilter(QObject *, QEvent *e) { } case (GPEvent::GetItemsInfo): { GPEventGetItemsInfo *event(static_cast<GPEventGetItemsInfo *>(e)); - QString folder(event->folder()); + TQString folder(event->folder()); MTList<GPFileItemInfo> mtList(event->infoList()); GPFileItemInfoList infoList; GPFileItemInfoList::const_iterator it; diff --git a/kipi-plugins/kameraklient/gpeventfilter.h b/kipi-plugins/kameraklient/gpeventfilter.h index 850a2f2..b415c5b 100644 --- a/kipi-plugins/kameraklient/gpeventfilter.h +++ b/kipi-plugins/kameraklient/gpeventfilter.h @@ -22,35 +22,36 @@ #ifndef GPEVENTFILTER_H #define GPEVENTFILTER_H -#include <qobject.h> +#include <tqobject.h> #include "gpfileiteminfo.h" -class QEvent; -class QImage; -class QString; +class TQEvent; +class TQImage; +class TQString; namespace KIPIKameraKlientPlugin { class CameraUI; -class GPEventFilter : public QObject { +class GPEventFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: - GPEventFilter(QObject *parent); + GPEventFilter(TQObject *tqparent); ~GPEventFilter(); protected: - bool eventFilter(QObject *obj, QEvent *e); + bool eventFilter(TQObject *obj, TQEvent *e); private: CameraUI *view_; signals: - void signalCameraError(const QString&); - void signalStatusMsg(const QString&); + void signalCameraError(const TQString&); + void signalStatusMsg(const TQString&); void signalProgressVal(int); void signalBusy(bool); diff --git a/kipi-plugins/kameraklient/gpevents.h b/kipi-plugins/kameraklient/gpevents.h index 7be51ac..d5a4c5e 100644 --- a/kipi-plugins/kameraklient/gpevents.h +++ b/kipi-plugins/kameraklient/gpevents.h @@ -22,10 +22,10 @@ #ifndef GPEVENTS_H #define GPEVENTS_H -#include <qevent.h> -#include <qstring.h> -#include <qimage.h> -#include <qvaluelist.h> +#include <tqevent.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqvaluelist.h> #include "mtlist.h" #include "gpfileiteminfo.h" @@ -33,11 +33,11 @@ namespace KIPIKameraKlientPlugin { -class GPEvent : public QCustomEvent { +class GPEvent : public TQCustomEvent { public: enum Type { - Init = QCustomEvent::User, + Init = TQCustomEvent::User, GetSubFolders, MakeFolder, DeleteFolder, @@ -57,46 +57,46 @@ public: Error, Busy }; - GPEvent(Type type) : QCustomEvent(type) {} + GPEvent(Type type) : TQCustomEvent(type) {} }; class GPEventError : public GPEvent { public: - GPEventError(const QString errorMsg) : GPEvent(Error), errorMsg_(errorMsg) {} - QString errorMsg() const { return errorMsg_; } + GPEventError(const TQString errorMsg) : GPEvent(Error), errorMsg_(errorMsg) {} + TQString errorMsg() const { return errorMsg_; } private: - QString errorMsg_; + TQString errorMsg_; }; class GPEventGetSubFolders : public GPEvent { public: - GPEventGetSubFolders(const QString& folder, const QValueList<QString>& subFolderList) + GPEventGetSubFolders(const TQString& folder, const TQValueList<TQString>& subFolderList) : GPEvent(GetSubFolders), folder_(folder), subFolderList_(subFolderList) {} - QString folder() const { return folder_; } - const MTList<QString>& subFolderList() const { return subFolderList_; } + TQString folder() const { return folder_; } + const MTList<TQString>& subFolderList() const { return subFolderList_; } private: - QString folder_; - MTList<QString> subFolderList_; + TQString folder_; + MTList<TQString> subFolderList_; }; class GPEventGetItemsInfo : public GPEvent { public: - GPEventGetItemsInfo(const QString& folder, const GPFileItemInfoList& infoList) + GPEventGetItemsInfo(const TQString& folder, const GPFileItemInfoList& infoList) : GPEvent(GetItemsInfo), folder_(folder), infoList_(infoList) {} - QString folder() const { return folder_; } + TQString folder() const { return folder_; } const MTList<GPFileItemInfo>& infoList() const { return infoList_; } private: - QString folder_; + TQString folder_; MTList<GPFileItemInfo> infoList_; }; @@ -115,80 +115,80 @@ private: class GPEventGetThumbnail : public GPEvent { public: - GPEventGetThumbnail(const QString& folder, const QString& imageName, const QImage& thumbnail) + GPEventGetThumbnail(const TQString& folder, const TQString& imageName, const TQImage& thumbnail) : GPEvent(GetThumbnail), folder_(folder), imageName_(imageName), thumbnail_(thumbnail) {} - QString folder() const { return folder_; } - QString imageName() const { return imageName_; } - QImage thumbnail() const { return thumbnail_; } + TQString folder() const { return folder_; } + TQString imageName() const { return imageName_; } + TQImage thumbnail() const { return thumbnail_; } private: - QString folder_; - QString imageName_; - QImage thumbnail_; + TQString folder_; + TQString imageName_; + TQImage thumbnail_; }; class GPEventDownloadItem : public GPEvent { public: - GPEventDownloadItem(const QString& folder, const QString& itemName) + GPEventDownloadItem(const TQString& folder, const TQString& itemName) : GPEvent(DownloadItem), folder_(folder), itemName_(itemName) {} - QString folder() const { return folder_; } - QString itemName() const { return itemName_; } + TQString folder() const { return folder_; } + TQString itemName() const { return itemName_; } private: - QString folder_; - QString itemName_; + TQString folder_; + TQString itemName_; }; class GPEventDeleteItem : public GPEvent { public: - GPEventDeleteItem(const QString& folder, const QString& itemName) + GPEventDeleteItem(const TQString& folder, const TQString& itemName) : GPEvent(DeleteItem), folder_(folder), itemName_(itemName) {} - QString folder() const { return folder_; } - QString itemName() const { return itemName_; } + TQString folder() const { return folder_; } + TQString itemName() const { return itemName_; } private: - QString folder_; - QString itemName_; + TQString folder_; + TQString itemName_; }; class GPEventOpenItem : public GPEvent { public: - GPEventOpenItem(const QString& openFile) : GPEvent(OpenItem), openFile_(openFile) + GPEventOpenItem(const TQString& openFile) : GPEvent(OpenItem), openFile_(openFile) {} - QString openFile() const { return openFile_; } + TQString openFile() const { return openFile_; } private: - QString openFile_; + TQString openFile_; }; class GPEventOpenItemWithService : public GPEvent { public: - GPEventOpenItemWithService(const QString& openFile, const QString& serviceName) + GPEventOpenItemWithService(const TQString& openFile, const TQString& serviceName) : GPEvent(OpenItemWithService), openFile_(openFile), serviceName_(serviceName) { } - QString openFile() const { return openFile_; } - QString serviceName() const { return serviceName_; } + TQString openFile() const { return openFile_; } + TQString serviceName() const { return serviceName_; } private: - QString openFile_; - QString serviceName_; + TQString openFile_; + TQString serviceName_; }; class GPEventExifInfo : public GPEvent { public: - GPEventExifInfo(const QString& folder, const QString& itemName, char *data, int size) + GPEventExifInfo(const TQString& folder, const TQString& itemName, char *data, int size) : GPEvent(ExifInfo), folder_(folder), itemName_(itemName), @@ -196,26 +196,26 @@ public: size_(size) {} - QString folder() const { return folder_; } - QString itemName() const { return itemName_; } + TQString folder() const { return folder_; } + TQString itemName() const { return itemName_; } char* data() { return data_; } int size() const { return size_; } private: - QString folder_; - QString itemName_; + TQString folder_; + TQString itemName_; char *data_; int size_; }; class GPEventStatusMsg : public GPEvent { public: - GPEventStatusMsg(const QString& msg) : GPEvent(StatusMsg), msg_(msg) + GPEventStatusMsg(const TQString& msg) : GPEvent(StatusMsg), msg_(msg) {} - QString msg() const { return msg_; } + TQString msg() const { return msg_; } private: - QString msg_; + TQString msg_; }; class GPEventProgress : public GPEvent { diff --git a/kipi-plugins/kameraklient/gpfileitemcontainer.cpp b/kipi-plugins/kameraklient/gpfileitemcontainer.cpp index 689b511..18c354c 100644 --- a/kipi-plugins/kameraklient/gpfileitemcontainer.cpp +++ b/kipi-plugins/kameraklient/gpfileitemcontainer.cpp @@ -19,8 +19,8 @@ * * ============================================================ */ -// Qt -#include <qstring.h> +// TQt +#include <tqstring.h> // KDE #include <kdebug.h> // Local @@ -33,23 +33,23 @@ namespace KIPIKameraKlientPlugin { -GPFileItemContainer::GPFileItemContainer(QObject *parent, CameraFolderView *folderView, CameraIconView *iconView) : QObject(parent) { +GPFileItemContainer::GPFileItemContainer(TQObject *tqparent, CameraFolderView *folderView, CameraIconView *iconView) : TQObject(tqparent) { folderView_ = folderView; iconView_ = iconView; folderDict_.setAutoDelete(true); - connect(folderView_, SIGNAL(signalCleared()), this, SLOT(slotFolderViewCleared())); - connect(iconView_, SIGNAL(signalCleared()), this, SLOT(slotIconViewCleared())); + connect(folderView_, TQT_SIGNAL(signalCleared()), this, TQT_SLOT(slotFolderViewCleared())); + connect(iconView_, TQT_SIGNAL(signalCleared()), this, TQT_SLOT(slotIconViewCleared())); } GPFileItemContainer::~GPFileItemContainer() { } -void GPFileItemContainer::addVirtualFolder(const QString& title) { +void GPFileItemContainer::addVirtualFolder(const TQString& title) { folderView_->addVirtualFolder(title); } -void GPFileItemContainer::addRootFolder(const QString& folder) { +void GPFileItemContainer::addRootFolder(const TQString& folder) { folderView_->addRootFolder(folder); GPFolder *item = new GPFolder; item->viewItem = folderView_->rootFolder(); @@ -57,14 +57,14 @@ void GPFileItemContainer::addRootFolder(const QString& folder) { folderDict_.insert(folder, item); } -void GPFileItemContainer::addFolder(const QString& folder, const QString& subfolder) { - QString path(folder); +void GPFileItemContainer::addFolder(const TQString& folder, const TQString& subfolder) { + TQString path(folder); if (!path.endsWith("/")) { path += "/"; } path += subfolder; kdDebug() << "GPFileItemContainer: Adding folder " << path << endl; - if (!folderDict_.find(path)) { + if (!folderDict_.tqfind(path)) { GPFolder *item = new GPFolder; folderDict_.insert(path, item); item->viewItem = folderView_->addFolder(folder, subfolder); @@ -74,8 +74,8 @@ void GPFileItemContainer::addFolder(const QString& folder, const QString& subfol } } -void GPFileItemContainer::addFiles(const QString& folder, const GPFileItemInfoList& infoList) { - GPFolder *folderItem = folderDict_.find(folder); +void GPFileItemContainer::addFiles(const TQString& folder, const GPFileItemInfoList& infoList) { + GPFolder *folderItem = folderDict_.tqfind(folder); if (!folderItem) { kdWarning() << "GPFileItemContainer: " << "Couldn't find Folder in Dict: " << folder << endl; return; @@ -83,7 +83,7 @@ void GPFileItemContainer::addFiles(const QString& folder, const GPFileItemInfoLi GPFileDict* fileDict = folderItem->fileDict; GPFileItemInfoList::const_iterator it; for (it = infoList.begin(); it != infoList.end(); ++it) { - GPFileItemInfo *fileInfo = fileDict->find((*it).name); + GPFileItemInfo *fileInfo = fileDict->tqfind((*it).name); if (!fileInfo) { // Hmm... Totally New file fileInfo = new GPFileItemInfo((*it)); @@ -113,13 +113,13 @@ void GPFileItemContainer::addFiles(const GPFileItemInfoList& infoList) { for (it = infoList.begin(); it != infoList.end(); ++it) { GPFileItemInfo info(*it); - GPFolder *folderItem = folderDict_.find(info.folder); + GPFolder *folderItem = folderDict_.tqfind(info.folder); if (!folderItem) { kdWarning() << "GPFileItemContainer: " << "Couldn't find Folder in Dict: " << info.folder << endl; continue; } GPFileDict* fileDict = folderItem->fileDict; - GPFileItemInfo *fileInfo = fileDict->find((*it).name); + GPFileItemInfo *fileInfo = fileDict->tqfind((*it).name); if (!fileInfo) { // Hmm... Totally New file fileInfo = new GPFileItemInfo(info); @@ -138,14 +138,14 @@ void GPFileItemContainer::addFiles(const GPFileItemInfoList& infoList) { } } -void GPFileItemContainer::addFile(const QString& folder, const GPFileItemInfo& info) { - GPFolder *folderItem = folderDict_.find(folder); +void GPFileItemContainer::addFile(const TQString& folder, const GPFileItemInfo& info) { + GPFolder *folderItem = folderDict_.tqfind(folder); if (!folderItem) { kdWarning() << "GPFileItemContainer: " << "Couldn't find Folder in Dict: " << folder << endl; return; } GPFileDict* fileDict = folderItem->fileDict; - GPFileItemInfo *fileInfo = fileDict->find(info.name); + GPFileItemInfo *fileInfo = fileDict->tqfind(info.name); if (!fileInfo) { // Hmm... Totally New file fileInfo = new GPFileItemInfo(info); @@ -165,14 +165,14 @@ void GPFileItemContainer::addFile(const QString& folder, const GPFileItemInfo& i } } -void GPFileItemContainer::delFile(const QString& folder, const QString& name) { - GPFolder *folderItem = folderDict_.find(folder); +void GPFileItemContainer::delFile(const TQString& folder, const TQString& name) { + GPFolder *folderItem = folderDict_.tqfind(folder); if (!folderItem) { kdWarning() << "GPFileItemContainer: " << "Couldn't find Folder in Dict: " << folder << endl; return; } GPFileDict* fileDict = folderItem->fileDict; - GPFileItemInfo* fileInfo = fileDict->find(name); + GPFileItemInfo* fileInfo = fileDict->tqfind(name); if (!fileInfo) { kdWarning() << "GPFileItemContainer: " << "Couldn't File Item to Delete in Dict: " << name << endl; return; @@ -192,14 +192,14 @@ void GPFileItemContainer::delFile(const QString& folder, const QString& name) { } } -CameraIconItem* GPFileItemContainer::findItem(const QString& folder, const QString& name) { - GPFolder *folderItem = folderDict_.find(folder); +CameraIconItem* GPFileItemContainer::findItem(const TQString& folder, const TQString& name) { + GPFolder *folderItem = folderDict_.tqfind(folder); if (!folderItem) { kdWarning() << "GPFileItemContainer: " << "Couldn't find Folder in Dict: " << folder << endl; return 0; } GPFileDict* fileDict = folderItem->fileDict; - GPFileItemInfo* fileInfo = fileDict->find(name); + GPFileItemInfo* fileInfo = fileDict->tqfind(name); if (!fileInfo) { kdWarning() << "GPFileItemContainer: " << "Couldn't File Item to Delete in Dict: " << name << endl; return 0; @@ -207,8 +207,8 @@ CameraIconItem* GPFileItemContainer::findItem(const QString& folder, const QStri return (CameraIconItem*) fileInfo->viewItem; } -QPtrList<GPFileItemInfo> GPFileItemContainer::allFiles() { - QPtrList<GPFileItemInfo> ptrList; +TQPtrList<GPFileItemInfo> GPFileItemContainer::allFiles() { + TQPtrList<GPFileItemInfo> ptrList; GPFolderDictIterator it(folderDict_); for (; it.current(); ++it) { GPFolder* folderItem = it.current(); diff --git a/kipi-plugins/kameraklient/gpfileitemcontainer.h b/kipi-plugins/kameraklient/gpfileitemcontainer.h index da64199..8c84301 100644 --- a/kipi-plugins/kameraklient/gpfileitemcontainer.h +++ b/kipi-plugins/kameraklient/gpfileitemcontainer.h @@ -22,14 +22,14 @@ #ifndef GPFILEITEMCONTAINER_H #define GPFILEITEMCONTAINER_H -#include <qobject.h> -#include <qdict.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqdict.h> +#include <tqptrlist.h> #include "gpfileiteminfo.h" -class QString; +class TQString; namespace KIPIKameraKlientPlugin { @@ -39,30 +39,31 @@ class CameraFolderView; class CameraIconView; class CameraIconItem; -class GPFileItemContainer : public QObject { +class GPFileItemContainer : public TQObject { Q_OBJECT + TQ_OBJECT public: - GPFileItemContainer(QObject *parent, CameraFolderView *folderView, CameraIconView *iconView); + GPFileItemContainer(TQObject *tqparent, CameraFolderView *folderView, CameraIconView *iconView); ~GPFileItemContainer(); - void addVirtualFolder(const QString& title); - void addRootFolder(const QString& folder); - void addFolder(const QString& folder, const QString& subfolder); + void addVirtualFolder(const TQString& title); + void addRootFolder(const TQString& folder); + void addFolder(const TQString& folder, const TQString& subfolder); - void addFiles(const QString& folder, const GPFileItemInfoList& infoList); + void addFiles(const TQString& folder, const GPFileItemInfoList& infoList); void addFiles(const GPFileItemInfoList& infoList); - void addFile(const QString& folder, const GPFileItemInfo& info); + void addFile(const TQString& folder, const GPFileItemInfo& info); - void delFile(const QString& folder, const QString& name); + void delFile(const TQString& folder, const TQString& name); - CameraIconItem* findItem(const QString& folder, const QString& name); + CameraIconItem* findItem(const TQString& folder, const TQString& name); - QPtrList<GPFileItemInfo> allFiles(); + TQPtrList<GPFileItemInfo> allFiles(); private: - typedef QDict<GPFileItemInfo> GPFileDict; - typedef QDictIterator<GPFileItemInfo> GPFileDictIterator; + typedef TQDict<GPFileItemInfo> GPFileDict; + typedef TQDictIterator<GPFileItemInfo> GPFileDictIterator; class GPFolder { public: @@ -81,8 +82,8 @@ private: CameraFolderItem *viewItem; }; - typedef QDict<GPFolder> GPFolderDict; - typedef QDictIterator<GPFolder> GPFolderDictIterator; + typedef TQDict<GPFolder> GPFolderDict; + typedef TQDictIterator<GPFolder> GPFolderDictIterator; GPFolderDict folderDict_; CameraFolderView *folderView_; diff --git a/kipi-plugins/kameraklient/gpfileiteminfo.h b/kipi-plugins/kameraklient/gpfileiteminfo.h index d9ce95f..9d3af9a 100644 --- a/kipi-plugins/kameraklient/gpfileiteminfo.h +++ b/kipi-plugins/kameraklient/gpfileiteminfo.h @@ -22,8 +22,8 @@ #ifndef GPFILEITEMINFO_H #define GPFILEITEMINFO_H -#include <qstring.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqvaluelist.h> namespace KIPIKameraKlientPlugin { @@ -37,13 +37,13 @@ public: GPFileItemInfo(const GPFileItemInfo& info); GPFileItemInfo& operator=(const GPFileItemInfo& info); // --------------------------------------------------------- - QString name; - QString folder; + TQString name; + TQString folder; // --------------------------------------------------------- bool fileInfoAvailable; - QString mime; - QString time; + TQString mime; + TQString time; int size; int width; int height; @@ -53,7 +53,7 @@ public: // --------------------------------------------------------- bool previewInfoAvailable; - QString previewMime; + TQString previewMime; int previewSize; int previewWidth; int previewHeight; @@ -61,7 +61,7 @@ public: // --------------------------------------------------------- bool audioInfoAvailable; - QString audioMime; + TQString audioMime; int audioSize; int audioDownloaded; // --------------------------------------------------------- @@ -69,7 +69,7 @@ public: }; // Container for GPFileItemInfo -typedef QValueList<GPFileItemInfo> GPFileItemInfoList; +typedef TQValueList<GPFileItemInfo> GPFileItemInfoList; } // NameSpace KIPIKameraKlientPlugin diff --git a/kipi-plugins/kameraklient/gpfileiteminfodlg.cpp b/kipi-plugins/kameraklient/gpfileiteminfodlg.cpp index 63976ca..a97c7db 100644 --- a/kipi-plugins/kameraklient/gpfileiteminfodlg.cpp +++ b/kipi-plugins/kameraklient/gpfileiteminfodlg.cpp @@ -22,10 +22,10 @@ * * ============================================================ */ -#include <qpixmap.h> -#include <qstring.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqpixmap.h> +#include <tqstring.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kiconloader.h> #include <klocale.h> @@ -38,28 +38,28 @@ namespace KIPIKameraKlientPlugin { GPFileItemInfoDlg::GPFileItemInfoDlg(const GPFileItemInfo& info, - QPixmap *pixmap ) + TQPixmap *pixmap ) : KDialogBase(0L, "GPFileItemInfoDlg", true, info.name, Ok, Ok, true) { - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget( page ); - QGridLayout *grid = new QGridLayout( page, 1, 1, 5, 5); + TQGridLayout *grid = new TQGridLayout( page, 1, 1, 5, 5); // ----------------------------------------------------- - QLabel *thumbLabel = new QLabel( page ); - thumbLabel->setFrameShape(QFrame::Box); + TQLabel *thumbLabel = new TQLabel( page ); + thumbLabel->setFrameShape(TQFrame::Box); thumbLabel->setMargin(2); - thumbLabel->setPaletteBackgroundColor(colorGroup().base()); + thumbLabel->setPaletteBackgroundColor(tqcolorGroup().base()); if (!pixmap) { - if (info.mime.contains("image")) + if (info.mime.tqcontains("image")) thumbLabel->setPixmap(DesktopIcon("image")); - else if (info.mime.contains("audio")) + else if (info.mime.tqcontains("audio")) thumbLabel->setPixmap(DesktopIcon("audio")); - else if (info.mime.contains("video")) + else if (info.mime.tqcontains("video")) thumbLabel->setPixmap(DesktopIcon("video")); else thumbLabel->setPixmap(DesktopIcon("document")); @@ -71,7 +71,7 @@ GPFileItemInfoDlg::GPFileItemInfoDlg(const GPFileItemInfo& info, // ---------------------------------------------------- - QLabel *nameLabel = new QLabel( page ); + TQLabel *nameLabel = new TQLabel( page ); nameLabel->setText(info.name); grid->addWidget( nameLabel, 0, 2); @@ -83,43 +83,43 @@ GPFileItemInfoDlg::GPFileItemInfoDlg(const GPFileItemInfo& info, // ---------------------------------------------------- - QLabel *l = 0; + TQLabel *l = 0; int currRow = 2; - QString value; + TQString value; - l = new QLabel(i18n("MimeType:"), page); + l = new TQLabel(i18n("MimeType:"), page); grid->addWidget(l, currRow, 0); value = info.mime.isNull() ? i18n("Unknown") : info.mime; - l = new QLabel(value, page); + l = new TQLabel(value, page); grid->addWidget(l, currRow++, 2); - l = new QLabel(i18n("Date:"), page); + l = new TQLabel(i18n("Date:"), page); grid->addWidget(l, currRow, 0); value = info.time.isNull() ? i18n("Unknown") : info.time; - l = new QLabel(value, page); + l = new TQLabel(value, page); grid->addWidget(l, currRow++, 2); - l = new QLabel(i18n("Size:"), page); + l = new TQLabel(i18n("Size:"), page); grid->addWidget(l, currRow, 0); - value = info.size <= 0 ? i18n("Unknown") : QString::number(info.size); + value = info.size <= 0 ? i18n("Unknown") : TQString::number(info.size); value += i18n( " bytes" ); - l = new QLabel(value, page); + l = new TQLabel(value, page); grid->addWidget(l, currRow++, 2); - l = new QLabel(i18n("Width:"), page); + l = new TQLabel(i18n("Width:"), page); grid->addWidget(l, currRow, 0); - value = info.width <= 0 ? i18n("Unknown") : QString::number(info.width); - l = new QLabel(value, page); + value = info.width <= 0 ? i18n("Unknown") : TQString::number(info.width); + l = new TQLabel(value, page); grid->addWidget(l, currRow++, 2); - l = new QLabel(i18n("Height:"), page); + l = new TQLabel(i18n("Height:"), page); grid->addWidget(l, currRow, 0); - value = info.height <= 0 ? i18n("Unknown") : QString::number(info.height); - l = new QLabel(value, page); + value = info.height <= 0 ? i18n("Unknown") : TQString::number(info.height); + l = new TQLabel(value, page); grid->addWidget(l, currRow++, 2); - l = new QLabel(i18n("Read permissions:"), page); + l = new TQLabel(i18n("Read permissions:"), page); grid->addWidget(l, currRow, 0); if (info.readPermissions == 0) value = i18n("No"); @@ -127,10 +127,10 @@ GPFileItemInfoDlg::GPFileItemInfoDlg(const GPFileItemInfo& info, value = i18n("Yes"); else value = i18n("Unknown"); - l = new QLabel(value, page); + l = new TQLabel(value, page); grid->addWidget(l, currRow++, 2); - l = new QLabel(i18n("Write permissions:"), page); + l = new TQLabel(i18n("Write permissions:"), page); grid->addWidget(l, currRow, 0); if (info.writePermissions == 0) value = i18n("No"); @@ -138,10 +138,10 @@ GPFileItemInfoDlg::GPFileItemInfoDlg(const GPFileItemInfo& info, value = i18n("Yes"); else value = i18n("Unknown"); - l = new QLabel(value, page); + l = new TQLabel(value, page); grid->addWidget(l, currRow++, 2); - l = new QLabel(i18n("Downloaded:"), page); + l = new TQLabel(i18n("Downloaded:"), page); grid->addWidget(l, currRow, 0); if (info.downloaded == 0) value = i18n("No"); @@ -149,7 +149,7 @@ GPFileItemInfoDlg::GPFileItemInfoDlg(const GPFileItemInfo& info, value = i18n("Yes"); else value = i18n("Unknown"); - l = new QLabel(value, page); + l = new TQLabel(value, page); grid->addWidget(l, currRow++, 2); diff --git a/kipi-plugins/kameraklient/gpfileiteminfodlg.h b/kipi-plugins/kameraklient/gpfileiteminfodlg.h index 00433df..7e85344 100644 --- a/kipi-plugins/kameraklient/gpfileiteminfodlg.h +++ b/kipi-plugins/kameraklient/gpfileiteminfodlg.h @@ -24,7 +24,7 @@ #include <kdialogbase.h> -class QPixmap; +class TQPixmap; namespace KIPIKameraKlientPlugin { @@ -36,7 +36,7 @@ class GPFileItemInfoDlg : public KDialogBase public: GPFileItemInfoDlg(const GPFileItemInfo& info, - QPixmap *pixmap=0); + TQPixmap *pixmap=0); ~GPFileItemInfoDlg(); }; diff --git a/kipi-plugins/kameraklient/gpiface.cpp b/kipi-plugins/kameraklient/gpiface.cpp index 9c92b64..37fd72d 100644 --- a/kipi-plugins/kameraklient/gpiface.cpp +++ b/kipi-plugins/kameraklient/gpiface.cpp @@ -26,9 +26,9 @@ extern "C" #include <gphoto2.h> } -// Qt -#include <qstring.h> -#include <qstringlist.h> +// TQt +#include <tqstring.h> +#include <tqstringlist.h> // Local #include "gpiface.h" @@ -36,7 +36,7 @@ extern "C" namespace KIPIKameraKlientPlugin { -int GPIface::autoDetect(QString& model, QString& port) { +int GPIface::autoDetect(TQString& model, TQString& port) { CameraList *pCamList; CameraAbilitiesList *abilList; GPPortInfoList *infoList; @@ -75,7 +75,7 @@ int GPIface::autoDetect(QString& model, QString& port) { return 0; } -void GPIface::getSupportedCameras(int& count, QStringList& clist) { +void GPIface::getSupportedCameras(int& count, TQStringList& clist) { clist.clear(); count = 0; @@ -98,14 +98,14 @@ void GPIface::getSupportedCameras(int& count, QStringList& clist) { const char *cname; gp_abilities_list_get_abilities( abilList, i, &abil ); cname = abil.model; - clist.append( QString( cname ) ); + clist.append( TQString( cname ) ); } } gp_abilities_list_free( abilList ); gp_context_unref( context ); } -void GPIface::getSupportedPorts(QStringList& plist) { +void GPIface::getSupportedPorts(TQStringList& plist) { GPPortInfoList *list; GPPortInfo info; plist.clear(); @@ -119,7 +119,7 @@ void GPIface::getSupportedPorts(QStringList& plist) { gp_port_info_list_free( list ); } -void GPIface::getCameraSupportedPorts(const QString& model, QStringList& plist) { +void GPIface::getCameraSupportedPorts(const TQString& model, TQStringList& plist) { int i = 0; plist.clear(); CameraAbilities abilities; diff --git a/kipi-plugins/kameraklient/gpiface.h b/kipi-plugins/kameraklient/gpiface.h index 4b13f24..e7f11f1 100644 --- a/kipi-plugins/kameraklient/gpiface.h +++ b/kipi-plugins/kameraklient/gpiface.h @@ -22,8 +22,8 @@ #ifndef GPIFACE_H #define GPIFACE_H -class QString; -class QStringList; +class TQString; +class TQStringList; namespace KIPIKameraKlientPlugin { @@ -31,10 +31,10 @@ namespace KIPIKameraKlientPlugin class GPIface { public: - static int autoDetect(QString& model, QString& port); - static void getSupportedCameras(int& count, QStringList& clist); - static void getSupportedPorts(QStringList& plist); - static void getCameraSupportedPorts(const QString& model, QStringList& plist); + static int autoDetect(TQString& model, TQString& port); + static void getSupportedCameras(int& count, TQStringList& clist); + static void getSupportedPorts(TQStringList& plist); + static void getCameraSupportedPorts(const TQString& model, TQStringList& plist); }; } // NameSpace KIPIKameraKlientPlugin diff --git a/kipi-plugins/kameraklient/gpmessages.h b/kipi-plugins/kameraklient/gpmessages.h index 063c3aa..b255df1 100644 --- a/kipi-plugins/kameraklient/gpmessages.h +++ b/kipi-plugins/kameraklient/gpmessages.h @@ -18,16 +18,17 @@ #ifndef GPMESSAGES_H #define GPMESSAGES_H -#include <qobject.h> +#include <tqobject.h> namespace KIPIKameraKlientPlugin { -class GPMessages : public QObject { +class GPMessages : public TQObject { Q_OBJECT + TQ_OBJECT - friend class GPStatus; + friend class GPtqStatus; public: @@ -36,13 +37,13 @@ public: signals: - void errorMessage(const QString&); - void statusChanged(const QString&); + void errorMessage(const TQString&); + void statusChanged(const TQString&); void progressChanged(int); private: - GPMessages() : QObject() { }; + GPMessages() : TQObject() { }; static GPMessages* gpMessages; }; diff --git a/kipi-plugins/kameraklient/gpstatus.cpp b/kipi-plugins/kameraklient/gpstatus.cpp index b5ea875..a54ca82 100644 --- a/kipi-plugins/kameraklient/gpstatus.cpp +++ b/kipi-plugins/kameraklient/gpstatus.cpp @@ -26,10 +26,10 @@ namespace KIPIKameraKlientPlugin { -float GPStatus::target = 0.0; -bool GPStatus::cancel = false; +float GPtqStatus::target = 0.0; +bool GPtqStatus::cancel = false; -GPStatus::GPStatus() : QObject() { +GPtqStatus::GPtqStatus() : TQObject() { context = gp_context_new(); cancel = false; gp_context_set_cancel_func(context, cancel_func, 0); @@ -38,63 +38,63 @@ GPStatus::GPStatus() : QObject() { gp_context_set_progress_funcs(context, progress_start_func, progress_update_func, progress_stop_func, 0); } -GPStatus::~GPStatus() { +GPtqStatus::~GPtqStatus() { if(context) { gp_context_unref(context); } } -void GPStatus::cancelOperation() { +void GPtqStatus::cancelOperation() { cancel = true; } -GPContextFeedback GPStatus::cancel_func(GPContext *, void *) { +GPContextFeedback GPtqStatus::cancel_func(GPContext *, void *) { return (cancel ? GP_CONTEXT_FEEDBACK_CANCEL : GP_CONTEXT_FEEDBACK_OK); } -void GPStatus::error_func(GPContext *, const char *format, va_list args, void *) { +void GPtqStatus::error_func(GPContext *, const char *format, va_list args, void *) { char buf[4096] = ""; int nSize = vsnprintf( buf, 4096, format, args ); if(nSize > 4094) { nSize = 4094; } buf[nSize] = '\0'; - QString error; + TQString error; error = error.fromLocal8Bit(buf); GPMessages::gpMessagesWrapper()->emit errorMessage(error); } -void GPStatus::status_func (GPContext *, const char *format, va_list args, void *) { +void GPtqStatus::status_func (GPContext *, const char *format, va_list args, void *) { char buf[4096] = ""; int nSize = vsnprintf( buf, 4096, format, args ); if(nSize > 4094) { nSize = 4094; } buf[nSize] = '\0'; - QString status; + TQString status; status = status.fromLocal8Bit(buf); GPMessages::gpMessagesWrapper()->emit statusChanged(status); } -unsigned int GPStatus::progress_start_func(GPContext *, float _target, const char *format, va_list args, void *) { +unsigned int GPtqStatus::progress_start_func(GPContext *, float _target, const char *format, va_list args, void *) { char buf[4096] = ""; int nSize = vsnprintf( buf, 4096, format, args ); if(nSize > 4094) { nSize = 4094; } buf[nSize] = '\0'; - QString prog; + TQString prog; prog = prog.fromLocal8Bit(buf); target = _target; return GP_OK; } -void GPStatus::progress_update_func(GPContext *, unsigned int, float current, void *) { +void GPtqStatus::progress_update_func(GPContext *, unsigned int, float current, void *) { int percentage = int(100.0 * current/target); GPMessages::gpMessagesWrapper()->emit progressChanged(percentage); } -void GPStatus::progress_stop_func(GPContext *, unsigned int, void *) { +void GPtqStatus::progress_stop_func(GPContext *, unsigned int, void *) { GPMessages::gpMessagesWrapper()->emit progressChanged(0); } diff --git a/kipi-plugins/kameraklient/gpstatus.h b/kipi-plugins/kameraklient/gpstatus.h index ca30917..1dccb13 100644 --- a/kipi-plugins/kameraklient/gpstatus.h +++ b/kipi-plugins/kameraklient/gpstatus.h @@ -22,8 +22,8 @@ #ifndef GPSTATUS_H #define GPSTATUS_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> extern "C" { #include <stdio.h> @@ -33,13 +33,14 @@ extern "C" { namespace KIPIKameraKlientPlugin { -class GPStatus : public QObject { +class GPtqStatus : public TQObject { Q_OBJECT + TQ_OBJECT friend class GPCamera; public: - GPStatus(); - ~GPStatus(); + GPtqStatus(); + ~GPtqStatus(); void cancelOperation(); private: diff --git a/kipi-plugins/kameraklient/kameraklient.cpp b/kipi-plugins/kameraklient/kameraklient.cpp index a0ba5e6..f62216b 100644 --- a/kipi-plugins/kameraklient/kameraklient.cpp +++ b/kipi-plugins/kameraklient/kameraklient.cpp @@ -19,9 +19,9 @@ * * ============================================================ */ -// Qt -#include <qiconset.h> -#include <qwidget.h> +// TQt +#include <tqiconset.h> +#include <tqwidget.h> // KDE #include <kaboutdata.h> #include <kaction.h> @@ -39,21 +39,21 @@ typedef KGenericFactory<Plugin_KameraKlient> Factory; K_EXPORT_COMPONENT_FACTORY(kipiplugin_kameraklient, Factory("kipiplugin_kameraklient")) -Plugin_KameraKlient::Plugin_KameraKlient(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin(Factory::instance(), parent, "KameraKlient") { +Plugin_KameraKlient::Plugin_KameraKlient(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin(Factory::instance(), tqparent, "KameraKlient") { kdDebug() << "KameraKlient KIPI Plugin loaded" << endl; } Plugin_KameraKlient::~Plugin_KameraKlient() { } -void Plugin_KameraKlient::setup(QWidget* widget) { +void Plugin_KameraKlient::setup(TQWidget* widget) { KIPI::Plugin::setup(widget); mKameraKlientAction = new KAction(i18n("Digital Camera"), "camera_unmount", KShortcut(), this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "kipiplugin_kameraklient"); addAction(mKameraKlientAction); diff --git a/kipi-plugins/kameraklient/kameraklient.h b/kipi-plugins/kameraklient/kameraklient.h index 3f726cf..0bc2cb2 100644 --- a/kipi-plugins/kameraklient/kameraklient.h +++ b/kipi-plugins/kameraklient/kameraklient.h @@ -32,14 +32,15 @@ class CameraType; class Plugin_KameraKlient : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_KameraKlient(QObject *parent, const char* name, const QStringList& args); + Plugin_KameraKlient(TQObject *tqparent, const char* name, const TQStringList& args); ~Plugin_KameraKlient(); - virtual void setup(QWidget* widget); + virtual void setup(TQWidget* widget); virtual KIPI::Category category(KAction*) const; - QString id() const { - return QString::fromLatin1("kameraklient"); + TQString id() const { + return TQString::tqfromLatin1("kameraklient"); } KAction* mKameraKlientAction; diff --git a/kipi-plugins/kameraklient/mtlist.h b/kipi-plugins/kameraklient/mtlist.h index ae1dad8..ae75581 100644 --- a/kipi-plugins/kameraklient/mtlist.h +++ b/kipi-plugins/kameraklient/mtlist.h @@ -19,8 +19,8 @@ #define LISTMT_H -#include <qvaluelist.h> -#include <qmutex.h> +#include <tqvaluelist.h> +#include <tqmutex.h> namespace KIPIKameraKlientPlugin { @@ -28,7 +28,7 @@ namespace KIPIKameraKlientPlugin template<class Type> class MTList { public: - typedef typename QValueList<Type>::const_iterator const_iterator_type; + typedef typename TQValueList<Type>::const_iterator const_iterator_type; MTList() { } @@ -53,7 +53,7 @@ public: } - MTList(const QValueList<Type>& origList) { + MTList(const TQValueList<Type>& origList) { mutex_.lock(); list_.clear(); const_iterator_type iter; @@ -193,8 +193,8 @@ public: private: - QValueList<Type> list_; - QMutex mutex_; + TQValueList<Type> list_; + TQMutex mutex_; }; diff --git a/kipi-plugins/kameraklient/mtqueue.h b/kipi-plugins/kameraklient/mtqueue.h index 490f805..9311b0e 100644 --- a/kipi-plugins/kameraklient/mtqueue.h +++ b/kipi-plugins/kameraklient/mtqueue.h @@ -14,11 +14,11 @@ * GNU General Public License for more details. * * ============================================================ */ -#ifndef COMMAND_QUEUE_H -#define COMMAND_QUEUE_H +#ifndef COMMAND_TQUEUE_H +#define COMMAND_TQUEUE_H -#include <qptrqueue.h> -#include <qmutex.h> +#include <tqptrqueue.h> +#include <tqmutex.h> namespace KIPIKameraKlientPlugin { @@ -70,8 +70,8 @@ public: private: - QPtrQueue<Type> queue_; - QMutex mutex_; + TQPtrQueue<Type> queue_; + TQMutex mutex_; }; diff --git a/kipi-plugins/kameraklient/savefiledialog.cpp b/kipi-plugins/kameraklient/savefiledialog.cpp index d31cb27..e5f2109 100644 --- a/kipi-plugins/kameraklient/savefiledialog.cpp +++ b/kipi-plugins/kameraklient/savefiledialog.cpp @@ -14,13 +14,13 @@ * GNU General Public License for more details. * * ============================================================ */ -// Qt -#include <qstring.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlayout.h> +// TQt +#include <tqstring.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlayout.h> // KDE #include <klocale.h> #include <kbuttonbox.h> @@ -31,27 +31,27 @@ namespace KIPIKameraKlientPlugin { -SavefileDialog::SavefileDialog(const QString& file, QWidget *parent, const char* name, bool modal) : QDialog(parent, name, modal) { - QFileInfo fileInfo(file); +SavefileDialog::SavefileDialog(const TQString& file, TQWidget *tqparent, const char* name, bool modal) : TQDialog(tqparent, name, modal) { + TQFileInfo fileInfo(file); setCaption(i18n("File Already Exists")); - QLabel *descLbl = new QLabel(i18n("The file '%1' already exists!").arg(fileInfo.absFilePath()), this); - renameEdit = new QLineEdit(this); + TQLabel *descLbl = new TQLabel(i18n("The file '%1' already exists!").tqarg(fileInfo.absFilePath()), this); + renameEdit = new TQLineEdit(this); renameEdit->setText(fileInfo.fileName()); - connect(renameEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slot_renameEnabled())); + connect(renameEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slot_renameEnabled())); KButtonBox *bbox = new KButtonBox(this); - renameBtn = bbox->addButton(i18n("Rename"), this, SLOT(slot_rename()), true); + renameBtn = bbox->addButton(i18n("Rename"), TQT_TQOBJECT(this), TQT_SLOT(slot_rename()), true); renameBtn->setEnabled(false); - bbox->addButton(i18n("Skip"), this, SLOT(slot_skip()), false); - bbox->addButton(i18n("Skip All"), this, SLOT(slot_skipAll()), true); - bbox->addButton(i18n("Overwrite"), this, SLOT(slot_overwrite()), true); - bbox->addButton(i18n("Overwrite All"), this, SLOT(slot_overwriteAll()), true); - QPushButton *cancelBtn = bbox->addButton(i18n("&Cancel"), this, SLOT(reject()), true); + bbox->addButton(i18n("Skip"), TQT_TQOBJECT(this), TQT_SLOT(slot_skip()), false); + bbox->addButton(i18n("Skip All"), TQT_TQOBJECT(this), TQT_SLOT(slot_skipAll()), true); + bbox->addButton(i18n("Overwrite"), TQT_TQOBJECT(this), TQT_SLOT(slot_overwrite()), true); + bbox->addButton(i18n("Overwrite All"), TQT_TQOBJECT(this), TQT_SLOT(slot_overwriteAll()), true); + TQPushButton *cancelBtn = bbox->addButton(i18n("&Cancel"), TQT_TQOBJECT(this), TQT_SLOT(reject()), true); cancelBtn->setDefault(true); - bbox->layout(); - QGridLayout *layout = new QGridLayout(this, 0, 0, 15); - layout->addMultiCellWidget(descLbl, 0, 0, 0, 3); - layout->addMultiCellWidget(renameEdit, 3, 3, 0, 3); - layout->addMultiCellWidget(bbox, 4, 4, 0, 3); + bbox->tqlayout(); + TQGridLayout *tqlayout = new TQGridLayout(this, 0, 0, 15); + tqlayout->addMultiCellWidget(descLbl, 0, 0, 0, 3); + tqlayout->addMultiCellWidget(renameEdit, 3, 3, 0, 3); + tqlayout->addMultiCellWidget(bbox, 4, 4, 0, 3); } SavefileDialog::~SavefileDialog() { @@ -61,7 +61,7 @@ SavefileDialog::Operation SavefileDialog::saveFileOperation() { return op; } -QString SavefileDialog::renameFile() { +TQString SavefileDialog::renameFile() { return renameEdit->text(); } diff --git a/kipi-plugins/kameraklient/savefiledialog.h b/kipi-plugins/kameraklient/savefiledialog.h index f3024a5..a1233e9 100644 --- a/kipi-plugins/kameraklient/savefiledialog.h +++ b/kipi-plugins/kameraklient/savefiledialog.h @@ -17,24 +17,25 @@ #ifndef SAVEFILEDIALOG_H #define SAVEFILEDIALOG_H -#include <qdialog.h> +#include <tqdialog.h> -class QString; -class QLineEdit; -class QPushButton; +class TQString; +class TQLineEdit; +class TQPushButton; namespace KIPIKameraKlientPlugin { -class SavefileDialog : public QDialog { +class SavefileDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: enum Operation { Rename, Skip, SkipAll, Overwrite, OverwriteAll, None }; - SavefileDialog(const QString& file, QWidget *parent=0, const char* name=0, bool modal=true); + SavefileDialog(const TQString& file, TQWidget *tqparent=0, const char* name=0, bool modal=true); ~SavefileDialog(); Operation saveFileOperation(); - QString renameFile(); + TQString renameFile(); private slots: void slot_rename() { @@ -55,8 +56,8 @@ private slots: void slot_renameEnabled(); private: - QLineEdit *renameEdit; - QPushButton *renameBtn; + TQLineEdit *renameEdit; + TQPushButton *renameBtn; Operation op; }; diff --git a/kipi-plugins/kameraklient/setupcamera.cpp b/kipi-plugins/kameraklient/setupcamera.cpp index 2920dad..c772e4a 100644 --- a/kipi-plugins/kameraklient/setupcamera.cpp +++ b/kipi-plugins/kameraklient/setupcamera.cpp @@ -19,15 +19,15 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qapplication.h> -#include <qgroupbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qframe.h> +#include <tqapplication.h> +#include <tqgroupbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqframe.h> // KDE includes. @@ -56,8 +56,8 @@ namespace KIPIKameraKlientPlugin { -SetupCamera::SetupCamera(QWidget* parent, const char* name) - : KDialogBase(parent, name, true, i18n("Setup Cameras"), +SetupCamera::SetupCamera(TQWidget* tqparent, const char* name) + : KDialogBase(tqparent, name, true, i18n("Setup Cameras"), Help|Ok|Cancel, Ok, true) { // About data and help button. @@ -78,66 +78,66 @@ SetupCamera::SetupCamera(QWidget* parent, const char* name) helpButton_ = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); helpButton_->setPopup( helpMenu->menu() ); - setWFlags(Qt::WDestructiveClose); - QWidget *page = new QWidget(this); + setWFlags(TQt::WDestructiveClose); + TQWidget *page = new TQWidget(this); setMainWidget(page); - QVBoxLayout* vbox = new QVBoxLayout(page, 5, 5); + TQVBoxLayout* vbox = new TQVBoxLayout(page, 5, 5); //--------------------------------------------- - QGroupBox* groupBox = new QGroupBox(page, "groupBox"); + TQGroupBox* groupBox = new TQGroupBox(page, "groupBox"); groupBox->setColumnLayout(0, Qt::Vertical); - groupBox->layout()->setSpacing(5); - groupBox->layout()->setMargin(5); + groupBox->tqlayout()->setSpacing(5); + groupBox->tqlayout()->setMargin(5); - QGridLayout* groupBoxLayout = new QGridLayout(groupBox->layout()); - groupBoxLayout->setAlignment( Qt::AlignTop ); - listView_ = new QListView( groupBox ); + TQGridLayout* groupBoxLayout = new TQGridLayout(groupBox->tqlayout()); + groupBoxLayout->tqsetAlignment( TQt::AlignTop ); + listView_ = new TQListView( groupBox ); listView_->addColumn(i18n("Model")); listView_->addColumn(i18n("Port")); listView_->setAllColumnsShowFocus(true); groupBoxLayout->addMultiCellWidget(listView_, 0, 4, 0, 0); - addButton_ = new QPushButton(groupBox); + addButton_ = new TQPushButton(groupBox); groupBoxLayout->addWidget(addButton_, 0, 1); - removeButton_ = new QPushButton(groupBox); + removeButton_ = new TQPushButton(groupBox); groupBoxLayout->addWidget(removeButton_, 1, 1); - editButton_ = new QPushButton( groupBox); + editButton_ = new TQPushButton( groupBox); groupBoxLayout->addWidget(editButton_, 2, 1); - autoDetectButton_ = new QPushButton(groupBox); + autoDetectButton_ = new TQPushButton(groupBox); groupBoxLayout->addWidget(autoDetectButton_, 3, 1); addButton_->setText( i18n("Add...")); removeButton_->setText( i18n( "Remove")); editButton_->setText( i18n("Edit...")); autoDetectButton_->setText(i18n("Auto-Detect")); - QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); + TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); groupBoxLayout->addItem(spacer, 4, 1); vbox->addWidget(groupBox); removeButton_->setEnabled(false); editButton_->setEnabled(false); - connect(listView_, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); - connect(addButton_, SIGNAL(clicked()), this, SLOT(slotAddCamera())); - connect(removeButton_, SIGNAL(clicked()), this, SLOT(slotRemoveCamera())); - connect(editButton_, SIGNAL(clicked()), this, SLOT(slotEditCamera())); - connect(autoDetectButton_, SIGNAL(clicked()), this, SLOT(slotAutoDetectCamera())); + connect(listView_, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); + connect(addButton_, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddCamera())); + connect(removeButton_, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveCamera())); + connect(editButton_, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditCamera())); + connect(autoDetectButton_, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAutoDetectCamera())); CameraList* clist = CameraList::instance(); if(clist) { - QPtrList<CameraType>* cl = clist->cameraList(); + TQPtrList<CameraType>* cl = clist->cameraList(); for (CameraType *ctype = cl->first(); ctype; ctype = cl->next()) { - new QListViewItem(listView_, ctype->model(), ctype->port()); + new TQListViewItem(listView_, ctype->model(), ctype->port()); } } - connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked())); + connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOkClicked())); show(); int W=SetupCamera::width (), H=SetupCamera::height(); - move(QApplication::desktop()->width ()/2-(W/2), QApplication::desktop()->height()/2-(H/2)); + move(TQApplication::desktop()->width ()/2-(W/2), TQApplication::desktop()->height()/2-(H/2)); } SetupCamera::~SetupCamera() { @@ -151,7 +151,7 @@ void SetupCamera::slotHelp() } void SetupCamera::slotSelectionChanged() { - QListViewItem *item = listView_->selectedItem(); + TQListViewItem *item = listView_->selectedItem(); if (!item) { removeButton_->setEnabled(false); editButton_->setEnabled(false); @@ -163,13 +163,13 @@ void SetupCamera::slotSelectionChanged() { void SetupCamera::slotAddCamera() { CameraSelection *select = new CameraSelection; - connect(select, SIGNAL(signalOkClicked(const QString&, const QString&)), - this, SLOT(slotAddedCamera(const QString&, const QString&))); + connect(select, TQT_SIGNAL(signalOkClicked(const TQString&, const TQString&)), + this, TQT_SLOT(slotAddedCamera(const TQString&, const TQString&))); select->show(); } void SetupCamera::slotRemoveCamera() { - QListViewItem *item = listView_->currentItem(); + TQListViewItem *item = listView_->currentItem(); if (!item) { return; } @@ -177,19 +177,19 @@ void SetupCamera::slotRemoveCamera() { } void SetupCamera::slotEditCamera() { - QListViewItem *item = listView_->currentItem(); + TQListViewItem *item = listView_->currentItem(); if (!item) { return; } CameraSelection *select = new CameraSelection; select->setCamera(item->text(0), item->text(1)); - connect(select, SIGNAL(signalOkClicked(const QString&, const QString&)), - this, SLOT(slotEditedCamera(const QString&, const QString&))); + connect(select, TQT_SIGNAL(signalOkClicked(const TQString&, const TQString&)), + this, TQT_SLOT(slotEditedCamera(const TQString&, const TQString&))); select->show(); } void SetupCamera::slotAutoDetectCamera() { - QString model, port; + TQString model, port; if (GPIface::autoDetect(model, port) != 0) { KMessageBox::error(this, i18n("Failed to auto-detect camera!\n" "Please retry or try setting manually.")); return; @@ -197,7 +197,7 @@ void SetupCamera::slotAutoDetectCamera() { bool found = false; CameraList* clist = CameraList::instance(); if (clist) { - if (clist->find(model)) { + if (clist->tqfind(model)) { found = true; } } @@ -205,16 +205,16 @@ void SetupCamera::slotAutoDetectCamera() { KMessageBox::information(this, i18n("Already added camera: ") + model + " (" + port + ")"); } else { KMessageBox::information(this, i18n("Found camera: ") + model + " (" + port + ")"); - new QListViewItem(listView_, model, port, "/"); + new TQListViewItem(listView_, model, port, "/"); } } -void SetupCamera::slotAddedCamera(const QString& model, const QString& port) { - new QListViewItem(listView_, model, port); +void SetupCamera::slotAddedCamera(const TQString& model, const TQString& port) { + new TQListViewItem(listView_, model, port); } -void SetupCamera::slotEditedCamera(const QString& model, const QString& port) { - QListViewItem *item = listView_->currentItem(); +void SetupCamera::slotEditedCamera(const TQString& model, const TQString& port) { + TQListViewItem *item = listView_->currentItem(); if (!item) { return; } @@ -226,9 +226,9 @@ void SetupCamera::applySettings() { CameraList* clist = CameraList::instance(); if(clist) { clist->clear(); - QListViewItemIterator it(listView_); + TQListViewItemIterator it(listView_); for( ; it.current(); ++it ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); CameraType *ctype = new CameraType(item->text(0), item->text(1)); clist->insert(ctype); } diff --git a/kipi-plugins/kameraklient/setupcamera.h b/kipi-plugins/kameraklient/setupcamera.h index ad7e265..a6a36e7 100644 --- a/kipi-plugins/kameraklient/setupcamera.h +++ b/kipi-plugins/kameraklient/setupcamera.h @@ -30,9 +30,9 @@ #include "kpaboutdata.h" -class QListView; -class QListViewItem; -class QPushButton; +class TQListView; +class TQListViewItem; +class TQPushButton; namespace KIPIKameraKlientPlugin { @@ -40,23 +40,24 @@ namespace KIPIKameraKlientPlugin class SetupCamera : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - SetupCamera(QWidget* parent = 0, const char* name = 0); + SetupCamera(TQWidget* tqparent = 0, const char* name = 0); ~SetupCamera(); void applySettings(); private: - QListView* listView_; + TQListView* listView_; - QPushButton* addButton_; - QPushButton* removeButton_; - QPushButton* editButton_; - QPushButton* autoDetectButton_; - QPushButton* helpButton_; + TQPushButton* addButton_; + TQPushButton* removeButton_; + TQPushButton* editButton_; + TQPushButton* autoDetectButton_; + TQPushButton* helpButton_; KIPIPlugins::KPAboutData* m_about; @@ -68,8 +69,8 @@ private slots: void slotRemoveCamera(); void slotEditCamera(); void slotAutoDetectCamera(); - void slotAddedCamera(const QString& model, const QString& port); - void slotEditedCamera(const QString& model, const QString& port); + void slotAddedCamera(const TQString& model, const TQString& port); + void slotEditedCamera(const TQString& model, const TQString& port); void slotOkClicked(); }; diff --git a/kipi-plugins/kameraklient/thumbitem.cpp b/kipi-plugins/kameraklient/thumbitem.cpp index bfa9fec..5809fc5 100644 --- a/kipi-plugins/kameraklient/thumbitem.cpp +++ b/kipi-plugins/kameraklient/thumbitem.cpp @@ -13,14 +13,14 @@ * GNU General Public License for more details. * * ============================================================ */ -// Qt -#include <qpixmap.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpalette.h> -#include <qpainter.h> -#include <qevent.h> -#include <qtextedit.h> +// TQt +#include <tqpixmap.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpalette.h> +#include <tqpainter.h> +#include <tqevent.h> +#include <tqtextedit.h> // Local #include "thumbview.h" #include "thumbitem.h" @@ -28,21 +28,21 @@ namespace KIPIKameraKlientPlugin { -class ThumbItemLineEdit : public QTextEdit { +class ThumbItemLineEdit : public TQTextEdit { public: - ThumbItemLineEdit(const QString& text, QWidget* parent, ThumbItem* item); + ThumbItemLineEdit(const TQString& text, TQWidget* tqparent, ThumbItem* item); private: - void keyPressEvent(QKeyEvent *e); - void focusOutEvent(QFocusEvent *e); + void keyPressEvent(TQKeyEvent *e); + void focusOutEvent(TQFocusEvent *e); ThumbItem *thumbItem; - QString startText; + TQString startText; }; -ThumbItemLineEdit::ThumbItemLineEdit(const QString& text, QWidget* parent, ThumbItem* item) - : QTextEdit(parent), thumbItem(item), startText(text) { - setFrameStyle(QFrame::Plain | QFrame::Box); +ThumbItemLineEdit::ThumbItemLineEdit(const TQString& text, TQWidget* tqparent, ThumbItem* item) + : TQTextEdit(tqparent), thumbItem(item), startText(text) { + setFrameStyle(TQFrame::Plain | TQFrame::Box); setLineWidth(1); setHScrollBarMode( AlwaysOff ); @@ -52,24 +52,24 @@ ThumbItemLineEdit::ThumbItemLineEdit(const QString& text, QWidget* parent, Thumb setWrapColumnOrWidth(item->pixmapRect().width()); resize(200, 200); setText(text); - setAlignment(Qt::AlignCenter); + tqsetAlignment(TQt::AlignCenter); resize(wrapColumnOrWidth() + 2, heightForWidth(wrapColumnOrWidth()) + 2); } -void ThumbItemLineEdit::keyPressEvent( QKeyEvent *e ) { +void ThumbItemLineEdit::keyPressEvent( TQKeyEvent *e ) { if ( e->key() == Key_Escape) { thumbItem->setText(startText); thumbItem->cancelRenameItem(); } else if ( e->key() == Key_Enter || e->key() == Key_Return ) { thumbItem->renameItem(); } else { - QTextEdit::keyPressEvent( e ); + TQTextEdit::keyPressEvent( e ); sync(); } } -void ThumbItemLineEdit::focusOutEvent( QFocusEvent *e ) { - if (e->reason() != QFocusEvent::Popup ) { +void ThumbItemLineEdit::focusOutEvent( TQFocusEvent *e ) { + if (e->reason() != TQFocusEvent::Popup ) { thumbItem->cancelRenameItem(); } } @@ -77,32 +77,32 @@ void ThumbItemLineEdit::focusOutEvent( QFocusEvent *e ) { class ThumbItemPrivate { public: - QString text; - QPixmap* pixmap; + TQString text; + TQPixmap* pixmap; - QRect rect; - QRect textRect; - QRect pixmapRect; + TQRect rect; + TQRect textRect; + TQRect pixmapRect; bool selected; - QString key; + TQString key; }; -ThumbItem::ThumbItem(ThumbView* parent, const QString& text, const QPixmap& pixmap) { - view = parent; +ThumbItem::ThumbItem(ThumbView* tqparent, const TQString& text, const TQPixmap& pixmap) { + view = tqparent; next = 0; prev = 0; renameBox = 0; d = new ThumbItemPrivate; d->text = text; - d->pixmap = new QPixmap(pixmap); + d->pixmap = new TQPixmap(pixmap); d->selected = false; d->key = d->text; // make sure to calcrect before inserting; this will calculate the size of the rect; inserting would move it to the required location - d->rect = QRect(0, 0, 0, 0); - d->textRect = QRect(0, 0, 0, 0); - d->pixmapRect = QRect(0, 0, 0, 0); + d->rect = TQRect(0, 0, 0, 0); + d->textRect = TQRect(0, 0, 0, 0); + d->pixmapRect = TQRect(0, 0, 0, 0); calcRect(); view->insertItem(this); @@ -115,9 +115,9 @@ ThumbItem::~ThumbItem() { } void ThumbItem::calcRect() { - QRect rect(d->rect); - QRect textRect(d->textRect); - QRect pixmapRect(d->pixmapRect); + TQRect rect(d->rect); + TQRect textRect(d->textRect); + TQRect pixmapRect(d->pixmapRect); // set initial pixrect int pw = d->pixmap->width(); int ph = d->pixmap->height(); @@ -125,26 +125,26 @@ void ThumbItem::calcRect() { pixmapRect.setWidth(pw); pixmapRect.setHeight(ph); // word wrap - QFontMetrics fm(view->font()); - QRect r = QRect(fm.boundingRect(0, 0, pixmapRect.width(), - 0xFFFFFFFF, Qt::AlignHCenter | - Qt::WordBreak | Qt::BreakAnywhere, + TQFontMetrics fm(view->font()); + TQRect r = TQRect(fm.boundingRect(0, 0, pixmapRect.width(), + 0xFFFFFFFF, TQt::AlignHCenter | + TQt::WordBreak | TQt::BreakAnywhere, d->text)); r.setWidth(r.width() + 4); textRect.setWidth(r.width()); textRect.setHeight(r.height()); // Now start updating the rects - int w = QMAX(textRect.width(), pixmapRect.width()); + int w = TQMAX(textRect.width(), pixmapRect.width()); int h = textRect.height() + pixmapRect.height() + 1; rect.setWidth(w); rect.setHeight(h); // Center the pix and text rect - pixmapRect = QRect((rect.width() - pixmapRect.width())/2, + pixmapRect = TQRect((rect.width() - pixmapRect.width())/2, 0, pixmapRect.width(), pixmapRect.height()); - textRect = QRect((rect.width() - textRect.width())/2, + textRect = TQRect((rect.width() - textRect.width())/2, rect.height() - textRect.height(), textRect.width(), textRect.height()); // Finally save the settings @@ -153,87 +153,87 @@ void ThumbItem::calcRect() { setTextRect(textRect); } -void ThumbItem::paintItem(QPainter *, const QColorGroup& cg) { - QRect pRect=pixmapRect(true); - QRect tRect=textRect(true); +void ThumbItem::paintItem(TQPainter *, const TQColorGroup& cg) { + TQRect pRect=pixmapRect(true); + TQRect tRect=textRect(true); - QPixmap pix(rect().width(), rect().height()); + TQPixmap pix(rect().width(), rect().height()); pix.fill(cg.base()); - QPainter painter(&pix); + TQPainter painter(&pix); painter.drawPixmap(pRect.x(), pRect.y(), *pixmap() ); if (isSelected()) { - QPen pen; + TQPen pen; pen.setColor(cg.highlight()); painter.setPen(pen); painter.drawRect(0, 0, pix.width(), pix.height()); painter.fillRect(0, tRect.y(), pix.width(), tRect.height(), cg.highlight() ); - painter.setPen( QPen( cg.highlightedText() ) ); + painter.setPen( TQPen( cg.highlightedText() ) ); } else { painter.setPen( cg.text() ); } - painter.drawText(tRect, Qt::WordBreak|Qt::BreakAnywhere|Qt::AlignHCenter|Qt::AlignTop,text()); + painter.drawText(tRect, TQt::WordBreak|TQt::BreakAnywhere|TQt::AlignHCenter|TQt::AlignTop,text()); painter.end(); - QRect r(rect()); - r = QRect(view->contentsToViewport(QPoint(r.x(), r.y())), QSize(r.width(), r.height())); + TQRect r(rect()); + r = TQRect(view->contentsToViewport(TQPoint(r.x(), r.y())), TQSize(r.width(), r.height())); bitBlt(view->viewport(), r.x(), r.y(), &pix, 0, 0, r.width(), r.height()); } -void ThumbItem::repaint() { - QRect r(view->contentsRectToViewport(d->rect)); - view->viewport()->repaint(r); +void ThumbItem::tqrepaint() { + TQRect r(view->contentsRectToViewport(d->rect)); + view->viewport()->tqrepaint(r); } -QRect ThumbItem::rect() { +TQRect ThumbItem::rect() { return d->rect; } -QRect ThumbItem::textRect(bool relative) { +TQRect ThumbItem::textRect(bool relative) { if (relative) { return d->textRect; } else { - QRect r(x() + d->textRect.x(), y() + d->textRect.y(), d->textRect.width(), d->textRect.height()); + TQRect r(x() + d->textRect.x(), y() + d->textRect.y(), d->textRect.width(), d->textRect.height()); return r; } } -QRect ThumbItem::pixmapRect(bool relative) { +TQRect ThumbItem::pixmapRect(bool relative) { if (relative) { return d->pixmapRect; } else { - QRect r(x() + d->pixmapRect.x(), y() + d->pixmapRect.y(), d->pixmapRect.width(), d->pixmapRect.height()); + TQRect r(x() + d->pixmapRect.x(), y() + d->pixmapRect.y(), d->pixmapRect.width(), d->pixmapRect.height()); return r; } } -void ThumbItem::setRect(const QRect& rect) { +void ThumbItem::setRect(const TQRect& rect) { if (rect.isValid()) { d->rect = rect; } } -void ThumbItem::setTextRect(const QRect& rect) +void ThumbItem::setTextRect(const TQRect& rect) { if (rect.isValid()) { d->textRect = rect; } } -void ThumbItem::setPixmapRect(const QRect& rect) { +void ThumbItem::setPixmapRect(const TQRect& rect) { if (rect.isValid()) { d->pixmapRect = rect; } } -QPixmap * ThumbItem::pixmap() const { +TQPixmap * ThumbItem::pixmap() const { return d->pixmap; } -QString ThumbItem::text() const { +TQString ThumbItem::text() const { return d->text; } @@ -269,8 +269,8 @@ void ThumbItem::setSelected(bool val, bool cb) { } d->selected = val; view->selectItem(this, val); - QRect r(d->rect); - r = QRect(view->contentsToViewport(QPoint(r.x(), r.y())), QSize(r.width(), r.height())); + TQRect r(d->rect); + r = TQRect(view->contentsToViewport(TQPoint(r.x(), r.y())), TQSize(r.width(), r.height())); view->viewport()->update(r); } @@ -278,39 +278,39 @@ bool ThumbItem::isSelected() { return d->selected; } -void ThumbItem::setPixmap(const QPixmap& pixmap) { +void ThumbItem::setPixmap(const TQPixmap& pixmap) { if (d->pixmap) { delete d->pixmap; d->pixmap = 0; } - d->pixmap = new QPixmap(pixmap); + d->pixmap = new TQPixmap(pixmap); - QRect oR(d->rect); + TQRect oR(d->rect); calcRect(); oR = oR.unite(d->rect); - oR = QRect(view->contentsToViewport(QPoint(oR.x(), oR.y())), QSize(oR.width(), oR.height())); + oR = TQRect(view->contentsToViewport(TQPoint(oR.x(), oR.y())), TQSize(oR.width(), oR.height())); view->updateItemContainer(this); - if(oR.intersects(QRect(view->contentsX(), view->contentsY(), view->visibleWidth(), view->visibleHeight()))) { - view->viewport()->repaint(oR); + if(oR.intersects(TQRect(view->contentsX(), view->contentsY(), view->visibleWidth(), view->visibleHeight()))) { + view->viewport()->tqrepaint(oR); } } -void ThumbItem::setText(const QString& text) { +void ThumbItem::setText(const TQString& text) { d->text = text; d->key = text; - QRect oR(d->rect); + TQRect oR(d->rect); calcRect(); oR = oR.unite(d->rect); - oR = QRect(view->contentsToViewport(QPoint(oR.x(), oR.y())), - QSize(oR.width(), oR.height())); + oR = TQRect(view->contentsToViewport(TQPoint(oR.x(), oR.y())), + TQSize(oR.width(), oR.height())); view->updateItemContainer(this); - if(oR.intersects(QRect(view->contentsX(), view->contentsY(), view->visibleWidth(), view->visibleHeight()))) { - view->viewport()->repaint(oR); + if(oR.intersects(TQRect(view->contentsX(), view->contentsY(), view->visibleWidth(), view->visibleHeight()))) { + view->viewport()->tqrepaint(oR); } } @@ -332,7 +332,7 @@ void ThumbItem::rename() { renameBox = 0; } renameBox = new ThumbItemLineEdit(d->text, view->viewport(), this); - QRect tr(textRect(false)); + TQRect tr(textRect(false)); view->addChild(renameBox, tr.x() + (tr.width()/2 - renameBox->width()/2 ), tr.y() - 3); renameBox->selectAll(); view->viewport()->setFocusProxy(renameBox); @@ -360,7 +360,7 @@ void ThumbItem::renameItem() { } void ThumbItem::cancelRenameItem() { - repaint(); + tqrepaint(); bool resetFocus = view->viewport()->focusProxy() == renameBox; delete renameBox; @@ -376,7 +376,7 @@ int ThumbItem::compare(ThumbItem *item) { return key().localeAwareCompare(item->key()); } -QString ThumbItem::key() const { +TQString ThumbItem::key() const { return d->key; } diff --git a/kipi-plugins/kameraklient/thumbitem.h b/kipi-plugins/kameraklient/thumbitem.h index 557c74e..806c0be 100644 --- a/kipi-plugins/kameraklient/thumbitem.h +++ b/kipi-plugins/kameraklient/thumbitem.h @@ -16,12 +16,12 @@ #ifndef THUMBITEM_H #define THUMBITEM_H -#include <qrect.h> -#include <qstring.h> +#include <tqrect.h> +#include <tqstring.h> -class QPixmap; -class QPainter; -class QColorGroup; +class TQPixmap; +class TQPainter; +class TQColorGroup; namespace KIPIKameraKlientPlugin { @@ -37,13 +37,13 @@ class ThumbItem { public: - ThumbItem(ThumbView* parent, - const QString& text, - const QPixmap& pixmap); + ThumbItem(ThumbView* tqparent, + const TQString& text, + const TQPixmap& pixmap); virtual ~ThumbItem(); - QPixmap *pixmap() const; - QString text() const; + TQPixmap *pixmap() const; + TQString text() const; ThumbItem *nextItem(); ThumbItem *prevItem(); @@ -53,34 +53,34 @@ public: int width() const; int height() const; - QRect rect(); - QRect textRect(bool relative=true); - QRect pixmapRect(bool relative=true); + TQRect rect(); + TQRect textRect(bool relative=true); + TQRect pixmapRect(bool relative=true); bool move(int x, int y); void setSelected(bool val, bool cb=true); bool isSelected(); - virtual void setPixmap(const QPixmap& pixmap); - virtual void setText(const QString& text); - void repaint(); + virtual void setPixmap(const TQPixmap& pixmap); + virtual void setText(const TQString& text); + void tqrepaint(); ThumbView* iconView(); void rename(); virtual int compare(ThumbItem *item); - virtual QString key() const; + virtual TQString key() const; protected: virtual void calcRect(); - void setRect(const QRect& rect); - void setTextRect(const QRect& rect); - void setPixmapRect(const QRect& rect); + void setRect(const TQRect& rect); + void setTextRect(const TQRect& rect); + void setPixmapRect(const TQRect& rect); - virtual void paintItem(QPainter *p, const QColorGroup& cg); + virtual void paintItem(TQPainter *p, const TQColorGroup& cg); void renameItem(); void cancelRenameItem(); diff --git a/kipi-plugins/kameraklient/thumbview.cpp b/kipi-plugins/kameraklient/thumbview.cpp index 1009b39..09f5715 100644 --- a/kipi-plugins/kameraklient/thumbview.cpp +++ b/kipi-plugins/kameraklient/thumbview.cpp @@ -13,21 +13,21 @@ * GNU General Public License for more details. * * ============================================================ */ -// Qt -#include <qpainter.h> -#include <qrect.h> -#include <qpoint.h> -#include <qsize.h> -#include <qevent.h> -#include <qstring.h> -#include <qstyle.h> -#include <qpixmap.h> -#include <qptrlist.h> -#include <qcursor.h> -#include <qtimer.h> -#include <qdragobject.h> -#include <qstrlist.h> -#include <qapplication.h> +// TQt +#include <tqpainter.h> +#include <tqrect.h> +#include <tqpoint.h> +#include <tqsize.h> +#include <tqevent.h> +#include <tqstring.h> +#include <tqstyle.h> +#include <tqpixmap.h> +#include <tqptrlist.h> +#include <tqcursor.h> +#include <tqtimer.h> +#include <tqdragobject.h> +#include <tqstrlist.h> +#include <tqapplication.h> // KDE #include <kiconloader.h> // Standard @@ -57,12 +57,12 @@ public: int count; bool clearing; bool pressedMoved; - QRect *rubber; - QPoint dragStartPos; - QPtrList<ThumbItem> selectedItems; - QTimer* updateTimer; + TQRect *rubber; + TQPoint dragStartPos; + TQPtrList<ThumbItem> selectedItems; + TQTimer* updateTimer; struct ItemContainer { - ItemContainer(ItemContainer *p, ItemContainer *n, const QRect &r) : prev(p), next(n), rect(r) { + ItemContainer(ItemContainer *p, ItemContainer *n, const TQRect &r) : prev(p), next(n), rect(r) { items.setAutoDelete(false); if (prev) { prev->next = this; @@ -72,8 +72,8 @@ public: } } ItemContainer *prev, *next; - QRect rect; - QPtrList<ThumbItem> items; + TQRect rect; + TQPtrList<ThumbItem> items; } *firstContainer, *lastContainer; ThumbItem *startDragItem; struct SortableItem { @@ -92,11 +92,11 @@ static int cmpItems( const void *n1, const void *n2 ) { } -ThumbView::ThumbView(QWidget* parent, const char* name, WFlags fl) : QScrollView(parent, name, Qt::WStaticContents | fl) { - setBackgroundMode(Qt::NoBackground); - viewport()->setBackgroundMode(Qt::NoBackground); +ThumbView::ThumbView(TQWidget* tqparent, const char* name, WFlags fl) : TQScrollView(tqparent, name, TQt::WStaticContents | fl) { + setBackgroundMode(TQt::NoBackground); + viewport()->setBackgroundMode(TQt::NoBackground); viewport()->setFocusProxy(this); - viewport()->setFocusPolicy(QWidget::TabFocus); + viewport()->setFocusPolicy(TQ_TabFocus); renamingItem = 0; d = new ThumbViewPrivate; d->firstItem = 0; @@ -109,9 +109,9 @@ ThumbView::ThumbView(QWidget* parent, const char* name, WFlags fl) : QScrollView d->firstContainer = 0; d->lastContainer = 0; d->selectedItems.setAutoDelete(false); - d->updateTimer = new QTimer(this); + d->updateTimer = new TQTimer(this); d->startDragItem = 0; - connect(d->updateTimer, SIGNAL(timeout()), this, SLOT(slotUpdate())); + connect(d->updateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdate())); } ThumbView::~ThumbView() { @@ -236,8 +236,8 @@ void ThumbView::takeItem(ThumbItem *item) { } } if (!d->clearing) { - QRect r(contentsRectToViewport(item->rect())); - viewport()->repaint(r); + TQRect r(contentsRectToViewport(item->rect())); + viewport()->tqrepaint(r); } } @@ -277,32 +277,32 @@ void ThumbView::sort() { delete [] items; } -void ThumbView::viewportPaintEvent(QPaintEvent *pe) { - QRect r(pe->rect()); - QRegion paintRegion(pe->region()); - QPainter painter(viewport()); +void ThumbView::viewportPaintEvent(TQPaintEvent *pe) { + TQRect r(pe->rect()); + TQRegion paintRegion(pe->region()); + TQPainter painter(viewport()); painter.setClipRegion(paintRegion); ThumbViewPrivate::ItemContainer *c = d->firstContainer; for ( ; c; c = c->next) { - QRect cr(contentsRectToViewport(c->rect)); + TQRect cr(contentsRectToViewport(c->rect)); if (r.intersects(cr)) { ThumbItem *item = c->items.first(); for ( ; item; item = c->items.next()) { - QRect ir(contentsRectToViewport(item->rect())); + TQRect ir(contentsRectToViewport(item->rect())); if (r.intersects(ir)) { - item->paintItem(&painter, colorGroup()); - paintRegion -= QRegion(ir); + item->paintItem(&painter, tqcolorGroup()); + paintRegion -= TQRegion(ir); } } } } painter.setClipRegion(paintRegion); - painter.fillRect(r, colorGroup().base()); + painter.fillRect(r, tqcolorGroup().base()); painter.end(); } -void ThumbView::resizeEvent(QResizeEvent* e) { - QScrollView::resizeEvent(e); +void ThumbView::resizeEvent(TQResizeEvent* e) { + TQScrollView::resizeEvent(e); //d->updateTimer->start(0, true); rearrangeItems(); } @@ -319,16 +319,16 @@ void ThumbView::rearrangeItems(bool update) { ThumbItem *next = makeRow(item, y, changed); changedLayout = changed || changedLayout; item = next; - w = QMAX(w, item->x() + item->width()); - h = QMAX(h, item->y() + item->height()); - h = QMAX(h, y); + w = TQMAX(w, item->x() + item->width()); + h = TQMAX(h, item->y() + item->height()); + h = TQMAX(h, y); if (!item || !item->next) { break; } item = item->next; } - w = QMAX(w, d->lastItem->x() + d->lastItem->width()); - h = QMAX(h, d->lastItem->y() + d->lastItem->height()); + w = TQMAX(w, d->lastItem->x() + d->lastItem->width()); + h = TQMAX(h, d->lastItem->y() + d->lastItem->height()); int vw = visibleWidth(); viewport()->setUpdatesEnabled(false); resizeContents( w, h ); @@ -358,7 +358,7 @@ ThumbItem* ThumbView::makeRow(ThumbItem *begin, int &y, bool &changed) { item = item->prev; break; } - h = QMAX(h, item->height()); + h = TQMAX(h, item->height()); ThumbItem *old = item; item = item->next; if (!item) { @@ -386,27 +386,27 @@ ThumbItem* ThumbView::makeRow(ThumbItem *begin, int &y, bool &changed) { return end; } -void ThumbView::drawRubber(QPainter *p) { +void ThumbView::drawRubber(TQPainter *p) { if (!p || !d->rubber) { return; } - QRect r(d->rubber->normalize()); + TQRect r(d->rubber->normalize()); r = contentsRectToViewport(r); - QPoint pnt(r.x(), r.y()); - style().drawPrimitive(QStyle::PE_FocusRect, p, QRect( pnt.x(), pnt.y(), r.width(), r.height()), colorGroup(), QStyle::Style_Default, QStyleOption(colorGroup().base())); + TQPoint pnt(r.x(), r.y()); + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, p, TQRect( pnt.x(), pnt.y(), r.width(), r.height()), tqcolorGroup(), TQStyle::Style_Default, TQStyleOption(tqcolorGroup().base())); } -void ThumbView::contentsMousePressEvent(QMouseEvent *e) { +void ThumbView::contentsMousePressEvent(TQMouseEvent *e) { // If renaming any item, cancel it -------------------------- if (renamingItem) { renamingItem->cancelRenameItem(); } // Delete any existing rubber ------------------------------- if ( d->rubber ) { - QPainter p; + TQPainter p; p.begin(viewport()); p.setRasterOp(NotROP); - p.setPen(QPen(color0, 1)); + p.setPen(TQPen(color0, 1)); p.setBrush(NoBrush); drawRubber(&p); p.end(); @@ -416,9 +416,9 @@ void ThumbView::contentsMousePressEvent(QMouseEvent *e) { d->dragStartPos = e->pos(); ThumbItem *item = findItem(e->pos()); if (item) { - if (e->state() & Qt::ControlButton) { + if (e->state() & TQt::ControlButton) { item->setSelected(!item->isSelected(), false); - } else if (e->state() & Qt::ShiftButton) { + } else if (e->state() & TQt::ShiftButton) { // different selection mode than the Trolls ThumbItem *lastSelectedItem = 0; bool bwdSelection = false; @@ -476,27 +476,27 @@ void ThumbView::contentsMousePressEvent(QMouseEvent *e) { delete d->rubber; d->rubber = 0; } - d->rubber = new QRect( e->x(), e->y(), 0, 0 ); - QPainter p; + d->rubber = new TQRect( e->x(), e->y(), 0, 0 ); + TQPainter p; p.begin( viewport() ); p.setRasterOp( NotROP ); - p.setPen( QPen( color0, 1 ) ); + p.setPen( TQPen( color0, 1 ) ); p.setBrush( NoBrush ); drawRubber( &p ); p.end(); d->pressedMoved = false; } -void ThumbView::contentsMouseMoveEvent(QMouseEvent *e) { +void ThumbView::contentsMouseMoveEvent(TQMouseEvent *e) { if (!e) { return; } - if (e->state() == NoButton) { + if (e->state() == Qt::NoButton) { return; } // Dragging ? if (d->startDragItem) { - if ((d->dragStartPos - e->pos() ).manhattanLength() > QApplication::startDragDistance()) { + if ((d->dragStartPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance()) { startDrag(); } return; @@ -504,13 +504,13 @@ void ThumbView::contentsMouseMoveEvent(QMouseEvent *e) { if (!d->rubber) { return; } - QRect oldRubber = QRect(*d->rubber); + TQRect oldRubber = TQRect(*d->rubber); d->rubber->setRight( e->pos().x() ); d->rubber->setBottom( e->pos().y() ); - QRegion paintRegion; + TQRegion paintRegion; viewport()->setUpdatesEnabled(false); - QRect nr(d->rubber->normalize()); - QRect rubberUnion = nr.unite(oldRubber.normalize()); + TQRect nr(d->rubber->normalize()); + TQRect rubberUnion = nr.unite(oldRubber.normalize()); bool changed = false; ThumbViewPrivate::ItemContainer *c = d->lastContainer; for (; c; c = c->prev) { @@ -521,54 +521,54 @@ void ThumbView::contentsMouseMoveEvent(QMouseEvent *e) { if (!item->isSelected()) { item->setSelected(true, false); changed = true; - paintRegion += QRect(item->rect()); + paintRegion += TQRect(item->rect()); } } else { if (item->isSelected()) { item->setSelected(false, false); changed = true; - paintRegion += QRect(item->rect()); + paintRegion += TQRect(item->rect()); } } } } } viewport()->setUpdatesEnabled(true); - QRect r = *d->rubber; + TQRect r = *d->rubber; *d->rubber = oldRubber; - QPainter p; + TQPainter p; p.begin( viewport() ); p.setRasterOp( NotROP ); - p.setPen( QPen( color0, 1 ) ); + p.setPen( TQPen( color0, 1 ) ); p.setBrush( NoBrush ); drawRubber( &p ); p.end(); if (changed) { emit signalSelectionChanged(); paintRegion.translate(-contentsX(), -contentsY()); - viewport()->repaint(paintRegion); + viewport()->tqrepaint(paintRegion); } ensureVisible(e->pos().x(), e->pos().y()); *d->rubber = r; p.begin(viewport()); p.setRasterOp(NotROP); - p.setPen(QPen(color0, 1)); + p.setPen(TQPen(color0, 1)); p.setBrush(NoBrush); drawRubber(&p); p.end(); d->pressedMoved = true; } -void ThumbView::contentsMouseReleaseEvent(QMouseEvent *e) { +void ThumbView::contentsMouseReleaseEvent(TQMouseEvent *e) { if (!e) { return; } d->startDragItem = 0; if (d->rubber) { - QPainter p; + TQPainter p; p.begin( viewport() ); p.setRasterOp( NotROP ); - p.setPen( QPen( color0, 1 ) ); + p.setPen( TQPen( color0, 1 ) ); p.setBrush( NoBrush ); drawRubber( &p ); p.end(); @@ -582,7 +582,7 @@ void ThumbView::contentsMouseReleaseEvent(QMouseEvent *e) { } else { emit signalRightButtonClicked(e->globalPos()); } - } else if ((e->button() == Qt::LeftButton) && !(e->state() & Qt::ShiftButton) && !(e->state() & Qt::ControlButton)) { + } else if ((e->button() == Qt::LeftButton) && !(e->state() & TQt::ShiftButton) && !(e->state() & TQt::ControlButton)) { if (d->pressedMoved) { d->pressedMoved = false; return; @@ -594,7 +594,7 @@ void ThumbView::contentsMouseReleaseEvent(QMouseEvent *e) { } } -void ThumbView::contentsMouseDoubleClickEvent(QMouseEvent *e) { +void ThumbView::contentsMouseDoubleClickEvent(TQMouseEvent *e) { ThumbItem *item = findItem(e->pos()); if (item) { blockSignals(true); @@ -614,7 +614,7 @@ void ThumbView::rebuildContainers() { appendContainer(); ThumbViewPrivate::ItemContainer* c = d->lastContainer; while (item) { - if (c->rect.contains(item->rect())) { + if (c->rect.tqcontains(item->rect())) { c->items.append(item); item = item->next; } else if (c->rect.intersects(item->rect())) { @@ -642,13 +642,13 @@ void ThumbView::rebuildContainers() { } void ThumbView::appendContainer() { - QSize s; - s = QSize(INT_MAX - 1, RECT_EXTENSION ); + TQSize s; + s = TQSize(INT_MAX - 1, RECT_EXTENSION ); if (!d->firstContainer) { - d->firstContainer = new ThumbViewPrivate::ItemContainer(0, 0, QRect(QPoint(0, 0), s)); + d->firstContainer = new ThumbViewPrivate::ItemContainer(0, 0, TQRect(TQPoint(0, 0), s)); d->lastContainer = d->firstContainer; } else { - d->lastContainer = new ThumbViewPrivate::ItemContainer(d->lastContainer, 0, QRect(d->lastContainer->rect.bottomLeft(), s)); + d->lastContainer = new ThumbViewPrivate::ItemContainer(d->lastContainer, 0, TQRect(d->lastContainer->rect.bottomLeft(), s)); } } @@ -675,11 +675,11 @@ void ThumbView::updateItemContainer(ThumbItem *item) { appendContainer(); c = d->firstContainer; } - const QRect ir = item->rect(); - bool contains = false; + const TQRect ir = item->rect(); + bool tqcontains = false; for (;;) { if (c->rect.intersects(ir)) { - contains = c->rect.contains(ir); + tqcontains = c->rect.tqcontains(ir); break; } c = c->next; @@ -692,7 +692,7 @@ void ThumbView::updateItemContainer(ThumbItem *item) { return; } c->items.append(item); - if (!contains) { + if (!tqcontains) { c = c->next; if (!c) { appendContainer(); @@ -701,20 +701,20 @@ void ThumbView::updateItemContainer(ThumbItem *item) { c->items.append( item ); } if (contentsWidth() < ir.right() || contentsHeight() < ir.bottom()) { - resizeContents(QMAX(contentsWidth(), ir.right()), QMAX(contentsHeight(), ir.bottom())); + resizeContents(TQMAX(contentsWidth(), ir.right()), TQMAX(contentsHeight(), ir.bottom())); } } -ThumbItem* ThumbView::findItem(const QPoint& pos) { +ThumbItem* ThumbView::findItem(const TQPoint& pos) { if (!d->firstItem) { return 0; } ThumbViewPrivate::ItemContainer *c = d->lastContainer; for (; c; c = c->prev) { - if ( c->rect.contains(pos) ) { + if ( c->rect.tqcontains(pos) ) { ThumbItem *item = c->items.last(); for ( ; item; item = c->items.prev()) { - if (item->rect().contains( pos )) { + if (item->rect().tqcontains( pos )) { return item; } } @@ -723,7 +723,7 @@ ThumbItem* ThumbView::findItem(const QPoint& pos) { return 0; } -ThumbItem* ThumbView::findItem(const QString& text) { +ThumbItem* ThumbView::findItem(const TQString& text) { if (!d->firstItem) { return 0; } @@ -742,8 +742,8 @@ ThumbItem* ThumbView::findItem(const QString& text) { } } -QRect ThumbView::contentsRectToViewport(const QRect& r) { - QRect vr = QRect(contentsToViewport(QPoint(r.x(), r.y())), r.size()); +TQRect ThumbView::contentsRectToViewport(const TQRect& r) { + TQRect vr = TQRect(contentsToViewport(TQPoint(r.x(), r.y())), r.size()); return vr; } @@ -809,14 +809,14 @@ void ThumbView::startDrag() { if (!d->startDragItem) { return; } - QStrList uris; + TQStrList uris; for (ThumbItem *it = firstItem(); it; it=it->nextItem()) { if (it->isSelected()) { - // PENDING(Aur�lien) Check if .ascii() is ok here + // PENDING(Aur�lien) Check if .ascii() is ok here uris.append(it->text().ascii()); } } - QUriDrag* drag = new QUriDrag(uris, this); + TQUriDrag* drag = new TQUriDrag(uris, this); if (!drag) { return; } @@ -825,7 +825,7 @@ void ThumbView::startDrag() { drag->dragCopy(); } -void ThumbView::contentsDropEvent(QDropEvent *e) { +void ThumbView::contentsDropEvent(TQDropEvent *e) { if (!e) { return; } @@ -835,7 +835,7 @@ void ThumbView::contentsDropEvent(QDropEvent *e) { } } -void ThumbView::keyPressEvent(QKeyEvent *e) { +void ThumbView::keyPressEvent(TQKeyEvent *e) { bool handled = false; if (!d->firstItem) { return; @@ -886,7 +886,7 @@ void ThumbView::keyPressEvent(QKeyEvent *e) { int y = currItem->y() - d->spacing*2; ThumbItem *item = 0; while (!item && y > 0) { - item = findItem(QPoint(x,y)); + item = findItem(TQPoint(x,y)); y -= d->spacing * 2; } if (item) { @@ -901,7 +901,7 @@ void ThumbView::keyPressEvent(QKeyEvent *e) { int y = currItem->y() + currItem->height() + d->spacing * 2; ThumbItem *item = 0; while (!item && y < contentsHeight()) { - item = findItem(QPoint(x,y)); + item = findItem(TQPoint(x,y)); y += d->spacing * 2; } if (item) { @@ -912,11 +912,11 @@ void ThumbView::keyPressEvent(QKeyEvent *e) { break; } case Key_Next: { - QRect r( 0, currItem->y() + visibleHeight(), + TQRect r( 0, currItem->y() + visibleHeight(), contentsWidth(), visibleHeight() ); ThumbItem *ni = findFirstVisibleItem(r); if (!ni) { - r = QRect( 0, currItem->y() + currItem->height(), contentsWidth(), contentsHeight() ); + r = TQRect( 0, currItem->y() + currItem->height(), contentsWidth(), contentsHeight() ); ni = findLastVisibleItem( r ); } if (ni) { @@ -927,10 +927,10 @@ void ThumbView::keyPressEvent(QKeyEvent *e) { break; } case Key_Prior: { - QRect r(0, currItem->y() - visibleHeight(), contentsWidth(), visibleHeight() ); + TQRect r(0, currItem->y() - visibleHeight(), contentsWidth(), visibleHeight() ); ThumbItem *ni = findFirstVisibleItem(r); if ( !ni ) { - r = QRect( 0, 0, contentsWidth(), currItem->y() ); + r = TQRect( 0, 0, contentsWidth(), currItem->y() ); ni = findFirstVisibleItem( r ); } if ( ni ) { @@ -945,7 +945,7 @@ void ThumbView::keyPressEvent(QKeyEvent *e) { return; } if (handled) { - viewport()->repaint(); + viewport()->tqrepaint(); emit signalSelectionChanged(); } } @@ -959,7 +959,7 @@ void ThumbView::ensureItemVisible(ThumbItem *item) { ensureVisible( item->x() + w / 2, item->y() + h / 2, w / 2 + 1, h / 2 + 1 ); } -ThumbItem* ThumbView::findFirstVisibleItem(const QRect &r ) const { +ThumbItem* ThumbView::findFirstVisibleItem(const TQRect &r ) const { ThumbViewPrivate::ItemContainer *c = d->firstContainer; ThumbItem *i = 0; bool alreadyIntersected = false; @@ -972,8 +972,8 @@ ThumbItem* ThumbView::findFirstVisibleItem(const QRect &r ) const { if ( !i ) { i = item; } else { - QRect r2 = item->rect(); - QRect r3 = i->rect(); + TQRect r2 = item->rect(); + TQRect r3 = i->rect(); if (r2.y() < r3.y()) { i = item; } else if (r2.y() == r3.y() && r2.x() < r3.x()) { @@ -991,7 +991,7 @@ ThumbItem* ThumbView::findFirstVisibleItem(const QRect &r ) const { return i; } -ThumbItem* ThumbView::findLastVisibleItem(const QRect &r ) const { +ThumbItem* ThumbView::findLastVisibleItem(const TQRect &r ) const { ThumbViewPrivate::ItemContainer *c = d->firstContainer; ThumbItem *i = 0; bool alreadyIntersected = false; @@ -1004,8 +1004,8 @@ ThumbItem* ThumbView::findLastVisibleItem(const QRect &r ) const { if ( !i ) { i = item; } else { - QRect r2 = item->rect(); - QRect r3 = i->rect(); + TQRect r2 = item->rect(); + TQRect r3 = i->rect(); if (r2.y() > r3.y()) { i = item; } else if (r2.y() == r3.y() && r2.x() > r3.x()) { diff --git a/kipi-plugins/kameraklient/thumbview.h b/kipi-plugins/kameraklient/thumbview.h index 0a0e188..cb7ce0d 100644 --- a/kipi-plugins/kameraklient/thumbview.h +++ b/kipi-plugins/kameraklient/thumbview.h @@ -16,13 +16,13 @@ #ifndef THUMBVIEW_H #define THUMBVIEW_H -#include <qscrollview.h> +#include <tqscrollview.h> -class QPainter; -class QMouseEvent; -class QPaintEvent; -class QDropEvent; -class QPoint; +class TQPainter; +class TQMouseEvent; +class TQPaintEvent; +class TQDropEvent; +class TQPoint; namespace KIPIKameraKlientPlugin { @@ -30,22 +30,23 @@ namespace KIPIKameraKlientPlugin class ThumbItem; class ThumbViewPrivate; -class ThumbView : public QScrollView { +class ThumbView : public TQScrollView { Q_OBJECT + TQ_OBJECT friend class ThumbItem; public: - ThumbView(QWidget* parent=0, const char* name=0, + ThumbView(TQWidget* tqparent=0, const char* name=0, WFlags fl=0); ~ThumbView(); ThumbItem* firstItem(); ThumbItem* lastItem(); - ThumbItem* findItem(const QPoint& pos); - ThumbItem* findItem(const QString& text); + ThumbItem* findItem(const TQPoint& pos); + ThumbItem* findItem(const TQString& text); int count(); int index(ThumbItem* item); @@ -62,32 +63,32 @@ public: virtual void insertItem(ThumbItem *item); virtual void takeItem(ThumbItem *item); void updateItemContainer(ThumbItem *item); - QRect contentsRectToViewport(const QRect& r); + TQRect contentsRectToViewport(const TQRect& r); void ensureItemVisible(ThumbItem *item); - ThumbItem *findFirstVisibleItem(const QRect &r ) const; - ThumbItem *findLastVisibleItem(const QRect &r ) const; + ThumbItem *findFirstVisibleItem(const TQRect &r ) const; + ThumbItem *findLastVisibleItem(const TQRect &r ) const; void sort(); protected: - virtual void contentsMousePressEvent(QMouseEvent *e); - virtual void contentsMouseMoveEvent(QMouseEvent *e); - virtual void contentsMouseReleaseEvent(QMouseEvent *e); - virtual void contentsMouseDoubleClickEvent(QMouseEvent *e); + virtual void contentsMousePressEvent(TQMouseEvent *e); + virtual void contentsMouseMoveEvent(TQMouseEvent *e); + virtual void contentsMouseReleaseEvent(TQMouseEvent *e); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent *e); - virtual void viewportPaintEvent(QPaintEvent *pe); - virtual void resizeEvent(QResizeEvent* e); + virtual void viewportPaintEvent(TQPaintEvent *pe); + virtual void resizeEvent(TQResizeEvent* e); - virtual void keyPressEvent(QKeyEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); virtual void startDrag(); - virtual void contentsDropEvent(QDropEvent *e); + virtual void contentsDropEvent(TQDropEvent *e); private: - void drawRubber(QPainter *p); + void drawRubber(TQPainter *p); void rebuildContainers(); void appendContainer(); @@ -107,8 +108,8 @@ private: signals: void signalSelectionChanged(); - void signalRightButtonClicked(const QPoint &pos); - void signalRightButtonClicked(ThumbItem *item, const QPoint &pos); + void signalRightButtonClicked(const TQPoint &pos); + void signalRightButtonClicked(ThumbItem *item, const TQPoint &pos); void signalDoubleClicked(ThumbItem *item); void signalReturnPressed(ThumbItem *item); void signalItemRenamed(ThumbItem *item); diff --git a/kipi-plugins/metadataedit/commenteditdialog.cpp b/kipi-plugins/metadataedit/commenteditdialog.cpp index ba13195..8082632 100644 --- a/kipi-plugins/metadataedit/commenteditdialog.cpp +++ b/kipi-plugins/metadataedit/commenteditdialog.cpp @@ -20,14 +20,14 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qlabel.h> -#include <qframe.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> // KDE includes. @@ -64,19 +64,19 @@ public: syncIPTCCaptionCheck = 0; } - QCheckBox *syncJFIFCommentCheck; - QCheckBox *syncEXIFCommentCheck; - QCheckBox *syncIPTCCaptionCheck; + TQCheckBox *syncJFIFCommentCheck; + TQCheckBox *syncEXIFCommentCheck; + TQCheckBox *syncIPTCCaptionCheck; KTextEdit *userCommentEdit; KIPIPlugins::KPAboutData *about; }; -CommentEditDialog::CommentEditDialog(QWidget* parent) +CommentEditDialog::CommentEditDialog(TQWidget* tqparent) : KDialogBase(Plain, i18n("Edit Image Caption"), Help|Ok|Cancel, Ok, - parent, 0, true, true) + tqparent, 0, true, true) { d = new CommentEditDialogDialogPrivate; @@ -95,27 +95,27 @@ CommentEditDialog::CommentEditDialog(QWidget* parent) KHelpMenu* helpMenu = new KHelpMenu(this, d->about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), - this, SLOT(slotHelp()), 0, -1, 0); + this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // ------------------------------------------------------------ - QVBoxLayout *vlay = new QVBoxLayout(plainPage(), 0, KDialog::spacingHint()); + TQVBoxLayout *vlay = new TQVBoxLayout(plainPage(), 0, KDialog::spacingHint()); - QLabel *title = new QLabel(i18n("<p>Enter the image caption hosted by <b>%1</b>. " + TQLabel *title = new TQLabel(i18n("<p>Enter the image caption hosted by <b>%1</b>. " "This field is not limited (excepted with IPTC). UTF-8 encoding " "will be used to save text.") - .arg(KApplication::kApplication()->aboutData()->appName()), + .tqarg(KApplication::kApplication()->aboutData()->appName()), plainPage()); d->userCommentEdit = new KTextEdit(plainPage()); - d->syncJFIFCommentCheck = new QCheckBox(i18n("Sync JFIF Comment section"), plainPage()); - d->syncEXIFCommentCheck = new QCheckBox(i18n("Sync EXIF Comment"), plainPage()); - d->syncIPTCCaptionCheck = new QCheckBox(i18n("Sync IPTC caption (warning: limited to 2000 printable " + d->syncJFIFCommentCheck = new TQCheckBox(i18n("Sync JFIF Comment section"), plainPage()); + d->syncEXIFCommentCheck = new TQCheckBox(i18n("Sync EXIF Comment"), plainPage()); + d->syncIPTCCaptionCheck = new TQCheckBox(i18n("Sync IPTC caption (warning: limited to 2000 printable " "Ascii characters set)"), plainPage()); - QLabel *note = new QLabel(i18n("<b>Note: captions from currently selected images " + TQLabel *note = new TQLabel(i18n("<b>Note: captions from currently selected images " "will be permanently replaced.</b>"), plainPage()); // ------------------------------------------------------------ @@ -143,7 +143,7 @@ void CommentEditDialog::slotHelp() KApplication::kApplication()->invokeHelp("metadataedit", "kipi-plugins"); } -void CommentEditDialog::closeEvent(QCloseEvent *e) +void CommentEditDialog::closeEvent(TQCloseEvent *e) { if (!e) return; saveSettings(); @@ -163,7 +163,7 @@ void CommentEditDialog::readSettings() setCheckedSyncJFIFComment(config.readBoolEntry("Sync JFIF Comment", true)); setCheckedSyncEXIFComment(config.readBoolEntry("Sync EXIF Comment", true)); setCheckedSyncIPTCCaption(config.readBoolEntry("Sync IPTC Caption", true)); - resize(configDialogSize(config, QString("Comments Edit Dialog"))); + resize(configDialogSize(config, TQString("Comments Edit Dialog"))); } void CommentEditDialog::saveSettings() @@ -173,7 +173,7 @@ void CommentEditDialog::saveSettings() config.writeEntry("Sync JFIF Comment", syncJFIFCommentIsChecked()); config.writeEntry("Sync EXIF Comment", syncEXIFCommentIsChecked()); config.writeEntry("Sync IPTC Caption", syncIPTCCaptionIsChecked()); - saveDialogSize(config, QString("Comments Edit Dialog")); + saveDialogSize(config, TQString("Comments Edit Dialog")); config.sync(); } @@ -198,7 +198,7 @@ bool CommentEditDialog::syncIPTCCaptionIsChecked() return d->syncIPTCCaptionCheck->isChecked(); } -QString CommentEditDialog::getComments() +TQString CommentEditDialog::getComments() { return d->userCommentEdit->text(); } diff --git a/kipi-plugins/metadataedit/commenteditdialog.h b/kipi-plugins/metadataedit/commenteditdialog.h index 876d64a..280d6db 100644 --- a/kipi-plugins/metadataedit/commenteditdialog.h +++ b/kipi-plugins/metadataedit/commenteditdialog.h @@ -23,9 +23,9 @@ #ifndef COMMENTEDITDIALOG_H #define COMMENTEDITDIALOG_H -// Qt includes. +// TQt includes. -#include <qstring.h> +#include <tqstring.h> // KDE includes. @@ -39,10 +39,11 @@ class CommentEditDialogDialogPrivate; class CommentEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CommentEditDialog(QWidget* parent); + CommentEditDialog(TQWidget* tqparent); ~CommentEditDialog(); bool syncJFIFCommentIsChecked(); @@ -53,7 +54,7 @@ public: void setCheckedSyncEXIFComment(bool c); void setCheckedSyncIPTCCaption(bool c); - QString getComments(); + TQString getComments(); protected slots: @@ -63,7 +64,7 @@ protected slots: protected: - void closeEvent(QCloseEvent *); + void closeEvent(TQCloseEvent *); private: diff --git a/kipi-plugins/metadataedit/commentremovedialog.cpp b/kipi-plugins/metadataedit/commentremovedialog.cpp index de18d0e..4e6b271 100644 --- a/kipi-plugins/metadataedit/commentremovedialog.cpp +++ b/kipi-plugins/metadataedit/commentremovedialog.cpp @@ -20,14 +20,14 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qlabel.h> -#include <qframe.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> // KDE includes. @@ -63,18 +63,18 @@ public: removeIPTCCaptionCheck = 0; } - QCheckBox *removeHOSTCommentCheck; - QCheckBox *removeJFIFCommentCheck; - QCheckBox *removeEXIFCommentCheck; - QCheckBox *removeIPTCCaptionCheck; + TQCheckBox *removeHOSTCommentCheck; + TQCheckBox *removeJFIFCommentCheck; + TQCheckBox *removeEXIFCommentCheck; + TQCheckBox *removeIPTCCaptionCheck; KIPIPlugins::KPAboutData *about; }; -CommentRemoveDialog::CommentRemoveDialog(QWidget* parent) +CommentRemoveDialog::CommentRemoveDialog(TQWidget* tqparent) : KDialogBase(Plain, i18n("Remove Image Captions"), Help|Ok|Cancel, Ok, - parent, 0, true, true) + tqparent, 0, true, true) { d = new CommentRemoveDialogDialogPrivate; @@ -93,21 +93,21 @@ CommentRemoveDialog::CommentRemoveDialog(QWidget* parent) KHelpMenu* helpMenu = new KHelpMenu(this, d->about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), - this, SLOT(slotHelp()), 0, -1, 0); + this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // ------------------------------------------------------------ - QVBoxLayout *vlay = new QVBoxLayout(plainPage(), 0, KDialog::spacingHint()); + TQVBoxLayout *vlay = new TQVBoxLayout(plainPage(), 0, KDialog::spacingHint()); - d->removeHOSTCommentCheck = new QCheckBox(i18n("Remove caption created by %1") - .arg(KApplication::kApplication()->aboutData()->appName()), + d->removeHOSTCommentCheck = new TQCheckBox(i18n("Remove caption created by %1") + .tqarg(KApplication::kApplication()->aboutData()->appName()), plainPage()); - d->removeJFIFCommentCheck = new QCheckBox(i18n("Remove JFIF Comment section"), plainPage()); - d->removeEXIFCommentCheck = new QCheckBox(i18n("Remove EXIF Comment"), plainPage()); - d->removeIPTCCaptionCheck = new QCheckBox(i18n("Remove IPTC caption"), plainPage()); + d->removeJFIFCommentCheck = new TQCheckBox(i18n("Remove JFIF Comment section"), plainPage()); + d->removeEXIFCommentCheck = new TQCheckBox(i18n("Remove EXIF Comment"), plainPage()); + d->removeIPTCCaptionCheck = new TQCheckBox(i18n("Remove IPTC caption"), plainPage()); - QLabel *note = new QLabel(i18n("<b>Note: Captions from currently selected images " + TQLabel *note = new TQLabel(i18n("<b>Note: Captions from currently selected images " "will be permanently removed.</b>"), plainPage()); // ------------------------------------------------------------ @@ -134,7 +134,7 @@ void CommentRemoveDialog::slotHelp() KApplication::kApplication()->invokeHelp("metadataedit", "kipi-plugins"); } -void CommentRemoveDialog::closeEvent(QCloseEvent *e) +void CommentRemoveDialog::closeEvent(TQCloseEvent *e) { if (!e) return; saveSettings(); @@ -155,7 +155,7 @@ void CommentRemoveDialog::readSettings() setCheckedRemoveJFIFComment(config.readBoolEntry("Remove JFIF Comment", true)); setCheckedRemoveEXIFComment(config.readBoolEntry("Remove EXIF Comment", true)); setCheckedRemoveIPTCCaption(config.readBoolEntry("Remove IPTC Caption", true)); - resize(configDialogSize(config, QString("Comments Remove Dialog"))); + resize(configDialogSize(config, TQString("Comments Remove Dialog"))); } void CommentRemoveDialog::saveSettings() @@ -166,7 +166,7 @@ void CommentRemoveDialog::saveSettings() config.writeEntry("Remove JFIF Comment", removeJFIFCommentIsChecked()); config.writeEntry("Remove EXIF Comment", removeEXIFCommentIsChecked()); config.writeEntry("Remove IPTC Caption", removeIPTCCaptionIsChecked()); - saveDialogSize(config, QString("Comments Remove Dialog")); + saveDialogSize(config, TQString("Comments Remove Dialog")); config.sync(); } diff --git a/kipi-plugins/metadataedit/commentremovedialog.h b/kipi-plugins/metadataedit/commentremovedialog.h index 4d812dc..2506364 100644 --- a/kipi-plugins/metadataedit/commentremovedialog.h +++ b/kipi-plugins/metadataedit/commentremovedialog.h @@ -35,10 +35,11 @@ class CommentRemoveDialogDialogPrivate; class CommentRemoveDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CommentRemoveDialog(QWidget* parent); + CommentRemoveDialog(TQWidget* tqparent); ~CommentRemoveDialog(); bool removeHOSTCommentIsChecked(); @@ -59,7 +60,7 @@ protected slots: protected: - void closeEvent(QCloseEvent *); + void closeEvent(TQCloseEvent *); private: diff --git a/kipi-plugins/metadataedit/exifadjust.cpp b/kipi-plugins/metadataedit/exifadjust.cpp index f80320a..aad43f8 100644 --- a/kipi-plugins/metadataedit/exifadjust.cpp +++ b/kipi-plugins/metadataedit/exifadjust.cpp @@ -26,10 +26,10 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> // KDE includes. @@ -70,13 +70,13 @@ public: customRenderedCB = 0; } - QCheckBox *brightnessCheck; + TQCheckBox *brightnessCheck; - QComboBox *gainControlCB; - QComboBox *contrastCB; - QComboBox *saturationCB; - QComboBox *sharpnessCB; - QComboBox *customRenderedCB; + TQComboBox *gainControlCB; + TQComboBox *contrastCB; + TQComboBox *saturationCB; + TQComboBox *sharpnessCB; + TQComboBox *customRenderedCB; KDoubleSpinBox *brightnessEdit; @@ -87,26 +87,26 @@ public: MetadataCheckBox *customRenderedCheck; }; -EXIFAdjust::EXIFAdjust(QWidget* parent) - : QWidget(parent) +EXIFAdjust::EXIFAdjust(TQWidget* tqparent) + : TQWidget(tqparent) { d = new EXIFAdjustPriv; - QGridLayout* grid = new QGridLayout(parent, 6, 2, KDialog::spacingHint()); + TQGridLayout* grid = new TQGridLayout(tqparent, 6, 2, KDialog::spacingHint()); // -------------------------------------------------------- - d->brightnessCheck = new QCheckBox(i18n("Brightness (APEX):"), parent); - d->brightnessEdit = new KDoubleSpinBox(-99.99, 99.99, 0.1, 0.0, 2, parent); + d->brightnessCheck = new TQCheckBox(i18n("Brightness (APEX):"), tqparent); + d->brightnessEdit = new KDoubleSpinBox(-99.99, 99.99, 0.1, 0.0, 2, tqparent); grid->addMultiCellWidget(d->brightnessCheck, 0, 0, 0, 0); grid->addMultiCellWidget(d->brightnessEdit, 0, 0, 2, 2); - QWhatsThis::add(d->brightnessEdit, i18n("<p>Set here the brightness adjustment value in APEX unit " + TQWhatsThis::add(d->brightnessEdit, i18n("<p>Set here the brightness adjustment value in APEX unit " "used by camera to take the picture.")); // -------------------------------------------------------- - d->gainControlCheck = new MetadataCheckBox(i18n("Gain Control:"), parent); - d->gainControlCB = new QComboBox(false, parent); + d->gainControlCheck = new MetadataCheckBox(i18n("Gain Control:"), tqparent); + d->gainControlCB = new TQComboBox(false, tqparent); d->gainControlCB->insertItem(i18n("None"), 0); d->gainControlCB->insertItem(i18n("Low gain up"), 1); d->gainControlCB->insertItem(i18n("High gain up"), 2); @@ -114,54 +114,54 @@ EXIFAdjust::EXIFAdjust(QWidget* parent) d->gainControlCB->insertItem(i18n("High gain down"), 4); grid->addMultiCellWidget(d->gainControlCheck, 1, 1, 0, 0); grid->addMultiCellWidget(d->gainControlCB, 1, 1, 2, 2); - QWhatsThis::add(d->gainControlCB, i18n("<p>Set here the degree of overall image gain adjustment " + TQWhatsThis::add(d->gainControlCB, i18n("<p>Set here the degree of overall image gain adjustment " "used by camera to take the picture.")); // -------------------------------------------------------- - d->contrastCheck = new MetadataCheckBox(i18n("Contrast:"), parent); - d->contrastCB = new QComboBox(false, parent); + d->contrastCheck = new MetadataCheckBox(i18n("Contrast:"), tqparent); + d->contrastCB = new TQComboBox(false, tqparent); d->contrastCB->insertItem(i18n("Normal"), 0); d->contrastCB->insertItem(i18n("Soft"), 1); d->contrastCB->insertItem(i18n("Hard"), 2); grid->addMultiCellWidget(d->contrastCheck, 2, 2, 0, 0); grid->addMultiCellWidget(d->contrastCB, 2, 2, 2, 2); - QWhatsThis::add(d->contrastCB, i18n("<p>Set here the direction of contrast processing " + TQWhatsThis::add(d->contrastCB, i18n("<p>Set here the direction of contrast processing " "applied by the camera to take the picture.")); // -------------------------------------------------------- - d->saturationCheck = new MetadataCheckBox(i18n("Saturation:"), parent); - d->saturationCB = new QComboBox(false, parent); + d->saturationCheck = new MetadataCheckBox(i18n("Saturation:"), tqparent); + d->saturationCB = new TQComboBox(false, tqparent); d->saturationCB->insertItem(i18n("Normal"), 0); d->saturationCB->insertItem(i18n("Low"), 1); d->saturationCB->insertItem(i18n("High"), 2); grid->addMultiCellWidget(d->saturationCheck, 3, 3, 0, 0); grid->addMultiCellWidget(d->saturationCB, 3, 3, 2, 2); - QWhatsThis::add(d->saturationCB, i18n("<p>Set here the direction of saturation processing " + TQWhatsThis::add(d->saturationCB, i18n("<p>Set here the direction of saturation processing " "applied by the camera to take the picture.")); // -------------------------------------------------------- - d->sharpnessCheck = new MetadataCheckBox(i18n("Sharpness:"), parent); - d->sharpnessCB = new QComboBox(false, parent); + d->sharpnessCheck = new MetadataCheckBox(i18n("Sharpness:"), tqparent); + d->sharpnessCB = new TQComboBox(false, tqparent); d->sharpnessCB->insertItem(i18n("Normal"), 0); d->sharpnessCB->insertItem(i18n("Soft"), 1); d->sharpnessCB->insertItem(i18n("Hard"), 2); grid->addMultiCellWidget(d->sharpnessCheck, 4, 4, 0, 0); grid->addMultiCellWidget(d->sharpnessCB, 4, 4, 2, 2); - QWhatsThis::add(d->sharpnessCB, i18n("<p>Set here the direction of sharpness processing " + TQWhatsThis::add(d->sharpnessCB, i18n("<p>Set here the direction of sharpness processing " "applied by the camera to take the picture.")); // -------------------------------------------------------- - d->customRenderedCheck = new MetadataCheckBox(i18n("Custom rendered:"), parent); - d->customRenderedCB = new QComboBox(false, parent); + d->customRenderedCheck = new MetadataCheckBox(i18n("Custom rendered:"), tqparent); + d->customRenderedCB = new TQComboBox(false, tqparent); d->customRenderedCB->insertItem(i18n("Normal process"), 0); d->customRenderedCB->insertItem(i18n("Custom process"), 1); grid->addMultiCellWidget(d->customRenderedCheck, 5, 5, 0, 0); grid->addMultiCellWidget(d->customRenderedCB, 5, 5, 2, 2); - QWhatsThis::add(d->customRenderedCB, i18n("<p>Set here the use of special processing on " + TQWhatsThis::add(d->customRenderedCB, i18n("<p>Set here the use of special processing on " "image data, such as rendering geared to output.")); grid->setColStretch(1, 10); @@ -169,63 +169,63 @@ EXIFAdjust::EXIFAdjust(QWidget* parent) // -------------------------------------------------------- - connect(d->brightnessCheck, SIGNAL(toggled(bool)), - d->brightnessEdit, SLOT(setEnabled(bool))); + connect(d->brightnessCheck, TQT_SIGNAL(toggled(bool)), + d->brightnessEdit, TQT_SLOT(setEnabled(bool))); - connect(d->gainControlCheck, SIGNAL(toggled(bool)), - d->gainControlCB, SLOT(setEnabled(bool))); + connect(d->gainControlCheck, TQT_SIGNAL(toggled(bool)), + d->gainControlCB, TQT_SLOT(setEnabled(bool))); - connect(d->contrastCheck, SIGNAL(toggled(bool)), - d->contrastCB, SLOT(setEnabled(bool))); + connect(d->contrastCheck, TQT_SIGNAL(toggled(bool)), + d->contrastCB, TQT_SLOT(setEnabled(bool))); - connect(d->saturationCheck, SIGNAL(toggled(bool)), - d->saturationCB, SLOT(setEnabled(bool))); + connect(d->saturationCheck, TQT_SIGNAL(toggled(bool)), + d->saturationCB, TQT_SLOT(setEnabled(bool))); - connect(d->sharpnessCheck, SIGNAL(toggled(bool)), - d->sharpnessCB, SLOT(setEnabled(bool))); + connect(d->sharpnessCheck, TQT_SIGNAL(toggled(bool)), + d->sharpnessCB, TQT_SLOT(setEnabled(bool))); - connect(d->customRenderedCheck, SIGNAL(toggled(bool)), - d->customRenderedCB, SLOT(setEnabled(bool))); + connect(d->customRenderedCheck, TQT_SIGNAL(toggled(bool)), + d->customRenderedCB, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->brightnessCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->brightnessCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->gainControlCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->gainControlCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->contrastCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->contrastCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->saturationCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->saturationCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->sharpnessCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->sharpnessCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->customRenderedCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->customRenderedCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->gainControlCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->gainControlCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->contrastCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->contrastCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->saturationCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->saturationCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->sharpnessCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->sharpnessCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->customRenderedCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->customRenderedCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->brightnessEdit, SIGNAL(valueChanged(double)), - this, SIGNAL(signalModified())); + connect(d->brightnessEdit, TQT_SIGNAL(valueChanged(double)), + this, TQT_SIGNAL(signalModified())); } EXIFAdjust::~EXIFAdjust() @@ -233,7 +233,7 @@ EXIFAdjust::~EXIFAdjust() delete d; } -void EXIFAdjust::readMetadata(QByteArray& exifData) +void EXIFAdjust::readMetadata(TQByteArray& exifData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; @@ -323,7 +323,7 @@ void EXIFAdjust::readMetadata(QByteArray& exifData) blockSignals(false); } -void EXIFAdjust::applyMetadata(QByteArray& exifData) +void EXIFAdjust::applyMetadata(TQByteArray& exifData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); diff --git a/kipi-plugins/metadataedit/exifadjust.h b/kipi-plugins/metadataedit/exifadjust.h index bf7be12..1acabaf 100644 --- a/kipi-plugins/metadataedit/exifadjust.h +++ b/kipi-plugins/metadataedit/exifadjust.h @@ -23,27 +23,28 @@ #ifndef EXIF_ADJUST_H #define EXIF_ADJUST_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class EXIFAdjustPriv; -class EXIFAdjust : public QWidget +class EXIFAdjust : public TQWidget { Q_OBJECT + TQ_OBJECT public: - EXIFAdjust(QWidget* parent); + EXIFAdjust(TQWidget* tqparent); ~EXIFAdjust(); - void applyMetadata(QByteArray& exifData); - void readMetadata(QByteArray& exifData); + void applyMetadata(TQByteArray& exifData); + void readMetadata(TQByteArray& exifData); signals: diff --git a/kipi-plugins/metadataedit/exifcaption.cpp b/kipi-plugins/metadataedit/exifcaption.cpp index abab570..b41ac1b 100644 --- a/kipi-plugins/metadataedit/exifcaption.cpp +++ b/kipi-plugins/metadataedit/exifcaption.cpp @@ -22,13 +22,13 @@ // QT includes. -#include <qlayout.h> -#include <qhgroupbox.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqhgroupbox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqcheckbox.h> // KDE includes. @@ -74,14 +74,14 @@ public: syncIPTCCaptionCheck = 0; } - QCheckBox *documentNameCheck; - QCheckBox *imageDescCheck; - QCheckBox *artistCheck; - QCheckBox *copyrightCheck; - QCheckBox *userCommentCheck; - QCheckBox *syncJFIFCommentCheck; - QCheckBox *syncHOSTCommentCheck; - QCheckBox *syncIPTCCaptionCheck; + TQCheckBox *documentNameCheck; + TQCheckBox *imageDescCheck; + TQCheckBox *artistCheck; + TQCheckBox *copyrightCheck; + TQCheckBox *userCommentCheck; + TQCheckBox *syncJFIFCommentCheck; + TQCheckBox *syncHOSTCommentCheck; + TQCheckBox *syncIPTCCaptionCheck; KTextEdit *userCommentEdit; @@ -91,71 +91,71 @@ public: KLineEdit *copyrightEdit; }; -EXIFCaption::EXIFCaption(QWidget* parent) - : QWidget(parent) +EXIFCaption::EXIFCaption(TQWidget* tqparent) + : TQWidget(tqparent) { d = new EXIFCaptionPriv; - QVBoxLayout *vlay = new QVBoxLayout( parent, 0, KDialog::spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( tqparent, 0, KDialog::spacingHint() ); // EXIF only accept printable Ascii char. - QRegExp asciiRx("[\x20-\x7F]+$"); - QValidator *asciiValidator = new QRegExpValidator(asciiRx, this); + TQRegExp asciiRx("[\x20-\x7F]+$"); + TQValidator *asciiValidator = new TQRegExpValidator(asciiRx, TQT_TQOBJECT(this)); // -------------------------------------------------------- - d->documentNameCheck = new QCheckBox(i18n("Document name (*):"), parent); - d->documentNameEdit = new KLineEdit(parent); + d->documentNameCheck = new TQCheckBox(i18n("Document name (*):"), tqparent); + d->documentNameEdit = new KLineEdit(tqparent); d->documentNameEdit->setValidator(asciiValidator); vlay->addWidget(d->documentNameCheck); vlay->addWidget(d->documentNameEdit); - QWhatsThis::add(d->documentNameEdit, i18n("<p>Enter the name of the document from which " + TQWhatsThis::add(d->documentNameEdit, i18n("<p>Enter the name of the document from which " "this image was been scanned. This field is limited " "to ASCII characters.")); // -------------------------------------------------------- - d->imageDescCheck = new QCheckBox(i18n("Image description (*):"), parent); - d->imageDescEdit = new KLineEdit(parent); + d->imageDescCheck = new TQCheckBox(i18n("Image description (*):"), tqparent); + d->imageDescEdit = new KLineEdit(tqparent); d->imageDescEdit->setValidator(asciiValidator); vlay->addWidget(d->imageDescCheck); vlay->addWidget(d->imageDescEdit); - QWhatsThis::add(d->imageDescEdit, i18n("<p>Enter the image title. This field is limited " + TQWhatsThis::add(d->imageDescEdit, i18n("<p>Enter the image title. This field is limited " "to ASCII characters.")); // -------------------------------------------------------- - d->artistCheck = new QCheckBox(i18n("Artist (*):"), parent); - d->artistEdit = new KLineEdit(parent); + d->artistCheck = new TQCheckBox(i18n("Artist (*):"), tqparent); + d->artistEdit = new KLineEdit(tqparent); d->artistEdit->setValidator(asciiValidator); vlay->addWidget(d->artistCheck); vlay->addWidget(d->artistEdit); - QWhatsThis::add(d->artistEdit, i18n("<p>Enter the image author's name. " + TQWhatsThis::add(d->artistEdit, i18n("<p>Enter the image author's name. " "This field is limited to ASCII characters.")); // -------------------------------------------------------- - d->copyrightCheck = new QCheckBox(i18n("Copyright (*):"), parent); - d->copyrightEdit = new KLineEdit(parent); + d->copyrightCheck = new TQCheckBox(i18n("Copyright (*):"), tqparent); + d->copyrightEdit = new KLineEdit(tqparent); d->copyrightEdit->setValidator(asciiValidator); vlay->addWidget(d->copyrightCheck); vlay->addWidget(d->copyrightEdit); - QWhatsThis::add(d->copyrightEdit, i18n("<p>Enter the copyright owner of the image. " + TQWhatsThis::add(d->copyrightEdit, i18n("<p>Enter the copyright owner of the image. " "This field is limited to ASCII characters.")); // -------------------------------------------------------- - d->userCommentCheck = new QCheckBox(i18n("Caption:"), parent); - d->userCommentEdit = new KTextEdit(parent); - QWhatsThis::add(d->userCommentEdit, i18n("<p>Enter the image's caption. " + d->userCommentCheck = new TQCheckBox(i18n("Caption:"), tqparent); + d->userCommentEdit = new KTextEdit(tqparent); + TQWhatsThis::add(d->userCommentEdit, i18n("<p>Enter the image's caption. " "This field is not limited. UTF8 encoding " "will be used to save the text.")); - d->syncHOSTCommentCheck = new QCheckBox(i18n("Sync captions entered through %1") - .arg(KApplication::kApplication()->aboutData()->appName()), - parent); - d->syncJFIFCommentCheck = new QCheckBox(i18n("Sync JFIF Comment section"), parent); - d->syncIPTCCaptionCheck = new QCheckBox(i18n("Sync IPTC caption (warning: limited to 2000 printable " - "Ascii characters set)"), parent); + d->syncHOSTCommentCheck = new TQCheckBox(i18n("Sync captions entered through %1") + .tqarg(KApplication::kApplication()->aboutData()->appName()), + tqparent); + d->syncJFIFCommentCheck = new TQCheckBox(i18n("Sync JFIF Comment section"), tqparent); + d->syncIPTCCaptionCheck = new TQCheckBox(i18n("Sync IPTC caption (warning: limited to 2000 printable " + "Ascii characters set)"), tqparent); vlay->addWidget(d->userCommentCheck); vlay->addWidget(d->userCommentEdit); @@ -169,69 +169,69 @@ EXIFCaption::EXIFCaption(QWidget* parent) "<b><a href='http://en.wikipedia.org/wiki/EXIF'>EXIF</a></b> " "text tags marked by (*) only support printable " "<b><a href='http://en.wikipedia.org/wiki/Ascii'>ASCII</a></b> " - "characters set.</b>"), parent); + "characters set.</b>"), tqparent); vlay->addWidget(note); vlay->addStretch(); // -------------------------------------------------------- - connect(d->documentNameCheck, SIGNAL(toggled(bool)), - d->documentNameEdit, SLOT(setEnabled(bool))); + connect(d->documentNameCheck, TQT_SIGNAL(toggled(bool)), + d->documentNameEdit, TQT_SLOT(setEnabled(bool))); - connect(d->imageDescCheck, SIGNAL(toggled(bool)), - d->imageDescEdit, SLOT(setEnabled(bool))); + connect(d->imageDescCheck, TQT_SIGNAL(toggled(bool)), + d->imageDescEdit, TQT_SLOT(setEnabled(bool))); - connect(d->artistCheck, SIGNAL(toggled(bool)), - d->artistEdit, SLOT(setEnabled(bool))); + connect(d->artistCheck, TQT_SIGNAL(toggled(bool)), + d->artistEdit, TQT_SLOT(setEnabled(bool))); - connect(d->copyrightCheck, SIGNAL(toggled(bool)), - d->copyrightEdit, SLOT(setEnabled(bool))); + connect(d->copyrightCheck, TQT_SIGNAL(toggled(bool)), + d->copyrightEdit, TQT_SLOT(setEnabled(bool))); - connect(d->userCommentCheck, SIGNAL(toggled(bool)), - d->userCommentEdit, SLOT(setEnabled(bool))); + connect(d->userCommentCheck, TQT_SIGNAL(toggled(bool)), + d->userCommentEdit, TQT_SLOT(setEnabled(bool))); - connect(d->userCommentCheck, SIGNAL(toggled(bool)), - d->syncJFIFCommentCheck, SLOT(setEnabled(bool))); + connect(d->userCommentCheck, TQT_SIGNAL(toggled(bool)), + d->syncJFIFCommentCheck, TQT_SLOT(setEnabled(bool))); - connect(d->userCommentCheck, SIGNAL(toggled(bool)), - d->syncHOSTCommentCheck, SLOT(setEnabled(bool))); + connect(d->userCommentCheck, TQT_SIGNAL(toggled(bool)), + d->syncHOSTCommentCheck, TQT_SLOT(setEnabled(bool))); - connect(d->userCommentCheck, SIGNAL(toggled(bool)), - d->syncIPTCCaptionCheck, SLOT(setEnabled(bool))); + connect(d->userCommentCheck, TQT_SIGNAL(toggled(bool)), + d->syncIPTCCaptionCheck, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->documentNameCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->documentNameCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->imageDescCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->imageDescCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->artistCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->artistCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->copyrightCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->copyrightCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->userCommentCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->userCommentCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->userCommentEdit, SIGNAL(textChanged()), - this, SIGNAL(signalModified())); + connect(d->userCommentEdit, TQT_SIGNAL(textChanged()), + this, TQT_SIGNAL(signalModified())); - connect(d->documentNameEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->documentNameEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->imageDescEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->imageDescEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->artistEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->artistEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->copyrightEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->copyrightEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); } EXIFCaption::~EXIFCaption() @@ -254,7 +254,7 @@ bool EXIFCaption::syncIPTCCaptionIsChecked() return d->syncIPTCCaptionCheck->isChecked(); } -QString EXIFCaption::getEXIFUserComments() +TQString EXIFCaption::getEXIFUserComments() { return d->userCommentEdit->text(); } @@ -274,12 +274,12 @@ void EXIFCaption::setCheckedSyncIPTCCaption(bool c) d->syncIPTCCaptionCheck->setChecked(c); } -void EXIFCaption::readMetadata(QByteArray& exifData) +void EXIFCaption::readMetadata(TQByteArray& exifData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); - QString data; + TQString data; d->documentNameEdit->clear(); d->documentNameCheck->setChecked(false); @@ -337,7 +337,7 @@ void EXIFCaption::readMetadata(QByteArray& exifData) blockSignals(false); } -void EXIFCaption::applyMetadata(QByteArray& exifData, QByteArray& iptcData) +void EXIFCaption::applyMetadata(TQByteArray& exifData, TQByteArray& iptcData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); @@ -376,7 +376,7 @@ void EXIFCaption::applyMetadata(QByteArray& exifData, QByteArray& iptcData) else exiv2Iface.removeExifTag("Exif.Photo.UserComment"); - exiv2Iface.setImageProgramId(QString("Kipi-plugins"), QString(kipiplugins_version)); + exiv2Iface.setImageProgramId(TQString("Kipi-plugins"), TQString(kipiplugins_version)); exifData = exiv2Iface.getExif(); iptcData = exiv2Iface.getIptc(); diff --git a/kipi-plugins/metadataedit/exifcaption.h b/kipi-plugins/metadataedit/exifcaption.h index 5aa52c0..8c231d8 100644 --- a/kipi-plugins/metadataedit/exifcaption.h +++ b/kipi-plugins/metadataedit/exifcaption.h @@ -23,28 +23,29 @@ #ifndef EXIF_CAPTION_H #define EXIF_CAPTION_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqcstring.h> +#include <tqstring.h> namespace KIPIMetadataEditPlugin { class EXIFCaptionPriv; -class EXIFCaption : public QWidget +class EXIFCaption : public TQWidget { Q_OBJECT + TQ_OBJECT public: - EXIFCaption(QWidget* parent); + EXIFCaption(TQWidget* tqparent); ~EXIFCaption(); - void applyMetadata(QByteArray& exifData, QByteArray& iptcData); - void readMetadata(QByteArray& exifData); + void applyMetadata(TQByteArray& exifData, TQByteArray& iptcData); + void readMetadata(TQByteArray& exifData); bool syncJFIFCommentIsChecked(); bool syncHOSTCommentIsChecked(); @@ -54,7 +55,7 @@ public: void setCheckedSyncHOSTComment(bool c); void setCheckedSyncIPTCCaption(bool c); - QString getEXIFUserComments(); + TQString getEXIFUserComments(); signals: diff --git a/kipi-plugins/metadataedit/exifdatetime.cpp b/kipi-plugins/metadataedit/exifdatetime.cpp index 7388703..c9d3c94 100644 --- a/kipi-plugins/metadataedit/exifdatetime.cpp +++ b/kipi-plugins/metadataedit/exifdatetime.cpp @@ -22,11 +22,11 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqcheckbox.h> // KDE includes. @@ -73,14 +73,14 @@ public: syncIPTCDateCheck = 0; } - QCheckBox *dateCreatedCheck; - QCheckBox *dateOriginalCheck; - QCheckBox *dateDigitalizedCheck; - QCheckBox *dateCreatedSubSecCheck; - QCheckBox *dateOriginalSubSecCheck; - QCheckBox *dateDigitalizedSubSecCheck; - QCheckBox *syncHOSTDateCheck; - QCheckBox *syncIPTCDateCheck; + TQCheckBox *dateCreatedCheck; + TQCheckBox *dateOriginalCheck; + TQCheckBox *dateDigitalizedCheck; + TQCheckBox *dateCreatedSubSecCheck; + TQCheckBox *dateOriginalSubSecCheck; + TQCheckBox *dateDigitalizedSubSecCheck; + TQCheckBox *syncHOSTDateCheck; + TQCheckBox *syncIPTCDateCheck; KIntSpinBox *dateCreatedSubSecEdit; KIntSpinBox *dateOriginalSubSecEdit; @@ -91,25 +91,25 @@ public: KDateTimeWidget *dateDigitalizedSel; }; -EXIFDateTime::EXIFDateTime(QWidget* parent) - : QWidget(parent) +EXIFDateTime::EXIFDateTime(TQWidget* tqparent) + : TQWidget(tqparent) { d = new EXIFDateTimePriv; - QGridLayout* grid = new QGridLayout(parent, 9, 3, KDialog::spacingHint()); + TQGridLayout* grid = new TQGridLayout(tqparent, 9, 3, KDialog::spacingHint()); // -------------------------------------------------------- - d->dateCreatedCheck = new QCheckBox(i18n("Creation date and time"), parent); - d->dateCreatedSubSecCheck = new QCheckBox(i18n("Creation sub-second"), parent); - d->dateCreatedSel = new KDateTimeWidget(parent); - d->dateCreatedSubSecEdit = new KIntSpinBox(0, 999, 1, 0, 10, parent); - d->dateCreatedSel->setDateTime(QDateTime::currentDateTime()); - d->syncHOSTDateCheck = new QCheckBox(i18n("Sync creation date entered through %1") - .arg(KApplication::kApplication()->aboutData()->appName()), - parent); - d->syncIPTCDateCheck = new QCheckBox(i18n("Sync IPTC creation date"), parent); - KSeparator *line = new KSeparator(Horizontal, parent); + d->dateCreatedCheck = new TQCheckBox(i18n("Creation date and time"), tqparent); + d->dateCreatedSubSecCheck = new TQCheckBox(i18n("Creation sub-second"), tqparent); + d->dateCreatedSel = new KDateTimeWidget(tqparent); + d->dateCreatedSubSecEdit = new KIntSpinBox(0, 999, 1, 0, 10, tqparent); + d->dateCreatedSel->setDateTime(TQDateTime::tqcurrentDateTime()); + d->syncHOSTDateCheck = new TQCheckBox(i18n("Sync creation date entered through %1") + .tqarg(KApplication::kApplication()->aboutData()->appName()), + tqparent); + d->syncIPTCDateCheck = new TQCheckBox(i18n("Sync IPTC creation date"), tqparent); + KSeparator *line = new KSeparator(Qt::Horizontal, tqparent); grid->addMultiCellWidget(d->dateCreatedCheck, 0, 0, 0, 0); grid->addMultiCellWidget(d->dateCreatedSubSecCheck, 0, 0, 1, 2); @@ -119,45 +119,45 @@ EXIFDateTime::EXIFDateTime(QWidget* parent) grid->addMultiCellWidget(d->syncIPTCDateCheck, 3, 3, 0, 3); grid->addMultiCellWidget(line, 4, 4, 0, 3); - QWhatsThis::add(d->dateCreatedSel, i18n("<p>Set here the date and time of image creation. " + TQWhatsThis::add(d->dateCreatedSel, i18n("<p>Set here the date and time of image creation. " "In this standard it is the date and time the file was changed.")); - QWhatsThis::add(d->dateCreatedSubSecEdit, i18n("<p>Set here the fractions of seconds for the date " + TQWhatsThis::add(d->dateCreatedSubSecEdit, i18n("<p>Set here the fractions of seconds for the date " "and time of image creation.")); // -------------------------------------------------------- - d->dateOriginalCheck = new QCheckBox(i18n("Original date and time"), parent); - d->dateOriginalSubSecCheck = new QCheckBox(i18n("Original sub-second"), parent); - d->dateOriginalSel = new KDateTimeWidget(parent); - d->dateOriginalSubSecEdit = new KIntSpinBox(0, 999, 1, 0, 10, parent); - d->dateOriginalSel->setDateTime(QDateTime::currentDateTime()); + d->dateOriginalCheck = new TQCheckBox(i18n("Original date and time"), tqparent); + d->dateOriginalSubSecCheck = new TQCheckBox(i18n("Original sub-second"), tqparent); + d->dateOriginalSel = new KDateTimeWidget(tqparent); + d->dateOriginalSubSecEdit = new KIntSpinBox(0, 999, 1, 0, 10, tqparent); + d->dateOriginalSel->setDateTime(TQDateTime::tqcurrentDateTime()); grid->addMultiCellWidget(d->dateOriginalCheck, 5, 5, 0, 0); grid->addMultiCellWidget(d->dateOriginalSubSecCheck, 5, 5, 1, 2); grid->addMultiCellWidget(d->dateOriginalSel, 6, 6, 0, 0); grid->addMultiCellWidget(d->dateOriginalSubSecEdit, 6, 6, 1, 1); - QWhatsThis::add(d->dateOriginalSel, i18n("<p>Set here the date and time when the original image " + TQWhatsThis::add(d->dateOriginalSel, i18n("<p>Set here the date and time when the original image " "data was generated. For a digital still camera the date and " "time the picture was taken are recorded.")); - QWhatsThis::add(d->dateOriginalSubSecEdit, i18n("<p>Set here the fractions of seconds for the date " + TQWhatsThis::add(d->dateOriginalSubSecEdit, i18n("<p>Set here the fractions of seconds for the date " "and time when the original image data was generated.")); // -------------------------------------------------------- - d->dateDigitalizedCheck = new QCheckBox(i18n("Digitization date and time"), parent); - d->dateDigitalizedSubSecCheck = new QCheckBox(i18n("Digitization sub-second"), parent); - d->dateDigitalizedSel = new KDateTimeWidget(parent); - d->dateDigitalizedSubSecEdit = new KIntSpinBox(0, 999, 1, 0, 10, parent); - d->dateDigitalizedSel->setDateTime(QDateTime::currentDateTime()); + d->dateDigitalizedCheck = new TQCheckBox(i18n("Digitization date and time"), tqparent); + d->dateDigitalizedSubSecCheck = new TQCheckBox(i18n("Digitization sub-second"), tqparent); + d->dateDigitalizedSel = new KDateTimeWidget(tqparent); + d->dateDigitalizedSubSecEdit = new KIntSpinBox(0, 999, 1, 0, 10, tqparent); + d->dateDigitalizedSel->setDateTime(TQDateTime::tqcurrentDateTime()); grid->addMultiCellWidget(d->dateDigitalizedCheck, 7, 7, 0, 0); grid->addMultiCellWidget(d->dateDigitalizedSubSecCheck, 7, 7, 1, 2); grid->addMultiCellWidget(d->dateDigitalizedSel, 8, 8, 0, 0); grid->addMultiCellWidget(d->dateDigitalizedSubSecEdit, 8, 8, 1, 1); - QWhatsThis::add(d->dateDigitalizedSel, i18n("<p>Set here the date and time when the image was " + TQWhatsThis::add(d->dateDigitalizedSel, i18n("<p>Set here the date and time when the image was " "stored as digital data. If, for example, an image was " "captured by a digital still camera and at the same " "time the file was recorded, then Original and Digitization " "date and time will have the same contents.")); - QWhatsThis::add(d->dateDigitalizedSubSecEdit, i18n("<p>Set here the fractions of seconds for the date " + TQWhatsThis::add(d->dateDigitalizedSubSecEdit, i18n("<p>Set here the fractions of seconds for the date " "and time when the image was stored as digital data.")); grid->setColStretch(3, 10); @@ -165,69 +165,69 @@ EXIFDateTime::EXIFDateTime(QWidget* parent) // -------------------------------------------------------- - connect(d->dateCreatedCheck, SIGNAL(toggled(bool)), - d->dateCreatedSel, SLOT(setEnabled(bool))); + connect(d->dateCreatedCheck, TQT_SIGNAL(toggled(bool)), + d->dateCreatedSel, TQT_SLOT(setEnabled(bool))); - connect(d->dateOriginalCheck, SIGNAL(toggled(bool)), - d->dateOriginalSel, SLOT(setEnabled(bool))); + connect(d->dateOriginalCheck, TQT_SIGNAL(toggled(bool)), + d->dateOriginalSel, TQT_SLOT(setEnabled(bool))); - connect(d->dateDigitalizedCheck, SIGNAL(toggled(bool)), - d->dateDigitalizedSel, SLOT(setEnabled(bool))); + connect(d->dateDigitalizedCheck, TQT_SIGNAL(toggled(bool)), + d->dateDigitalizedSel, TQT_SLOT(setEnabled(bool))); - connect(d->dateCreatedSubSecCheck, SIGNAL(toggled(bool)), - d->dateCreatedSubSecEdit, SLOT(setEnabled(bool))); + connect(d->dateCreatedSubSecCheck, TQT_SIGNAL(toggled(bool)), + d->dateCreatedSubSecEdit, TQT_SLOT(setEnabled(bool))); - connect(d->dateOriginalSubSecCheck, SIGNAL(toggled(bool)), - d->dateOriginalSubSecEdit, SLOT(setEnabled(bool))); + connect(d->dateOriginalSubSecCheck, TQT_SIGNAL(toggled(bool)), + d->dateOriginalSubSecEdit, TQT_SLOT(setEnabled(bool))); - connect(d->dateDigitalizedSubSecCheck, SIGNAL(toggled(bool)), - d->dateDigitalizedSubSecEdit, SLOT(setEnabled(bool))); + connect(d->dateDigitalizedSubSecCheck, TQT_SIGNAL(toggled(bool)), + d->dateDigitalizedSubSecEdit, TQT_SLOT(setEnabled(bool))); - connect(d->dateCreatedCheck, SIGNAL(toggled(bool)), - d->syncHOSTDateCheck, SLOT(setEnabled(bool))); + connect(d->dateCreatedCheck, TQT_SIGNAL(toggled(bool)), + d->syncHOSTDateCheck, TQT_SLOT(setEnabled(bool))); - connect(d->dateCreatedCheck, SIGNAL(toggled(bool)), - d->syncIPTCDateCheck, SLOT(setEnabled(bool))); + connect(d->dateCreatedCheck, TQT_SIGNAL(toggled(bool)), + d->syncIPTCDateCheck, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->dateCreatedCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->dateCreatedCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateOriginalCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->dateOriginalCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateDigitalizedCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->dateDigitalizedCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateCreatedSubSecCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->dateCreatedSubSecCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateOriginalSubSecCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->dateOriginalSubSecCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateDigitalizedSubSecCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->dateDigitalizedSubSecCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->dateCreatedSubSecEdit, SIGNAL(valueChanged(int)), - this, SIGNAL(signalModified())); + connect(d->dateCreatedSubSecEdit, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateOriginalSubSecEdit, SIGNAL(valueChanged(int)), - this, SIGNAL(signalModified())); + connect(d->dateOriginalSubSecEdit, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateDigitalizedSubSecEdit, SIGNAL(valueChanged(int)), - this, SIGNAL(signalModified())); + connect(d->dateDigitalizedSubSecEdit, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateCreatedSel, SIGNAL(valueChanged (const QDateTime &)), - this, SIGNAL(signalModified())); + connect(d->dateCreatedSel, TQT_SIGNAL(valueChanged (const TQDateTime &)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateOriginalSel, SIGNAL(valueChanged (const QDateTime &)), - this, SIGNAL(signalModified())); + connect(d->dateOriginalSel, TQT_SIGNAL(valueChanged (const TQDateTime &)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateDigitalizedSel, SIGNAL(valueChanged (const QDateTime &)), - this, SIGNAL(signalModified())); + connect(d->dateDigitalizedSel, TQT_SIGNAL(valueChanged (const TQDateTime &)), + this, TQT_SIGNAL(signalModified())); } EXIFDateTime::~EXIFDateTime() @@ -255,26 +255,26 @@ void EXIFDateTime::setCheckedSyncIPTCDate(bool c) d->syncIPTCDateCheck->setChecked(c); } -QDateTime EXIFDateTime::getEXIFCreationDate() +TQDateTime EXIFDateTime::getEXIFCreationDate() { return d->dateCreatedSel->dateTime(); } -void EXIFDateTime::readMetadata(QByteArray& exifData) +void EXIFDateTime::readMetadata(TQByteArray& exifData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); - QDateTime datetime; - QString datetimeStr, data; + TQDateTime datetime; + TQString datetimeStr, data; - d->dateCreatedSel->setDateTime(QDateTime::currentDateTime()); + d->dateCreatedSel->setDateTime(TQDateTime::tqcurrentDateTime()); d->dateCreatedCheck->setChecked(false); datetimeStr = exiv2Iface.getExifTagString("Exif.Image.DateTime", false); if (!datetimeStr.isEmpty()) { - datetime = QDateTime::fromString(datetimeStr, Qt::ISODate); + datetime = TQDateTime::fromString(datetimeStr, Qt::ISODate); if (datetime.isValid()) { d->dateCreatedSel->setDateTime(datetime); @@ -300,12 +300,12 @@ void EXIFDateTime::readMetadata(QByteArray& exifData) } d->dateCreatedSubSecEdit->setEnabled(d->dateCreatedSubSecCheck->isChecked()); - d->dateOriginalSel->setDateTime(QDateTime::currentDateTime()); + d->dateOriginalSel->setDateTime(TQDateTime::tqcurrentDateTime()); d->dateOriginalCheck->setChecked(false); datetimeStr = exiv2Iface.getExifTagString("Exif.Photo.DateTimeOriginal", false); if (!datetimeStr.isEmpty()) { - datetime = QDateTime::fromString(datetimeStr, Qt::ISODate); + datetime = TQDateTime::fromString(datetimeStr, Qt::ISODate); if (datetime.isValid()) { d->dateOriginalSel->setDateTime(datetime); @@ -329,12 +329,12 @@ void EXIFDateTime::readMetadata(QByteArray& exifData) } d->dateOriginalSubSecEdit->setEnabled(d->dateOriginalSubSecCheck->isChecked()); - d->dateDigitalizedSel->setDateTime(QDateTime::currentDateTime()); + d->dateDigitalizedSel->setDateTime(TQDateTime::tqcurrentDateTime()); d->dateDigitalizedCheck->setChecked(false); datetimeStr = exiv2Iface.getExifTagString("Exif.Photo.DateTimeDigitized", false); if (!datetimeStr.isEmpty()) { - datetime = QDateTime::fromString(datetimeStr, Qt::ISODate); + datetime = TQDateTime::fromString(datetimeStr, Qt::ISODate); if (datetime.isValid()) { d->dateDigitalizedSel->setDateTime(datetime); @@ -361,7 +361,7 @@ void EXIFDateTime::readMetadata(QByteArray& exifData) blockSignals(false); } -void EXIFDateTime::applyMetadata(QByteArray& exifData, QByteArray& iptcData) +void EXIFDateTime::applyMetadata(TQByteArray& exifData, TQByteArray& iptcData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); @@ -370,7 +370,7 @@ void EXIFDateTime::applyMetadata(QByteArray& exifData, QByteArray& iptcData) if (d->dateCreatedCheck->isChecked()) { exiv2Iface.setExifTagString("Exif.Image.DateTime", - d->dateCreatedSel->dateTime().toString(QString("yyyy:MM:dd hh:mm:ss")).ascii()); + d->dateCreatedSel->dateTime().toString(TQString("yyyy:MM:dd hh:mm:ss")).ascii()); if (syncIPTCDateIsChecked()) { @@ -385,31 +385,31 @@ void EXIFDateTime::applyMetadata(QByteArray& exifData, QByteArray& iptcData) if (d->dateCreatedSubSecCheck->isChecked()) exiv2Iface.setExifTagString("Exif.Photo.SubSecTime", - QString::number(d->dateCreatedSubSecEdit->value()).ascii()); + TQString::number(d->dateCreatedSubSecEdit->value()).ascii()); else exiv2Iface.removeExifTag("Exif.Photo.SubSecTime"); if (d->dateOriginalCheck->isChecked()) exiv2Iface.setExifTagString("Exif.Photo.DateTimeOriginal", - d->dateOriginalSel->dateTime().toString(QString("yyyy:MM:dd hh:mm:ss")).ascii()); + d->dateOriginalSel->dateTime().toString(TQString("yyyy:MM:dd hh:mm:ss")).ascii()); else exiv2Iface.removeExifTag("Exif.Photo.DateTimeOriginal"); if (d->dateOriginalSubSecCheck->isChecked()) exiv2Iface.setExifTagString("Exif.Photo.SubSecTimeOriginal", - QString::number(d->dateOriginalSubSecEdit->value()).ascii()); + TQString::number(d->dateOriginalSubSecEdit->value()).ascii()); else exiv2Iface.removeExifTag("Exif.Photo.SubSecTimeOriginal"); if (d->dateDigitalizedCheck->isChecked()) exiv2Iface.setExifTagString("Exif.Photo.DateTimeDigitized", - d->dateDigitalizedSel->dateTime().toString(QString("yyyy:MM:dd hh:mm:ss")).ascii()); + d->dateDigitalizedSel->dateTime().toString(TQString("yyyy:MM:dd hh:mm:ss")).ascii()); else exiv2Iface.removeExifTag("Exif.Photo.DateTimeDigitized"); if (d->dateDigitalizedSubSecCheck->isChecked()) exiv2Iface.setExifTagString("Exif.Photo.SubSecTimeDigitized", - QString::number(d->dateDigitalizedSubSecEdit->value()).ascii()); + TQString::number(d->dateDigitalizedSubSecEdit->value()).ascii()); else exiv2Iface.removeExifTag("Exif.Photo.SubSecTimeDigitized"); diff --git a/kipi-plugins/metadataedit/exifdatetime.h b/kipi-plugins/metadataedit/exifdatetime.h index 254b007..6b41fb5 100644 --- a/kipi-plugins/metadataedit/exifdatetime.h +++ b/kipi-plugins/metadataedit/exifdatetime.h @@ -23,28 +23,29 @@ #ifndef EXIF_DATETIME_H #define EXIF_DATETIME_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> -#include <qdatetime.h> +#include <tqwidget.h> +#include <tqcstring.h> +#include <tqdatetime.h> namespace KIPIMetadataEditPlugin { class EXIFDateTimePriv; -class EXIFDateTime : public QWidget +class EXIFDateTime : public TQWidget { Q_OBJECT + TQ_OBJECT public: - EXIFDateTime(QWidget* parent); + EXIFDateTime(TQWidget* tqparent); ~EXIFDateTime(); - void applyMetadata(QByteArray& exifData, QByteArray& iptcData); - void readMetadata(QByteArray& exifData); + void applyMetadata(TQByteArray& exifData, TQByteArray& iptcData); + void readMetadata(TQByteArray& exifData); bool syncHOSTDateIsChecked(); bool syncIPTCDateIsChecked(); @@ -52,7 +53,7 @@ public: void setCheckedSyncHOSTDate(bool c); void setCheckedSyncIPTCDate(bool c); - QDateTime getEXIFCreationDate(); + TQDateTime getEXIFCreationDate(); signals: diff --git a/kipi-plugins/metadataedit/exifdevice.cpp b/kipi-plugins/metadataedit/exifdevice.cpp index fde3a1b..c5a28bf 100644 --- a/kipi-plugins/metadataedit/exifdevice.cpp +++ b/kipi-plugins/metadataedit/exifdevice.cpp @@ -26,11 +26,11 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qcombobox.h> -#include <qvalidator.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> +#include <tqvalidator.h> // KDE includes. @@ -86,19 +86,19 @@ public: modelEdit = 0; } - QCheckBox *makeCheck; - QCheckBox *modelCheck; - QCheckBox *exposureTimeCheck; - QCheckBox *exposureBiasCheck; + TQCheckBox *makeCheck; + TQCheckBox *modelCheck; + TQCheckBox *exposureTimeCheck; + TQCheckBox *exposureBiasCheck; - QComboBox *deviceTypeCB; - QComboBox *exposureProgramCB; - QComboBox *exposureModeCB; - QComboBox *ISOSpeedCB; - QComboBox *meteringModeCB; - QComboBox *sensingMethodCB; - QComboBox *sceneTypeCB; - QComboBox *subjectDistanceTypeCB; + TQComboBox *deviceTypeCB; + TQComboBox *exposureProgramCB; + TQComboBox *exposureModeCB; + TQComboBox *ISOSpeedCB; + TQComboBox *meteringModeCB; + TQComboBox *sensingMethodCB; + TQComboBox *sceneTypeCB; + TQComboBox *subjectDistanceTypeCB; KLineEdit *makeEdit; KLineEdit *modelEdit; @@ -118,76 +118,76 @@ public: MetadataCheckBox *subjectDistanceTypeCheck; }; -EXIFDevice::EXIFDevice(QWidget* parent) - : QWidget(parent) +EXIFDevice::EXIFDevice(TQWidget* tqparent) + : TQWidget(tqparent) { d = new EXIFDevicePriv; - QGridLayout* grid = new QGridLayout(parent, 16, 5, KDialog::spacingHint()); + TQGridLayout* grid = new TQGridLayout(tqparent, 16, 5, KDialog::spacingHint()); // EXIF only accept printable Ascii char. - QRegExp asciiRx("[\x20-\x7F]+$"); - QValidator *asciiValidator = new QRegExpValidator(asciiRx, this); + TQRegExp asciiRx("[\x20-\x7F]+$"); + TQValidator *asciiValidator = new TQRegExpValidator(asciiRx, TQT_TQOBJECT(this)); // -------------------------------------------------------- - d->makeCheck = new QCheckBox(i18n("Device manufacturer (*):"), parent); - d->makeEdit = new KLineEdit(parent); + d->makeCheck = new TQCheckBox(i18n("Device manufacturer (*):"), tqparent); + d->makeEdit = new KLineEdit(tqparent); d->makeEdit->setValidator(asciiValidator); grid->addMultiCellWidget(d->makeCheck, 0, 0, 0, 0); grid->addMultiCellWidget(d->makeEdit, 0, 0, 2, 5); - QWhatsThis::add(d->makeEdit, i18n("<p>Set here the manufacturer of image input equipment used to " + TQWhatsThis::add(d->makeEdit, i18n("<p>Set here the manufacturer of image input equipment used to " "take the picture. This field is limited to ASCII characters.")); // -------------------------------------------------------- - d->modelCheck = new QCheckBox(i18n("Device model (*):"), parent); - d->modelEdit = new KLineEdit(parent); + d->modelCheck = new TQCheckBox(i18n("Device model (*):"), tqparent); + d->modelEdit = new KLineEdit(tqparent); d->modelEdit->setValidator(asciiValidator); grid->addMultiCellWidget(d->modelCheck, 1, 1, 0, 0); grid->addMultiCellWidget(d->modelEdit, 1, 1, 2, 5); - QWhatsThis::add(d->modelEdit, i18n("<p>Set here the model of image input equipment used to " + TQWhatsThis::add(d->modelEdit, i18n("<p>Set here the model of image input equipment used to " "take the picture. This field is limited to ASCII characters.")); // -------------------------------------------------------- - d->deviceTypeCheck = new MetadataCheckBox(i18n("Device type:"), parent); - d->deviceTypeCB = new QComboBox(false, parent); + d->deviceTypeCheck = new MetadataCheckBox(i18n("Device type:"), tqparent); + d->deviceTypeCB = new TQComboBox(false, tqparent); d->deviceTypeCB->insertItem(i18n("Film scanner"), 0); d->deviceTypeCB->insertItem(i18n("Reflection print scanner"), 1); d->deviceTypeCB->insertItem(i18n("Digital still camera"), 2); grid->addMultiCellWidget(d->deviceTypeCheck, 2, 2, 0, 0); grid->addMultiCellWidget(d->deviceTypeCB, 2, 2, 2, 5); - QWhatsThis::add(d->deviceTypeCB, i18n("<p>Select here the image input equipment type used to " + TQWhatsThis::add(d->deviceTypeCB, i18n("<p>Select here the image input equipment type used to " "take the picture.")); KActiveLabel *warning = new KActiveLabel(i18n("<b>Warning: EXIF <b><a href=" "'http://en.wikipedia.org/wiki/Exchangeable_image_file_format#MakerNote_Information'>" "Makernotes</a></b> can be unreadable if you set " - "wrong device manufacturer/model description.</b>"), parent); + "wrong device manufacturer/model description.</b>"), tqparent); - KSeparator *line = new KSeparator(Horizontal, parent); + KSeparator *line = new KSeparator(Qt::Horizontal, tqparent); grid->addMultiCellWidget(warning, 3, 3, 0, 5); grid->addMultiCellWidget(line, 4, 4, 0, 5); // -------------------------------------------------------- - d->exposureTimeCheck = new QCheckBox(i18n("Exposure time (seconds):"), parent); - d->exposureTimeNumEdit = new KIntSpinBox(1, 100000, 1, 1, 10, parent); - d->exposureTimeDenEdit = new KIntSpinBox(1, 100000, 1, 1, 10, parent); - QLabel *exposureLabel = new QLabel("/", parent); - exposureLabel->setAlignment (Qt::AlignRight|Qt::AlignVCenter); + d->exposureTimeCheck = new TQCheckBox(i18n("Exposure time (seconds):"), tqparent); + d->exposureTimeNumEdit = new KIntSpinBox(1, 100000, 1, 1, 10, tqparent); + d->exposureTimeDenEdit = new KIntSpinBox(1, 100000, 1, 1, 10, tqparent); + TQLabel *exposureLabel = new TQLabel("/", tqparent); + exposureLabel->tqsetAlignment (TQt::AlignRight|TQt::AlignVCenter); grid->addMultiCellWidget(d->exposureTimeCheck, 5, 5, 0, 0); grid->addMultiCellWidget(d->exposureTimeNumEdit, 5, 5, 2, 2); grid->addMultiCellWidget(exposureLabel, 5, 5, 3, 3); grid->addMultiCellWidget(d->exposureTimeDenEdit, 5, 5, 4, 4); - QWhatsThis::add(d->exposureTimeCheck, i18n("<p>Set on this option to set the exposure time " + TQWhatsThis::add(d->exposureTimeCheck, i18n("<p>Set on this option to set the exposure time " "of picture, given in seconds.")); // -------------------------------------------------------- - d->exposureProgramCheck = new MetadataCheckBox(i18n("Exposure program:"), parent); - d->exposureProgramCB = new QComboBox(false, parent); + d->exposureProgramCheck = new MetadataCheckBox(i18n("Exposure program:"), tqparent); + d->exposureProgramCB = new TQComboBox(false, tqparent); d->exposureProgramCB->insertItem(i18n("Not defined"), 0); d->exposureProgramCB->insertItem(i18n("Manual"), 1); d->exposureProgramCB->insertItem(i18n("Auto"), 2); @@ -199,19 +199,19 @@ EXIFDevice::EXIFDevice(QWidget* parent) d->exposureProgramCB->insertItem(i18n("Landscape mode"), 8); grid->addMultiCellWidget(d->exposureProgramCheck, 6, 6, 0, 0); grid->addMultiCellWidget(d->exposureProgramCB, 6, 6, 2, 5); - QWhatsThis::add(d->exposureProgramCB, i18n("<p>Select here the program used by the camera " + TQWhatsThis::add(d->exposureProgramCB, i18n("<p>Select here the program used by the camera " "to set exposure when the picture have been taken.")); // -------------------------------------------------------- - d->exposureModeCheck = new MetadataCheckBox(i18n("Exposure mode:"), parent); - d->exposureModeCB = new QComboBox(false, parent); + d->exposureModeCheck = new MetadataCheckBox(i18n("Exposure mode:"), tqparent); + d->exposureModeCB = new TQComboBox(false, tqparent); d->exposureModeCB->insertItem(i18n("Auto"), 0); d->exposureModeCB->insertItem(i18n("Manual"), 1); d->exposureModeCB->insertItem(i18n("Auto bracket"), 2); grid->addMultiCellWidget(d->exposureModeCheck, 7, 7, 0, 0); grid->addMultiCellWidget(d->exposureModeCB, 7, 7, 2, 5); - QWhatsThis::add(d->exposureModeCB, i18n("<p>Select here the mode used by the camera " + TQWhatsThis::add(d->exposureModeCB, i18n("<p>Select here the mode used by the camera " "to set exposure when the picture have been shot. " "In auto-bracketing mode, the camera shoots a " "series of frames of the same scene at different " @@ -219,20 +219,20 @@ EXIFDevice::EXIFDevice(QWidget* parent) // -------------------------------------------------------- - d->exposureBiasCheck = new QCheckBox(i18n("Exposure bias (APEX):"), parent); - d->exposureBiasEdit = new KDoubleSpinBox(-99.99, 99.99, 0.1, 0.0, 2, parent); + d->exposureBiasCheck = new TQCheckBox(i18n("Exposure bias (APEX):"), tqparent); + d->exposureBiasEdit = new KDoubleSpinBox(-99.99, 99.99, 0.1, 0.0, 2, tqparent); grid->addMultiCellWidget(d->exposureBiasCheck, 8, 8, 0, 0); grid->addMultiCellWidget(d->exposureBiasEdit, 8, 8, 2, 2); - QWhatsThis::add(d->exposureBiasEdit, i18n("<p>Set here the exposure bias value in APEX unit " + TQWhatsThis::add(d->exposureBiasEdit, i18n("<p>Set here the exposure bias value in APEX unit " "used by camera to take the picture.")); - KSeparator *line2 = new KSeparator(Horizontal, parent); + KSeparator *line2 = new KSeparator(Qt::Horizontal, tqparent); grid->addMultiCellWidget(line2, 9, 9, 0, 5); // -------------------------------------------------------- - d->meteringModeCheck = new MetadataCheckBox(i18n("Metering mode:"), parent); - d->meteringModeCB = new QComboBox(false, parent); + d->meteringModeCheck = new MetadataCheckBox(i18n("Metering mode:"), tqparent); + d->meteringModeCB = new TQComboBox(false, tqparent); d->meteringModeCB->insertItem(i18n("Unknown"), 0); d->meteringModeCB->insertItem(i18n("Average"), 1); d->meteringModeCB->insertItem(i18n("Center weighted average"), 2); @@ -243,13 +243,13 @@ EXIFDevice::EXIFDevice(QWidget* parent) d->meteringModeCB->insertItem(i18n("Other"), 7); grid->addMultiCellWidget(d->meteringModeCheck, 10, 10, 0, 0); grid->addMultiCellWidget(d->meteringModeCB, 10, 10, 2, 5); - QWhatsThis::add(d->meteringModeCB, i18n("<p>Select here the metering mode used by the camera " + TQWhatsThis::add(d->meteringModeCB, i18n("<p>Select here the metering mode used by the camera " "to set exposure when the picture have been shot.")); // -------------------------------------------------------- - d->ISOSpeedCheck = new MetadataCheckBox(i18n("Sensitivity (ISO):"), parent); - d->ISOSpeedCB = new QComboBox(false, parent); + d->ISOSpeedCheck = new MetadataCheckBox(i18n("Sensitivity (ISO):"), tqparent); + d->ISOSpeedCB = new TQComboBox(false, tqparent); d->ISOSpeedCB->insertItem("10", 0); d->ISOSpeedCB->insertItem("12", 1); d->ISOSpeedCB->insertItem("16", 2); @@ -288,13 +288,13 @@ EXIFDevice::EXIFDevice(QWidget* parent) d->ISOSpeedCB->insertItem("32000", 35); grid->addMultiCellWidget(d->ISOSpeedCheck, 11, 11, 0, 0); grid->addMultiCellWidget(d->ISOSpeedCB, 11, 11, 2, 5); - QWhatsThis::add(d->ISOSpeedCB, i18n("<p>Select here the ISO Speed of the camera " + TQWhatsThis::add(d->ISOSpeedCB, i18n("<p>Select here the ISO Speed of the camera " "witch have taken the picture.")); // -------------------------------------------------------- - d->sensingMethodCheck = new MetadataCheckBox(i18n("Sensing method:"), parent); - d->sensingMethodCB = new QComboBox(false, parent); + d->sensingMethodCheck = new MetadataCheckBox(i18n("Sensing method:"), tqparent); + d->sensingMethodCB = new TQComboBox(false, tqparent); d->sensingMethodCB->insertItem(i18n("Not defined"), 0); d->sensingMethodCB->insertItem(i18n("One-chip color area"), 1); d->sensingMethodCB->insertItem(i18n("Two-chip color area"), 2); @@ -304,33 +304,33 @@ EXIFDevice::EXIFDevice(QWidget* parent) d->sensingMethodCB->insertItem(i18n("Color sequential linear"), 6); grid->addMultiCellWidget(d->sensingMethodCheck, 12, 12, 0, 0); grid->addMultiCellWidget(d->sensingMethodCB, 12, 12, 2, 5); - QWhatsThis::add(d->sensingMethodCB, i18n("<p>Select here the image sensor type used by the camera " + TQWhatsThis::add(d->sensingMethodCB, i18n("<p>Select here the image sensor type used by the camera " "to take the picture.")); // -------------------------------------------------------- - d->sceneTypeCheck = new MetadataCheckBox(i18n("Scene capture type:"), parent); - d->sceneTypeCB = new QComboBox(false, parent); + d->sceneTypeCheck = new MetadataCheckBox(i18n("Scene capture type:"), tqparent); + d->sceneTypeCB = new TQComboBox(false, tqparent); d->sceneTypeCB->insertItem(i18n("Standard"), 0); d->sceneTypeCB->insertItem(i18n("Landscape"), 1); d->sceneTypeCB->insertItem(i18n("Portrait"), 2); d->sceneTypeCB->insertItem(i18n("Night scene"), 3); grid->addMultiCellWidget(d->sceneTypeCheck, 13, 13, 0, 0); grid->addMultiCellWidget(d->sceneTypeCB, 13, 13, 2, 5); - QWhatsThis::add(d->sceneTypeCB, i18n("<p>Select here the type of scene used by the camera " + TQWhatsThis::add(d->sceneTypeCB, i18n("<p>Select here the type of scene used by the camera " "to take the picture.")); // -------------------------------------------------------- - d->subjectDistanceTypeCheck = new MetadataCheckBox(i18n("Subject distance type:"), parent); - d->subjectDistanceTypeCB = new QComboBox(false, parent); + d->subjectDistanceTypeCheck = new MetadataCheckBox(i18n("Subject distance type:"), tqparent); + d->subjectDistanceTypeCB = new TQComboBox(false, tqparent); d->subjectDistanceTypeCB->insertItem(i18n("Unknow"), 0); d->subjectDistanceTypeCB->insertItem(i18n("Macro"), 1); d->subjectDistanceTypeCB->insertItem(i18n("Close view"), 2); d->subjectDistanceTypeCB->insertItem(i18n("Distant view"), 3); grid->addMultiCellWidget(d->subjectDistanceTypeCheck, 14, 14, 0, 0); grid->addMultiCellWidget(d->subjectDistanceTypeCB, 14, 14, 2, 5); - QWhatsThis::add(d->subjectDistanceTypeCB, i18n("<p>Select here the type of distance between " + TQWhatsThis::add(d->subjectDistanceTypeCB, i18n("<p>Select here the type of distance between " "the subject and the image input equipment.")); // -------------------------------------------------------- @@ -339,7 +339,7 @@ EXIFDevice::EXIFDevice(QWidget* parent) "<b><a href='http://en.wikipedia.org/wiki/EXIF'>EXIF</a></b> " "text tags marked by (*) only support printable " "<b><a href='http://en.wikipedia.org/wiki/Ascii'>ASCII</a></b> " - "characters set.</b>"), parent); + "characters set.</b>"), tqparent); grid->addMultiCellWidget(note, 15, 15, 0, 5); grid->setColStretch(1, 10); @@ -348,123 +348,123 @@ EXIFDevice::EXIFDevice(QWidget* parent) // -------------------------------------------------------- - connect(d->makeCheck, SIGNAL(toggled(bool)), - d->makeEdit, SLOT(setEnabled(bool))); + connect(d->makeCheck, TQT_SIGNAL(toggled(bool)), + d->makeEdit, TQT_SLOT(setEnabled(bool))); - connect(d->modelCheck, SIGNAL(toggled(bool)), - d->modelEdit, SLOT(setEnabled(bool))); + connect(d->modelCheck, TQT_SIGNAL(toggled(bool)), + d->modelEdit, TQT_SLOT(setEnabled(bool))); - connect(d->deviceTypeCheck, SIGNAL(toggled(bool)), - d->deviceTypeCB, SLOT(setEnabled(bool))); + connect(d->deviceTypeCheck, TQT_SIGNAL(toggled(bool)), + d->deviceTypeCB, TQT_SLOT(setEnabled(bool))); - connect(d->exposureTimeCheck, SIGNAL(toggled(bool)), - d->exposureTimeNumEdit, SLOT(setEnabled(bool))); + connect(d->exposureTimeCheck, TQT_SIGNAL(toggled(bool)), + d->exposureTimeNumEdit, TQT_SLOT(setEnabled(bool))); - connect(d->exposureTimeCheck, SIGNAL(toggled(bool)), - d->exposureTimeDenEdit, SLOT(setEnabled(bool))); + connect(d->exposureTimeCheck, TQT_SIGNAL(toggled(bool)), + d->exposureTimeDenEdit, TQT_SLOT(setEnabled(bool))); - connect(d->exposureProgramCheck, SIGNAL(toggled(bool)), - d->exposureProgramCB, SLOT(setEnabled(bool))); + connect(d->exposureProgramCheck, TQT_SIGNAL(toggled(bool)), + d->exposureProgramCB, TQT_SLOT(setEnabled(bool))); - connect(d->exposureModeCheck, SIGNAL(toggled(bool)), - d->exposureModeCB, SLOT(setEnabled(bool))); + connect(d->exposureModeCheck, TQT_SIGNAL(toggled(bool)), + d->exposureModeCB, TQT_SLOT(setEnabled(bool))); - connect(d->exposureBiasCheck, SIGNAL(toggled(bool)), - d->exposureBiasEdit, SLOT(setEnabled(bool))); + connect(d->exposureBiasCheck, TQT_SIGNAL(toggled(bool)), + d->exposureBiasEdit, TQT_SLOT(setEnabled(bool))); - connect(d->meteringModeCheck, SIGNAL(toggled(bool)), - d->meteringModeCB, SLOT(setEnabled(bool))); + connect(d->meteringModeCheck, TQT_SIGNAL(toggled(bool)), + d->meteringModeCB, TQT_SLOT(setEnabled(bool))); - connect(d->ISOSpeedCheck, SIGNAL(toggled(bool)), - d->ISOSpeedCB, SLOT(setEnabled(bool))); + connect(d->ISOSpeedCheck, TQT_SIGNAL(toggled(bool)), + d->ISOSpeedCB, TQT_SLOT(setEnabled(bool))); - connect(d->sensingMethodCheck, SIGNAL(toggled(bool)), - d->sensingMethodCB, SLOT(setEnabled(bool))); + connect(d->sensingMethodCheck, TQT_SIGNAL(toggled(bool)), + d->sensingMethodCB, TQT_SLOT(setEnabled(bool))); - connect(d->sceneTypeCheck, SIGNAL(toggled(bool)), - d->sceneTypeCB, SLOT(setEnabled(bool))); + connect(d->sceneTypeCheck, TQT_SIGNAL(toggled(bool)), + d->sceneTypeCB, TQT_SLOT(setEnabled(bool))); - connect(d->subjectDistanceTypeCheck, SIGNAL(toggled(bool)), - d->subjectDistanceTypeCB, SLOT(setEnabled(bool))); + connect(d->subjectDistanceTypeCheck, TQT_SIGNAL(toggled(bool)), + d->subjectDistanceTypeCB, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->makeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->makeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->modelCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->modelCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->exposureTimeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->exposureTimeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->exposureBiasCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->exposureBiasCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->deviceTypeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->deviceTypeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->exposureProgramCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->exposureProgramCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->exposureModeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->exposureModeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->meteringModeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->meteringModeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->ISOSpeedCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->ISOSpeedCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->sensingMethodCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->sensingMethodCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->sceneTypeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->sceneTypeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->subjectDistanceTypeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->subjectDistanceTypeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->deviceTypeCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->deviceTypeCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->exposureProgramCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->exposureProgramCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->exposureModeCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->exposureModeCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->ISOSpeedCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->ISOSpeedCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->meteringModeCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->meteringModeCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->sensingMethodCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->sensingMethodCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->sceneTypeCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->sceneTypeCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->subjectDistanceTypeCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->subjectDistanceTypeCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->makeEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->makeEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->modelEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->modelEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->exposureTimeNumEdit, SIGNAL(valueChanged(int)), - this, SIGNAL(signalModified())); + connect(d->exposureTimeNumEdit, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->exposureTimeDenEdit, SIGNAL(valueChanged(int)), - this, SIGNAL(signalModified())); + connect(d->exposureTimeDenEdit, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->exposureBiasEdit, SIGNAL(valueChanged(double)), - this, SIGNAL(signalModified())); + connect(d->exposureBiasEdit, TQT_SIGNAL(valueChanged(double)), + this, TQT_SIGNAL(signalModified())); } EXIFDevice::~EXIFDevice() @@ -472,14 +472,14 @@ EXIFDevice::~EXIFDevice() delete d; } -void EXIFDevice::readMetadata(QByteArray& exifData) +void EXIFDevice::readMetadata(TQByteArray& exifData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); long int num=1, den=1; long val=0; - QString data; + TQString data; d->makeEdit->clear(); d->makeCheck->setChecked(false); @@ -596,7 +596,7 @@ void EXIFDevice::readMetadata(QByteArray& exifData) { int item = -1; for (int i = 0 ; i < d->ISOSpeedCB->count() ; i++) - if (d->ISOSpeedCB->text(i) == QString::number(val)) + if (d->ISOSpeedCB->text(i) == TQString::number(val)) item = i; if (item != -1) @@ -612,7 +612,7 @@ void EXIFDevice::readMetadata(QByteArray& exifData) val = num / den; int item = -1; for (int i = 0 ; i < d->ISOSpeedCB->count() ; i++) - if (d->ISOSpeedCB->text(i) == QString::number(val)) + if (d->ISOSpeedCB->text(i) == TQString::number(val)) item = i; if (item != -1) @@ -670,7 +670,7 @@ void EXIFDevice::readMetadata(QByteArray& exifData) blockSignals(false); } -void EXIFDevice::applyMetadata(QByteArray& exifData) +void EXIFDevice::applyMetadata(TQByteArray& exifData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); diff --git a/kipi-plugins/metadataedit/exifdevice.h b/kipi-plugins/metadataedit/exifdevice.h index 0e8b204..1d95cb4 100644 --- a/kipi-plugins/metadataedit/exifdevice.h +++ b/kipi-plugins/metadataedit/exifdevice.h @@ -23,27 +23,28 @@ #ifndef EXIF_DEVICE_H #define EXIF_DEVICE_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class EXIFDevicePriv; -class EXIFDevice : public QWidget +class EXIFDevice : public TQWidget { Q_OBJECT + TQ_OBJECT public: - EXIFDevice(QWidget* parent); + EXIFDevice(TQWidget* tqparent); ~EXIFDevice(); - void applyMetadata(QByteArray& exifData); - void readMetadata(QByteArray& exifData); + void applyMetadata(TQByteArray& exifData); + void readMetadata(TQByteArray& exifData); signals: diff --git a/kipi-plugins/metadataedit/exifeditdialog.cpp b/kipi-plugins/metadataedit/exifeditdialog.cpp index 9a86113..e802a3d 100644 --- a/kipi-plugins/metadataedit/exifeditdialog.cpp +++ b/kipi-plugins/metadataedit/exifeditdialog.cpp @@ -20,12 +20,12 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qtimer.h> -#include <qframe.h> -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqtimer.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqpushbutton.h> // KDE includes. @@ -94,15 +94,15 @@ public: bool modified; bool isReadOnly; - QByteArray exifData; - QByteArray iptcData; + TQByteArray exifData; + TQByteArray iptcData; - QFrame *page_caption; - QFrame *page_datetime; - QFrame *page_lens; - QFrame *page_device; - QFrame *page_light; - QFrame *page_adjust; + TQFrame *page_caption; + TQFrame *page_datetime; + TQFrame *page_lens; + TQFrame *page_device; + TQFrame *page_light; + TQFrame *page_adjust; KURL::List urls; @@ -120,11 +120,11 @@ public: KIPIPlugins::KPAboutData *about; }; -EXIFEditDialog::EXIFEditDialog(QWidget* parent, KURL::List urls, KIPI::Interface *iface) - : KDialogBase(IconList, QString::null, +EXIFEditDialog::EXIFEditDialog(TQWidget* tqparent, KURL::List urls, KIPI::Interface *iface) + : KDialogBase(IconList, TQString(), urls.count() > 1 ? Help|User1|User2|Stretch|Ok|Apply|Close : Help|Stretch|Ok|Apply|Close, - Ok, parent, 0, true, true, + Ok, tqparent, 0, true, true, KStdGuiItem::guiItem(KStdGuiItem::Forward), KStdGuiItem::guiItem(KStdGuiItem::Back) ) { @@ -174,28 +174,28 @@ EXIFEditDialog::EXIFEditDialog(QWidget* parent, KURL::List urls, KIPI::Interface KHelpMenu* helpMenu = new KHelpMenu(this, d->about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), - this, SLOT(slotHelp()), 0, -1, 0); + this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // ------------------------------------------------------------ - connect(d->captionPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->captionPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->datetimePage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->datetimePage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->lensPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->lensPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->devicePage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->devicePage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->lightPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->lightPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->adjustPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->adjustPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); // ------------------------------------------------------------ @@ -214,7 +214,7 @@ void EXIFEditDialog::slotHelp() KApplication::kApplication()->invokeHelp("metadataedit", "kipi-plugins"); } -void EXIFEditDialog::closeEvent(QCloseEvent *e) +void EXIFEditDialog::closeEvent(TQCloseEvent *e) { if (!e) return; saveSettings(); @@ -237,7 +237,7 @@ void EXIFEditDialog::readSettings() d->captionPage->setCheckedSyncIPTCCaption(config.readBoolEntry("Sync IPTC Caption", true)); d->datetimePage->setCheckedSyncHOSTDate(config.readBoolEntry("Sync Host Date", true)); d->datetimePage->setCheckedSyncIPTCDate(config.readBoolEntry("Sync IPTC Date", true)); - resize(configDialogSize(config, QString("EXIF Edit Dialog"))); + resize(configDialogSize(config, TQString("EXIF Edit Dialog"))); } void EXIFEditDialog::saveSettings() @@ -250,7 +250,7 @@ void EXIFEditDialog::saveSettings() config.writeEntry("Sync IPTC Caption", d->captionPage->syncIPTCCaptionIsChecked()); config.writeEntry("Sync Host Date", d->datetimePage->syncHOSTDateIsChecked()); config.writeEntry("Sync IPTC Date", d->datetimePage->syncIPTCDateIsChecked()); - saveDialogSize(config, QString("EXIF Edit Dialog")); + saveDialogSize(config, TQString("EXIF Edit Dialog")); config.sync(); } @@ -276,12 +276,12 @@ void EXIFEditDialog::slotItemChanged() d->page_adjust->setEnabled(!d->isReadOnly); enableButton(Apply, !d->isReadOnly); - setCaption(QString("%1 (%2/%3) - %4") - .arg((*d->currItem).filename()) - .arg(d->urls.findIndex(*(d->currItem))+1) - .arg(d->urls.count()) - .arg(i18n("Edit EXIF Metadata")) + - (d->isReadOnly ? QString(" - ") + i18n("(read only)") : QString::null)); + setCaption(TQString("%1 (%2/%3) - %4") + .tqarg((*d->currItem).filename()) + .tqarg(d->urls.tqfindIndex(*(d->currItem))+1) + .tqarg(d->urls.count()) + .tqarg(i18n("Edit EXIF Metadata")) + + (d->isReadOnly ? TQString(" - ") + i18n("(read only)") : TQString())); enableButton(User1, *(d->currItem) != d->urls.last()); enableButton(User2, *(d->currItem) != d->urls.first()); enableButton(Apply, false); @@ -348,14 +348,14 @@ void EXIFEditDialog::slotOk() accept(); } -bool EXIFEditDialog::eventFilter(QObject *, QEvent *e) +bool EXIFEditDialog::eventFilter(TQObject *, TQEvent *e) { - if ( e->type() == QEvent::KeyPress ) + if ( e->type() == TQEvent::KeyPress ) { - QKeyEvent *k = (QKeyEvent *)e; + TQKeyEvent *k = (TQKeyEvent *)e; - if (k->state() == Qt::ControlButton && - (k->key() == Qt::Key_Enter || k->key() == Qt::Key_Return)) + if (k->state() == TQt::ControlButton && + (k->key() == TQt::Key_Enter || k->key() == TQt::Key_Return)) { slotApply(); @@ -364,8 +364,8 @@ bool EXIFEditDialog::eventFilter(QObject *, QEvent *e) return true; } - else if (k->state() == Qt::ShiftButton && - (k->key() == Qt::Key_Enter || k->key() == Qt::Key_Return)) + else if (k->state() == TQt::ShiftButton && + (k->key() == TQt::Key_Enter || k->key() == TQt::Key_Return)) { slotApply(); diff --git a/kipi-plugins/metadataedit/exifeditdialog.h b/kipi-plugins/metadataedit/exifeditdialog.h index f325a6e..3fc0bb7 100644 --- a/kipi-plugins/metadataedit/exifeditdialog.h +++ b/kipi-plugins/metadataedit/exifeditdialog.h @@ -23,9 +23,9 @@ #ifndef EXIFEDITDIALOG_H #define EXIFEDITDIALOG_H -// Qt includes. +// TQt includes. -#include <qcstring.h> +#include <tqcstring.h> // KDE includes. @@ -45,10 +45,11 @@ class EXIFEditDialogDialogPrivate; class EXIFEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - EXIFEditDialog(QWidget* parent, KURL::List urls, KIPI::Interface *iface); + EXIFEditDialog(TQWidget* tqparent, KURL::List urls, KIPI::Interface *iface); ~EXIFEditDialog(); public slots: @@ -63,8 +64,8 @@ protected slots: protected: - void closeEvent(QCloseEvent *); - bool eventFilter(QObject *, QEvent *); + void closeEvent(TQCloseEvent *); + bool eventFilter(TQObject *, TQEvent *); private slots: diff --git a/kipi-plugins/metadataedit/exiflens.cpp b/kipi-plugins/metadataedit/exiflens.cpp index ecd6a82..4f75217 100644 --- a/kipi-plugins/metadataedit/exiflens.cpp +++ b/kipi-plugins/metadataedit/exiflens.cpp @@ -26,10 +26,10 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> // KDE includes. @@ -127,14 +127,14 @@ public: apertureValues.append("f/91.0"); } - QStringList apertureValues; + TQStringList apertureValues; - QCheckBox *focalLength35mmCheck; - QCheckBox *focalLengthCheck; - QCheckBox *digitalZoomRatioCheck; + TQCheckBox *focalLength35mmCheck; + TQCheckBox *focalLengthCheck; + TQCheckBox *digitalZoomRatioCheck; - QComboBox *apertureCB; - QComboBox *maxApertureCB; + TQComboBox *apertureCB; + TQComboBox *maxApertureCB; KIntSpinBox *focalLength35mmEdit; @@ -145,59 +145,59 @@ public: MetadataCheckBox *maxApertureCheck; }; -EXIFLens::EXIFLens(QWidget* parent) - : QWidget(parent) +EXIFLens::EXIFLens(TQWidget* tqparent) + : TQWidget(tqparent) { d = new EXIFLensPriv; - QGridLayout* grid = new QGridLayout(parent, 5, 2, KDialog::spacingHint()); + TQGridLayout* grid = new TQGridLayout(tqparent, 5, 2, KDialog::spacingHint()); // -------------------------------------------------------- - d->focalLengthCheck = new QCheckBox(i18n("Focal length (mm):"), parent); - d->focalLengthEdit = new KDoubleSpinBox(1.0, 10000.0, 1.0, 50.0, 1, parent); + d->focalLengthCheck = new TQCheckBox(i18n("Focal length (mm):"), tqparent); + d->focalLengthEdit = new KDoubleSpinBox(1.0, 10000.0, 1.0, 50.0, 1, tqparent); grid->addMultiCellWidget(d->focalLengthCheck, 0, 0, 0, 0); grid->addMultiCellWidget(d->focalLengthEdit, 0, 0, 2, 2); - QWhatsThis::add(d->focalLengthEdit, i18n("<p>Set here the lens focal length in milimeters " + TQWhatsThis::add(d->focalLengthEdit, i18n("<p>Set here the lens focal length in milimeters " "used by camera to take the picture.")); // -------------------------------------------------------- - d->focalLength35mmCheck = new QCheckBox(i18n("Focal length in 35mm film (mm):"), parent); - d->focalLength35mmEdit = new KIntSpinBox(1, 10000, 1, 1, 10, parent); + d->focalLength35mmCheck = new TQCheckBox(i18n("Focal length in 35mm film (mm):"), tqparent); + d->focalLength35mmEdit = new KIntSpinBox(1, 10000, 1, 1, 10, tqparent); grid->addMultiCellWidget(d->focalLength35mmCheck, 1, 1, 0, 0); grid->addMultiCellWidget(d->focalLength35mmEdit, 1, 1, 2, 2); - QWhatsThis::add(d->focalLength35mmEdit, i18n("<p>Set here equivalent focal length assuming " + TQWhatsThis::add(d->focalLength35mmEdit, i18n("<p>Set here equivalent focal length assuming " "a 35mm film camera, in mm. A value of 0 means the focal " "length is unknown.")); // -------------------------------------------------------- - d->digitalZoomRatioCheck = new QCheckBox(i18n("Digital zoom ratio:"), parent); - d->digitalZoomRatioEdit = new KDoubleSpinBox(0.0, 100.0, 0.1, 1.0, 1, parent); + d->digitalZoomRatioCheck = new TQCheckBox(i18n("Digital zoom ratio:"), tqparent); + d->digitalZoomRatioEdit = new KDoubleSpinBox(0.0, 100.0, 0.1, 1.0, 1, tqparent); grid->addMultiCellWidget(d->digitalZoomRatioCheck, 2, 2, 0, 0); grid->addMultiCellWidget(d->digitalZoomRatioEdit, 2, 2, 2, 2); - QWhatsThis::add(d->digitalZoomRatioEdit, i18n("<p>Set here the digital zoom ratio " + TQWhatsThis::add(d->digitalZoomRatioEdit, i18n("<p>Set here the digital zoom ratio " "used by camera to take the picture.")); // -------------------------------------------------------- - d->apertureCheck = new MetadataCheckBox(i18n("Lens aperture (f-number):"), parent); - d->apertureCB = new QComboBox(false, parent); + d->apertureCheck = new MetadataCheckBox(i18n("Lens aperture (f-number):"), tqparent); + d->apertureCB = new TQComboBox(false, tqparent); d->apertureCB->insertStringList(d->apertureValues); grid->addMultiCellWidget(d->apertureCheck, 3, 3, 0, 0); grid->addMultiCellWidget(d->apertureCB, 3, 3, 2, 2); - QWhatsThis::add(d->apertureCB, i18n("<p>Select here the lens aperture used by camera " + TQWhatsThis::add(d->apertureCB, i18n("<p>Select here the lens aperture used by camera " "to take the picture.")); // -------------------------------------------------------- - d->maxApertureCheck = new MetadataCheckBox(i18n("Max. lens aperture (f-number):"), parent); - d->maxApertureCB = new QComboBox(false, parent); + d->maxApertureCheck = new MetadataCheckBox(i18n("Max. lens aperture (f-number):"), tqparent); + d->maxApertureCB = new TQComboBox(false, tqparent); d->maxApertureCB->insertStringList(d->apertureValues); grid->addMultiCellWidget(d->maxApertureCheck, 4, 4, 0, 0); grid->addMultiCellWidget(d->maxApertureCB, 4, 4, 2, 2); - QWhatsThis::add(d->maxApertureCB, i18n("<p>Select here the smallest aperture of the lens used by camera " + TQWhatsThis::add(d->maxApertureCB, i18n("<p>Select here the smallest aperture of the lens used by camera " "to take the picture.")); grid->setColStretch(1, 10); @@ -205,54 +205,54 @@ EXIFLens::EXIFLens(QWidget* parent) // -------------------------------------------------------- - connect(d->focalLengthCheck, SIGNAL(toggled(bool)), - d->focalLengthEdit, SLOT(setEnabled(bool))); + connect(d->focalLengthCheck, TQT_SIGNAL(toggled(bool)), + d->focalLengthEdit, TQT_SLOT(setEnabled(bool))); - connect(d->focalLength35mmCheck, SIGNAL(toggled(bool)), - d->focalLength35mmEdit, SLOT(setEnabled(bool))); + connect(d->focalLength35mmCheck, TQT_SIGNAL(toggled(bool)), + d->focalLength35mmEdit, TQT_SLOT(setEnabled(bool))); - connect(d->digitalZoomRatioCheck, SIGNAL(toggled(bool)), - d->digitalZoomRatioEdit, SLOT(setEnabled(bool))); + connect(d->digitalZoomRatioCheck, TQT_SIGNAL(toggled(bool)), + d->digitalZoomRatioEdit, TQT_SLOT(setEnabled(bool))); - connect(d->apertureCheck, SIGNAL(toggled(bool)), - d->apertureCB, SLOT(setEnabled(bool))); + connect(d->apertureCheck, TQT_SIGNAL(toggled(bool)), + d->apertureCB, TQT_SLOT(setEnabled(bool))); - connect(d->maxApertureCheck, SIGNAL(toggled(bool)), - d->maxApertureCB, SLOT(setEnabled(bool))); + connect(d->maxApertureCheck, TQT_SIGNAL(toggled(bool)), + d->maxApertureCB, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->focalLength35mmCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->focalLength35mmCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->focalLengthCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->focalLengthCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->digitalZoomRatioCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->digitalZoomRatioCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->apertureCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->apertureCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->maxApertureCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->maxApertureCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->apertureCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->apertureCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->maxApertureCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->maxApertureCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->focalLength35mmEdit, SIGNAL(valueChanged(int)), - this, SIGNAL(signalModified())); + connect(d->focalLength35mmEdit, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->focalLengthEdit, SIGNAL(valueChanged(double)), - this, SIGNAL(signalModified())); + connect(d->focalLengthEdit, TQT_SIGNAL(valueChanged(double)), + this, TQT_SIGNAL(signalModified())); - connect(d->digitalZoomRatioEdit, SIGNAL(valueChanged(double)), - this, SIGNAL(signalModified())); + connect(d->digitalZoomRatioEdit, TQT_SIGNAL(valueChanged(double)), + this, TQT_SIGNAL(signalModified())); } EXIFLens::~EXIFLens() @@ -260,7 +260,7 @@ EXIFLens::~EXIFLens() delete d; } -void EXIFLens::readMetadata(QByteArray& exifData) +void EXIFLens::readMetadata(TQByteArray& exifData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; @@ -299,7 +299,7 @@ void EXIFLens::readMetadata(QByteArray& exifData) d->apertureCheck->setChecked(false); if (exiv2Iface.getExifTagRational("Exif.Photo.FNumber", num, den)) { - QString fnumber = QString::number((double)(num)/(double)(den), 'f', 1); + TQString fnumber = TQString::number((double)(num)/(double)(den), 'f', 1); int item = -1; for (int i = 0 ; i < d->apertureCB->count() ; i++) @@ -318,7 +318,7 @@ void EXIFLens::readMetadata(QByteArray& exifData) { double aperture = pow(2.0, ((double)(num)/(double)(den))/2.0); - QString fnumber = QString::number(aperture, 'f', 1); + TQString fnumber = TQString::number(aperture, 'f', 1); int item = -1; for (int i = 0 ; i < d->apertureCB->count() ; i++) @@ -343,7 +343,7 @@ void EXIFLens::readMetadata(QByteArray& exifData) { double maxAperture = pow(2.0, ((double)(num)/(double)(den))/2.0); - QString fnumber = QString::number(maxAperture, 'f', 1); + TQString fnumber = TQString::number(maxAperture, 'f', 1); int item = -1; for (int i = 0 ; i < d->apertureCB->count() ; i++) @@ -365,7 +365,7 @@ void EXIFLens::readMetadata(QByteArray& exifData) blockSignals(false); } -void EXIFLens::applyMetadata(QByteArray& exifData) +void EXIFLens::applyMetadata(TQByteArray& exifData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); diff --git a/kipi-plugins/metadataedit/exiflens.h b/kipi-plugins/metadataedit/exiflens.h index de91970..d0b19ab 100644 --- a/kipi-plugins/metadataedit/exiflens.h +++ b/kipi-plugins/metadataedit/exiflens.h @@ -23,27 +23,28 @@ #ifndef EXIF_LENS_H #define EXIF_LENS_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class EXIFLensPriv; -class EXIFLens : public QWidget +class EXIFLens : public TQWidget { Q_OBJECT + TQ_OBJECT public: - EXIFLens(QWidget* parent); + EXIFLens(TQWidget* tqparent); ~EXIFLens(); - void applyMetadata(QByteArray& exifData); - void readMetadata(QByteArray& exifData); + void applyMetadata(TQByteArray& exifData); + void readMetadata(TQByteArray& exifData); signals: diff --git a/kipi-plugins/metadataedit/exiflight.cpp b/kipi-plugins/metadataedit/exiflight.cpp index e0a6d06..8812a90 100644 --- a/kipi-plugins/metadataedit/exiflight.cpp +++ b/kipi-plugins/metadataedit/exiflight.cpp @@ -26,11 +26,11 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qcombobox.h> -#include <qmap.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> +#include <tqmap.h> // KDE includes. @@ -56,15 +56,15 @@ namespace KIPIMetadataEditPlugin public: FlashMode() {} - FlashMode(int id, const QString& desc) : m_id(id), m_desc(desc) {} + FlashMode(int id, const TQString& desc) : m_id(id), m_desc(desc) {} int id() const { return m_id; } - QString desc() const { return m_desc; } + TQString desc() const { return m_desc; } private: int m_id; - QString m_desc; + TQString m_desc; }; class EXIFLightPriv @@ -106,15 +106,15 @@ public: flashModeMap.insert(21, FlashMode( 0x5f, i18n("Yes, auto, red-eye, return light") )); } - typedef QMap<int, FlashMode> FlashModeMap; + typedef TQMap<int, FlashMode> FlashModeMap; FlashModeMap flashModeMap; - QCheckBox *flashEnergyCheck; + TQCheckBox *flashEnergyCheck; - QComboBox *lightSourceCB; - QComboBox *flashModeCB; - QComboBox *whiteBalanceCB; + TQComboBox *lightSourceCB; + TQComboBox *flashModeCB; + TQComboBox *whiteBalanceCB; KDoubleSpinBox *flashEnergyEdit; @@ -123,17 +123,17 @@ public: MetadataCheckBox *whiteBalanceCheck; }; -EXIFLight::EXIFLight(QWidget* parent) - : QWidget(parent) +EXIFLight::EXIFLight(TQWidget* tqparent) + : TQWidget(tqparent) { d = new EXIFLightPriv; - QGridLayout* grid = new QGridLayout(parent, 4, 3, KDialog::spacingHint()); + TQGridLayout* grid = new TQGridLayout(tqparent, 4, 3, KDialog::spacingHint()); // -------------------------------------------------------- - d->lightSourceCheck = new MetadataCheckBox(i18n("Light source:"), parent); - d->lightSourceCB = new QComboBox(false, parent); + d->lightSourceCheck = new MetadataCheckBox(i18n("Light source:"), tqparent); + d->lightSourceCB = new TQComboBox(false, tqparent); d->lightSourceCB->insertItem(i18n("Unknown"), 0); d->lightSourceCB->insertItem(i18n("Daylight"), 1); d->lightSourceCB->insertItem(i18n("Fluorescent"), 2); @@ -157,13 +157,13 @@ EXIFLight::EXIFLight(QWidget* parent) d->lightSourceCB->insertItem(i18n("Other light source"), 20); grid->addMultiCellWidget(d->lightSourceCheck, 0, 0, 0, 0); grid->addMultiCellWidget(d->lightSourceCB, 0, 0, 2, 3); - QWhatsThis::add(d->lightSourceCB, i18n("<p>Select here the kind of light source used " + TQWhatsThis::add(d->lightSourceCB, i18n("<p>Select here the kind of light source used " "to take the picture.")); // -------------------------------------------------------- - d->flashModeCheck = new MetadataCheckBox(i18n("Flash mode:"), parent); - d->flashModeCB = new QComboBox(false, parent); + d->flashModeCheck = new MetadataCheckBox(i18n("Flash mode:"), tqparent); + d->flashModeCB = new TQComboBox(false, tqparent); for (EXIFLightPriv::FlashModeMap::Iterator it = d->flashModeMap.begin(); it != d->flashModeMap.end(); ++it ) @@ -171,16 +171,16 @@ EXIFLight::EXIFLight(QWidget* parent) grid->addMultiCellWidget(d->flashModeCheck, 1, 1, 0, 0); grid->addMultiCellWidget(d->flashModeCB, 1, 1, 2, 3); - QWhatsThis::add(d->flashModeCB, i18n("<p>Select here the flash program mode used by camera " + TQWhatsThis::add(d->flashModeCB, i18n("<p>Select here the flash program mode used by camera " "to take the picture.")); // -------------------------------------------------------- - d->flashEnergyCheck = new QCheckBox(i18n("Flash energy (BCPS):"), parent); - d->flashEnergyEdit = new KDoubleSpinBox(1.0, 10000.0, 1.0, 1.0, 1, parent); + d->flashEnergyCheck = new TQCheckBox(i18n("Flash energy (BCPS):"), tqparent); + d->flashEnergyEdit = new KDoubleSpinBox(1.0, 10000.0, 1.0, 1.0, 1, tqparent); grid->addMultiCellWidget(d->flashEnergyCheck, 2, 2, 0, 0); grid->addMultiCellWidget(d->flashEnergyEdit, 2, 2, 2, 2); - QWhatsThis::add(d->flashEnergyEdit, i18n("<p>Set here the flash energy used to take the picture " + TQWhatsThis::add(d->flashEnergyEdit, i18n("<p>Set here the flash energy used to take the picture " "in BCPS unit. Beam Candle Power Seconds is the measure " "of effective intensity of a light source when it is " "focused into a beam by a reflector or lens. This value " @@ -188,13 +188,13 @@ EXIFLight::EXIFLight(QWidget* parent) // -------------------------------------------------------- - d->whiteBalanceCheck = new MetadataCheckBox(i18n("White balance:"), parent); - d->whiteBalanceCB = new QComboBox(false, parent); + d->whiteBalanceCheck = new MetadataCheckBox(i18n("White balance:"), tqparent); + d->whiteBalanceCB = new TQComboBox(false, tqparent); d->whiteBalanceCB->insertItem(i18n("Auto"), 0); d->whiteBalanceCB->insertItem(i18n("Manual"), 1); grid->addMultiCellWidget(d->whiteBalanceCheck, 3, 3, 0, 0); grid->addMultiCellWidget(d->whiteBalanceCB, 3, 3, 2, 2); - QWhatsThis::add(d->whiteBalanceCB, i18n("<p>Select here the white balance mode set by camera when " + TQWhatsThis::add(d->whiteBalanceCB, i18n("<p>Select here the white balance mode set by camera when " "the picture have been shot.")); @@ -203,45 +203,45 @@ EXIFLight::EXIFLight(QWidget* parent) // -------------------------------------------------------- - connect(d->lightSourceCheck, SIGNAL(toggled(bool)), - d->lightSourceCB, SLOT(setEnabled(bool))); + connect(d->lightSourceCheck, TQT_SIGNAL(toggled(bool)), + d->lightSourceCB, TQT_SLOT(setEnabled(bool))); - connect(d->flashModeCheck, SIGNAL(toggled(bool)), - d->flashModeCB, SLOT(setEnabled(bool))); + connect(d->flashModeCheck, TQT_SIGNAL(toggled(bool)), + d->flashModeCB, TQT_SLOT(setEnabled(bool))); - connect(d->flashEnergyCheck, SIGNAL(toggled(bool)), - d->flashEnergyEdit, SLOT(setEnabled(bool))); + connect(d->flashEnergyCheck, TQT_SIGNAL(toggled(bool)), + d->flashEnergyEdit, TQT_SLOT(setEnabled(bool))); - connect(d->whiteBalanceCheck, SIGNAL(toggled(bool)), - d->whiteBalanceCB, SLOT(setEnabled(bool))); + connect(d->whiteBalanceCheck, TQT_SIGNAL(toggled(bool)), + d->whiteBalanceCB, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->flashEnergyCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->flashEnergyCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->lightSourceCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->lightSourceCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->flashModeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->flashModeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->whiteBalanceCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->whiteBalanceCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->lightSourceCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->lightSourceCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->flashModeCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->flashModeCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->whiteBalanceCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->whiteBalanceCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->flashEnergyEdit, SIGNAL(valueChanged(double)), - this, SIGNAL(signalModified())); + connect(d->flashEnergyEdit, TQT_SIGNAL(valueChanged(double)), + this, TQT_SIGNAL(signalModified())); } EXIFLight::~EXIFLight() @@ -249,7 +249,7 @@ EXIFLight::~EXIFLight() delete d; } -void EXIFLight::readMetadata(QByteArray& exifData) +void EXIFLight::readMetadata(TQByteArray& exifData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; @@ -326,7 +326,7 @@ void EXIFLight::readMetadata(QByteArray& exifData) blockSignals(false); } -void EXIFLight::applyMetadata(QByteArray& exifData) +void EXIFLight::applyMetadata(TQByteArray& exifData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); diff --git a/kipi-plugins/metadataedit/exiflight.h b/kipi-plugins/metadataedit/exiflight.h index 7b2f05c..5ea5611 100644 --- a/kipi-plugins/metadataedit/exiflight.h +++ b/kipi-plugins/metadataedit/exiflight.h @@ -23,27 +23,28 @@ #ifndef EXIF_LIGHT_H #define EXIF_LIGHT_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class EXIFLightPriv; -class EXIFLight : public QWidget +class EXIFLight : public TQWidget { Q_OBJECT + TQ_OBJECT public: - EXIFLight(QWidget* parent); + EXIFLight(TQWidget* tqparent); ~EXIFLight(); - void applyMetadata(QByteArray& exifData); - void readMetadata(QByteArray& exifData); + void applyMetadata(TQByteArray& exifData); + void readMetadata(TQByteArray& exifData); signals: diff --git a/kipi-plugins/metadataedit/iptccaption.cpp b/kipi-plugins/metadataedit/iptccaption.cpp index 3569e95..cfe1f88 100644 --- a/kipi-plugins/metadataedit/iptccaption.cpp +++ b/kipi-plugins/metadataedit/iptccaption.cpp @@ -22,13 +22,13 @@ // QT includes. -#include <qlayout.h> -#include <qhgroupbox.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqhgroupbox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqcheckbox.h> // KDE includes. @@ -72,13 +72,13 @@ public: syncEXIFCommentCheck = 0; } - QCheckBox *captionCheck; - QCheckBox *specialInstructionCheck; - QCheckBox *writerCheck; - QCheckBox *headlineCheck; - QCheckBox *syncJFIFCommentCheck; - QCheckBox *syncHOSTCommentCheck; - QCheckBox *syncEXIFCommentCheck; + TQCheckBox *captionCheck; + TQCheckBox *specialInstructionCheck; + TQCheckBox *writerCheck; + TQCheckBox *headlineCheck; + TQCheckBox *syncJFIFCommentCheck; + TQCheckBox *syncHOSTCommentCheck; + TQCheckBox *syncEXIFCommentCheck; KTextEdit *captionEdit; KTextEdit *specialInstructionEdit; @@ -87,26 +87,26 @@ public: KLineEdit *headlineEdit; }; -IPTCCaption::IPTCCaption(QWidget* parent) - : QWidget(parent) +IPTCCaption::IPTCCaption(TQWidget* tqparent) + : TQWidget(tqparent) { d = new IPTCCaptionPriv; - QVBoxLayout *vlay = new QVBoxLayout( parent, 0, KDialog::spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( tqparent, 0, KDialog::spacingHint() ); // IPTC only accept printable Ascii char. - QRegExp asciiRx("[\x20-\x7F]+$"); - QValidator *asciiValidator = new QRegExpValidator(asciiRx, this); + TQRegExp asciiRx("[\x20-\x7F]+$"); + TQValidator *asciiValidator = new TQRegExpValidator(asciiRx, TQT_TQOBJECT(this)); // -------------------------------------------------------- - d->captionCheck = new QCheckBox(i18n("Caption:"), parent); - d->captionEdit = new KTextEdit(parent); - d->syncJFIFCommentCheck = new QCheckBox(i18n("Sync JFIF Comment section"), parent); - d->syncHOSTCommentCheck = new QCheckBox(i18n("Sync caption entered through %1") - .arg(KApplication::kApplication()->aboutData()->appName()), - parent); - d->syncEXIFCommentCheck = new QCheckBox(i18n("Sync EXIF Comment"), parent); - KSeparator *line = new KSeparator(Horizontal, parent); + d->captionCheck = new TQCheckBox(i18n("Caption:"), tqparent); + d->captionEdit = new KTextEdit(tqparent); + d->syncJFIFCommentCheck = new TQCheckBox(i18n("Sync JFIF Comment section"), tqparent); + d->syncHOSTCommentCheck = new TQCheckBox(i18n("Sync caption entered through %1") + .tqarg(KApplication::kApplication()->aboutData()->appName()), + tqparent); + d->syncEXIFCommentCheck = new TQCheckBox(i18n("Sync EXIF Comment"), tqparent); + KSeparator *line = new KSeparator(Qt::Horizontal, tqparent); /* d->captionEdit->setValidator(asciiValidator); d->captionEdit->setMaxLength(2000);*/ @@ -116,40 +116,40 @@ IPTCCaption::IPTCCaption(QWidget* parent) vlay->addWidget(d->syncHOSTCommentCheck); vlay->addWidget(d->syncEXIFCommentCheck); vlay->addWidget(line); - QWhatsThis::add(d->captionEdit, i18n("<p>Enter the content description. This field is limited " + TQWhatsThis::add(d->captionEdit, i18n("<p>Enter the content description. This field is limited " "to 2000 ASCII characters.")); // -------------------------------------------------------- - d->writerCheck = new QCheckBox(i18n("Caption Writer:"), parent); - d->writerEdit = new KLineEdit(parent); + d->writerCheck = new TQCheckBox(i18n("Caption Writer:"), tqparent); + d->writerEdit = new KLineEdit(tqparent); d->writerEdit->setValidator(asciiValidator); d->writerEdit->setMaxLength(32); vlay->addWidget(d->writerCheck); vlay->addWidget(d->writerEdit); - QWhatsThis::add(d->writerEdit, i18n("<p>Enter the name of the caption author. This field is limited " + TQWhatsThis::add(d->writerEdit, i18n("<p>Enter the name of the caption author. This field is limited " "to 32 ASCII characters.")); // -------------------------------------------------------- - d->headlineCheck = new QCheckBox(i18n("Headline:"), parent); - d->headlineEdit = new KLineEdit(parent); + d->headlineCheck = new TQCheckBox(i18n("Headline:"), tqparent); + d->headlineEdit = new KLineEdit(tqparent); d->headlineEdit->setValidator(asciiValidator); d->headlineEdit->setMaxLength(256); vlay->addWidget(d->headlineCheck); vlay->addWidget(d->headlineEdit); - QWhatsThis::add(d->headlineEdit, i18n("<p>Enter here the content synopsis. This field is limited " + TQWhatsThis::add(d->headlineEdit, i18n("<p>Enter here the content synopsis. This field is limited " "to 256 ASCII characters.")); // -------------------------------------------------------- - d->specialInstructionCheck = new QCheckBox(i18n("Special Instructions:"), parent); - d->specialInstructionEdit = new KTextEdit(parent); + d->specialInstructionCheck = new TQCheckBox(i18n("Special Instructions:"), tqparent); + d->specialInstructionEdit = new KTextEdit(tqparent); /* d->specialInstructionEdit->setValidator(asciiValidator); d->specialInstructionEdit->setMaxLength(256);*/ vlay->addWidget(d->specialInstructionCheck); vlay->addWidget(d->specialInstructionEdit); - QWhatsThis::add(d->specialInstructionEdit, i18n("<p>Enter the editorial usage instructions. " + TQWhatsThis::add(d->specialInstructionEdit, i18n("<p>Enter the editorial usage instructions. " "This field is limited to 256 ASCII characters.")); // -------------------------------------------------------- @@ -159,60 +159,60 @@ IPTCCaption::IPTCCaption(QWidget* parent) "text tags only support the printable " "<b><a href='http://en.wikipedia.org/wiki/Ascii'>ASCII</a></b> " "characters set and limit strings size. " - "Use contextual help for details.</b>"), parent); + "Use contextual help for details.</b>"), tqparent); vlay->addWidget(note); vlay->addStretch(); // -------------------------------------------------------- - connect(d->captionCheck, SIGNAL(toggled(bool)), - d->captionEdit, SLOT(setEnabled(bool))); + connect(d->captionCheck, TQT_SIGNAL(toggled(bool)), + d->captionEdit, TQT_SLOT(setEnabled(bool))); - connect(d->captionCheck, SIGNAL(toggled(bool)), - d->syncJFIFCommentCheck, SLOT(setEnabled(bool))); + connect(d->captionCheck, TQT_SIGNAL(toggled(bool)), + d->syncJFIFCommentCheck, TQT_SLOT(setEnabled(bool))); - connect(d->captionCheck, SIGNAL(toggled(bool)), - d->syncHOSTCommentCheck, SLOT(setEnabled(bool))); + connect(d->captionCheck, TQT_SIGNAL(toggled(bool)), + d->syncHOSTCommentCheck, TQT_SLOT(setEnabled(bool))); - connect(d->captionCheck, SIGNAL(toggled(bool)), - d->syncEXIFCommentCheck, SLOT(setEnabled(bool))); + connect(d->captionCheck, TQT_SIGNAL(toggled(bool)), + d->syncEXIFCommentCheck, TQT_SLOT(setEnabled(bool))); - connect(d->writerCheck, SIGNAL(toggled(bool)), - d->writerEdit, SLOT(setEnabled(bool))); + connect(d->writerCheck, TQT_SIGNAL(toggled(bool)), + d->writerEdit, TQT_SLOT(setEnabled(bool))); - connect(d->headlineCheck, SIGNAL(toggled(bool)), - d->headlineEdit, SLOT(setEnabled(bool))); + connect(d->headlineCheck, TQT_SIGNAL(toggled(bool)), + d->headlineEdit, TQT_SLOT(setEnabled(bool))); - connect(d->specialInstructionCheck, SIGNAL(toggled(bool)), - d->specialInstructionEdit, SLOT(setEnabled(bool))); + connect(d->specialInstructionCheck, TQT_SIGNAL(toggled(bool)), + d->specialInstructionEdit, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->captionCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->captionCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->writerCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->writerCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->headlineCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->headlineCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->specialInstructionCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->specialInstructionCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->captionEdit, SIGNAL(textChanged()), - this, SIGNAL(signalModified())); + connect(d->captionEdit, TQT_SIGNAL(textChanged()), + this, TQT_SIGNAL(signalModified())); - connect(d->specialInstructionEdit, SIGNAL(textChanged()), - this, SIGNAL(signalModified())); + connect(d->specialInstructionEdit, TQT_SIGNAL(textChanged()), + this, TQT_SIGNAL(signalModified())); - connect(d->writerEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->writerEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->headlineEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->headlineEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); } IPTCCaption::~IPTCCaption() @@ -235,7 +235,7 @@ bool IPTCCaption::syncEXIFCommentIsChecked() return d->syncEXIFCommentCheck->isChecked(); } -QString IPTCCaption::getIPTCCaption() +TQString IPTCCaption::getIPTCCaption() { return d->captionEdit->text(); } @@ -255,12 +255,12 @@ void IPTCCaption::setCheckedSyncEXIFComment(bool c) d->syncEXIFCommentCheck->setChecked(c); } -void IPTCCaption::readMetadata(QByteArray& iptcData) +void IPTCCaption::readMetadata(TQByteArray& iptcData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); - QString data; + TQString data; d->captionEdit->clear(); d->captionCheck->setChecked(false); @@ -308,7 +308,7 @@ void IPTCCaption::readMetadata(QByteArray& iptcData) blockSignals(false); } -void IPTCCaption::applyMetadata(QByteArray& exifData, QByteArray& iptcData) +void IPTCCaption::applyMetadata(TQByteArray& exifData, TQByteArray& iptcData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); diff --git a/kipi-plugins/metadataedit/iptccaption.h b/kipi-plugins/metadataedit/iptccaption.h index cc93fad..c47c1bc 100644 --- a/kipi-plugins/metadataedit/iptccaption.h +++ b/kipi-plugins/metadataedit/iptccaption.h @@ -23,27 +23,28 @@ #ifndef IPTC_CAPTION_H #define IPTC_CAPTION_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class IPTCCaptionPriv; -class IPTCCaption : public QWidget +class IPTCCaption : public TQWidget { Q_OBJECT + TQ_OBJECT public: - IPTCCaption(QWidget* parent); + IPTCCaption(TQWidget* tqparent); ~IPTCCaption(); - void applyMetadata(QByteArray& exifData, QByteArray& iptcData); - void readMetadata(QByteArray& iptcData); + void applyMetadata(TQByteArray& exifData, TQByteArray& iptcData); + void readMetadata(TQByteArray& iptcData); bool syncJFIFCommentIsChecked(); bool syncHOSTCommentIsChecked(); @@ -53,7 +54,7 @@ public: void setCheckedSyncHOSTComment(bool c); void setCheckedSyncEXIFComment(bool c); - QString getIPTCCaption(); + TQString getIPTCCaption(); signals: diff --git a/kipi-plugins/metadataedit/iptccategories.cpp b/kipi-plugins/metadataedit/iptccategories.cpp index 1172663..48ef08d 100644 --- a/kipi-plugins/metadataedit/iptccategories.cpp +++ b/kipi-plugins/metadataedit/iptccategories.cpp @@ -22,12 +22,12 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> // KDE includes. @@ -65,13 +65,13 @@ public: subCategoryEdit = 0; } - QStringList oldSubCategories; + TQStringList oldSubCategories; - QPushButton *addSubCategoryButton; - QPushButton *delSubCategoryButton; + TQPushButton *addSubCategoryButton; + TQPushButton *delSubCategoryButton; - QCheckBox *subCategoriesCheck; - QCheckBox *categoryCheck; + TQCheckBox *subCategoriesCheck; + TQCheckBox *categoryCheck; KLineEdit *categoryEdit; KLineEdit *subCategoryEdit; @@ -79,39 +79,39 @@ public: KListBox *subCategoriesBox; }; -IPTCCategories::IPTCCategories(QWidget* parent) - : QWidget(parent) +IPTCCategories::IPTCCategories(TQWidget* tqparent) + : TQWidget(tqparent) { d = new IPTCCategoriesPriv; - QGridLayout *grid = new QGridLayout(parent, 6, 1, 0, KDialog::spacingHint()); - grid->setAlignment( Qt::AlignTop ); + TQGridLayout *grid = new TQGridLayout(tqparent, 6, 1, 0, KDialog::spacingHint()); + grid->tqsetAlignment( TQt::AlignTop ); // IPTC only accept printable Ascii char. - QRegExp asciiRx("[\x20-\x7F]+$"); - QValidator *asciiValidator = new QRegExpValidator(asciiRx, this); + TQRegExp asciiRx("[\x20-\x7F]+$"); + TQValidator *asciiValidator = new TQRegExpValidator(asciiRx, TQT_TQOBJECT(this)); // -------------------------------------------------------- - d->categoryCheck = new QCheckBox(i18n("Identify subject of content (3 chars max):"), parent); - d->categoryEdit = new KLineEdit(parent); + d->categoryCheck = new TQCheckBox(i18n("Identify subject of content (3 chars max):"), tqparent); + d->categoryEdit = new KLineEdit(tqparent); d->categoryEdit->setValidator(asciiValidator); d->categoryEdit->setMaxLength(3); - QWhatsThis::add(d->categoryEdit, i18n("<p>Set here the category of content. This field is limited " + TQWhatsThis::add(d->categoryEdit, i18n("<p>Set here the category of content. This field is limited " "to 3 ASCII characters.")); - d->subCategoriesCheck = new QCheckBox(i18n("Supplemental categories:"), parent); + d->subCategoriesCheck = new TQCheckBox(i18n("Supplemental categories:"), tqparent); - d->subCategoryEdit = new KLineEdit(parent); + d->subCategoryEdit = new KLineEdit(tqparent); d->subCategoryEdit->setValidator(asciiValidator); d->subCategoryEdit->setMaxLength(32); - QWhatsThis::add(d->subCategoryEdit, i18n("<p>Enter here a new supplemental category of content. " + TQWhatsThis::add(d->subCategoryEdit, i18n("<p>Enter here a new supplemental category of content. " "This field is limited to 32 ASCII characters.")); - d->subCategoriesBox = new KListBox(parent); - d->subCategoriesBox->setVScrollBarMode(QScrollView::AlwaysOn); + d->subCategoriesBox = new KListBox(tqparent); + d->subCategoriesBox->setVScrollBarMode(TQScrollView::AlwaysOn); - d->addSubCategoryButton = new QPushButton( i18n("&Add"), parent); - d->delSubCategoryButton = new QPushButton( i18n("&Delete"), parent); + d->addSubCategoryButton = new TQPushButton( i18n("&Add"), tqparent); + d->delSubCategoryButton = new TQPushButton( i18n("&Delete"), tqparent); d->addSubCategoryButton->setIconSet(SmallIcon("add")); d->delSubCategoryButton->setIconSet(SmallIcon("remove")); d->delSubCategoryButton->setEnabled(false); @@ -131,7 +131,7 @@ IPTCCategories::IPTCCategories(QWidget* parent) "text tags only support the printable " "<b><a href='http://en.wikipedia.org/wiki/Ascii'>ASCII</a></b> " "characters set and limit strings size. " - "Use contextual help for details.</b>"), parent); + "Use contextual help for details.</b>"), tqparent); note->setMaximumWidth(150); grid->addMultiCellWidget(note, 5, 5, 1, 1); @@ -140,68 +140,68 @@ IPTCCategories::IPTCCategories(QWidget* parent) // -------------------------------------------------------- - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->categoryEdit, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->categoryEdit, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->subCategoriesBox, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoriesBox, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->subCategoriesCheck, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoriesCheck, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->subCategoryEdit, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoryEdit, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->subCategoriesBox, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoriesBox, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->addSubCategoryButton, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->addSubCategoryButton, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->delSubCategoryButton, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->delSubCategoryButton, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), - d->subCategoryEdit, SLOT(setEnabled(bool))); + connect(d->subCategoriesCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoryEdit, TQT_SLOT(setEnabled(bool))); - connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), - d->subCategoriesBox, SLOT(setEnabled(bool))); + connect(d->subCategoriesCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoriesBox, TQT_SLOT(setEnabled(bool))); - connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), - d->addSubCategoryButton, SLOT(setEnabled(bool))); + connect(d->subCategoriesCheck, TQT_SIGNAL(toggled(bool)), + d->addSubCategoryButton, TQT_SLOT(setEnabled(bool))); - connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), - d->delSubCategoryButton, SLOT(setEnabled(bool))); + connect(d->subCategoriesCheck, TQT_SIGNAL(toggled(bool)), + d->delSubCategoryButton, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->subCategoriesBox, SIGNAL(selectionChanged()), - this, SLOT(slotCategorySelectionChanged())); + connect(d->subCategoriesBox, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotCategorySelectionChanged())); - connect(d->addSubCategoryButton, SIGNAL(clicked()), - this, SLOT(slotAddCategory())); + connect(d->addSubCategoryButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddCategory())); - connect(d->delSubCategoryButton, SIGNAL(clicked()), - this, SLOT(slotDelCategory())); + connect(d->delSubCategoryButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDelCategory())); // -------------------------------------------------------- - connect(d->categoryCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->subCategoriesCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->addSubCategoryButton, SIGNAL(clicked()), - this, SIGNAL(signalModified())); + connect(d->addSubCategoryButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalModified())); - connect(d->delSubCategoryButton, SIGNAL(clicked()), - this, SIGNAL(signalModified())); + connect(d->delSubCategoryButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalModified())); - connect(d->categoryEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->categoryEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); } IPTCCategories::~IPTCCategories() @@ -215,7 +215,7 @@ void IPTCCategories::slotDelCategory() if (index == -1) return; - QListBoxItem* item = d->subCategoriesBox->item(index); + TQListBoxItem* item = d->subCategoriesBox->item(index); if (!item) return; delete item; } @@ -230,11 +230,11 @@ void IPTCCategories::slotCategorySelectionChanged() void IPTCCategories::slotAddCategory() { - QString newCategory = d->subCategoryEdit->text(); + TQString newCategory = d->subCategoryEdit->text(); if (newCategory.isEmpty()) return; bool found = false; - for (QListBoxItem *item = d->subCategoriesBox->firstItem(); + for (TQListBoxItem *item = d->subCategoriesBox->firstItem(); item; item = item->next()) { if (newCategory == item->text()) @@ -248,12 +248,12 @@ void IPTCCategories::slotAddCategory() d->subCategoriesBox->insertItem(newCategory); } -void IPTCCategories::readMetadata(QByteArray& iptcData) +void IPTCCategories::readMetadata(TQByteArray& iptcData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); - QString data; + TQString data; d->categoryEdit->clear(); d->categoryCheck->setChecked(false); @@ -282,9 +282,9 @@ void IPTCCategories::readMetadata(QByteArray& iptcData) blockSignals(false); } -void IPTCCategories::applyMetadata(QByteArray& iptcData) +void IPTCCategories::applyMetadata(TQByteArray& iptcData) { - QStringList newCategories; + TQStringList newCategories; KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); @@ -293,14 +293,14 @@ void IPTCCategories::applyMetadata(QByteArray& iptcData) else exiv2Iface.removeIptcTag("Iptc.Application2.Category"); - for (QListBoxItem *item = d->subCategoriesBox->firstItem(); + for (TQListBoxItem *item = d->subCategoriesBox->firstItem(); item; item = item->next()) newCategories.append(item->text()); if (d->categoryCheck->isChecked() && d->subCategoriesCheck->isChecked()) exiv2Iface.setImageSubCategories(d->oldSubCategories, newCategories); else - exiv2Iface.setImageSubCategories(d->oldSubCategories, QStringList()); + exiv2Iface.setImageSubCategories(d->oldSubCategories, TQStringList()); iptcData = exiv2Iface.getIptc(); } diff --git a/kipi-plugins/metadataedit/iptccategories.h b/kipi-plugins/metadataedit/iptccategories.h index 1d63c86..abb2e0e 100644 --- a/kipi-plugins/metadataedit/iptccategories.h +++ b/kipi-plugins/metadataedit/iptccategories.h @@ -23,27 +23,28 @@ #ifndef IPTC_CATEGORIES_H #define IPTC_CATEGORIES_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class IPTCCategoriesPriv; -class IPTCCategories : public QWidget +class IPTCCategories : public TQWidget { Q_OBJECT + TQ_OBJECT public: - IPTCCategories(QWidget* parent); + IPTCCategories(TQWidget* tqparent); ~IPTCCategories(); - void applyMetadata(QByteArray& iptcData); - void readMetadata(QByteArray& iptcData); + void applyMetadata(TQByteArray& iptcData); + void readMetadata(TQByteArray& iptcData); signals: diff --git a/kipi-plugins/metadataedit/iptccredits.cpp b/kipi-plugins/metadataedit/iptccredits.cpp index 6f5701b..cfdf9de 100644 --- a/kipi-plugins/metadataedit/iptccredits.cpp +++ b/kipi-plugins/metadataedit/iptccredits.cpp @@ -22,13 +22,13 @@ // QT includes. -#include <qlayout.h> -#include <qhgroupbox.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqhgroupbox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqcheckbox.h> // KDE includes. @@ -69,12 +69,12 @@ public: contactCheck = 0; } - QCheckBox *copyrightCheck; - QCheckBox *bylineCheck; - QCheckBox *bylineTitleCheck; - QCheckBox *creditCheck; - QCheckBox *sourceCheck; - QCheckBox *contactCheck; + TQCheckBox *copyrightCheck; + TQCheckBox *bylineCheck; + TQCheckBox *bylineTitleCheck; + TQCheckBox *creditCheck; + TQCheckBox *sourceCheck; + TQCheckBox *contactCheck; KLineEdit *copyrightEdit; KLineEdit *bylineEdit; @@ -84,80 +84,80 @@ public: KLineEdit *contactEdit; }; -IPTCCredits::IPTCCredits(QWidget* parent) - : QWidget(parent) +IPTCCredits::IPTCCredits(TQWidget* tqparent) + : TQWidget(tqparent) { d = new IPTCCreditsPriv; - QVBoxLayout *vlay = new QVBoxLayout( parent, 0, KDialog::spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( tqparent, 0, KDialog::spacingHint() ); // IPTC only accept printable Ascii char. - QRegExp asciiRx("[\x20-\x7F]+$"); - QValidator *asciiValidator = new QRegExpValidator(asciiRx, this); + TQRegExp asciiRx("[\x20-\x7F]+$"); + TQValidator *asciiValidator = new TQRegExpValidator(asciiRx, TQT_TQOBJECT(this)); // -------------------------------------------------------- - d->copyrightCheck = new QCheckBox(i18n("Copyright:"), parent); - d->copyrightEdit = new KLineEdit(parent); + d->copyrightCheck = new TQCheckBox(i18n("Copyright:"), tqparent); + d->copyrightEdit = new KLineEdit(tqparent); d->copyrightEdit->setValidator(asciiValidator); d->copyrightEdit->setMaxLength(128); vlay->addWidget(d->copyrightCheck); vlay->addWidget(d->copyrightEdit); - QWhatsThis::add(d->copyrightEdit, i18n("<p>Set here the necessary copyright notice. This field is limited " + TQWhatsThis::add(d->copyrightEdit, i18n("<p>Set here the necessary copyright notice. This field is limited " "to 128 ASCII characters.")); // -------------------------------------------------------- - d->bylineCheck = new QCheckBox(i18n("Byline:"), parent); - d->bylineEdit = new KLineEdit(parent); + d->bylineCheck = new TQCheckBox(i18n("Byline:"), tqparent); + d->bylineEdit = new KLineEdit(tqparent); d->bylineEdit->setValidator(asciiValidator); d->bylineEdit->setMaxLength(32); vlay->addWidget(d->bylineCheck); vlay->addWidget(d->bylineEdit); - QWhatsThis::add(d->bylineEdit, i18n("<p>Set here the name of content creator. This field is limited " + TQWhatsThis::add(d->bylineEdit, i18n("<p>Set here the name of content creator. This field is limited " "to 32 ASCII characters.")); // -------------------------------------------------------- - d->bylineTitleCheck = new QCheckBox(i18n("Byline Title:"), parent); - d->bylineTitleEdit = new KLineEdit(parent); + d->bylineTitleCheck = new TQCheckBox(i18n("Byline Title:"), tqparent); + d->bylineTitleEdit = new KLineEdit(tqparent); d->bylineTitleEdit->setValidator(asciiValidator); d->bylineTitleEdit->setMaxLength(32); vlay->addWidget(d->bylineTitleCheck); vlay->addWidget(d->bylineTitleEdit); - QWhatsThis::add(d->bylineTitleEdit, i18n("<p>Set here the title of content creator. This field is limited " + TQWhatsThis::add(d->bylineTitleEdit, i18n("<p>Set here the title of content creator. This field is limited " "to 32 ASCII characters.")); // -------------------------------------------------------- - d->creditCheck = new QCheckBox(i18n("Credit:"), parent); - d->creditEdit = new KLineEdit(parent); + d->creditCheck = new TQCheckBox(i18n("Credit:"), tqparent); + d->creditEdit = new KLineEdit(tqparent); d->creditEdit->setValidator(asciiValidator); d->creditEdit->setMaxLength(32); vlay->addWidget(d->creditCheck); vlay->addWidget(d->creditEdit); - QWhatsThis::add(d->creditEdit, i18n("<p>Set here the content provider. " + TQWhatsThis::add(d->creditEdit, i18n("<p>Set here the content provider. " "This field is limited to 32 ASCII characters.")); // -------------------------------------------------------- - d->sourceCheck = new QCheckBox(i18n("Source:"), parent); - d->sourceEdit = new KLineEdit(parent); + d->sourceCheck = new TQCheckBox(i18n("Source:"), tqparent); + d->sourceEdit = new KLineEdit(tqparent); d->sourceEdit->setValidator(asciiValidator); d->sourceEdit->setMaxLength(32); vlay->addWidget(d->sourceCheck); vlay->addWidget(d->sourceEdit); - QWhatsThis::add(d->sourceEdit, i18n("<p>Set here the original owner of content. " + TQWhatsThis::add(d->sourceEdit, i18n("<p>Set here the original owner of content. " "This field is limited to 32 ASCII characters.")); // -------------------------------------------------------- - d->contactCheck = new QCheckBox(i18n("Contact:"), parent); - d->contactEdit = new KLineEdit(parent); + d->contactCheck = new TQCheckBox(i18n("Contact:"), tqparent); + d->contactEdit = new KLineEdit(tqparent); d->contactEdit->setValidator(asciiValidator); d->contactEdit->setMaxLength(128); vlay->addWidget(d->contactCheck); vlay->addWidget(d->contactEdit); - QWhatsThis::add(d->contactEdit, i18n("<p>Set here the person or organisation to contact. " + TQWhatsThis::add(d->contactEdit, i18n("<p>Set here the person or organisation to contact. " "This field is limited to 128 ASCII characters.")); // -------------------------------------------------------- @@ -167,70 +167,70 @@ IPTCCredits::IPTCCredits(QWidget* parent) "text tags only support the printable " "<b><a href='http://en.wikipedia.org/wiki/Ascii'>ASCII</a></b> " "characters set and limit strings size. " - "Use contextual help for details.</b>"), parent); + "Use contextual help for details.</b>"), tqparent); vlay->addWidget(note); vlay->addStretch(); // -------------------------------------------------------- - connect(d->copyrightCheck, SIGNAL(toggled(bool)), - d->copyrightEdit, SLOT(setEnabled(bool))); + connect(d->copyrightCheck, TQT_SIGNAL(toggled(bool)), + d->copyrightEdit, TQT_SLOT(setEnabled(bool))); - connect(d->bylineCheck, SIGNAL(toggled(bool)), - d->bylineEdit, SLOT(setEnabled(bool))); + connect(d->bylineCheck, TQT_SIGNAL(toggled(bool)), + d->bylineEdit, TQT_SLOT(setEnabled(bool))); - connect(d->bylineTitleCheck, SIGNAL(toggled(bool)), - d->bylineTitleEdit, SLOT(setEnabled(bool))); + connect(d->bylineTitleCheck, TQT_SIGNAL(toggled(bool)), + d->bylineTitleEdit, TQT_SLOT(setEnabled(bool))); - connect(d->creditCheck, SIGNAL(toggled(bool)), - d->creditEdit, SLOT(setEnabled(bool))); + connect(d->creditCheck, TQT_SIGNAL(toggled(bool)), + d->creditEdit, TQT_SLOT(setEnabled(bool))); - connect(d->sourceCheck, SIGNAL(toggled(bool)), - d->sourceEdit, SLOT(setEnabled(bool))); + connect(d->sourceCheck, TQT_SIGNAL(toggled(bool)), + d->sourceEdit, TQT_SLOT(setEnabled(bool))); - connect(d->contactCheck, SIGNAL(toggled(bool)), - d->contactEdit, SLOT(setEnabled(bool))); + connect(d->contactCheck, TQT_SIGNAL(toggled(bool)), + d->contactEdit, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->copyrightCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->copyrightCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->bylineCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->bylineCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->bylineTitleCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->bylineTitleCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->creditCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->creditCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->sourceCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->sourceCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->contactCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->contactCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->copyrightEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->copyrightEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->bylineEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->bylineEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->bylineTitleEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->bylineTitleEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->creditEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->creditEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->sourceEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->sourceEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->contactEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->contactEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); } IPTCCredits::~IPTCCredits() @@ -238,12 +238,12 @@ IPTCCredits::~IPTCCredits() delete d; } -void IPTCCredits::readMetadata(QByteArray& iptcData) +void IPTCCredits::readMetadata(TQByteArray& iptcData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); - QString data; + TQString data; d->copyrightEdit->clear(); d->copyrightCheck->setChecked(false); @@ -308,7 +308,7 @@ void IPTCCredits::readMetadata(QByteArray& iptcData) blockSignals(false); } -void IPTCCredits::applyMetadata(QByteArray& iptcData) +void IPTCCredits::applyMetadata(TQByteArray& iptcData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); diff --git a/kipi-plugins/metadataedit/iptccredits.h b/kipi-plugins/metadataedit/iptccredits.h index 710d000..cf56067 100644 --- a/kipi-plugins/metadataedit/iptccredits.h +++ b/kipi-plugins/metadataedit/iptccredits.h @@ -23,27 +23,28 @@ #ifndef IPTC_CREDITS_H #define IPTC_CREDITS_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class IPTCCreditsPriv; -class IPTCCredits : public QWidget +class IPTCCredits : public TQWidget { Q_OBJECT + TQ_OBJECT public: - IPTCCredits(QWidget* parent); + IPTCCredits(TQWidget* tqparent); ~IPTCCredits(); - void applyMetadata(QByteArray& iptcData); - void readMetadata(QByteArray& iptcData); + void applyMetadata(TQByteArray& iptcData); + void readMetadata(TQByteArray& iptcData); signals: diff --git a/kipi-plugins/metadataedit/iptcdatetime.cpp b/kipi-plugins/metadataedit/iptcdatetime.cpp index 7889805..db68bb6 100644 --- a/kipi-plugins/metadataedit/iptcdatetime.cpp +++ b/kipi-plugins/metadataedit/iptcdatetime.cpp @@ -22,12 +22,12 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qdatetime.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqdatetime.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqcheckbox.h> // KDE includes. @@ -78,16 +78,16 @@ public: syncEXIFDateCheck = 0; } - QCheckBox *dateCreatedCheck; - QCheckBox *dateReleasedCheck; - QCheckBox *dateExpiredCheck; - QCheckBox *dateDigitalizedCheck; - QCheckBox *timeCreatedCheck; - QCheckBox *timeReleasedCheck; - QCheckBox *timeExpiredCheck; - QCheckBox *timeDigitalizedCheck; - QCheckBox *syncHOSTDateCheck; - QCheckBox *syncEXIFDateCheck; + TQCheckBox *dateCreatedCheck; + TQCheckBox *dateReleasedCheck; + TQCheckBox *dateExpiredCheck; + TQCheckBox *dateDigitalizedCheck; + TQCheckBox *timeCreatedCheck; + TQCheckBox *timeReleasedCheck; + TQCheckBox *timeExpiredCheck; + TQCheckBox *timeDigitalizedCheck; + TQCheckBox *syncHOSTDateCheck; + TQCheckBox *syncEXIFDateCheck; KDateWidget *dateCreatedSel; KDateWidget *dateReleasedSel; @@ -100,26 +100,26 @@ public: KTimeWidget *timeDigitalizedSel; }; -IPTCDateTime::IPTCDateTime(QWidget* parent) - : QWidget(parent) +IPTCDateTime::IPTCDateTime(TQWidget* tqparent) + : TQWidget(tqparent) { d = new IPTCDateTimePriv; - QGridLayout* grid = new QGridLayout(parent, 11, 2, KDialog::spacingHint()); + TQGridLayout* grid = new TQGridLayout(tqparent, 11, 2, KDialog::spacingHint()); // -------------------------------------------------------- - d->dateCreatedCheck = new QCheckBox(i18n("Creation date"), parent); - d->timeCreatedCheck = new QCheckBox(i18n("Creation time"), parent); - d->dateCreatedSel = new KDateWidget(parent); - d->timeCreatedSel = new KTimeWidget(parent); - d->syncHOSTDateCheck = new QCheckBox(i18n("Sync creation date entered through %1") - .arg(KApplication::kApplication()->aboutData()->appName()), - parent); - d->syncEXIFDateCheck = new QCheckBox(i18n("Sync EXIF creation date"), parent); - KSeparator *line = new KSeparator(Horizontal, parent); - d->dateCreatedSel->setDate(QDate::currentDate()); - d->timeCreatedSel->setTime(QTime::currentTime()); + d->dateCreatedCheck = new TQCheckBox(i18n("Creation date"), tqparent); + d->timeCreatedCheck = new TQCheckBox(i18n("Creation time"), tqparent); + d->dateCreatedSel = new KDateWidget(tqparent); + d->timeCreatedSel = new KTimeWidget(tqparent); + d->syncHOSTDateCheck = new TQCheckBox(i18n("Sync creation date entered through %1") + .tqarg(KApplication::kApplication()->aboutData()->appName()), + tqparent); + d->syncEXIFDateCheck = new TQCheckBox(i18n("Sync EXIF creation date"), tqparent); + KSeparator *line = new KSeparator(Qt::Horizontal, tqparent); + d->dateCreatedSel->setDate(TQDate::tqcurrentDate()); + d->timeCreatedSel->setTime(TQTime::currentTime()); grid->addMultiCellWidget(d->dateCreatedCheck, 0, 0, 0, 0); grid->addMultiCellWidget(d->timeCreatedCheck, 0, 0, 1, 2); grid->addMultiCellWidget(d->dateCreatedSel, 1, 1, 0, 0); @@ -127,60 +127,60 @@ IPTCDateTime::IPTCDateTime(QWidget* parent) grid->addMultiCellWidget(d->syncHOSTDateCheck, 2, 2, 0, 2); grid->addMultiCellWidget(d->syncEXIFDateCheck, 3, 3, 0, 2); grid->addMultiCellWidget(line, 4, 4, 0, 2); - QWhatsThis::add(d->dateCreatedSel, i18n("<p>Set here the creation date of " + TQWhatsThis::add(d->dateCreatedSel, i18n("<p>Set here the creation date of " "intellectual content.")); - QWhatsThis::add(d->timeCreatedSel, i18n("<p>Set here the creation time of " + TQWhatsThis::add(d->timeCreatedSel, i18n("<p>Set here the creation time of " "intellectual content.")); // -------------------------------------------------------- - d->dateReleasedCheck = new QCheckBox(i18n("Release date"), parent); - d->timeReleasedCheck = new QCheckBox(i18n("Release time"), parent); - d->dateReleasedSel = new KDateWidget(parent); - d->timeReleasedSel = new KTimeWidget(parent); - d->dateReleasedSel->setDate(QDate::currentDate()); - d->timeReleasedSel->setTime(QTime::currentTime()); + d->dateReleasedCheck = new TQCheckBox(i18n("Release date"), tqparent); + d->timeReleasedCheck = new TQCheckBox(i18n("Release time"), tqparent); + d->dateReleasedSel = new KDateWidget(tqparent); + d->timeReleasedSel = new KTimeWidget(tqparent); + d->dateReleasedSel->setDate(TQDate::tqcurrentDate()); + d->timeReleasedSel->setTime(TQTime::currentTime()); grid->addMultiCellWidget(d->dateReleasedCheck, 5, 5, 0, 0); grid->addMultiCellWidget(d->timeReleasedCheck, 5, 5, 1, 2); grid->addMultiCellWidget(d->dateReleasedSel, 6, 6, 0, 0); grid->addMultiCellWidget(d->timeReleasedSel, 6, 6, 1, 1); - QWhatsThis::add(d->dateReleasedSel, i18n("<p>Set here the earliest intended usable date of " + TQWhatsThis::add(d->dateReleasedSel, i18n("<p>Set here the earliest intended usable date of " "intellectual content.")); - QWhatsThis::add(d->timeReleasedSel, i18n("<p>Set here the earliest intended usable time of " + TQWhatsThis::add(d->timeReleasedSel, i18n("<p>Set here the earliest intended usable time of " "intellectual content.")); // -------------------------------------------------------- - d->dateExpiredCheck = new QCheckBox(i18n("Expiration date"), parent); - d->timeExpiredCheck = new QCheckBox(i18n("Expiration time"), parent); - d->dateExpiredSel = new KDateWidget(parent); - d->timeExpiredSel = new KTimeWidget(parent); - d->dateExpiredSel->setDate(QDate::currentDate()); - d->timeExpiredSel->setTime(QTime::currentTime()); + d->dateExpiredCheck = new TQCheckBox(i18n("Expiration date"), tqparent); + d->timeExpiredCheck = new TQCheckBox(i18n("Expiration time"), tqparent); + d->dateExpiredSel = new KDateWidget(tqparent); + d->timeExpiredSel = new KTimeWidget(tqparent); + d->dateExpiredSel->setDate(TQDate::tqcurrentDate()); + d->timeExpiredSel->setTime(TQTime::currentTime()); grid->addMultiCellWidget(d->dateExpiredCheck, 7, 7, 0, 0); grid->addMultiCellWidget(d->timeExpiredCheck, 7, 7, 1, 2); grid->addMultiCellWidget(d->dateExpiredSel, 8, 8, 0, 0); grid->addMultiCellWidget(d->timeExpiredSel, 8, 8, 1, 1); - QWhatsThis::add(d->dateExpiredSel, i18n("<p>Set here the latest intended usable date of " + TQWhatsThis::add(d->dateExpiredSel, i18n("<p>Set here the latest intended usable date of " "intellectual content.")); - QWhatsThis::add(d->timeExpiredSel, i18n("<p>Set here the latest intended usable time of " + TQWhatsThis::add(d->timeExpiredSel, i18n("<p>Set here the latest intended usable time of " "intellectual content.")); // -------------------------------------------------------- - d->dateDigitalizedCheck = new QCheckBox(i18n("Digitization date"), parent); - d->timeDigitalizedCheck = new QCheckBox(i18n("Digitization time"), parent); - d->dateDigitalizedSel = new KDateWidget(parent); - d->timeDigitalizedSel = new KTimeWidget(parent); - d->dateDigitalizedSel->setDate(QDate::currentDate()); - d->timeDigitalizedSel->setTime(QTime::currentTime()); + d->dateDigitalizedCheck = new TQCheckBox(i18n("Digitization date"), tqparent); + d->timeDigitalizedCheck = new TQCheckBox(i18n("Digitization time"), tqparent); + d->dateDigitalizedSel = new KDateWidget(tqparent); + d->timeDigitalizedSel = new KTimeWidget(tqparent); + d->dateDigitalizedSel->setDate(TQDate::tqcurrentDate()); + d->timeDigitalizedSel->setTime(TQTime::currentTime()); grid->addMultiCellWidget(d->dateDigitalizedCheck, 9, 9, 0, 0); grid->addMultiCellWidget(d->timeDigitalizedCheck, 9, 9, 1, 2); grid->addMultiCellWidget(d->dateDigitalizedSel, 10, 10, 0, 0); grid->addMultiCellWidget(d->timeDigitalizedSel, 10, 10, 1, 1); - QWhatsThis::add(d->dateDigitalizedSel, i18n("<p>Set here the creation date of " + TQWhatsThis::add(d->dateDigitalizedSel, i18n("<p>Set here the creation date of " "digital representation.")); - QWhatsThis::add(d->timeDigitalizedSel, i18n("<p>Set here the creation time of " + TQWhatsThis::add(d->timeDigitalizedSel, i18n("<p>Set here the creation time of " "digital representation.")); grid->setColStretch(2, 10); @@ -188,87 +188,87 @@ IPTCDateTime::IPTCDateTime(QWidget* parent) // -------------------------------------------------------- - connect(d->dateCreatedCheck, SIGNAL(toggled(bool)), - d->dateCreatedSel, SLOT(setEnabled(bool))); + connect(d->dateCreatedCheck, TQT_SIGNAL(toggled(bool)), + d->dateCreatedSel, TQT_SLOT(setEnabled(bool))); - connect(d->dateReleasedCheck, SIGNAL(toggled(bool)), - d->dateReleasedSel, SLOT(setEnabled(bool))); + connect(d->dateReleasedCheck, TQT_SIGNAL(toggled(bool)), + d->dateReleasedSel, TQT_SLOT(setEnabled(bool))); - connect(d->dateExpiredCheck, SIGNAL(toggled(bool)), - d->dateExpiredSel, SLOT(setEnabled(bool))); + connect(d->dateExpiredCheck, TQT_SIGNAL(toggled(bool)), + d->dateExpiredSel, TQT_SLOT(setEnabled(bool))); - connect(d->dateDigitalizedCheck, SIGNAL(toggled(bool)), - d->dateDigitalizedSel, SLOT(setEnabled(bool))); + connect(d->dateDigitalizedCheck, TQT_SIGNAL(toggled(bool)), + d->dateDigitalizedSel, TQT_SLOT(setEnabled(bool))); - connect(d->timeCreatedCheck, SIGNAL(toggled(bool)), - d->timeCreatedSel, SLOT(setEnabled(bool))); + connect(d->timeCreatedCheck, TQT_SIGNAL(toggled(bool)), + d->timeCreatedSel, TQT_SLOT(setEnabled(bool))); - connect(d->timeReleasedCheck, SIGNAL(toggled(bool)), - d->timeReleasedSel, SLOT(setEnabled(bool))); + connect(d->timeReleasedCheck, TQT_SIGNAL(toggled(bool)), + d->timeReleasedSel, TQT_SLOT(setEnabled(bool))); - connect(d->timeExpiredCheck, SIGNAL(toggled(bool)), - d->timeExpiredSel, SLOT(setEnabled(bool))); + connect(d->timeExpiredCheck, TQT_SIGNAL(toggled(bool)), + d->timeExpiredSel, TQT_SLOT(setEnabled(bool))); - connect(d->timeDigitalizedCheck, SIGNAL(toggled(bool)), - d->timeDigitalizedSel, SLOT(setEnabled(bool))); + connect(d->timeDigitalizedCheck, TQT_SIGNAL(toggled(bool)), + d->timeDigitalizedSel, TQT_SLOT(setEnabled(bool))); - connect(d->dateCreatedCheck, SIGNAL(toggled(bool)), - d->syncHOSTDateCheck, SLOT(setEnabled(bool))); + connect(d->dateCreatedCheck, TQT_SIGNAL(toggled(bool)), + d->syncHOSTDateCheck, TQT_SLOT(setEnabled(bool))); - connect(d->dateCreatedCheck, SIGNAL(toggled(bool)), - d->syncEXIFDateCheck, SLOT(setEnabled(bool))); + connect(d->dateCreatedCheck, TQT_SIGNAL(toggled(bool)), + d->syncEXIFDateCheck, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->dateCreatedCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->dateCreatedCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateReleasedCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->dateReleasedCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateExpiredCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->dateExpiredCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateDigitalizedCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->dateDigitalizedCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->timeCreatedCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->timeCreatedCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->timeReleasedCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->timeReleasedCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->timeExpiredCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->timeExpiredCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->timeDigitalizedCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->timeDigitalizedCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->dateCreatedSel, SIGNAL(changed(QDate)), - this, SIGNAL(signalModified())); + connect(d->dateCreatedSel, TQT_SIGNAL(changed(TQDate)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateReleasedSel, SIGNAL(changed(QDate)), - this, SIGNAL(signalModified())); + connect(d->dateReleasedSel, TQT_SIGNAL(changed(TQDate)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateExpiredSel, SIGNAL(changed(QDate)), - this, SIGNAL(signalModified())); + connect(d->dateExpiredSel, TQT_SIGNAL(changed(TQDate)), + this, TQT_SIGNAL(signalModified())); - connect(d->dateDigitalizedSel, SIGNAL(changed(QDate)), - this, SIGNAL(signalModified())); + connect(d->dateDigitalizedSel, TQT_SIGNAL(changed(TQDate)), + this, TQT_SIGNAL(signalModified())); - connect(d->timeCreatedSel, SIGNAL(valueChanged(const QTime &)), - this, SIGNAL(signalModified())); + connect(d->timeCreatedSel, TQT_SIGNAL(valueChanged(const TQTime &)), + this, TQT_SIGNAL(signalModified())); - connect(d->timeReleasedSel, SIGNAL(valueChanged(const QTime &)), - this, SIGNAL(signalModified())); + connect(d->timeReleasedSel, TQT_SIGNAL(valueChanged(const TQTime &)), + this, TQT_SIGNAL(signalModified())); - connect(d->timeExpiredSel, SIGNAL(valueChanged(const QTime &)), - this, SIGNAL(signalModified())); + connect(d->timeExpiredSel, TQT_SIGNAL(valueChanged(const TQTime &)), + this, TQT_SIGNAL(signalModified())); - connect(d->timeDigitalizedSel, SIGNAL(valueChanged(const QTime &)), - this, SIGNAL(signalModified())); + connect(d->timeDigitalizedSel, TQT_SIGNAL(valueChanged(const TQTime &)), + this, TQT_SIGNAL(signalModified())); } IPTCDateTime::~IPTCDateTime() @@ -296,29 +296,29 @@ void IPTCDateTime::setCheckedSyncEXIFDate(bool c) d->syncEXIFDateCheck->setChecked(c); } -QDateTime IPTCDateTime::getIPTCCreationDate() +TQDateTime IPTCDateTime::getIPTCCreationDate() { - return QDateTime(d->dateCreatedSel->date(), d->timeCreatedSel->time()); + return TQDateTime(d->dateCreatedSel->date(), d->timeCreatedSel->time()); } -void IPTCDateTime::readMetadata(QByteArray& iptcData) +void IPTCDateTime::readMetadata(TQByteArray& iptcData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); - QDate date; - QTime time; - QString dateStr, timeStr; + TQDate date; + TQTime time; + TQString dateStr, timeStr; dateStr = exiv2Iface.getIptcTagString("Iptc.Application2.DateCreated", false); timeStr = exiv2Iface.getIptcTagString("Iptc.Application2.TimeCreated", false); - d->dateCreatedSel->setDate(QDate::currentDate()); + d->dateCreatedSel->setDate(TQDate::tqcurrentDate()); d->dateCreatedCheck->setChecked(false); if (!dateStr.isEmpty()) { - date = QDate::fromString(dateStr, Qt::ISODate); + date = TQDate::fromString(dateStr, Qt::ISODate); if (date.isValid()) { d->dateCreatedSel->setDate(date); @@ -329,11 +329,11 @@ void IPTCDateTime::readMetadata(QByteArray& iptcData) d->syncHOSTDateCheck->setEnabled(d->dateCreatedCheck->isChecked()); d->syncEXIFDateCheck->setEnabled(d->dateCreatedCheck->isChecked()); - d->timeCreatedSel->setTime(QTime::currentTime()); + d->timeCreatedSel->setTime(TQTime::currentTime()); d->timeCreatedCheck->setChecked(false); if (!timeStr.isEmpty()) { - time = QTime::fromString(timeStr, Qt::ISODate); + time = TQTime::fromString(timeStr, Qt::ISODate); if (time.isValid()) { d->timeCreatedSel->setTime(time); @@ -345,11 +345,11 @@ void IPTCDateTime::readMetadata(QByteArray& iptcData) dateStr = exiv2Iface.getIptcTagString("Iptc.Application2.ReleaseDate", false); timeStr = exiv2Iface.getIptcTagString("Iptc.Application2.ReleaseTime", false); - d->dateReleasedSel->setDate(QDate::currentDate()); + d->dateReleasedSel->setDate(TQDate::tqcurrentDate()); d->dateReleasedCheck->setChecked(false); if (!dateStr.isEmpty()) { - date = QDate::fromString(dateStr, Qt::ISODate); + date = TQDate::fromString(dateStr, Qt::ISODate); if (date.isValid()) { d->dateReleasedSel->setDate(date); @@ -358,11 +358,11 @@ void IPTCDateTime::readMetadata(QByteArray& iptcData) } d->dateReleasedSel->setEnabled(d->dateReleasedCheck->isChecked()); - d->timeReleasedSel->setTime(QTime::currentTime()); + d->timeReleasedSel->setTime(TQTime::currentTime()); d->timeReleasedCheck->setChecked(false); if (!timeStr.isEmpty()) { - time = QTime::fromString(timeStr, Qt::ISODate); + time = TQTime::fromString(timeStr, Qt::ISODate); if (time.isValid()) { d->timeReleasedSel->setTime(time); @@ -374,11 +374,11 @@ void IPTCDateTime::readMetadata(QByteArray& iptcData) dateStr = exiv2Iface.getIptcTagString("Iptc.Application2.ExpirationDate", false); timeStr = exiv2Iface.getIptcTagString("Iptc.Application2.ExpirationTime", false); - d->dateExpiredSel->setDate(QDate::currentDate()); + d->dateExpiredSel->setDate(TQDate::tqcurrentDate()); d->dateExpiredCheck->setChecked(false); if (!dateStr.isEmpty()) { - date = QDate::fromString(dateStr, Qt::ISODate); + date = TQDate::fromString(dateStr, Qt::ISODate); if (date.isValid()) { d->dateExpiredSel->setDate(date); @@ -387,11 +387,11 @@ void IPTCDateTime::readMetadata(QByteArray& iptcData) } d->dateExpiredSel->setEnabled(d->dateExpiredCheck->isChecked()); - d->timeExpiredSel->setTime(QTime::currentTime()); + d->timeExpiredSel->setTime(TQTime::currentTime()); d->timeExpiredCheck->setChecked(false); if (!timeStr.isEmpty()) { - time = QTime::fromString(timeStr, Qt::ISODate); + time = TQTime::fromString(timeStr, Qt::ISODate); if (time.isValid()) { d->timeExpiredSel->setTime(time); @@ -403,11 +403,11 @@ void IPTCDateTime::readMetadata(QByteArray& iptcData) dateStr = exiv2Iface.getIptcTagString("Iptc.Application2.DigitizationDate", false); timeStr = exiv2Iface.getIptcTagString("Iptc.Application2.DigitizationTime", false); - d->dateDigitalizedSel->setDate(QDate::currentDate()); + d->dateDigitalizedSel->setDate(TQDate::tqcurrentDate()); d->dateDigitalizedCheck->setChecked(false); if (!dateStr.isEmpty()) { - date = QDate::fromString(dateStr, Qt::ISODate); + date = TQDate::fromString(dateStr, Qt::ISODate); if (date.isValid()) { d->dateDigitalizedSel->setDate(date); @@ -416,11 +416,11 @@ void IPTCDateTime::readMetadata(QByteArray& iptcData) } d->dateDigitalizedSel->setEnabled(d->dateDigitalizedCheck->isChecked()); - d->timeDigitalizedSel->setTime(QTime::currentTime()); + d->timeDigitalizedSel->setTime(TQTime::currentTime()); d->timeDigitalizedCheck->setChecked(false); if (!timeStr.isEmpty()) { - time = QTime::fromString(timeStr, Qt::ISODate); + time = TQTime::fromString(timeStr, Qt::ISODate); if (time.isValid()) { d->timeDigitalizedSel->setTime(time); @@ -432,7 +432,7 @@ void IPTCDateTime::readMetadata(QByteArray& iptcData) blockSignals(false); } -void IPTCDateTime::applyMetadata(QByteArray& exifData, QByteArray& iptcData) +void IPTCDateTime::applyMetadata(TQByteArray& exifData, TQByteArray& iptcData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setExif(exifData); @@ -445,7 +445,7 @@ void IPTCDateTime::applyMetadata(QByteArray& exifData, QByteArray& iptcData) if (syncEXIFDateIsChecked()) { exiv2Iface.setExifTagString("Exif.Image.DateTime", - getIPTCCreationDate().toString(QString("yyyy:MM:dd hh:mm:ss")).ascii()); + getIPTCCreationDate().toString(TQString("yyyy:MM:dd hh:mm:ss")).ascii()); } } else diff --git a/kipi-plugins/metadataedit/iptcdatetime.h b/kipi-plugins/metadataedit/iptcdatetime.h index b30ffb5..92d5489 100644 --- a/kipi-plugins/metadataedit/iptcdatetime.h +++ b/kipi-plugins/metadataedit/iptcdatetime.h @@ -23,27 +23,28 @@ #ifndef IPTC_DATETIME_H #define IPTC_DATETIME_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class IPTCDateTimePriv; -class IPTCDateTime : public QWidget +class IPTCDateTime : public TQWidget { Q_OBJECT + TQ_OBJECT public: - IPTCDateTime(QWidget* parent); + IPTCDateTime(TQWidget* tqparent); ~IPTCDateTime(); - void applyMetadata(QByteArray& exifData, QByteArray& iptcData); - void readMetadata(QByteArray& iptcData); + void applyMetadata(TQByteArray& exifData, TQByteArray& iptcData); + void readMetadata(TQByteArray& iptcData); bool syncHOSTDateIsChecked(); bool syncEXIFDateIsChecked(); @@ -51,7 +52,7 @@ public: void setCheckedSyncHOSTDate(bool c); void setCheckedSyncEXIFDate(bool c); - QDateTime getIPTCCreationDate(); + TQDateTime getIPTCCreationDate(); signals: diff --git a/kipi-plugins/metadataedit/iptceditdialog.cpp b/kipi-plugins/metadataedit/iptceditdialog.cpp index 4713aea..a4beb35 100644 --- a/kipi-plugins/metadataedit/iptceditdialog.cpp +++ b/kipi-plugins/metadataedit/iptceditdialog.cpp @@ -20,12 +20,12 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qtimer.h> -#include <qframe.h> -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqtimer.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqpushbutton.h> // KDE includes. @@ -98,17 +98,17 @@ public: bool modified; bool isReadOnly; - QByteArray exifData; - QByteArray iptcData; + TQByteArray exifData; + TQByteArray iptcData; - QFrame *page_caption; - QFrame *page_datetime; - QFrame *page_subjects; - QFrame *page_keywords; - QFrame *page_categories; - QFrame *page_credits; - QFrame *page_status; - QFrame *page_origin; + TQFrame *page_caption; + TQFrame *page_datetime; + TQFrame *page_subjects; + TQFrame *page_keywords; + TQFrame *page_categories; + TQFrame *page_credits; + TQFrame *page_status; + TQFrame *page_origin; KURL::List urls; @@ -120,7 +120,7 @@ public: IPTCKeywords *keywordsPage; IPTCCategories *categoriesPage; IPTCCredits *creditsPage; - IPTCStatus *statusPage; + IPTCtqStatus *statusPage; IPTCOrigin *originPage; KIPI::Interface *interface; @@ -128,11 +128,11 @@ public: KIPIPlugins::KPAboutData *about; }; -IPTCEditDialog::IPTCEditDialog(QWidget* parent, KURL::List urls, KIPI::Interface *iface) - : KDialogBase(IconList, QString::null, +IPTCEditDialog::IPTCEditDialog(TQWidget* tqparent, KURL::List urls, KIPI::Interface *iface) + : KDialogBase(IconList, TQString(), urls.count() > 1 ? Help|User1|User2|Stretch|Ok|Apply|Close : Help|Stretch|Ok|Apply|Close, - Ok, parent, 0, true, true, + Ok, tqparent, 0, true, true, KStdGuiItem::guiItem(KStdGuiItem::Forward), KStdGuiItem::guiItem(KStdGuiItem::Back) ) { @@ -167,9 +167,9 @@ IPTCEditDialog::IPTCEditDialog(QWidget* parent, KURL::List urls, KIPI::Interface BarIcon("identity", KIcon::SizeMedium)); d->creditsPage = new IPTCCredits(d->page_credits); - d->page_status = addPage(i18n("Status"), i18n("Status Information"), + d->page_status = addPage(i18n("tqStatus"), i18n("tqStatus Information"), BarIcon("messagebox_info", KIcon::SizeMedium)); - d->statusPage = new IPTCStatus(d->page_status); + d->statusPage = new IPTCtqStatus(d->page_status); d->page_origin = addPage(i18n("Origin"), i18n("Origin Information"), BarIcon("www", KIcon::SizeMedium)); @@ -190,34 +190,34 @@ IPTCEditDialog::IPTCEditDialog(QWidget* parent, KURL::List urls, KIPI::Interface KHelpMenu* helpMenu = new KHelpMenu(this, d->about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), - this, SLOT(slotHelp()), 0, -1, 0); + this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // ------------------------------------------------------------ - connect(d->captionPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->captionPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->datetimePage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->datetimePage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->subjectsPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->subjectsPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->keywordsPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->keywordsPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->categoriesPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->categoriesPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->creditsPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->creditsPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->statusPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->statusPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); - connect(d->originPage, SIGNAL(signalModified()), - this, SLOT(slotModified())); + connect(d->originPage, TQT_SIGNAL(signalModified()), + this, TQT_SLOT(slotModified())); // ------------------------------------------------------------ @@ -236,7 +236,7 @@ void IPTCEditDialog::slotHelp() KApplication::kApplication()->invokeHelp("metadataedit", "kipi-plugins"); } -void IPTCEditDialog::closeEvent(QCloseEvent *e) +void IPTCEditDialog::closeEvent(TQCloseEvent *e) { if (!e) return; saveSettings(); @@ -259,7 +259,7 @@ void IPTCEditDialog::readSettings() d->captionPage->setCheckedSyncEXIFComment(config.readBoolEntry("Sync EXIF Comment", true)); d->datetimePage->setCheckedSyncHOSTDate(config.readBoolEntry("Sync Host Date", true)); d->datetimePage->setCheckedSyncEXIFDate(config.readBoolEntry("Sync EXIF Date", true)); - resize(configDialogSize(config, QString("IPTC Edit Dialog"))); + resize(configDialogSize(config, TQString("IPTC Edit Dialog"))); } void IPTCEditDialog::saveSettings() @@ -272,7 +272,7 @@ void IPTCEditDialog::saveSettings() config.writeEntry("Sync EXIF Comment", d->captionPage->syncEXIFCommentIsChecked()); config.writeEntry("Sync Host Date", d->datetimePage->syncHOSTDateIsChecked()); config.writeEntry("Sync EXIF Date", d->datetimePage->syncEXIFDateIsChecked()); - saveDialogSize(config, QString("IPTC Edit Dialog")); + saveDialogSize(config, TQString("IPTC Edit Dialog")); config.sync(); } @@ -302,12 +302,12 @@ void IPTCEditDialog::slotItemChanged() d->page_origin->setEnabled(!d->isReadOnly); enableButton(Apply, !d->isReadOnly); - setCaption(QString("%1 (%2/%3) - %4") - .arg((*d->currItem).filename()) - .arg(d->urls.findIndex(*(d->currItem))+1) - .arg(d->urls.count()) - .arg(i18n("Edit IPTC Metadata")) + - (d->isReadOnly ? QString(" - ") + i18n("(read only)") : QString::null)); + setCaption(TQString("%1 (%2/%3) - %4") + .tqarg((*d->currItem).filename()) + .tqarg(d->urls.tqfindIndex(*(d->currItem))+1) + .tqarg(d->urls.count()) + .tqarg(i18n("Edit IPTC Metadata")) + + (d->isReadOnly ? TQString(" - ") + i18n("(read only)") : TQString())); enableButton(User1, *(d->currItem) != d->urls.last()); enableButton(User2, *(d->currItem) != d->urls.first()); enableButton(Apply, false); @@ -376,14 +376,14 @@ void IPTCEditDialog::slotOk() accept(); } -bool IPTCEditDialog::eventFilter(QObject *, QEvent *e) +bool IPTCEditDialog::eventFilter(TQObject *, TQEvent *e) { - if ( e->type() == QEvent::KeyPress ) + if ( e->type() == TQEvent::KeyPress ) { - QKeyEvent *k = (QKeyEvent *)e; + TQKeyEvent *k = (TQKeyEvent *)e; - if (k->state() == Qt::ControlButton && - (k->key() == Qt::Key_Enter || k->key() == Qt::Key_Return)) + if (k->state() == TQt::ControlButton && + (k->key() == TQt::Key_Enter || k->key() == TQt::Key_Return)) { slotApply(); @@ -392,8 +392,8 @@ bool IPTCEditDialog::eventFilter(QObject *, QEvent *e) return true; } - else if (k->state() == Qt::ShiftButton && - (k->key() == Qt::Key_Enter || k->key() == Qt::Key_Return)) + else if (k->state() == TQt::ShiftButton && + (k->key() == TQt::Key_Enter || k->key() == TQt::Key_Return)) { slotApply(); diff --git a/kipi-plugins/metadataedit/iptceditdialog.h b/kipi-plugins/metadataedit/iptceditdialog.h index 7db7df6..5c17ff7 100644 --- a/kipi-plugins/metadataedit/iptceditdialog.h +++ b/kipi-plugins/metadataedit/iptceditdialog.h @@ -23,9 +23,9 @@ #ifndef IPTCEDITDIALOG_H #define IPTCEDITDIALOG_H -// Qt includes. +// TQt includes. -#include <qcstring.h> +#include <tqcstring.h> // KDE includes. @@ -40,10 +40,11 @@ class IPTCEditDialogDialogPrivate; class IPTCEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - IPTCEditDialog(QWidget* parent, KURL::List urls, KIPI::Interface *iface); + IPTCEditDialog(TQWidget* tqparent, KURL::List urls, KIPI::Interface *iface); ~IPTCEditDialog(); public slots: @@ -58,8 +59,8 @@ protected slots: protected: - void closeEvent(QCloseEvent *); - bool eventFilter(QObject *, QEvent *); + void closeEvent(TQCloseEvent *); + bool eventFilter(TQObject *, TQEvent *); private slots: diff --git a/kipi-plugins/metadataedit/iptckeywords.cpp b/kipi-plugins/metadataedit/iptckeywords.cpp index 1307cbb..7787f2c 100644 --- a/kipi-plugins/metadataedit/iptckeywords.cpp +++ b/kipi-plugins/metadataedit/iptckeywords.cpp @@ -22,12 +22,12 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> // KDE includes. @@ -63,44 +63,44 @@ public: keywordEdit = 0; } - QStringList oldKeywords; + TQStringList oldKeywords; - QPushButton *addKeywordButton; - QPushButton *delKeywordButton; + TQPushButton *addKeywordButton; + TQPushButton *delKeywordButton; - QCheckBox *keywordsCheck; + TQCheckBox *keywordsCheck; KLineEdit *keywordEdit; KListBox *keywordsBox; }; -IPTCKeywords::IPTCKeywords(QWidget* parent) - : QWidget(parent) +IPTCKeywords::IPTCKeywords(TQWidget* tqparent) + : TQWidget(tqparent) { d = new IPTCKeywordsPriv; - QGridLayout *grid = new QGridLayout(parent, 5, 2, 0, KDialog::spacingHint()); - grid->setAlignment( Qt::AlignTop ); + TQGridLayout *grid = new TQGridLayout(tqparent, 5, 2, 0, KDialog::spacingHint()); + grid->tqsetAlignment( TQt::AlignTop ); // IPTC only accept printable Ascii char. - QRegExp asciiRx("[\x20-\x7F]+$"); - QValidator *asciiValidator = new QRegExpValidator(asciiRx, this); + TQRegExp asciiRx("[\x20-\x7F]+$"); + TQValidator *asciiValidator = new TQRegExpValidator(asciiRx, TQT_TQOBJECT(this)); // -------------------------------------------------------- - d->keywordsCheck = new QCheckBox(i18n("Use information retrieval words:"), parent); + d->keywordsCheck = new TQCheckBox(i18n("Use information retrieval words:"), tqparent); - d->keywordEdit = new KLineEdit(parent); + d->keywordEdit = new KLineEdit(tqparent); d->keywordEdit->setValidator(asciiValidator); d->keywordEdit->setMaxLength(64); - QWhatsThis::add(d->keywordEdit, i18n("<p>Enter here a new keyword. " + TQWhatsThis::add(d->keywordEdit, i18n("<p>Enter here a new keyword. " "This field is limited to 64 ASCII characters.")); - d->keywordsBox = new KListBox(parent); - d->keywordsBox->setVScrollBarMode(QScrollView::AlwaysOn); + d->keywordsBox = new KListBox(tqparent); + d->keywordsBox->setVScrollBarMode(TQScrollView::AlwaysOn); - d->addKeywordButton = new QPushButton( i18n("&Add"), parent); - d->delKeywordButton = new QPushButton( i18n("&Delete"), parent); + d->addKeywordButton = new TQPushButton( i18n("&Add"), tqparent); + d->delKeywordButton = new TQPushButton( i18n("&Delete"), tqparent); d->addKeywordButton->setIconSet(SmallIcon("add")); d->delKeywordButton->setIconSet(SmallIcon("remove")); d->delKeywordButton->setEnabled(false); @@ -118,7 +118,7 @@ IPTCKeywords::IPTCKeywords(QWidget* parent) "text tags only support the printable " "<b><a href='http://en.wikipedia.org/wiki/Ascii'>ASCII</a></b> " "characters set and limit strings size. " - "Use contextual help for details.</b>"), parent); + "Use contextual help for details.</b>"), tqparent); note->setMaximumWidth(150); grid->addMultiCellWidget(note, 4, 4, 1, 1); @@ -127,39 +127,39 @@ IPTCKeywords::IPTCKeywords(QWidget* parent) // -------------------------------------------------------- - connect(d->keywordsBox, SIGNAL(selectionChanged()), - this, SLOT(slotKeywordSelectionChanged())); + connect(d->keywordsBox, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotKeywordSelectionChanged())); - connect(d->addKeywordButton, SIGNAL(clicked()), - this, SLOT(slotAddKeyword())); + connect(d->addKeywordButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddKeyword())); - connect(d->delKeywordButton, SIGNAL(clicked()), - this, SLOT(slotDelKeyword())); + connect(d->delKeywordButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDelKeyword())); // -------------------------------------------------------- - connect(d->keywordsCheck, SIGNAL(toggled(bool)), - d->keywordEdit, SLOT(setEnabled(bool))); + connect(d->keywordsCheck, TQT_SIGNAL(toggled(bool)), + d->keywordEdit, TQT_SLOT(setEnabled(bool))); - connect(d->keywordsCheck, SIGNAL(toggled(bool)), - d->keywordsBox, SLOT(setEnabled(bool))); + connect(d->keywordsCheck, TQT_SIGNAL(toggled(bool)), + d->keywordsBox, TQT_SLOT(setEnabled(bool))); - connect(d->keywordsCheck, SIGNAL(toggled(bool)), - d->addKeywordButton, SLOT(setEnabled(bool))); + connect(d->keywordsCheck, TQT_SIGNAL(toggled(bool)), + d->addKeywordButton, TQT_SLOT(setEnabled(bool))); - connect(d->keywordsCheck, SIGNAL(toggled(bool)), - d->delKeywordButton, SLOT(setEnabled(bool))); + connect(d->keywordsCheck, TQT_SIGNAL(toggled(bool)), + d->delKeywordButton, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->keywordsCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->keywordsCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->addKeywordButton, SIGNAL(clicked()), - this, SIGNAL(signalModified())); + connect(d->addKeywordButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalModified())); - connect(d->delKeywordButton, SIGNAL(clicked()), - this, SIGNAL(signalModified())); + connect(d->delKeywordButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalModified())); } IPTCKeywords::~IPTCKeywords() @@ -173,7 +173,7 @@ void IPTCKeywords::slotDelKeyword() if (index == -1) return; - QListBoxItem* item = d->keywordsBox->item(index); + TQListBoxItem* item = d->keywordsBox->item(index); if (!item) return; delete item; } @@ -188,11 +188,11 @@ void IPTCKeywords::slotKeywordSelectionChanged() void IPTCKeywords::slotAddKeyword() { - QString newKeyword = d->keywordEdit->text(); + TQString newKeyword = d->keywordEdit->text(); if (newKeyword.isEmpty()) return; bool found = false; - for (QListBoxItem *item = d->keywordsBox->firstItem(); + for (TQListBoxItem *item = d->keywordsBox->firstItem(); item; item = item->next()) { if (newKeyword == item->text()) @@ -206,7 +206,7 @@ void IPTCKeywords::slotAddKeyword() d->keywordsBox->insertItem(newKeyword); } -void IPTCKeywords::readMetadata(QByteArray& iptcData) +void IPTCKeywords::readMetadata(TQByteArray& iptcData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; @@ -228,20 +228,20 @@ void IPTCKeywords::readMetadata(QByteArray& iptcData) blockSignals(false); } -void IPTCKeywords::applyMetadata(QByteArray& iptcData) +void IPTCKeywords::applyMetadata(TQByteArray& iptcData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); - QStringList newKeywords; + TQStringList newKeywords; - for (QListBoxItem *item = d->keywordsBox->firstItem(); + for (TQListBoxItem *item = d->keywordsBox->firstItem(); item; item = item->next()) newKeywords.append(item->text()); if (d->keywordsCheck->isChecked()) exiv2Iface.setImageKeywords(d->oldKeywords, newKeywords); else - exiv2Iface.setImageKeywords(d->oldKeywords, QStringList()); + exiv2Iface.setImageKeywords(d->oldKeywords, TQStringList()); iptcData = exiv2Iface.getIptc(); } diff --git a/kipi-plugins/metadataedit/iptckeywords.h b/kipi-plugins/metadataedit/iptckeywords.h index 3518adb..7e9f638 100644 --- a/kipi-plugins/metadataedit/iptckeywords.h +++ b/kipi-plugins/metadataedit/iptckeywords.h @@ -23,27 +23,28 @@ #ifndef IPTC_KEYWORDS_H #define IPTC_KEYWORDS_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class IPTCKeywordsPriv; -class IPTCKeywords : public QWidget +class IPTCKeywords : public TQWidget { Q_OBJECT + TQ_OBJECT public: - IPTCKeywords(QWidget* parent); + IPTCKeywords(TQWidget* tqparent); ~IPTCKeywords(); - void applyMetadata(QByteArray& iptcData); - void readMetadata(QByteArray& iptcData); + void applyMetadata(TQByteArray& iptcData); + void readMetadata(TQByteArray& iptcData); signals: diff --git a/kipi-plugins/metadataedit/iptcorigin.cpp b/kipi-plugins/metadataedit/iptcorigin.cpp index df8d569..6e79338 100644 --- a/kipi-plugins/metadataedit/iptcorigin.cpp +++ b/kipi-plugins/metadataedit/iptcorigin.cpp @@ -22,13 +22,13 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qlistbox.h> -#include <qcombobox.h> -#include <qmap.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqlistbox.h> +#include <tqcombobox.h> +#include <tqmap.h> // KDE includes. @@ -248,7 +248,7 @@ public: countryCodeMap.insert( "POL", i18n("Poland") ); countryCodeMap.insert( "PRT", i18n("Portugal") ); countryCodeMap.insert( "PRI", i18n("Puerto Rico") ); - countryCodeMap.insert( "QAT", i18n("Qatar") ); + countryCodeMap.insert( "TQAT", i18n("Qatar") ); countryCodeMap.insert( "REU", i18n("Reunion") ); countryCodeMap.insert( "ROU", i18n("Romania") ); countryCodeMap.insert( "RUS", i18n("Russian Federation") ); @@ -330,18 +330,18 @@ public: countryCodeMap.insert( "JRO", i18n("Jericho") ); } - typedef QMap<QString, QString> CountryCodeMap; + typedef TQMap<TQString, TQString> CountryCodeMap; CountryCodeMap countryCodeMap; - QComboBox *countryCB; + TQComboBox *countryCB; - QCheckBox *objectNameCheck; - QCheckBox *cityCheck; - QCheckBox *sublocationCheck; - QCheckBox *provinceCheck; - QCheckBox *locationCheck; - QCheckBox *originalTransCheck; + TQCheckBox *objectNameCheck; + TQCheckBox *cityCheck; + TQCheckBox *sublocationCheck; + TQCheckBox *provinceCheck; + TQCheckBox *locationCheck; + TQCheckBox *originalTransCheck; KLineEdit *objectNameEdit; KLineEdit *cityEdit; @@ -353,83 +353,83 @@ public: MetadataCheckBox *countryCheck; }; -IPTCOrigin::IPTCOrigin(QWidget* parent) - : QWidget(parent) +IPTCOrigin::IPTCOrigin(TQWidget* tqparent) + : TQWidget(tqparent) { d = new IPTCOriginPriv; - QGridLayout* grid = new QGridLayout(parent, 12, 2, KDialog::spacingHint()); + TQGridLayout* grid = new TQGridLayout(tqparent, 12, 2, KDialog::spacingHint()); // IPTC only accept printable Ascii char. - QRegExp asciiRx("[\x20-\x7F]+$"); - QValidator *asciiValidator = new QRegExpValidator(asciiRx, this); + TQRegExp asciiRx("[\x20-\x7F]+$"); + TQValidator *asciiValidator = new TQRegExpValidator(asciiRx, TQT_TQOBJECT(this)); // -------------------------------------------------------- - d->objectNameCheck = new QCheckBox(i18n("Object name:"), parent); - d->objectNameEdit = new KLineEdit(parent); + d->objectNameCheck = new TQCheckBox(i18n("Object name:"), tqparent); + d->objectNameEdit = new KLineEdit(tqparent); d->objectNameEdit->setValidator(asciiValidator); d->objectNameEdit->setMaxLength(64); - QWhatsThis::add(d->objectNameEdit, i18n("<p>Set here the shorthand reference of content. " + TQWhatsThis::add(d->objectNameEdit, i18n("<p>Set here the shorthand reference of content. " "This field is limited to 64 ASCII characters.")); // -------------------------------------------------------- - d->locationCheck = new QCheckBox(i18n("Location:"), parent); - d->locationEdit = new KLineEdit(parent); + d->locationCheck = new TQCheckBox(i18n("Location:"), tqparent); + d->locationEdit = new KLineEdit(tqparent); d->locationEdit->setValidator(asciiValidator); d->locationEdit->setMaxLength(64); - QWhatsThis::add(d->locationEdit, i18n("<p>Set here the full country name referenced by the content. " + TQWhatsThis::add(d->locationEdit, i18n("<p>Set here the full country name referenced by the content. " "This field is limited to 64 ASCII characters.")); // -------------------------------------------------------- - d->cityCheck = new QCheckBox(i18n("City:"), parent); - d->cityEdit = new KLineEdit(parent); + d->cityCheck = new TQCheckBox(i18n("City:"), tqparent); + d->cityEdit = new KLineEdit(tqparent); d->cityEdit->setValidator(asciiValidator); d->cityEdit->setMaxLength(32); - QWhatsThis::add(d->cityEdit, i18n("<p>Set here the city of content origin. " + TQWhatsThis::add(d->cityEdit, i18n("<p>Set here the city of content origin. " "This field is limited to 32 ASCII characters.")); // -------------------------------------------------------- - d->sublocationCheck = new QCheckBox(i18n("Sublocation:"), parent); - d->sublocationEdit = new KLineEdit(parent); + d->sublocationCheck = new TQCheckBox(i18n("Sublocation:"), tqparent); + d->sublocationEdit = new KLineEdit(tqparent); d->sublocationEdit->setValidator(asciiValidator); d->sublocationEdit->setMaxLength(32); - QWhatsThis::add(d->sublocationEdit, i18n("<p>Set here the content location within city. " + TQWhatsThis::add(d->sublocationEdit, i18n("<p>Set here the content location within city. " "This field is limited to 32 ASCII characters.")); // -------------------------------------------------------- - d->provinceCheck = new QCheckBox(i18n("State/Province:"), parent); - d->provinceEdit = new KLineEdit(parent); + d->provinceCheck = new TQCheckBox(i18n("State/Province:"), tqparent); + d->provinceEdit = new KLineEdit(tqparent); d->provinceEdit->setValidator(asciiValidator); d->provinceEdit->setMaxLength(32); - QWhatsThis::add(d->provinceEdit, i18n("<p>Set here the Province or State of content origin. " + TQWhatsThis::add(d->provinceEdit, i18n("<p>Set here the Province or State of content origin. " "This field is limited to 32 ASCII characters.")); // -------------------------------------------------------- - d->countryCheck = new MetadataCheckBox(i18n("Country:"), parent); - d->countryCB = new QComboBox(false, parent); + d->countryCheck = new MetadataCheckBox(i18n("Country:"), tqparent); + d->countryCB = new TQComboBox(false, tqparent); for (IPTCOriginPriv::CountryCodeMap::Iterator it = d->countryCodeMap.begin(); it != d->countryCodeMap.end(); ++it ) - d->countryCB->insertItem(QString("%1 - %2").arg(it.key()).arg(it.data())); + d->countryCB->insertItem(TQString("%1 - %2").tqarg(it.key()).tqarg(it.data())); d->countryCB->listBox()->sort(); - QWhatsThis::add(d->countryCB, i18n("<p>Select here country name of content origin.")); + TQWhatsThis::add(d->countryCB, i18n("<p>Select here country name of content origin.")); // -------------------------------------------------------- - d->originalTransCheck = new QCheckBox(i18n("Original transmission reference:"), parent); - d->originalTransEdit = new KLineEdit(parent); + d->originalTransCheck = new TQCheckBox(i18n("Original transmission reference:"), tqparent); + d->originalTransEdit = new KLineEdit(tqparent); d->originalTransEdit->setValidator(asciiValidator); d->originalTransEdit->setMaxLength(32); - QWhatsThis::add(d->originalTransEdit, i18n("<p>Set here the location of original content transmission. " + TQWhatsThis::add(d->originalTransEdit, i18n("<p>Set here the location of original content transmission. " "This field is limited to 32 ASCII characters.")); // -------------------------------------------------------- @@ -439,7 +439,7 @@ IPTCOrigin::IPTCOrigin(QWidget* parent) "text tags only support the printable " "<b><a href='http://en.wikipedia.org/wiki/Ascii'>ASCII</a></b> " "characters set and limit strings size. " - "Use contextual help for details.</b>"), parent); + "Use contextual help for details.</b>"), tqparent); // -------------------------------------------------------- @@ -447,7 +447,7 @@ IPTCOrigin::IPTCOrigin(QWidget* parent) grid->addMultiCellWidget(d->objectNameEdit, 1, 1, 0, 2); grid->addMultiCellWidget(d->locationCheck, 2, 2, 0, 0); grid->addMultiCellWidget(d->locationEdit, 2, 2, 1, 2); - grid->addMultiCellWidget(new KSeparator(Qt::Horizontal, parent), 3, 3, 0, 2); + grid->addMultiCellWidget(new KSeparator(Qt::Horizontal, tqparent), 3, 3, 0, 2); grid->addMultiCellWidget(d->cityCheck, 4, 4, 0, 0); grid->addMultiCellWidget(d->cityEdit, 4, 4, 1, 2); grid->addMultiCellWidget(d->sublocationCheck, 5, 5, 0, 0); @@ -456,7 +456,7 @@ IPTCOrigin::IPTCOrigin(QWidget* parent) grid->addMultiCellWidget(d->provinceEdit, 6, 6, 1, 2); grid->addMultiCellWidget(d->countryCheck, 7, 7, 0, 0); grid->addMultiCellWidget(d->countryCB, 7, 7, 1, 2); - grid->addMultiCellWidget(new KSeparator(Qt::Horizontal, parent), 8, 8, 0, 2); + grid->addMultiCellWidget(new KSeparator(Qt::Horizontal, tqparent), 8, 8, 0, 2); grid->addMultiCellWidget(d->originalTransCheck, 9, 9, 0, 2); grid->addMultiCellWidget(d->originalTransEdit, 10, 10, 0, 2); grid->addMultiCellWidget(note, 11, 11, 0, 2); @@ -465,72 +465,72 @@ IPTCOrigin::IPTCOrigin(QWidget* parent) // -------------------------------------------------------- - connect(d->objectNameCheck, SIGNAL(toggled(bool)), - d->objectNameEdit, SLOT(setEnabled(bool))); + connect(d->objectNameCheck, TQT_SIGNAL(toggled(bool)), + d->objectNameEdit, TQT_SLOT(setEnabled(bool))); - connect(d->cityCheck, SIGNAL(toggled(bool)), - d->cityEdit, SLOT(setEnabled(bool))); + connect(d->cityCheck, TQT_SIGNAL(toggled(bool)), + d->cityEdit, TQT_SLOT(setEnabled(bool))); - connect(d->sublocationCheck, SIGNAL(toggled(bool)), - d->sublocationEdit, SLOT(setEnabled(bool))); + connect(d->sublocationCheck, TQT_SIGNAL(toggled(bool)), + d->sublocationEdit, TQT_SLOT(setEnabled(bool))); - connect(d->provinceCheck, SIGNAL(toggled(bool)), - d->provinceEdit, SLOT(setEnabled(bool))); + connect(d->provinceCheck, TQT_SIGNAL(toggled(bool)), + d->provinceEdit, TQT_SLOT(setEnabled(bool))); - connect(d->countryCheck, SIGNAL(toggled(bool)), - d->countryCB, SLOT(setEnabled(bool))); + connect(d->countryCheck, TQT_SIGNAL(toggled(bool)), + d->countryCB, TQT_SLOT(setEnabled(bool))); - connect(d->locationCheck, SIGNAL(toggled(bool)), - d->locationEdit, SLOT(setEnabled(bool))); + connect(d->locationCheck, TQT_SIGNAL(toggled(bool)), + d->locationEdit, TQT_SLOT(setEnabled(bool))); - connect(d->originalTransCheck, SIGNAL(toggled(bool)), - d->originalTransEdit, SLOT(setEnabled(bool))); + connect(d->originalTransCheck, TQT_SIGNAL(toggled(bool)), + d->originalTransEdit, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->objectNameCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->objectNameCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->cityCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->cityCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->sublocationCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->sublocationCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->provinceCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->provinceCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->countryCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->countryCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->locationCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->locationCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->originalTransCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->originalTransCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->countryCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->countryCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectNameEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->objectNameEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->cityEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->cityEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->sublocationEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->sublocationEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->provinceEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->provinceEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->locationEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->locationEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->originalTransEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->originalTransEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); } IPTCOrigin::~IPTCOrigin() @@ -538,12 +538,12 @@ IPTCOrigin::~IPTCOrigin() delete d; } -void IPTCOrigin::readMetadata(QByteArray& iptcData) +void IPTCOrigin::readMetadata(TQByteArray& iptcData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); - QString data; + TQString data; d->objectNameEdit->clear(); d->objectNameCheck->setChecked(false); @@ -628,7 +628,7 @@ void IPTCOrigin::readMetadata(QByteArray& iptcData) blockSignals(false); } -void IPTCOrigin::applyMetadata(QByteArray& iptcData) +void IPTCOrigin::applyMetadata(TQByteArray& iptcData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); @@ -660,8 +660,8 @@ void IPTCOrigin::applyMetadata(QByteArray& iptcData) if (d->countryCheck->isChecked()) { - QString countryName = d->countryCB->currentText().mid(6); - QString countryCode = d->countryCB->currentText().left(3); + TQString countryName = d->countryCB->currentText().mid(6); + TQString countryCode = d->countryCB->currentText().left(3); exiv2Iface.setIptcTagString("Iptc.Application2.CountryCode", countryCode); exiv2Iface.setIptcTagString("Iptc.Application2.CountryName", countryName); } diff --git a/kipi-plugins/metadataedit/iptcorigin.h b/kipi-plugins/metadataedit/iptcorigin.h index 77cc193..443e5b4 100644 --- a/kipi-plugins/metadataedit/iptcorigin.h +++ b/kipi-plugins/metadataedit/iptcorigin.h @@ -23,27 +23,28 @@ #ifndef IPTC_ORIGIN_H #define IPTC_ORIGIN_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class IPTCOriginPriv; -class IPTCOrigin : public QWidget +class IPTCOrigin : public TQWidget { Q_OBJECT + TQ_OBJECT public: - IPTCOrigin(QWidget* parent); + IPTCOrigin(TQWidget* tqparent); ~IPTCOrigin(); - void applyMetadata(QByteArray& iptcData); - void readMetadata(QByteArray& iptcData); + void applyMetadata(TQByteArray& iptcData); + void readMetadata(TQByteArray& iptcData); signals: diff --git a/kipi-plugins/metadataedit/iptcstatus.cpp b/kipi-plugins/metadataedit/iptcstatus.cpp index 4b86c83..d55c405 100644 --- a/kipi-plugins/metadataedit/iptcstatus.cpp +++ b/kipi-plugins/metadataedit/iptcstatus.cpp @@ -22,11 +22,11 @@ // QT includes. -#include <qlayout.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qvalidator.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> // KDE includes. @@ -69,13 +69,13 @@ public: JobIDCheck = 0; } - QCheckBox *statusCheck; - QCheckBox *JobIDCheck; + TQCheckBox *statusCheck; + TQCheckBox *JobIDCheck; - QComboBox *priorityCB; - QComboBox *objectCycleCB; - QComboBox *objectTypeCB; - QComboBox *objectAttributeCB; + TQComboBox *priorityCB; + TQComboBox *objectCycleCB; + TQComboBox *objectTypeCB; + TQComboBox *objectAttributeCB; KLineEdit *statusEdit; KLineEdit *objectTypeDescEdit; @@ -88,32 +88,32 @@ public: MetadataCheckBox *objectAttributeCheck; }; -IPTCStatus::IPTCStatus(QWidget* parent) - : QWidget(parent) +IPTCtqStatus::IPTCtqStatus(TQWidget* tqparent) + : TQWidget(tqparent) { d = new IPTCStatusPriv; - QGridLayout* grid = new QGridLayout(parent, 11, 2, KDialog::spacingHint()); + TQGridLayout* grid = new TQGridLayout(tqparent, 11, 2, KDialog::spacingHint()); // IPTC only accept printable Ascii char. - QRegExp asciiRx("[\x20-\x7F]+$"); - QValidator *asciiValidator = new QRegExpValidator(asciiRx, this); + TQRegExp asciiRx("[\x20-\x7F]+$"); + TQValidator *asciiValidator = new TQRegExpValidator(asciiRx, TQT_TQOBJECT(this)); // -------------------------------------------------------- - d->statusCheck = new QCheckBox(i18n("Edit Status:"), parent); - d->statusEdit = new KLineEdit(parent); + d->statusCheck = new TQCheckBox(i18n("Edit tqStatus:"), tqparent); + d->statusEdit = new KLineEdit(tqparent); d->statusEdit->setValidator(asciiValidator); d->statusEdit->setMaxLength(64); grid->addMultiCellWidget(d->statusCheck, 0, 0, 0, 2); grid->addMultiCellWidget(d->statusEdit, 1, 1, 0, 2); - QWhatsThis::add(d->statusEdit, i18n("<p>Set here the content status. This field is limited " + TQWhatsThis::add(d->statusEdit, i18n("<p>Set here the content status. This field is limited " "to 64 ASCII characters.")); // -------------------------------------------------------- - d->priorityCheck = new MetadataCheckBox(i18n("Priority:"), parent); - d->priorityCB = new QComboBox(false, parent); + d->priorityCheck = new MetadataCheckBox(i18n("Priority:"), tqparent); + d->priorityCB = new TQComboBox(false, tqparent); d->priorityCB->insertItem(i18n("0: None"), 0); d->priorityCB->insertItem(i18n("1: High"), 1); d->priorityCB->insertItem("2", 2); @@ -125,24 +125,24 @@ IPTCStatus::IPTCStatus(QWidget* parent) d->priorityCB->insertItem(i18n("8: Low"), 8); grid->addMultiCellWidget(d->priorityCheck, 2, 2, 0, 0); grid->addMultiCellWidget(d->priorityCB, 2, 2, 1, 1); - QWhatsThis::add(d->priorityCB, i18n("<p>Select here the editorial urgency of content.")); + TQWhatsThis::add(d->priorityCB, i18n("<p>Select here the editorial urgency of content.")); // -------------------------------------------------------- - d->objectCycleCheck = new MetadataCheckBox(i18n("Object Cycle:"), parent); - d->objectCycleCB = new QComboBox(false, parent); + d->objectCycleCheck = new MetadataCheckBox(i18n("Object Cycle:"), tqparent); + d->objectCycleCB = new TQComboBox(false, tqparent); d->objectCycleCB->insertItem(i18n("Morning"), 0); d->objectCycleCB->insertItem(i18n("Afternoon"), 1); d->objectCycleCB->insertItem(i18n("Evening"), 2); grid->addMultiCellWidget(d->objectCycleCheck, 3, 3, 0, 0); grid->addMultiCellWidget(d->objectCycleCB, 3, 3, 1, 1); - QWhatsThis::add(d->objectCycleCB, i18n("<p>Select here the editorial cycle of content.")); + TQWhatsThis::add(d->objectCycleCB, i18n("<p>Select here the editorial cycle of content.")); // -------------------------------------------------------- - d->objectTypeCheck = new MetadataCheckBox(i18n("Object Type:"), parent); - d->objectTypeCB = new QComboBox(false, parent); - d->objectTypeDescEdit = new KLineEdit(parent); + d->objectTypeCheck = new MetadataCheckBox(i18n("Object Type:"), tqparent); + d->objectTypeCB = new TQComboBox(false, tqparent); + d->objectTypeDescEdit = new KLineEdit(tqparent); d->objectTypeDescEdit->setValidator(asciiValidator); d->objectTypeDescEdit->setMaxLength(64); d->objectTypeCB->insertItem(i18n("News"), 0); @@ -151,15 +151,15 @@ IPTCStatus::IPTCStatus(QWidget* parent) grid->addMultiCellWidget(d->objectTypeCheck, 4, 4, 0, 0); grid->addMultiCellWidget(d->objectTypeCB, 4, 4, 1, 1); grid->addMultiCellWidget(d->objectTypeDescEdit, 5, 5, 0, 2); - QWhatsThis::add(d->objectTypeCB, i18n("<p>Select here the editorial type of content.")); - QWhatsThis::add(d->objectTypeDescEdit, i18n("<p>Set here the editorial type description of content. " + TQWhatsThis::add(d->objectTypeCB, i18n("<p>Select here the editorial type of content.")); + TQWhatsThis::add(d->objectTypeDescEdit, i18n("<p>Set here the editorial type description of content. " "This field is limited to 64 ASCII characters.")); // -------------------------------------------------------- - d->objectAttributeCheck = new MetadataCheckBox(i18n("Object Attribute:"), parent); - d->objectAttributeCB = new QComboBox(false, parent); - d->objectAttributeDescEdit = new KLineEdit(parent); + d->objectAttributeCheck = new MetadataCheckBox(i18n("Object Attribute:"), tqparent); + d->objectAttributeCB = new TQComboBox(false, tqparent); + d->objectAttributeDescEdit = new KLineEdit(tqparent); d->objectAttributeDescEdit->setValidator(asciiValidator); d->objectAttributeDescEdit->setMaxLength(64); d->objectAttributeCB->insertItem(i18n("Current"), 0); @@ -187,19 +187,19 @@ IPTCStatus::IPTCStatus(QWidget* parent) grid->addMultiCellWidget(d->objectAttributeCheck, 6, 6, 0, 0); grid->addMultiCellWidget(d->objectAttributeCB, 6, 6, 1, 2); grid->addMultiCellWidget(d->objectAttributeDescEdit, 7, 7, 0, 2); - QWhatsThis::add(d->objectAttributeCB, i18n("<p>Select here the editorial attribute of content.")); - QWhatsThis::add(d->objectAttributeDescEdit, i18n("<p>Set here the editorial attribute description of " + TQWhatsThis::add(d->objectAttributeCB, i18n("<p>Select here the editorial attribute of content.")); + TQWhatsThis::add(d->objectAttributeDescEdit, i18n("<p>Set here the editorial attribute description of " "content. This field is limited to 64 ASCII characters.")); // -------------------------------------------------------- - d->JobIDCheck = new QCheckBox(i18n("Job Identification:"), parent); - d->JobIDEdit = new KLineEdit(parent); + d->JobIDCheck = new TQCheckBox(i18n("Job Identification:"), tqparent); + d->JobIDEdit = new KLineEdit(tqparent); d->JobIDEdit->setValidator(asciiValidator); d->JobIDEdit->setMaxLength(32); grid->addMultiCellWidget(d->JobIDCheck, 8, 8, 0, 2); grid->addMultiCellWidget(d->JobIDEdit, 9, 9, 0, 2); - QWhatsThis::add(d->JobIDEdit, i18n("<p>Set here the string that identifies content that recurs. " + TQWhatsThis::add(d->JobIDEdit, i18n("<p>Set here the string that identifies content that recurs. " "This field is limited to 32 ASCII characters.")); // -------------------------------------------------------- @@ -209,7 +209,7 @@ IPTCStatus::IPTCStatus(QWidget* parent) "text tags only support the printable " "<b><a href='http://en.wikipedia.org/wiki/Ascii'>ASCII</a></b> " "characters set and limit strings size. " - "Use contextual help for details.</b>"), parent); + "Use contextual help for details.</b>"), tqparent); grid->addMultiCellWidget(note, 10, 10, 0, 2); grid->setColStretch(2, 10); @@ -217,99 +217,99 @@ IPTCStatus::IPTCStatus(QWidget* parent) // -------------------------------------------------------- - connect(d->priorityCheck, SIGNAL(toggled(bool)), - d->priorityCB, SLOT(setEnabled(bool))); + connect(d->priorityCheck, TQT_SIGNAL(toggled(bool)), + d->priorityCB, TQT_SLOT(setEnabled(bool))); - connect(d->objectCycleCheck, SIGNAL(toggled(bool)), - d->objectCycleCB, SLOT(setEnabled(bool))); + connect(d->objectCycleCheck, TQT_SIGNAL(toggled(bool)), + d->objectCycleCB, TQT_SLOT(setEnabled(bool))); - connect(d->objectTypeCheck, SIGNAL(toggled(bool)), - d->objectTypeCB, SLOT(setEnabled(bool))); + connect(d->objectTypeCheck, TQT_SIGNAL(toggled(bool)), + d->objectTypeCB, TQT_SLOT(setEnabled(bool))); - connect(d->objectTypeCheck, SIGNAL(toggled(bool)), - d->objectTypeDescEdit, SLOT(setEnabled(bool))); + connect(d->objectTypeCheck, TQT_SIGNAL(toggled(bool)), + d->objectTypeDescEdit, TQT_SLOT(setEnabled(bool))); - connect(d->objectAttributeCheck, SIGNAL(toggled(bool)), - d->objectAttributeCB, SLOT(setEnabled(bool))); + connect(d->objectAttributeCheck, TQT_SIGNAL(toggled(bool)), + d->objectAttributeCB, TQT_SLOT(setEnabled(bool))); - connect(d->objectAttributeCheck, SIGNAL(toggled(bool)), - d->objectAttributeDescEdit, SLOT(setEnabled(bool))); + connect(d->objectAttributeCheck, TQT_SIGNAL(toggled(bool)), + d->objectAttributeDescEdit, TQT_SLOT(setEnabled(bool))); - connect(d->statusCheck, SIGNAL(toggled(bool)), - d->statusEdit, SLOT(setEnabled(bool))); + connect(d->statusCheck, TQT_SIGNAL(toggled(bool)), + d->statusEdit, TQT_SLOT(setEnabled(bool))); - connect(d->JobIDCheck, SIGNAL(toggled(bool)), - d->JobIDEdit, SLOT(setEnabled(bool))); + connect(d->JobIDCheck, TQT_SIGNAL(toggled(bool)), + d->JobIDEdit, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->priorityCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->priorityCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectCycleCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->objectCycleCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectTypeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->objectTypeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectTypeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->objectTypeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectAttributeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->objectAttributeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectAttributeCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->objectAttributeCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->statusCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->statusCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->JobIDCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->JobIDCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); // -------------------------------------------------------- - connect(d->priorityCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->priorityCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectCycleCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->objectCycleCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectTypeCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->objectTypeCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectAttributeCB, SIGNAL(activated(int)), - this, SIGNAL(signalModified())); + connect(d->objectAttributeCB, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalModified())); - connect(d->statusEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->statusEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectTypeDescEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->objectTypeDescEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->objectAttributeDescEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->objectAttributeDescEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); - connect(d->JobIDEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->JobIDEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); } -IPTCStatus::~IPTCStatus() +IPTCtqStatus::~IPTCtqStatus() { delete d; } -void IPTCStatus::readMetadata(QByteArray& iptcData) +void IPTCtqStatus::readMetadata(TQByteArray& iptcData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); - QString data; + TQString data; int val; d->statusEdit->clear(); d->statusCheck->setChecked(false); - data = exiv2Iface.getIptcTagString("Iptc.Application2.EditStatus", false); + data = exiv2Iface.getIptcTagString("Iptc.Application2.EdittqStatus", false); if (!data.isNull()) { d->statusEdit->setText(data); @@ -338,17 +338,17 @@ void IPTCStatus::readMetadata(QByteArray& iptcData) data = exiv2Iface.getIptcTagString("Iptc.Application2.ObjectCycle", false); if (!data.isNull()) { - if (data == QString("a")) + if (data == TQString("a")) { d->objectCycleCB->setCurrentItem(0); d->objectCycleCheck->setChecked(true); } - else if (data == QString("b")) + else if (data == TQString("b")) { d->objectCycleCB->setCurrentItem(1); d->objectCycleCheck->setChecked(true); } - else if (data == QString("c")) + else if (data == TQString("c")) { d->objectCycleCB->setCurrentItem(2); d->objectCycleCheck->setChecked(true); @@ -364,7 +364,7 @@ void IPTCStatus::readMetadata(QByteArray& iptcData) data = exiv2Iface.getIptcTagString("Iptc.Application2.ObjectType", false); if (!data.isNull()) { - QString typeSec = data.section(":", 0, 0); + TQString typeSec = data.section(":", 0, 0); if (!typeSec.isEmpty()) { int type = typeSec.toInt()-1; @@ -387,7 +387,7 @@ void IPTCStatus::readMetadata(QByteArray& iptcData) data = exiv2Iface.getIptcTagString("Iptc.Application2.ObjectAttribute", false); if (!data.isNull()) { - QString attSec = data.section(":", 0, 0); + TQString attSec = data.section(":", 0, 0); if (!attSec.isEmpty()) { int att = attSec.toInt()-1; @@ -417,18 +417,18 @@ void IPTCStatus::readMetadata(QByteArray& iptcData) blockSignals(false); } -void IPTCStatus::applyMetadata(QByteArray& iptcData) +void IPTCtqStatus::applyMetadata(TQByteArray& iptcData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); if (d->statusCheck->isChecked()) - exiv2Iface.setIptcTagString("Iptc.Application2.EditStatus", d->statusEdit->text()); + exiv2Iface.setIptcTagString("Iptc.Application2.EdittqStatus", d->statusEdit->text()); else - exiv2Iface.removeIptcTag("Iptc.Application2.EditStatus"); + exiv2Iface.removeIptcTag("Iptc.Application2.EdittqStatus"); if (d->priorityCheck->isChecked()) - exiv2Iface.setIptcTagString("Iptc.Application2.Urgency", QString::number(d->priorityCB->currentItem())); + exiv2Iface.setIptcTagString("Iptc.Application2.Urgency", TQString::number(d->priorityCB->currentItem())); else if (d->priorityCheck->isValid()) exiv2Iface.removeIptcTag("Iptc.Application2.Urgency"); @@ -437,15 +437,15 @@ void IPTCStatus::applyMetadata(QByteArray& iptcData) switch (d->objectCycleCB->currentItem()) { case(0): - exiv2Iface.setIptcTagString("Iptc.Application2.ObjectCycle", QString("a")); + exiv2Iface.setIptcTagString("Iptc.Application2.ObjectCycle", TQString("a")); break; case(1): - exiv2Iface.setIptcTagString("Iptc.Application2.ObjectCycle", QString("b")); + exiv2Iface.setIptcTagString("Iptc.Application2.ObjectCycle", TQString("b")); break; case(2): - exiv2Iface.setIptcTagString("Iptc.Application2.ObjectCycle", QString("c")); + exiv2Iface.setIptcTagString("Iptc.Application2.ObjectCycle", TQString("c")); break; } } @@ -454,9 +454,9 @@ void IPTCStatus::applyMetadata(QByteArray& iptcData) if (d->objectTypeCheck->isChecked()) { - QString objectType; + TQString objectType; objectType.sprintf("%2d", d->objectTypeCB->currentItem()+1); - objectType.append(QString(":%1").arg(d->objectTypeDescEdit->text())); + objectType.append(TQString(":%1").tqarg(d->objectTypeDescEdit->text())); exiv2Iface.setIptcTagString("Iptc.Application2.ObjectType", objectType); } else if (d->objectTypeCheck->isValid()) @@ -464,9 +464,9 @@ void IPTCStatus::applyMetadata(QByteArray& iptcData) if (d->objectAttributeCheck->isChecked()) { - QString objectAttribute; + TQString objectAttribute; objectAttribute.sprintf("%3d", d->objectAttributeCB->currentItem()+1); - objectAttribute.append(QString(":%1").arg(d->objectAttributeDescEdit->text())); + objectAttribute.append(TQString(":%1").tqarg(d->objectAttributeDescEdit->text())); exiv2Iface.setIptcTagString("Iptc.Application2.ObjectAttribute", objectAttribute); } else if (d->objectAttributeCheck->isValid()) @@ -477,7 +477,7 @@ void IPTCStatus::applyMetadata(QByteArray& iptcData) else exiv2Iface.removeIptcTag("Iptc.Application2.FixtureId"); - exiv2Iface.setImageProgramId(QString("Kipi-plugins"), QString(kipiplugins_version)); + exiv2Iface.setImageProgramId(TQString("Kipi-plugins"), TQString(kipiplugins_version)); iptcData = exiv2Iface.getIptc(); } diff --git a/kipi-plugins/metadataedit/iptcstatus.h b/kipi-plugins/metadataedit/iptcstatus.h index ea0f537..3108a49 100644 --- a/kipi-plugins/metadataedit/iptcstatus.h +++ b/kipi-plugins/metadataedit/iptcstatus.h @@ -23,27 +23,28 @@ #ifndef IPTC_STATUS_H #define IPTC_STATUS_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class IPTCStatusPriv; -class IPTCStatus : public QWidget +class IPTCtqStatus : public TQWidget { Q_OBJECT + TQ_OBJECT public: - IPTCStatus(QWidget* parent); - ~IPTCStatus(); + IPTCtqStatus(TQWidget* tqparent); + ~IPTCtqStatus(); - void applyMetadata(QByteArray& iptcData); - void readMetadata(QByteArray& iptcData); + void applyMetadata(TQByteArray& iptcData); + void readMetadata(TQByteArray& iptcData); signals: diff --git a/kipi-plugins/metadataedit/iptcsubjects.cpp b/kipi-plugins/metadataedit/iptcsubjects.cpp index f1bb14c..11ad303 100644 --- a/kipi-plugins/metadataedit/iptcsubjects.cpp +++ b/kipi-plugins/metadataedit/iptcsubjects.cpp @@ -22,12 +22,12 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> // KDE includes. @@ -63,44 +63,44 @@ public: subjectEdit = 0; } - QStringList oldSubjects; + TQStringList oldSubjects; - QPushButton *addSubjectButton; - QPushButton *delSubjectButton; + TQPushButton *addSubjectButton; + TQPushButton *delSubjectButton; - QCheckBox *subjectsCheck; + TQCheckBox *subjectsCheck; KLineEdit *subjectEdit; KListBox *subjectsBox; }; -IPTCSubjects::IPTCSubjects(QWidget* parent) - : QWidget(parent) +IPTCSubjects::IPTCSubjects(TQWidget* tqparent) + : TQWidget(tqparent) { d = new IPTCSubjectsPriv; - QGridLayout *grid = new QGridLayout(parent, 5, 2, 0, KDialog::spacingHint()); - grid->setAlignment( Qt::AlignTop ); + TQGridLayout *grid = new TQGridLayout(tqparent, 5, 2, 0, KDialog::spacingHint()); + grid->tqsetAlignment( TQt::AlignTop ); // IPTC only accept printable Ascii char. - QRegExp asciiRx("[\x20-\x7F]+$"); - QValidator *asciiValidator = new QRegExpValidator(asciiRx, this); + TQRegExp asciiRx("[\x20-\x7F]+$"); + TQValidator *asciiValidator = new TQRegExpValidator(asciiRx, TQT_TQOBJECT(this)); // -------------------------------------------------------- - d->subjectsCheck = new QCheckBox(i18n("Use structured definition of the subject matter:"), parent); + d->subjectsCheck = new TQCheckBox(i18n("Use structured definition of the subject matter:"), tqparent); - d->subjectEdit = new KLineEdit(parent); + d->subjectEdit = new KLineEdit(tqparent); d->subjectEdit->setValidator(asciiValidator); d->subjectEdit->setMaxLength(236); - QWhatsThis::add(d->subjectEdit, i18n("<p>Enter here a new subject. " + TQWhatsThis::add(d->subjectEdit, i18n("<p>Enter here a new subject. " "This field is limited to 236 ASCII characters.")); - d->subjectsBox = new KListBox(parent); - d->subjectsBox->setVScrollBarMode(QScrollView::AlwaysOn); + d->subjectsBox = new KListBox(tqparent); + d->subjectsBox->setVScrollBarMode(TQScrollView::AlwaysOn); - d->addSubjectButton = new QPushButton( i18n("&Add"), parent); - d->delSubjectButton = new QPushButton( i18n("&Delete"), parent); + d->addSubjectButton = new TQPushButton( i18n("&Add"), tqparent); + d->delSubjectButton = new TQPushButton( i18n("&Delete"), tqparent); d->addSubjectButton->setIconSet(SmallIcon("add")); d->delSubjectButton->setIconSet(SmallIcon("remove")); d->delSubjectButton->setEnabled(false); @@ -118,7 +118,7 @@ IPTCSubjects::IPTCSubjects(QWidget* parent) "text tags only support the printable " "<b><a href='http://en.wikipedia.org/wiki/Ascii'>ASCII</a></b> " "characters set and limit strings size. " - "Use contextual help for details.</b>"), parent); + "Use contextual help for details.</b>"), tqparent); note->setMaximumWidth(150); grid->addMultiCellWidget(note, 4, 4, 1, 1); @@ -127,39 +127,39 @@ IPTCSubjects::IPTCSubjects(QWidget* parent) // -------------------------------------------------------- - connect(d->subjectsBox, SIGNAL(selectionChanged()), - this, SLOT(slotSubjectSelectionChanged())); + connect(d->subjectsBox, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotSubjectSelectionChanged())); - connect(d->addSubjectButton, SIGNAL(clicked()), - this, SLOT(slotAddSubject())); + connect(d->addSubjectButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddSubject())); - connect(d->delSubjectButton, SIGNAL(clicked()), - this, SLOT(slotDelSubject())); + connect(d->delSubjectButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDelSubject())); // -------------------------------------------------------- - connect(d->subjectsCheck, SIGNAL(toggled(bool)), - d->subjectEdit, SLOT(setEnabled(bool))); + connect(d->subjectsCheck, TQT_SIGNAL(toggled(bool)), + d->subjectEdit, TQT_SLOT(setEnabled(bool))); - connect(d->subjectsCheck, SIGNAL(toggled(bool)), - d->subjectsBox, SLOT(setEnabled(bool))); + connect(d->subjectsCheck, TQT_SIGNAL(toggled(bool)), + d->subjectsBox, TQT_SLOT(setEnabled(bool))); - connect(d->subjectsCheck, SIGNAL(toggled(bool)), - d->addSubjectButton, SLOT(setEnabled(bool))); + connect(d->subjectsCheck, TQT_SIGNAL(toggled(bool)), + d->addSubjectButton, TQT_SLOT(setEnabled(bool))); - connect(d->subjectsCheck, SIGNAL(toggled(bool)), - d->delSubjectButton, SLOT(setEnabled(bool))); + connect(d->subjectsCheck, TQT_SIGNAL(toggled(bool)), + d->delSubjectButton, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->subjectsCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->subjectsCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->addSubjectButton, SIGNAL(clicked()), - this, SIGNAL(signalModified())); + connect(d->addSubjectButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalModified())); - connect(d->delSubjectButton, SIGNAL(clicked()), - this, SIGNAL(signalModified())); + connect(d->delSubjectButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalModified())); } IPTCSubjects::~IPTCSubjects() @@ -173,7 +173,7 @@ void IPTCSubjects::slotDelSubject() if (index == -1) return; - QListBoxItem* item = d->subjectsBox->item(index); + TQListBoxItem* item = d->subjectsBox->item(index); if (!item) return; delete item; } @@ -188,11 +188,11 @@ void IPTCSubjects::slotSubjectSelectionChanged() void IPTCSubjects::slotAddSubject() { - QString newSubject = d->subjectEdit->text(); + TQString newSubject = d->subjectEdit->text(); if (newSubject.isEmpty()) return; bool found = false; - for (QListBoxItem *item = d->subjectsBox->firstItem(); + for (TQListBoxItem *item = d->subjectsBox->firstItem(); item; item = item->next()) { if (newSubject == item->text()) @@ -206,7 +206,7 @@ void IPTCSubjects::slotAddSubject() d->subjectsBox->insertItem(newSubject); } -void IPTCSubjects::readMetadata(QByteArray& iptcData) +void IPTCSubjects::readMetadata(TQByteArray& iptcData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; @@ -228,20 +228,20 @@ void IPTCSubjects::readMetadata(QByteArray& iptcData) blockSignals(false); } -void IPTCSubjects::applyMetadata(QByteArray& iptcData) +void IPTCSubjects::applyMetadata(TQByteArray& iptcData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); - QStringList newSubjects; + TQStringList newSubjects; - for (QListBoxItem *item = d->subjectsBox->firstItem(); + for (TQListBoxItem *item = d->subjectsBox->firstItem(); item; item = item->next()) newSubjects.append(item->text()); if (d->subjectsCheck->isChecked()) exiv2Iface.setImageSubjects(d->oldSubjects, newSubjects); else - exiv2Iface.setImageSubjects(d->oldSubjects, QStringList()); + exiv2Iface.setImageSubjects(d->oldSubjects, TQStringList()); iptcData = exiv2Iface.getIptc(); } diff --git a/kipi-plugins/metadataedit/iptcsubjects.h b/kipi-plugins/metadataedit/iptcsubjects.h index 2c0d566..46e03f3 100644 --- a/kipi-plugins/metadataedit/iptcsubjects.h +++ b/kipi-plugins/metadataedit/iptcsubjects.h @@ -23,27 +23,28 @@ #ifndef IPTC_SUBJECTS_H #define IPTC_SUBJECTS_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcstring.h> +#include <tqwidget.h> +#include <tqcstring.h> namespace KIPIMetadataEditPlugin { class IPTCSubjectsPriv; -class IPTCSubjects : public QWidget +class IPTCSubjects : public TQWidget { Q_OBJECT + TQ_OBJECT public: - IPTCSubjects(QWidget* parent); + IPTCSubjects(TQWidget* tqparent); ~IPTCSubjects(); - void applyMetadata(QByteArray& iptcData); - void readMetadata(QByteArray& iptcData); + void applyMetadata(TQByteArray& iptcData); + void readMetadata(TQByteArray& iptcData); signals: diff --git a/kipi-plugins/metadataedit/metadatacheckbox.cpp b/kipi-plugins/metadataedit/metadatacheckbox.cpp index 5dd33c9..01a8f5d 100644 --- a/kipi-plugins/metadataedit/metadatacheckbox.cpp +++ b/kipi-plugins/metadataedit/metadatacheckbox.cpp @@ -31,13 +31,13 @@ namespace KIPIMetadataEditPlugin { -MetadataCheckBox::MetadataCheckBox(const QString& text, QWidget* parent) - : QCheckBox(text, parent) +MetadataCheckBox::MetadataCheckBox(const TQString& text, TQWidget* tqparent) + : TQCheckBox(text, tqparent) { m_valid = true; - connect(this, SIGNAL(toggled(bool)), - this, SLOT(slotValid())); + connect(this, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotValid())); } MetadataCheckBox::~MetadataCheckBox() diff --git a/kipi-plugins/metadataedit/metadatacheckbox.h b/kipi-plugins/metadataedit/metadatacheckbox.h index 82a5dc6..a349b58 100644 --- a/kipi-plugins/metadataedit/metadatacheckbox.h +++ b/kipi-plugins/metadataedit/metadatacheckbox.h @@ -28,18 +28,19 @@ // QT includes. -#include <qcheckbox.h> +#include <tqcheckbox.h> namespace KIPIMetadataEditPlugin { -class MetadataCheckBox : public QCheckBox +class MetadataCheckBox : public TQCheckBox { Q_OBJECT + TQ_OBJECT public: - MetadataCheckBox(const QString& text, QWidget* parent); + MetadataCheckBox(const TQString& text, TQWidget* tqparent); ~MetadataCheckBox(); void setValid(bool v); diff --git a/kipi-plugins/metadataedit/plugin_metadataedit.cpp b/kipi-plugins/metadataedit/plugin_metadataedit.cpp index 64f8a39..20fed59 100644 --- a/kipi-plugins/metadataedit/plugin_metadataedit.cpp +++ b/kipi-plugins/metadataedit/plugin_metadataedit.cpp @@ -55,13 +55,13 @@ typedef KGenericFactory<Plugin_MetadataEdit> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_metadataedit, Factory("kipiplugin_metadataedit")) -Plugin_MetadataEdit::Plugin_MetadataEdit(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "MetadataEdit") +Plugin_MetadataEdit::Plugin_MetadataEdit(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "MetadataEdit") { kdDebug( 51001 ) << "Plugin_MetadataEdit plugin loaded" << endl; } -void Plugin_MetadataEdit::setup( QWidget* widget ) +void Plugin_MetadataEdit::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -74,7 +74,7 @@ void Plugin_MetadataEdit::setup( QWidget* widget ) 0, 0, this, - SLOT(slotEditExif()), + TQT_SLOT(slotEditExif()), actionCollection(), "editexif")); @@ -82,7 +82,7 @@ void Plugin_MetadataEdit::setup( QWidget* widget ) 0, 0, this, - SLOT(slotRemoveExif()), + TQT_SLOT(slotRemoveExif()), actionCollection(), "removeexif")); @@ -90,7 +90,7 @@ void Plugin_MetadataEdit::setup( QWidget* widget ) 0, 0, this, - SLOT(slotImportExif()), + TQT_SLOT(slotImportExif()), actionCollection(), "importexif")); @@ -100,7 +100,7 @@ void Plugin_MetadataEdit::setup( QWidget* widget ) 0, 0, this, - SLOT(slotEditIptc()), + TQT_SLOT(slotEditIptc()), actionCollection(), "editiptc")); @@ -108,7 +108,7 @@ void Plugin_MetadataEdit::setup( QWidget* widget ) 0, 0, this, - SLOT(slotRemoveIptc()), + TQT_SLOT(slotRemoveIptc()), actionCollection(), "removeiptc")); @@ -116,7 +116,7 @@ void Plugin_MetadataEdit::setup( QWidget* widget ) 0, 0, this, - SLOT(slotImportIptc()), + TQT_SLOT(slotImportIptc()), actionCollection(), "importiptc")); @@ -126,7 +126,7 @@ void Plugin_MetadataEdit::setup( QWidget* widget ) 0, 0, this, - SLOT(slotEditComments()), + TQT_SLOT(slotEditComments()), actionCollection(), "editcomments")); @@ -134,13 +134,13 @@ void Plugin_MetadataEdit::setup( QWidget* widget ) 0, 0, this, - SLOT(slotRemoveComments()), + TQT_SLOT(slotRemoveComments()), actionCollection(), "removecomments")); addAction( m_actionMetadataEdit ); - m_interface = dynamic_cast< KIPI::Interface* >( parent() ); + m_interface = dynamic_cast< KIPI::Interface* >( tqparent() ); if ( !m_interface ) { @@ -151,8 +151,8 @@ void Plugin_MetadataEdit::setup( QWidget* widget ) KIPI::ImageCollection selection = m_interface->currentSelection(); m_actionMetadataEdit->setEnabled( selection.isValid() && !selection.images().isEmpty() ); - connect( m_interface, SIGNAL(selectionChanged(bool)), - m_actionMetadataEdit, SLOT(setEnabled(bool))); + connect( m_interface, TQT_SIGNAL(selectionChanged(bool)), + m_actionMetadataEdit, TQT_SLOT(setEnabled(bool))); } void Plugin_MetadataEdit::slotEditExif() @@ -162,7 +162,7 @@ void Plugin_MetadataEdit::slotEditExif() if ( !images.isValid() || images.images().isEmpty() ) return; - KIPIMetadataEditPlugin::EXIFEditDialog dialog(kapp->activeWindow(), images.images(), m_interface); + KIPIMetadataEditPlugin::EXIFEditDialog dialog(TQT_TQWIDGET(kapp->activeWindow()), images.images(), m_interface); dialog.exec(); m_interface->refreshImages(images.images()); } @@ -175,7 +175,7 @@ void Plugin_MetadataEdit::slotRemoveExif() return; if (KMessageBox::warningYesNo( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("EXIF metadata will be permanently removed from all current selected pictures.\n" "Do you want to continue ?"), i18n("Remove EXIF Metadata")) != KMessageBox::Yes) @@ -183,7 +183,7 @@ void Plugin_MetadataEdit::slotRemoveExif() KURL::List imageURLs = images.images(); KURL::List updatedURLs; - QStringList errorFiles; + TQStringList errorFiles; for( KURL::List::iterator it = imageURLs.begin() ; it != imageURLs.end(); ++it) @@ -214,7 +214,7 @@ void Plugin_MetadataEdit::slotRemoveExif() if (!errorFiles.isEmpty()) { KMessageBox::errorList( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Unable to remove EXIF metadata from:"), errorFiles, i18n("Remove EXIF Metadata")); @@ -229,7 +229,7 @@ void Plugin_MetadataEdit::slotImportExif() return; KURL importEXIFFile = KFileDialog::getOpenURL(KGlobalSettings::documentPath(), - QString::null, kapp->activeWindow(), + TQString(), TQT_TQWIDGET(kapp->activeWindow()), i18n("Select File to Import EXIF metadata") ); if( importEXIFFile.isEmpty() ) return; @@ -237,33 +237,33 @@ void Plugin_MetadataEdit::slotImportExif() KExiv2Iface::KExiv2 exiv2Iface; if (!exiv2Iface.load(importEXIFFile.path())) { - KMessageBox::error(kapp->activeWindow(), - i18n("Cannot load metadata from \"%1\"").arg(importEXIFFile.fileName()), + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), + i18n("Cannot load metadata from \"%1\"").tqarg(importEXIFFile.fileName()), i18n("Import EXIF Metadata")); return; } - QByteArray exifData = exiv2Iface.getExif(); + TQByteArray exifData = exiv2Iface.getExif(); if (exifData.isEmpty()) { - KMessageBox::error(kapp->activeWindow(), - i18n("\"%1\" do not have EXIF metadata").arg(importEXIFFile.fileName()), + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), + i18n("\"%1\" do not have EXIF metadata").tqarg(importEXIFFile.fileName()), i18n("Import EXIF Metadata")); return; } if (KMessageBox::warningYesNo( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("EXIF metadata from current selected pictures will be permanently " "replaced by the EXIF content of \"%1\".\n" - "Do you want to continue ?").arg(importEXIFFile.fileName()), + "Do you want to continue ?").tqarg(importEXIFFile.fileName()), i18n("Import EXIF Metadata")) != KMessageBox::Yes) return; KURL::List imageURLs = images.images(); KURL::List updatedURLs; - QStringList errorFiles; + TQStringList errorFiles; for( KURL::List::iterator it = imageURLs.begin() ; it != imageURLs.end(); ++it) @@ -294,7 +294,7 @@ void Plugin_MetadataEdit::slotImportExif() if (!errorFiles.isEmpty()) { KMessageBox::errorList( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Unable to set EXIF metadata from:"), errorFiles, i18n("Import EXIF Metadata")); @@ -308,7 +308,7 @@ void Plugin_MetadataEdit::slotEditIptc() if ( !images.isValid() || images.images().isEmpty() ) return; - KIPIMetadataEditPlugin::IPTCEditDialog dialog(kapp->activeWindow(), images.images(), m_interface); + KIPIMetadataEditPlugin::IPTCEditDialog dialog(TQT_TQWIDGET(kapp->activeWindow()), images.images(), m_interface); dialog.exec(); m_interface->refreshImages(images.images()); } @@ -321,7 +321,7 @@ void Plugin_MetadataEdit::slotRemoveIptc() return; if (KMessageBox::warningYesNo( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("IPTC metadata will be permanently removed from all current selected pictures.\n" "Do you want to continue ?"), i18n("Remove IPTC Metadata")) != KMessageBox::Yes) @@ -329,7 +329,7 @@ void Plugin_MetadataEdit::slotRemoveIptc() KURL::List imageURLs = images.images(); KURL::List updatedURLs; - QStringList errorFiles; + TQStringList errorFiles; for( KURL::List::iterator it = imageURLs.begin() ; it != imageURLs.end(); ++it) @@ -360,7 +360,7 @@ void Plugin_MetadataEdit::slotRemoveIptc() if (!errorFiles.isEmpty()) { KMessageBox::errorList( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Unable to remove IPTC metadata from:"), errorFiles, i18n("Remove IPTC Metadata")); @@ -375,7 +375,7 @@ void Plugin_MetadataEdit::slotImportIptc() return; KURL importIPTCFile = KFileDialog::getOpenURL(KGlobalSettings::documentPath(), - QString::null, kapp->activeWindow(), + TQString(), TQT_TQWIDGET(kapp->activeWindow()), i18n("Select File to Import IPTC metadata") ); if( importIPTCFile.isEmpty() ) return; @@ -383,33 +383,33 @@ void Plugin_MetadataEdit::slotImportIptc() KExiv2Iface::KExiv2 exiv2Iface; if (!exiv2Iface.load(importIPTCFile.path())) { - KMessageBox::error(kapp->activeWindow(), - i18n("Cannot load metadata from \"%1\"").arg(importIPTCFile.fileName()), + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), + i18n("Cannot load metadata from \"%1\"").tqarg(importIPTCFile.fileName()), i18n("Import IPTC Metadata")); return; } - QByteArray iptcData = exiv2Iface.getIptc(); + TQByteArray iptcData = exiv2Iface.getIptc(); if (iptcData.isEmpty()) { - KMessageBox::error(kapp->activeWindow(), - i18n("\"%1\" do not have IPTC metadata").arg(importIPTCFile.fileName()), + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), + i18n("\"%1\" do not have IPTC metadata").tqarg(importIPTCFile.fileName()), i18n("Import IPTC Metadata")); return; } if (KMessageBox::warningYesNo( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("IPTC metadata from current selected pictures will be permanently " "replaced by the IPTC content of \"%1\".\n" - "Do you want to continue ?").arg(importIPTCFile.fileName()), + "Do you want to continue ?").tqarg(importIPTCFile.fileName()), i18n("Import IPTC Metadata")) != KMessageBox::Yes) return; KURL::List imageURLs = images.images(); KURL::List updatedURLs; - QStringList errorFiles; + TQStringList errorFiles; for( KURL::List::iterator it = imageURLs.begin() ; it != imageURLs.end(); ++it) @@ -440,7 +440,7 @@ void Plugin_MetadataEdit::slotImportIptc() if (!errorFiles.isEmpty()) { KMessageBox::errorList( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Unable to set IPTC metadata from:"), errorFiles, i18n("Import IPTC Metadata")); @@ -454,14 +454,14 @@ void Plugin_MetadataEdit::slotEditComments() if ( !images.isValid() || images.images().isEmpty() ) return; - KIPIMetadataEditPlugin::CommentEditDialog dlg(kapp->activeWindow()); + KIPIMetadataEditPlugin::CommentEditDialog dlg(TQT_TQWIDGET(kapp->activeWindow())); if (dlg.exec() != KMessageBox::Ok) return; KURL::List imageURLs = images.images(); KURL::List updatedURLs; - QStringList errorFiles; + TQStringList errorFiles; for( KURL::List::iterator it = imageURLs.begin() ; it != imageURLs.end(); ++it) @@ -504,7 +504,7 @@ void Plugin_MetadataEdit::slotEditComments() if (!errorFiles.isEmpty()) { KMessageBox::informationList( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Unable to set captions as image metadata from:"), errorFiles, i18n("Edit Image Caption")); @@ -518,14 +518,14 @@ void Plugin_MetadataEdit::slotRemoveComments() if ( !images.isValid() || images.images().isEmpty() ) return; - KIPIMetadataEditPlugin::CommentRemoveDialog dlg(kapp->activeWindow()); + KIPIMetadataEditPlugin::CommentRemoveDialog dlg(TQT_TQWIDGET(kapp->activeWindow())); if (dlg.exec() != KMessageBox::Ok) return; KURL::List imageURLs = images.images(); KURL::List updatedURLs; - QStringList errorFiles; + TQStringList errorFiles; for( KURL::List::iterator it = imageURLs.begin() ; it != imageURLs.end(); ++it) @@ -536,7 +536,7 @@ void Plugin_MetadataEdit::slotRemoveComments() if (dlg.removeHOSTCommentIsChecked()) { KIPI::ImageInfo info = m_interface->info(url); - info.setDescription(QString::null); + info.setDescription(TQString()); } if (!KExiv2Iface::KExiv2::isReadOnly(url.path())) @@ -549,7 +549,7 @@ void Plugin_MetadataEdit::slotRemoveComments() ret &= exiv2Iface.removeExifTag("Exif.Photo.UserComment"); if (dlg.removeJFIFCommentIsChecked()) - ret &= exiv2Iface.setComments(QByteArray()); + ret &= exiv2Iface.setComments(TQByteArray()); if (dlg.removeIPTCCaptionIsChecked()) ret &= exiv2Iface.removeIptcTag("Iptc.Application2.Caption"); @@ -571,7 +571,7 @@ void Plugin_MetadataEdit::slotRemoveComments() if (!errorFiles.isEmpty()) { KMessageBox::informationList( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Unable to remove caption as image metadata from:"), errorFiles, i18n("Remove Image Caption")); diff --git a/kipi-plugins/metadataedit/plugin_metadataedit.h b/kipi-plugins/metadataedit/plugin_metadataedit.h index 28c8d79..d4fd809 100644 --- a/kipi-plugins/metadataedit/plugin_metadataedit.h +++ b/kipi-plugins/metadataedit/plugin_metadataedit.h @@ -32,13 +32,14 @@ class KActionMenu; class Plugin_MetadataEdit : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_MetadataEdit(QObject *parent, const char* name, const QStringList &args); + Plugin_MetadataEdit(TQObject *tqparent, const char* name, const TQStringList &args); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* ); + virtual void setup( TQWidget* ); protected slots: diff --git a/kipi-plugins/mpegencoder/checkbinprog.cpp b/kipi-plugins/mpegencoder/checkbinprog.cpp index 1d6e2f2..60ebf9d 100644 --- a/kipi-plugins/mpegencoder/checkbinprog.cpp +++ b/kipi-plugins/mpegencoder/checkbinprog.cpp @@ -22,12 +22,12 @@ #include "checkbinprog.h" -// Qt includes +// TQt includes -#include <qwidget.h> -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqwidget.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> // KDElib includes @@ -43,7 +43,7 @@ namespace KIPIMPEGEncoderPlugin ///////////////////////////////// CONSTRUCTOR /////////////////////////////////////////////// -CheckBinProg::CheckBinProg(QObject *parent) +CheckBinProg::CheckBinProg(TQObject *tqparent) { config = new KConfig("kipirc"); config->setGroup("MPEGEncoder Settings"); @@ -63,54 +63,54 @@ CheckBinProg::~CheckBinProg() int CheckBinProg::findExecutables( void ) { - QFile montage, composite, convert, identify, ppmtoy4m, yuvscaler, mpeg2enc, mp2enc, mplex; + TQFile montage, composite, convert, identify, ppmtoy4m, yuvscaler, mpeg2enc, mp2enc, mplex; int ValRet = 0; if (ImageMagickPath.isEmpty()) { - KMessageBox::error(kapp->activeWindow(), i18n("Your 'ImageMagick' binary program path is empty.\nSetting to default value. Check option's setting.")); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Your 'ImageMagick' binary program path is empty.\nSetting to default value. Check option's setting.")); return (ValRet); } if (MjpegToolsPath.isEmpty()) { - KMessageBox::error(kapp->activeWindow(), i18n("Your 'MjpegTools' binary programs path is empty.\nSetting to default value. Check option's setting.")); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Your 'MjpegTools' binary programs path is empty.\nSetting to default value. Check option's setting.")); return (ValRet); } - QString str = ""; + TQString str = ""; // ImageMagick external programs. - if (montage.exists(QString (ImageMagickPath+"/montage")) == FALSE) - str = i18n("Cannot find 'montage' binary program from ImageMagick package. Please install it."); + if (montage.exists(TQString (ImageMagickPath+"/montage")) == FALSE) + str = i18n("Cannot tqfind 'montage' binary program from ImageMagick package. Please install it."); - if (composite.exists(QString (ImageMagickPath+"/composite")) == FALSE) - str = i18n("Cannot find 'composite' binary program from ImageMagick package. Please install it."); + if (composite.exists(TQString (ImageMagickPath+"/composite")) == FALSE) + str = i18n("Cannot tqfind 'composite' binary program from ImageMagick package. Please install it."); - if (convert.exists(QString (ImageMagickPath+"/convert")) == FALSE) - str = i18n("Cannot find 'convert' binary program from ImageMagick package. Please install it."); + if (convert.exists(TQString (ImageMagickPath+"/convert")) == FALSE) + str = i18n("Cannot tqfind 'convert' binary program from ImageMagick package. Please install it."); - if (identify.exists(QString (ImageMagickPath+"/identify")) == FALSE) - str = i18n("Cannot find 'identify' binary program from ImageMagick package. Please install it."); + if (identify.exists(TQString (ImageMagickPath+"/identify")) == FALSE) + str = i18n("Cannot tqfind 'identify' binary program from ImageMagick package. Please install it."); // MjpegTools external programs. - if (ppmtoy4m.exists(QString (MjpegToolsPath+"/ppmtoy4m")) == FALSE) - str = i18n("Cannot find 'ppmtoy4m' binary program from MjpegTools package. Please install it."); + if (ppmtoy4m.exists(TQString (MjpegToolsPath+"/ppmtoy4m")) == FALSE) + str = i18n("Cannot tqfind 'ppmtoy4m' binary program from MjpegTools package. Please install it."); - if (yuvscaler.exists(QString (MjpegToolsPath+"/yuvscaler")) == FALSE) - str = i18n("Cannot find 'yuvscaler' binary program from MjpegTools package. Please install it."); + if (yuvscaler.exists(TQString (MjpegToolsPath+"/yuvscaler")) == FALSE) + str = i18n("Cannot tqfind 'yuvscaler' binary program from MjpegTools package. Please install it."); - if (mpeg2enc.exists(QString (MjpegToolsPath+"/mpeg2enc")) == FALSE) - str = i18n("Cannot find 'mpeg2enc' binary program from MjpegTools package. Please install it."); + if (mpeg2enc.exists(TQString (MjpegToolsPath+"/mpeg2enc")) == FALSE) + str = i18n("Cannot tqfind 'mpeg2enc' binary program from MjpegTools package. Please install it."); - if ( mplex.exists(QString (MjpegToolsPath+"/mplex")) == FALSE) - str = i18n("Cannot find 'mplex' binary program from MjpegTools package. Please install it."); + if ( mplex.exists(TQString (MjpegToolsPath+"/mplex")) == FALSE) + str = i18n("Cannot tqfind 'mplex' binary program from MjpegTools package. Please install it."); - if (mp2enc.exists(QString (MjpegToolsPath+"/mp2enc")) == FALSE) + if (mp2enc.exists(TQString (MjpegToolsPath+"/mp2enc")) == FALSE) { - str = i18n("Cannot find 'mp2enc' binary program from MjpegTools package. Please install it.\n" + str = i18n("Cannot tqfind 'mp2enc' binary program from MjpegTools package. Please install it.\n" "Audio capabilities will be disabled."); ValRet = 2; } @@ -121,7 +121,7 @@ if (MjpegToolsPath.isEmpty()) "\n\nVisit these URLs for more information:" "\nImageMagick package: http://www.imagemagick.org/" "\nMjpegTools package: http://mjpeg.sourceforge.net/"); - KMessageBox::error(kapp->activeWindow(), str); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), str); return (ValRet); } diff --git a/kipi-plugins/mpegencoder/checkbinprog.h b/kipi-plugins/mpegencoder/checkbinprog.h index 30e7783..7ce17ef 100644 --- a/kipi-plugins/mpegencoder/checkbinprog.h +++ b/kipi-plugins/mpegencoder/checkbinprog.h @@ -23,27 +23,28 @@ #ifndef CheckBinProg_included #define CheckBinProg_included -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class KConfig; namespace KIPIMPEGEncoderPlugin { -class CheckBinProg : public QObject +class CheckBinProg : public TQObject { Q_OBJECT + TQ_OBJECT public: - CheckBinProg(QObject *parent=0); + CheckBinProg(TQObject *tqparent=0); virtual ~CheckBinProg(); int findExecutables( void ); private: KConfig* config; - QString ImageMagickPath; - QString MjpegToolsPath; + TQString ImageMagickPath; + TQString MjpegToolsPath; }; } // NameSpace KIPIMPEGEncoderPlugin diff --git a/kipi-plugins/mpegencoder/images2mpg b/kipi-plugins/mpegencoder/images2mpg index 0c0d3f1..c720d2d 100755 --- a/kipi-plugins/mpegencoder/images2mpg +++ b/kipi-plugins/mpegencoder/images2mpg @@ -116,7 +116,7 @@ # Add a video type command line option (PAL, NTSC, SECAM). # Remove '-F' option (frame rate value -> fixed by video type option) # Add an exiting test of input image files before encoding. -# Add an exiting test of input audio files and mask file before encoding. +# Add an exiting test of input audio files and tqmask file before encoding. # Add an exiting test if verbosity level is unknown. # Add image sequence duration value test. # Add an implementation for don't used a default 'black.png' file. ImageMagick create a @@ -197,7 +197,7 @@ exit 0 # --------------------------------------MAIN------------------------------------------------------------- -# Trap shell signals fonction. +# Trap shell Q_SIGNALS fonction. trap CleanUp 2 @@ -565,19 +565,19 @@ else # check if programs are installed if [ ! -e $MONTAGE_BIN ]; then - echo -e "\nCan't find $MONTAGE_BIN, please install it or check -I parameter" + echo -e "\nCan't tqfind $MONTAGE_BIN, please install it or check -I parameter" exit -1 fi if [ ! -e $COMPOSITE_BIN ]; then - echo -e "\nCan't find $COMPOSITE_BIN, please install it or check -I parameter" + echo -e "\nCan't tqfind $COMPOSITE_BIN, please install it or check -I parameter" exit -1 fi if [ ! -e $CONVERT_BIN ]; then - echo -e "\nCan't find $CONVERT_BIN, please install it or check -I parameter" + echo -e "\nCan't tqfind $CONVERT_BIN, please install it or check -I parameter" exit -1 fi if [ ! -e $IDENTIFY_BIN ]; then - echo -e "\nCan't find $IDENTIFY_BIN, please install it or check -I parameter" + echo -e "\nCan't tqfind $IDENTIFY_BIN, please install it or check -I parameter" exit -1 fi fi @@ -602,31 +602,31 @@ else fi # check if programs are installed if [ ! -e $PPMTOY4M_BIN ]; then - echo -e "\nCan't find $PPMTOY4M_BIN, please install it or check -M parameter" + echo -e "\nCan't tqfind $PPMTOY4M_BIN, please install it or check -M parameter" exit -1 fi if [ ! -e $YUVSCALER_BIN ]; then - echo -e "\nCan't find $YUVSCALER_BIN, please install it or check -M parameter" + echo -e "\nCan't tqfind $YUVSCALER_BIN, please install it or check -M parameter" exit -1 fi if [ ! -e $MPEG2ENC_BIN ]; then - echo -e "\nCan't find $MPEG2ENC_BIN, please install it or check -M parameter" + echo -e "\nCan't tqfind $MPEG2ENC_BIN, please install it or check -M parameter" exit -1 fi if [ ! -e $MP2ENC_BIN ]; then - echo -e "\nCan't find $MP2ENC_BIN, please install it or check -M parameter" + echo -e "\nCan't tqfind $MP2ENC_BIN, please install it or check -M parameter" exit -1 fi if [ ! -e $OGG_BIN ]; then - echo -e "\nCan't find $OGG_BIN, please install it or check -M parameter" + echo -e "\nCan't tqfind $OGG_BIN, please install it or check -M parameter" exit -1 fi if [ ! -e $MP3_BIN ]; then - echo -e "\nCan't find $MP3_BIN, please install it or check -M parameter" + echo -e "\nCan't tqfind $MP3_BIN, please install it or check -M parameter" exit -1 fi if [ ! -e $MPLEX_BIN ]; then - echo -e "\nCan't find $MPLEX_BIN, please install it or check -M parameter" + echo -e "\nCan't tqfind $MPLEX_BIN, please install it or check -M parameter" exit -1 fi @@ -858,7 +858,7 @@ while test $CPT -lt $NBFRAMETOTAL;\ if [ $CPT = `echo $((($CPF*$NBFRAMEIMAGE)-$NBFRAMEIMAGE+1))` ]; then # Conversion and resizing the curent image file with ImageMagick. - $MONTAGE_BIN -type TrueColor -quality 100 -geometry 768x576 -texture "$MASK" "${INPUT_IMAGE_FILES[`echo $(($CPF-1))`]}" "$TMPFILENAME.tmp.jpg" + $MONTAGE_BIN -type TrueColor -quality 100 -tqgeometry 768x576 -texture "$MASK" "${INPUT_IMAGE_FILES[`echo $(($CPF-1))`]}" "$TMPFILENAME.tmp.jpg" $CONVERT_BIN -type TrueColor -quality 100 "$TMPFILENAME.tmp.jpg" "$TMPFILENAME.tmp.pnm" # Next input image... @@ -870,7 +870,7 @@ while test $CPT -lt $NBFRAMETOTAL;\ if [ $[$CPT <= `echo $((($CPF*($NBFRAMEIMAGE+$NBFRAMETRANSITION)-$NBFRAMEIMAGE)))`] = 1 ]; then if [ $DISSOLVEVALUE = 99 ]; then - $MONTAGE_BIN -type TrueColor -quality 100 -geometry 768x576 -texture "$MASK" "${INPUT_IMAGE_FILES[`echo $(($CPF-1))`]}" "$TMPFILENAME.tmp.jpg" + $MONTAGE_BIN -type TrueColor -quality 100 -tqgeometry 768x576 -texture "$MASK" "${INPUT_IMAGE_FILES[`echo $(($CPF-1))`]}" "$TMPFILENAME.tmp.jpg" $CONVERT_BIN -type TrueColor -quality 100 "$TMPFILENAME.tmp.jpg" "$TMPFILENAME.next_trans.tmp.pnm" fi diff --git a/kipi-plugins/mpegencoder/kimg2mpg.cpp b/kipi-plugins/mpegencoder/kimg2mpg.cpp index 947c430..129816d 100644 --- a/kipi-plugins/mpegencoder/kimg2mpg.cpp +++ b/kipi-plugins/mpegencoder/kimg2mpg.cpp @@ -34,33 +34,33 @@ extern "C" #include <iostream> -// Qt includes - -#include <qwidget.h> -#include <qpixmap.h> -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qframe.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qradiobutton.h> -#include <qlabel.h> -#include <qdialog.h> -#include <qprogressbar.h> -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qspinbox.h> -#include <qlistbox.h> -#include <qheader.h> -#include <qwhatsthis.h> -#include <qprocess.h> -#include <qdatetime.h> -#include <qlayout.h> -#include <qdragobject.h> -#include <qmessagebox.h> +// TQt includes + +#include <tqwidget.h> +#include <tqpixmap.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqradiobutton.h> +#include <tqlabel.h> +#include <tqdialog.h> +#include <tqprogressbar.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqspinbox.h> +#include <tqlistbox.h> +#include <tqheader.h> +#include <tqwhatsthis.h> +#include <tqprocess.h> +#include <tqdatetime.h> +#include <tqlayout.h> +#include <tqdragobject.h> +#include <tqmessagebox.h> // KDElib includes @@ -105,63 +105,63 @@ namespace KIPIMPEGEncoderPlugin ///////////////////////////////////////////////////////////////////////////////////////////// -class ImageItem : public QListBoxText +class ImageItem : public TQListBoxText { public: - ImageItem(QListBox * parent, QString const & name, QString const & comments, QString const & path, - QString const & album) - : QListBoxText(parent), _name(name), _comments(comments), _path(path), _album(album) + ImageItem(TQListBox * tqparent, TQString const & name, TQString const & comments, TQString const & path, + TQString const & album) + : TQListBoxText(tqparent), _name(name), _comments(comments), _path(path), _album(album) {} - QString comments() { return _comments; } - QString name() { return _name; } - QString path() { return _path; } - QString album() { return _album; } - void setName(const QString &newName) { setText(newName); } + TQString comments() { return _comments; } + TQString name() { return _name; } + TQString path() { return _path; } + TQString album() { return _album; } + void setName(const TQString &newName) { setText(newName); } private: - QString _name; - QString _comments; - QString _path; - QString _album; + TQString _name; + TQString _comments; + TQString _path; + TQString _album; }; ///////////////////////////////////////////////////////////////////////////////////////////// -ListImageItems::ListImageItems(QWidget *parent, const char *name) - : KListBox(parent, name) +ListImageItems::ListImageItems(TQWidget *tqparent, const char *name) + : KListBox(tqparent, name) { - setSelectionMode (QListBox::Extended); + setSelectionMode (TQListBox::Extended); setAcceptDrops(true); } ///////////////////////////////////////////////////////////////////////////////////////////// -void ListImageItems::dragEnterEvent(QDragEnterEvent *e) +void ListImageItems::dragEnterEvent(TQDragEnterEvent *e) { - e->accept(QUriDrag::canDecode(e)); + e->accept(TQUriDrag::canDecode(e)); } ///////////////////////////////////////////////////////////////////////////////////////////// -void ListImageItems::dropEvent(QDropEvent *e) +void ListImageItems::dropEvent(TQDropEvent *e) { - QStrList strList; + TQStrList strList; KURL::List filesUrl; - if ( !QUriDrag::decode(e, strList) ) return; + if ( !TQUriDrag::decode(e, strList) ) return; - QStrList stringList; - QStrListIterator it(strList); + TQStrList stringList; + TQStrListIterator it(strList); char *str; while ( (str = it.current()) != 0 ) { - QString filePath = QUriDrag::uriToLocalFile(str); - QFileInfo fileInfo(filePath); + TQString filePath = TQUriDrag::uriToLocalFile(str); + TQFileInfo fileInfo(filePath); if (fileInfo.isFile() && fileInfo.exists()) { @@ -179,8 +179,8 @@ void ListImageItems::dropEvent(QDropEvent *e) /////////////////////////////// CONSTRUCTOR ///////////////////////////////////////////////// -KImg2mpgData::KImg2mpgData(KIPI::Interface* interface, QWidget *parent, const char *name) - : KImg2mpgBase(parent, name), m_interface( interface ) +KImg2mpgData::KImg2mpgData(KIPI::Interface* interface, TQWidget *tqparent, const char *name) + : KImg2mpgBase(tqparent, name), m_interface( interface ) { m_TmpFolderConfig = ""; m_Proc = 0L; @@ -188,7 +188,7 @@ KImg2mpgData::KImg2mpgData(KIPI::Interface* interface, QWidget *parent, const ch m_Encoding = false; m_Abort = false; - m_Icons = new KIconLoader( QString( "kipi" ) ); + m_Icons = new KIconLoader( TQString( "kipi" ) ); m_NoneLabel = i18n ("none"); // Set buttons icon @@ -198,47 +198,47 @@ KImg2mpgData::KImg2mpgData(KIPI::Interface* interface, QWidget *parent, const ch // Signal/Slot connections - connect( m_VideoTypeComboBox, SIGNAL( activated(int ) ), - this, SLOT( SlotPortfolioDurationChanged (int) ) ); + connect( m_VideoTypeComboBox, TQT_SIGNAL( activated(int ) ), + this, TQT_SLOT( SlotPortfolioDurationChanged (int) ) ); - connect( m_DurationImageSpinBox, SIGNAL( valueChanged(int ) ), - this, SLOT( SlotPortfolioDurationChanged (int) ) ); + connect( m_DurationImageSpinBox, TQT_SIGNAL( valueChanged(int ) ), + this, TQT_SLOT( SlotPortfolioDurationChanged (int) ) ); - connect( m_TransitionComboBox, SIGNAL( activated(int ) ), - this, SLOT( SlotPortfolioDurationChanged (int) ) ); + connect( m_TransitionComboBox, TQT_SIGNAL( activated(int ) ), + this, TQT_SLOT( SlotPortfolioDurationChanged (int) ) ); - connect( m_MPEGOutputBUTTONFilename, SIGNAL( clicked() ), - this, SLOT( slotMPEGFilenameDialog() ) ); + connect( m_MPEGOutputBUTTONFilename, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotMPEGFilenameDialog() ) ); - connect( m_AudioInputBUTTONFilename, SIGNAL( clicked() ), - this, SLOT( slotAudioFilenameDialog() ) ); + connect( m_AudioInputBUTTONFilename, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotAudioFilenameDialog() ) ); - connect( m_ImagesFilesListBox, SIGNAL( currentChanged( QListBoxItem * ) ), - this, SLOT( slotImagesFilesSelected(QListBoxItem *) ) ); + connect( m_ImagesFilesListBox, TQT_SIGNAL( currentChanged( TQListBoxItem * ) ), + this, TQT_SLOT( slotImagesFilesSelected(TQListBoxItem *) ) ); - connect(m_ImagesFilesListBox, SIGNAL( addedDropItems(KURL::List) ), - this, SLOT( slotAddDropItems(KURL::List))); + connect(m_ImagesFilesListBox, TQT_SIGNAL( addedDropItems(KURL::List) ), + this, TQT_SLOT( slotAddDropItems(KURL::List))); - connect( m_ImagesFilesButtonAdd, SIGNAL( clicked() ), - this, SLOT( slotImagesFilesButtonAdd() ) ); + connect( m_ImagesFilesButtonAdd, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImagesFilesButtonAdd() ) ); - connect( m_ImagesFilesButtonDelete, SIGNAL( clicked() ), - this, SLOT( slotImagesFilesButtonDelete() ) ); + connect( m_ImagesFilesButtonDelete, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImagesFilesButtonDelete() ) ); - connect( m_ImagesFilesButtonUp, SIGNAL( clicked() ), - this, SLOT( slotImagesFilesButtonUp() ) ); + connect( m_ImagesFilesButtonUp, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImagesFilesButtonUp() ) ); - connect( m_ImagesFilesButtonDown, SIGNAL( clicked() ), - this, SLOT( slotImagesFilesButtonDown() ) ); + connect( m_ImagesFilesButtonDown, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImagesFilesButtonDown() ) ); - connect(m_Encodebutton, SIGNAL(clicked()), - this, SLOT(slotEncode())); + connect(m_Encodebutton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEncode())); - connect(m_optionsbutton, SIGNAL(clicked()), - this, SLOT(slotOptions())); + connect(m_optionsbutton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotOptions())); - connect(m_quitbutton, SIGNAL(clicked()), - this, SLOT(slotClose())); + connect(m_quitbutton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotClose())); // About data and help button. @@ -260,13 +260,13 @@ KImg2mpgData::KImg2mpgData(KIPI::Interface* interface, QWidget *parent, const ch KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); readSettings(); - int maxW = QMAX( m_VideoFormatComboBox->sizeHint().width(), - m_ChromaComboBox->sizeHint().width() ); + int maxW = TQMAX( m_VideoFormatComboBox->tqsizeHint().width(), + m_ChromaComboBox->tqsizeHint().width() ); m_ChromaComboBox->setMinimumWidth( maxW ); m_VideoFormatComboBox->setMinimumWidth( maxW ); @@ -304,10 +304,10 @@ void KImg2mpgData::slotAddDropItems(KURL::List filesUrl) void KImg2mpgData::slotMPEGFilenameDialog( void ) { - QString temp; + TQString temp; temp = KFileDialog::getOpenFileName(KGlobalSettings::documentPath(), - QString( "*.mpg" ), + TQString( "*.mpg" ), this, i18n("Select MPEG Output File") ); if( temp.isEmpty() ) @@ -321,10 +321,10 @@ void KImg2mpgData::slotMPEGFilenameDialog( void ) void KImg2mpgData::slotAudioFilenameDialog( void ) { - QString temp; + TQString temp; temp = KFileDialog::getOpenFileName(KGlobalSettings::documentPath(), - QString( "*.wav *.mp2 *.mp3 *.ogg" ), + TQString( "*.wav *.mp2 *.mp3 *.ogg" ), this, i18n("Select Audio Input File") ); if( temp.isEmpty() ) @@ -390,10 +390,10 @@ void KImg2mpgData::slotImagesFilesButtonUp( void ) return; ImageItem *pitem = static_cast<ImageItem*>( m_ImagesFilesListBox->item(Index) ); - QString path(pitem->path()); - QString comment(pitem->comments()); - QString name(pitem->name()); - QString album(pitem->album()); + TQString path(pitem->path()); + TQString comment(pitem->comments()); + TQString name(pitem->name()); + TQString album(pitem->album()); m_ImagesFilesListBox->removeItem(Index); ImageItem *item = new ImageItem( 0, name, comment, path, album ); item->setName( name ); @@ -405,7 +405,7 @@ void KImg2mpgData::slotImagesFilesButtonUp( void ) ///////////////////////////////////////////////////////////////////////////////////////////// -void KImg2mpgData::slotImagesFilesSelected( QListBoxItem *item ) +void KImg2mpgData::slotImagesFilesSelected( TQListBoxItem *item ) { if ( !item || m_ImagesFilesListBox->count() == 0 ) { @@ -427,19 +427,19 @@ void KImg2mpgData::slotImagesFilesSelected( QListBoxItem *item ) m_thumbJob = KIO::filePreview( url, m_ImageLabel->width() ); - connect(m_thumbJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), - SLOT(slotGotPreview(const KFileItem*, const QPixmap&))); - connect(m_thumbJob, SIGNAL(failed(const KFileItem*)), - SLOT(slotFailedPreview(const KFileItem*))); + connect(m_thumbJob, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), + TQT_SLOT(slotGotPreview(const KFileItem*, const TQPixmap&))); + connect(m_thumbJob, TQT_SIGNAL(failed(const KFileItem*)), + TQT_SLOT(slotFailedPreview(const KFileItem*))); int index = m_ImagesFilesListBox->index ( item ); - m_label7->setText(i18n("Image no. %1").arg(index + 1)); + m_label7->setText(i18n("Image no. %1").tqarg(index + 1)); } ///////////////////////////////////////////////////////////////////////////////////////////// -void KImg2mpgData::slotGotPreview(const KFileItem*, const QPixmap &pixmap) +void KImg2mpgData::slotGotPreview(const KFileItem*, const TQPixmap &pixmap) { m_ImageLabel->setPixmap(pixmap); m_thumbJob = 0L; @@ -479,10 +479,10 @@ void KImg2mpgData::slotImagesFilesButtonDown( void ) return; ImageItem *pitem = static_cast<ImageItem*>( m_ImagesFilesListBox->item(Index) ); - QString path(pitem->path()); - QString comment(pitem->comments()); - QString name(pitem->name()); - QString album(pitem->name()); + TQString path(pitem->path()); + TQString comment(pitem->comments()); + TQString name(pitem->name()); + TQString album(pitem->name()); m_ImagesFilesListBox->removeItem(Index); ImageItem *item = new ImageItem( 0, name, comment, path, album ); item->setName( name ); @@ -505,10 +505,10 @@ void KImg2mpgData::slotClose() void KImg2mpgData::slotEncode( void ) { m_Proc = new KProcess; - QColor BackGroundColor; - QString HexColor; - QString Temp; - QString OutputFileName, InputAudioFileName; + TQColor BackGroundColor; + TQString HexColor; + TQString Temp; + TQString OutputFileName, InputAudioFileName; bool ResultOk; if (m_Encoding) @@ -542,27 +542,27 @@ void KImg2mpgData::slotEncode( void ) // Init. Tmp folder KStandardDirs dir; m_TmpFolderConfig = dir.saveLocation("tmp", "kipi-mpegencoderplugin-" + - QString::number(getpid()) ); + TQString::number(getpid()) ); m_DebugOuputMessages = ""; m_DurationTime.start(); InputAudioFileName = m_AudioInputEDITFilename->text(); - if (InputAudioFileName.isEmpty() == false && !QFile::exists(InputAudioFileName)) + if (InputAudioFileName.isEmpty() == false && !TQFile::exists(InputAudioFileName)) { KMessageBox::error(this, i18n("You must specify an existing audio file.")); return; } OutputFileName = m_MPEGOutputEDITFilename->text(); - QFileInfo fileInfo(OutputFileName); + TQFileInfo fileInfo(OutputFileName); if (OutputFileName.isEmpty() || fileInfo.isDir()) { KMessageBox::error(this, i18n("You must specify an MPEG output file name.")); return; } - QFileInfo dirInfo(fileInfo.dir().path()); + TQFileInfo dirInfo(fileInfo.dir().path()); if (!dirInfo.exists () || !dirInfo.isWritable()) { KMessageBox::error(this, i18n("You must specify a writable path for your output file.")); @@ -575,17 +575,17 @@ void KImg2mpgData::slotEncode( void ) return; } - if (QFile::exists(OutputFileName)) + if (TQFile::exists(OutputFileName)) { int Ret=KMessageBox::questionYesNo(this, i18n("The output MPEG file '%1' already exists.\n" - "Do you want overwrite this file?").arg(OutputFileName)); + "Do you want overwrite this file?").tqarg(OutputFileName)); if (Ret == KMessageBox::No) return; } m_ImagesFilesListBox->clearSelection(); m_Encodebutton->setText(i18n("A&bort")); - QWhatsThis::add( m_Encodebutton, i18n( "Abort the portfolio MPEG encoding. " + TQWhatsThis::add( m_Encodebutton, i18n( "Abort the portfolio MPEG encoding. " "Warning: all work so-far will be lost...." ) ); m_optionsbutton->setEnabled(false); @@ -662,7 +662,7 @@ void KImg2mpgData::slotEncode( void ) if ( InputAudioFileName.isEmpty() == false ) { - if ( InputAudioFileName.findRev(".mp2", -1, false) == -1 ) + if ( InputAudioFileName.tqfindRev(".mp2", -1, false) == -1 ) { *m_Proc << "-w" << InputAudioFileName; // Input WAV/OGG/MP3 audio file name. m_CommandLine = m_CommandLine + " -w \"" + InputAudioFileName + "\""; @@ -682,13 +682,13 @@ void KImg2mpgData::slotEncode( void ) for (uint i=0 ; i < m_ImagesFilesListBox->count() ; ++i) { - QString FileName=""; + TQString FileName=""; ImageItem *pitem = static_cast<ImageItem*>( m_ImagesFilesListBox->item(i) ); FileName.append (pitem->path()); // Input images files. - if (!QFile::exists(FileName)) + if (!TQFile::exists(FileName)) { KMessageBox::error(this, - i18n("Cannot access to file %1, please check the path is right.").arg(FileName)); + i18n("Cannot access to file %1, please check the path is right.").tqarg(FileName)); m_Abort = true; reset(); return; @@ -697,18 +697,18 @@ void KImg2mpgData::slotEncode( void ) m_CommandLine = m_CommandLine + " \"" + FileName + "\" "; } - connect(m_Proc, SIGNAL(processExited(KProcess *)),this, - SLOT(EncodeDone(KProcess*))); + connect(m_Proc, TQT_SIGNAL(processExited(KProcess *)),this, + TQT_SLOT(EncodeDone(KProcess*))); - connect(m_Proc, SIGNAL(receivedStderr(KProcess *,char*,int)),this, - SLOT(readStderr(KProcess*,char*,int))); + connect(m_Proc, TQT_SIGNAL(receivedStderr(KProcess *,char*,int)),this, + TQT_SLOT(readStderr(KProcess*,char*,int))); m_Img2mpgPidNum = -1; bool result = m_Proc->start(KProcess::NotifyOnExit , KProcess::All); if(!result) { - QString str = i18n("Cannot start 'images2mpg' bash script : fork failed."); + TQString str = i18n("Cannot start 'images2mpg' bash script : fork failed."); KMessageBox::error(this, str); reset(); } @@ -726,8 +726,8 @@ void KImg2mpgData::slotOptions( void ) m_OptionDlg->MJBinFolderEditFilename->setText(m_MJBinFolderConfig); m_OptionDlg->show(); - connect( m_OptionDlg, SIGNAL( okClicked () ), - this, SLOT( slotOptionDlgOkClicked() )); + connect( m_OptionDlg, TQT_SIGNAL( okClicked () ), + this, TQT_SLOT( slotOptionDlgOkClicked() )); } @@ -748,7 +748,7 @@ void KImg2mpgData::slotOptionDlgOkClicked( void ) m_MJBinFolderConfig.truncate(m_MJBinFolderConfig.length()-1); writeSettings(); - CheckBinProg* CheckExternalPrograms = new CheckBinProg(this); + CheckBinProg* CheckExternalPrograms = new CheckBinProg(TQT_TQOBJECT(this)); int ValRet = CheckExternalPrograms->findExecutables(); m_Encodebutton->setEnabled(true); @@ -760,8 +760,8 @@ void KImg2mpgData::slotOptionDlgOkClicked( void ) if (ValRet == 2) m_AudioInputFilename->setEnabled(false); - disconnect( m_OptionDlg, SIGNAL( okClicked() ), - this, SLOT( slotOptionDlgOkClicked() )); + disconnect( m_OptionDlg, TQT_SIGNAL( okClicked() ), + this, TQT_SLOT( slotOptionDlgOkClicked() )); } @@ -778,7 +778,7 @@ void KImg2mpgData::slotHelp() void KImg2mpgData::ShowNumberImages( int Number ) { - QTime TotalDuration (0, 0, 0); + TQTime TotalDuration (0, 0, 0); bool ResultOk; int TransitionDuration; @@ -789,7 +789,7 @@ void KImg2mpgData::ShowNumberImages( int Number ) TransitionDuration = 0; else { - QString VidFormat=m_VideoTypeComboBox->currentText(); + TQString VidFormat=m_VideoTypeComboBox->currentText(); if (VidFormat == "NTSC") TransitionDuration = (int)((((float)100 / (float)TransitionSpeed) / (float)30) * (float)1000); // in ms @@ -801,9 +801,9 @@ void KImg2mpgData::ShowNumberImages( int Number ) TotalDuration = TotalDuration.addMSecs((Number+1)*TransitionDuration); if ( Number < 2) - m_label6->setText(i18n("%1 image [%2]").arg(Number).arg(TotalDuration.toString())); + m_label6->setText(i18n("%1 image [%2]").tqarg(Number).tqarg(TotalDuration.toString())); else - m_label6->setText(i18n("%1 images [%2]").arg(Number).arg(TotalDuration.toString())); + m_label6->setText(i18n("%1 images [%2]").tqarg(Number).tqarg(TotalDuration.toString())); } @@ -811,25 +811,25 @@ void KImg2mpgData::ShowNumberImages( int Number ) void KImg2mpgData::readStderr(KProcess *, char *buffer, int buflen) { - QString NewString2; + TQString NewString2; int ImgNum; - m_EncodeString = QString::fromLocal8Bit(buffer, buflen); + m_EncodeString = TQString::fromLocal8Bit(buffer, buflen); - QString BufferTmp = buffer; + TQString BufferTmp = buffer; m_DebugOuputMessages.append(BufferTmp.left(buflen)); - if (m_EncodeString.contains("Images encoding (%) :")) + if (m_EncodeString.tqcontains("Images encoding (%) :")) { - int pos1 = m_EncodeString.find(':'); + int pos1 = m_EncodeString.tqfind(':'); if (pos1 != -1) { - QString newstring = m_EncodeString.mid(pos1+1, 4); + TQString newstring = m_EncodeString.mid(pos1+1, 4); m_progress->setValue(newstring.toUInt()); } - int pos2 = m_EncodeString.find('['); + int pos2 = m_EncodeString.tqfind('['); if (pos2 != -1) { @@ -840,7 +840,7 @@ void KImg2mpgData::readStderr(KProcess *, char *buffer, int buflen) ImgNum = 1; m_frame->setText(i18n("Encoding image file [%1/%2]...") - .arg(ImgNum).arg(m_ImagesFilesListBox->count())); + .tqarg(ImgNum).tqarg(m_ImagesFilesListBox->count())); if (ImgNum > 1) m_ImagesFilesListBox->setSelected(ImgNum-2, false); @@ -853,16 +853,16 @@ void KImg2mpgData::readStderr(KProcess *, char *buffer, int buflen) { // Print on the GUI the actual 'images2mpg' process. - if (m_EncodeString.contains("Initialising...")) + if (m_EncodeString.tqcontains("Initialising...")) m_frame->setText(i18n("Initialising...")); - if (m_EncodeString.contains("Merging MPEG flux...")) + if (m_EncodeString.tqcontains("Merging MPEG flux...")) { m_frame->setText(i18n("Merging MPEG flux...")); m_progress->setValue(100); } - if (m_EncodeString.contains("Encoding audio file...")) + if (m_EncodeString.tqcontains("Encoding audio file...")) { m_frame->setText(i18n("Encoding audio file...")); m_progress->setValue(100); @@ -870,10 +870,10 @@ void KImg2mpgData::readStderr(KProcess *, char *buffer, int buflen) // Or errors detections... - if (m_EncodeString.contains("cat:") || - m_EncodeString.contains("ERROR:") || - m_EncodeString.contains("Broken pipe") || - m_EncodeString.contains("No such file or directory")) + if (m_EncodeString.tqcontains("cat:") || + m_EncodeString.tqcontains("ERROR:") || + m_EncodeString.tqcontains("Broken pipe") || + m_EncodeString.tqcontains("No such file or directory")) { m_Abort = true; @@ -904,15 +904,15 @@ void KImg2mpgData::EncodeDone(KProcess*) int msecDur = m_DurationTime.elapsed(); m_EncodingDuration.setHMS(0, 0, 0); - QTime Duration = m_EncodingDuration.addMSecs (msecDur); - QString Encoding = Duration.toString("hh:mm:ss"); + TQTime Duration = m_EncodingDuration.addMSecs (msecDur); + TQString Encoding = Duration.toString("hh:mm:ss"); if ( m_Abort == false ) { m_frame->setText(i18n("Encoding terminated...")); int Ret=KMessageBox::warningYesNo(this, i18n("The encoding process has terminated...\n\n" - "Encoding duration: %1").arg(Encoding), + "Encoding duration: %1").tqarg(Encoding), i18n("'images2mpg' Script Execution Terminated"), i18n("&OK"), i18n("Show Process Messages")); @@ -930,7 +930,7 @@ void KImg2mpgData::EncodeDone(KProcess*) m_frame->setText(i18n("Encoding aborted...")); int Ret=KMessageBox::warningYesNo(this, i18n("The encoding process has been aborted...\n\n" - "Encoding duration: %1").arg(Encoding), + "Encoding duration: %1").tqarg(Encoding), i18n("'images2mpg' Script Execution Aborted"), i18n("&OK"), i18n("Show Process Messages")); @@ -949,7 +949,7 @@ void KImg2mpgData::EncodeDone(KProcess*) ///////////////////////////////////////////////////////////////////////////////////////////// -QPixmap KImg2mpgData::LoadIcon( QString Name, int Group ) +TQPixmap KImg2mpgData::LoadIcon( TQString Name, int Group ) { return m_Icons->loadIcon( Name, (KIcon::Group)Group ); } @@ -957,7 +957,7 @@ QPixmap KImg2mpgData::LoadIcon( QString Name, int Group ) ///////////////////////////////////////////////////////////////////////////////////////////// -void KImg2mpgData::closeEvent(QCloseEvent* e) +void KImg2mpgData::closeEvent(TQCloseEvent* e) { if (!e) return; @@ -989,7 +989,7 @@ void KImg2mpgData::closeEvent(QCloseEvent* e) void KImg2mpgData::show() { setCaption(i18n("Create MPEG Slideshow")); - QDialog::show(); + TQDialog::show(); } @@ -1076,19 +1076,19 @@ void KImg2mpgData::readSettings() m_VideoFormatConfig = m_config->readEntry("VideoFormat", "XVCD"); for (int i = 0 ; i < m_VideoFormatComboBox->count() ; ++i) - if ( (QString) m_VideoFormatComboBox->text(i) == m_VideoFormatConfig) + if ( (TQString) m_VideoFormatComboBox->text(i) == m_VideoFormatConfig) m_VideoFormatComboBox->setCurrentItem(i); m_VideoTypeConfig = m_config->readEntry("VideoType", "PAL"); for (int i = 0 ; i < m_VideoTypeComboBox->count() ; ++i) - if ( (QString) m_VideoTypeComboBox->text(i) == m_VideoTypeConfig) + if ( (TQString) m_VideoTypeComboBox->text(i) == m_VideoTypeConfig) m_VideoTypeComboBox->setCurrentItem(i); m_ChromaConfig = m_config->readEntry("ChromaMode", "420mpeg2"); for (int i = 0 ; i < m_ChromaComboBox->count() ; ++i) - if ( (QString) m_ChromaComboBox->text(i) == m_ChromaConfig) + if ( (TQString) m_ChromaComboBox->text(i) == m_ChromaConfig) m_ChromaComboBox->setCurrentItem(i); m_ImageDurationConfig = m_config->readEntry("ImageDuration", "10"); @@ -1097,10 +1097,10 @@ void KImg2mpgData::readSettings() m_TransitionSpeedConfig = m_config->readEntry("TransitionSpeed", m_NoneLabel); for (int i = 0 ; i < m_TransitionComboBox->count() ; ++i) - if ( (QString) m_TransitionComboBox->text(i) == m_TransitionSpeedConfig) + if ( (TQString) m_TransitionComboBox->text(i) == m_TransitionSpeedConfig) m_TransitionComboBox->setCurrentItem(i); - QColor *ColorB = new QColor( 0, 0, 0 ); + TQColor *ColorB = new TQColor( 0, 0, 0 ); m_BackgroundColorConfig = m_config->readColorEntry("BackgroundColor", ColorB); m_BackgroundColorButton->setColor(m_BackgroundColorConfig); @@ -1126,11 +1126,11 @@ void KImg2mpgData::readSettings() void KImg2mpgData::RemoveTmpFiles(void) { - QDir tmpFolder(m_TmpFolderConfig); + TQDir tmpFolder(m_TmpFolderConfig); if (m_TmpFolderConfig.isEmpty() != true && tmpFolder.exists() == true) if (DeleteDir(m_TmpFolderConfig) == false) - KMessageBox::error(this, i18n("Cannot remove temporary folder %1!").arg(m_TmpFolderConfig)); + KMessageBox::error(this, i18n("Cannot remove temporary folder %1!").tqarg(m_TmpFolderConfig)); } @@ -1146,12 +1146,12 @@ void KImg2mpgData::addItems(const KURL::List& fileList) { KURL currentFile = *it; - QFileInfo fi(currentFile.path()); - QString Temp = fi.dirPath(); - QString albumName = Temp.section('/', -1); + TQFileInfo fi(currentFile.path()); + TQString Temp = fi.dirPath(); + TQString albumName = Temp.section('/', -1); KIPI::ImageInfo info = m_interface->info(currentFile); - QString comments = info.description(); + TQString comments = info.description(); ImageItem *item = new ImageItem( m_ImagesFilesListBox, currentFile.path().section('/', -1 ), // File name with extension. @@ -1172,11 +1172,11 @@ void KImg2mpgData::addItems(const KURL::List& fileList) ///////////////////////////////////////////////////////////////////////////////////////////////////// -bool KImg2mpgData::DeleteDir(QString dirname) +bool KImg2mpgData::DeleteDir(TQString dirname) { if ( !dirname.isEmpty() ) { - QDir dir; + TQDir dir; if (dir.exists ( dirname ) == true) { @@ -1198,14 +1198,14 @@ return true; ///////////////////////////////////////////////////////////////////////////////////////////////////// -bool KImg2mpgData::deldir(QString dirname) +bool KImg2mpgData::deldir(TQString dirname) { -QDir *dir = new QDir(dirname); -dir->setFilter ( QDir::Dirs | QDir::Files | QDir::NoSymLinks ); +TQDir *dir = new TQDir(dirname); +dir->setFilter ( TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks ); -const QFileInfoList* fileinfolist = dir->entryInfoList(); -QFileInfoListIterator it(*fileinfolist); -QFileInfo* fi; +const TQFileInfoList* fileinfolist = dir->entryInfoList(); +TQFileInfoListIterator it(*fileinfolist); +TQFileInfo* fi; while( (fi = it.current() ) ) { diff --git a/kipi-plugins/mpegencoder/kimg2mpg.h b/kipi-plugins/mpegencoder/kimg2mpg.h index 8d668f5..9868381 100644 --- a/kipi-plugins/mpegencoder/kimg2mpg.h +++ b/kipi-plugins/mpegencoder/kimg2mpg.h @@ -24,13 +24,13 @@ #ifndef KImg2mpgData_included #define KImg2mpgData_included -// Include files for Qt +// Include files for TQt -#include <qstring.h> -#include <qcolor.h> -#include <qtimer.h> -#include <qguardedptr.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqcolor.h> +#include <tqtimer.h> +#include <tqguardedptr.h> +#include <tqdatetime.h> // Include files for KDE @@ -49,14 +49,14 @@ #include "kimg2mpgbase.h" class KFileItem; -class QPushButton; -class QComboBox; -class QSpinBox; -class QGroupBox; -class QListBoxItem; -class QLabel; -class QWidget; -class QPixmap; +class TQPushButton; +class TQComboBox; +class TQSpinBox; +class TQGroupBox; +class TQListBoxItem; +class TQLabel; +class TQWidget; +class TQPixmap; class KConfig; class KProcess; @@ -77,32 +77,34 @@ class OptionsDialog; class ListImageItems : public KListBox { Q_OBJECT + TQ_OBJECT public: - ListImageItems(QWidget *parent=0, const char *name=0); + ListImageItems(TQWidget *tqparent=0, const char *name=0); signals: void addedDropItems(KURL::List filesUrl); protected: - void dragEnterEvent(QDragEnterEvent *e); - void dropEvent(QDropEvent *e); + void dragEnterEvent(TQDragEnterEvent *e); + void dropEvent(TQDropEvent *e); }; class KImg2mpgData : public KImg2mpgBase { Q_OBJECT + TQ_OBJECT public: - KImg2mpgData( KIPI::Interface* interface, QWidget* parent = 0, const char * name = 0 ); + KImg2mpgData( KIPI::Interface* interface, TQWidget* tqparent = 0, const char * name = 0 ); virtual ~KImg2mpgData(); void show(); void ShowNumberImages( int Number ); - void closeEvent(QCloseEvent*); - QPixmap LoadIcon( QString Name, int Group ); + void closeEvent(TQCloseEvent*); + TQPixmap LoadIcon( TQString Name, int Group ); void addItems(const KURL::List& fileList); void writeSettings(); void readSettings(); @@ -124,39 +126,39 @@ public slots: void slotOptions( void ); void slotClose( void ); void slotHelp( void ); - void slotImagesFilesSelected( QListBoxItem *item ); + void slotImagesFilesSelected( TQListBoxItem *item ); void SlotPortfolioDurationChanged ( int ); void slotOptionDlgOkClicked( void ); - void slotGotPreview(const KFileItem* , const QPixmap &pixmap); + void slotGotPreview(const KFileItem* , const TQPixmap &pixmap); void slotFailedPreview(const KFileItem*); void slotAddDropItems(KURL::List filesUrl); private: - QString m_VideoFormatConfig; - QString m_VideoTypeConfig; - QString m_ChromaConfig; - QString m_ImageDurationConfig; - QString m_TransitionSpeedConfig; - QString m_MPEGOutputFileConfig; - QString m_AudioInputFileConfig; - QString m_IMBinFolderConfig; - QString m_MJBinFolderConfig; - QString m_TmpFolderConfig; - QString m_NoneLabel; - QString m_EncodeString; - QString m_DebugOuputMessages; - QString m_CommandLine; - QString m_ImagesFilesSort; - - QColor m_BackgroundColorConfig; + TQString m_VideoFormatConfig; + TQString m_VideoTypeConfig; + TQString m_ChromaConfig; + TQString m_ImageDurationConfig; + TQString m_TransitionSpeedConfig; + TQString m_MPEGOutputFileConfig; + TQString m_AudioInputFileConfig; + TQString m_IMBinFolderConfig; + TQString m_MJBinFolderConfig; + TQString m_TmpFolderConfig; + TQString m_NoneLabel; + TQString m_EncodeString; + TQString m_DebugOuputMessages; + TQString m_CommandLine; + TQString m_ImagesFilesSort; + + TQColor m_BackgroundColorConfig; KConfig* m_config; KIO::PreviewJob* m_thumbJob; - QTime m_EncodingDuration; - QTime m_DurationTime; + TQTime m_EncodingDuration; + TQTime m_DurationTime; bool m_Abort; bool m_Encoding; @@ -174,8 +176,8 @@ private: class KShowDebuggingOutput* m_DebuggingDialog; void RemoveTmpFiles( void ); - bool DeleteDir(QString dirname); - bool deldir(QString dirname); + bool DeleteDir(TQString dirname); + bool deldir(TQString dirname); }; } // NameSpace KIPIMPEGEncoderPlugin diff --git a/kipi-plugins/mpegencoder/kimg2mpgbase.ui b/kipi-plugins/mpegencoder/kimg2mpgbase.ui index ef91f1b..4d1d23f 100644 --- a/kipi-plugins/mpegencoder/kimg2mpgbase.ui +++ b/kipi-plugins/mpegencoder/kimg2mpgbase.ui @@ -1,13 +1,13 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KIPIMPEGEncoderPlugin::KImg2mpgBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>Kimg2mpgBase</cstring> </property> <property name="enabled"> <bool>true</bool> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -23,13 +23,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -51,15 +51,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout26</cstring> + <cstring>tqlayout26</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -88,41 +88,41 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>5</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout29</cstring> + <cstring>tqlayout29</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> <property name="text"> <string>Video Format</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>XVCD</string> @@ -162,15 +162,15 @@ DVD is an experimental option.</string> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout30</cstring> + <cstring>tqlayout30</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -185,11 +185,11 @@ DVD is an experimental option.</string> <property name="text"> <string>Video Type</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>PAL</string> @@ -223,15 +223,15 @@ NTSC is an American TV standard; PAL/SECAM is European.</string> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout31</cstring> + <cstring>tqlayout31</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3_3</cstring> </property> @@ -246,11 +246,11 @@ NTSC is an American TV standard; PAL/SECAM is European.</string> <property name="text"> <string>Chroma Mode</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Default</string> @@ -301,7 +301,7 @@ Change it if you have problems with the default value.</string> <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>5</height> @@ -310,7 +310,7 @@ Change it if you have problems with the default value.</string> </spacer> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -339,49 +339,49 @@ Change it if you have problems with the default value.</string> <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>5</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout25</cstring> + <cstring>tqlayout25</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout33</cstring> + <cstring>tqlayout33</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> <property name="text"> <string>Image duration</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout32</cstring> + <cstring>tqlayout32</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_DurationImageSpinBox</cstring> </property> @@ -400,7 +400,7 @@ Change it if you have problems with the default value.</string> <b>Warning</b>: you may have some problems with your DVD player if the total MPEG duration is under 3 seconds.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -412,26 +412,26 @@ Change it if you have problems with the default value.</string> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout44</cstring> + <cstring>tqlayout44</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Transition speed</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>none</string> @@ -486,22 +486,22 @@ Change it if you have problems with the default value.</string> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout45</cstring> + <cstring>tqlayout45</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> <property name="text"> <string>Background color</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> @@ -540,7 +540,7 @@ Black is a good value for this.</string> <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>5</height> @@ -551,7 +551,7 @@ Black is a good value for this.</string> </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_ImagesFilesGroup</cstring> </property> @@ -565,9 +565,9 @@ Black is a good value for this.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <vbox> <property name="name"> @@ -591,7 +591,7 @@ The portfolio's first image is on the top; the last image is on the bottom. If you want to add some images, click on the 'Add' button or use the drag-and-drop.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_label6</cstring> </property> @@ -622,14 +622,14 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_ImagesFilesButtonBox</cstring> </property> @@ -637,7 +637,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_ImagesFilesButtonAdd</cstring> </property> @@ -649,7 +649,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -662,7 +662,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Add some image files to the portfolio list.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_ImagesFilesButtonDelete</cstring> </property> @@ -674,7 +674,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -687,7 +687,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Remove some image files from the portfolio list.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_ImagesFilesButtonUp</cstring> </property> @@ -699,7 +699,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -712,7 +712,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Moving the current image up on the portfolio list.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_ImagesFilesButtonDown</cstring> </property> @@ -724,7 +724,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -749,22 +749,22 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_ImageLabel</cstring> </property> @@ -776,7 +776,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>128</width> <height>128</height> @@ -788,14 +788,14 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="scaledContents"> <bool>false</bool> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="whatsThis" stdset="0"> <string>Preview the currently selected image.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_label7</cstring> </property> @@ -818,23 +818,23 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout28</cstring> + <cstring>tqlayout28</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout27</cstring> + <cstring>tqlayout27</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_MPEGOutputFilename</cstring> </property> @@ -846,13 +846,13 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -893,14 +893,14 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_MPEGOutputBUTTONFilename</cstring> </property> @@ -912,7 +912,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>22</width> <height>22</height> @@ -932,7 +932,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -941,7 +941,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </spacer> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_AudioInputFilename</cstring> </property> @@ -953,13 +953,13 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -1001,14 +1001,14 @@ This audio file name will be multiplexed with the portfolio video. <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_AudioInputBUTTONFilename</cstring> </property> @@ -1020,7 +1020,7 @@ This audio file name will be multiplexed with the portfolio video. <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>22</width> <height>22</height> @@ -1040,7 +1040,7 @@ This audio file name will be multiplexed with the portfolio video. <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -1049,7 +1049,7 @@ This audio file name will be multiplexed with the portfolio video. </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_frame</cstring> </property> @@ -1061,13 +1061,13 @@ This audio file name will be multiplexed with the portfolio video. <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>50</width> <height>25</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>30</height> @@ -1098,13 +1098,13 @@ This audio file name will be multiplexed with the portfolio video. <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>27</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>30</height> @@ -1126,22 +1126,22 @@ This audio file name will be multiplexed with the portfolio video. <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_Encodebutton</cstring> </property> @@ -1171,14 +1171,14 @@ The program uses the 'images2mpg' bash script.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>51</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_optionsbutton</cstring> </property> @@ -1190,7 +1190,7 @@ The program uses the 'images2mpg' bash script.</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>62</width> <height>0</height> @@ -1210,14 +1210,14 @@ The program uses the 'images2mpg' bash script.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>51</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_helpButton</cstring> </property> @@ -1233,7 +1233,7 @@ The program uses the 'images2mpg' bash script.</string> <string>&Help</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_quitbutton</cstring> </property> @@ -1296,7 +1296,7 @@ The program uses the 'images2mpg' bash script.</string> <include location="global" impldecl="in implementation">kio/previewjob.h</include> <include location="global" impldecl="in implementation">klistbox.h</include> </includes> -<slots> +<Q_SLOTS> <slot specifier="non virtual">reset()</slot> <slot specifier="non virtual">readStderr( KProcess * proc, char * buffer, int buflen )</slot> <slot specifier="non virtual">EncodeDone( KProcess * )</slot> @@ -1310,14 +1310,14 @@ The program uses the 'images2mpg' bash script.</string> <slot specifier="non virtual">slotOptions( void )</slot> <slot specifier="non virtual">slotClose( void )</slot> <slot specifier="non virtual">slotHelp( void )</slot> - <slot specifier="non virtual">slotImagesFilesSelected( QListBoxItem * item )</slot> + <slot specifier="non virtual">slotImagesFilesSelected( TQListBoxItem * item )</slot> <slot specifier="non virtual">SlotPortfolioDurationChanged( int )</slot> <slot specifier="non virtual">slotOptionDlgOkClicked( void )</slot> <slot specifier="non virtual">slotGotPreview( const KFileItem *, const QPixmap & pixmap )</slot> <slot specifier="non virtual">slotFailedPreview( const KFileItem * )</slot> <slot specifier="non virtual">slotAddDropItems( KURL::List filesUrl )</slot> <slot>m_AudioInputFilename_toggled( bool )</slot> -</slots> +</Q_SLOTS> <functions> <function access="protected" specifier="non virtual">RemoveTmpFiles( void )</function> <function access="protected" specifier="non virtual" returnType="bool">DeleteDir( QString dirname )</function> @@ -1325,12 +1325,12 @@ The program uses the 'images2mpg' bash script.</string> <function specifier="non virtual">show()</function> <function specifier="non virtual">ShowNumberImages( int Number )</function> <function specifier="non virtual">closeEvent( QCloseEvent * )</function> - <function specifier="non virtual" returnType="QPixmap">LoadIcon( QString Name, int Group )</function> + <function specifier="non virtual" returnType="TQPixmap">LoadIcon( QString Name, int Group )</function> <function specifier="non virtual">addItems( const KURL::List & fileList )</function> <function specifier="non virtual">writeSettings()</function> <function specifier="non virtual">readSettings()</function> </functions> -<layoutdefaults spacing="6" margin="6"/> +<tqlayoutdefaults spacing="6" margin="6"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kimg2mpg.h</includehint> diff --git a/kipi-plugins/mpegencoder/kshowdebuggingoutput.cpp b/kipi-plugins/mpegencoder/kshowdebuggingoutput.cpp index b492f57..cd343d0 100644 --- a/kipi-plugins/mpegencoder/kshowdebuggingoutput.cpp +++ b/kipi-plugins/mpegencoder/kshowdebuggingoutput.cpp @@ -29,15 +29,15 @@ namespace KIPIMPEGEncoderPlugin ///////////////////////////////////////////////////////////////////////////////////////////// -KShowDebuggingOutput::KShowDebuggingOutput(QString Messages, QString Header, QString Foot, QWidget* parent ) - : KDialog( parent, "debugViewDialog", true ) +KShowDebuggingOutput::KShowDebuggingOutput(TQString Messages, TQString Header, TQString Foot, TQWidget* tqparent ) + : KDialog( tqparent, "debugViewDialog", true ) { setCaption( i18n("Debugging Output") ); - okButton = new QPushButton( i18n("&OK"), this ); - ClipBoardCopy = new QPushButton( i18n("Copy to Clip&board"), this ); - debugView = new QTextView( this ); - grid = new QGridLayout( this ); + okButton = new TQPushButton( i18n("&OK"), this ); + ClipBoardCopy = new TQPushButton( i18n("Copy to Clip&board"), this ); + debugView = new TQTextView( this ); + grid = new TQGridLayout( this ); grid->addMultiCellWidget( debugView, 0, 0, 0, 2 ); grid->addWidget( okButton, 1, 1 ); @@ -46,8 +46,8 @@ KShowDebuggingOutput::KShowDebuggingOutput(QString Messages, QString Header, QSt grid->setMargin( marginHint() ); grid->setColStretch( 0, 1 ); - connect( okButton, SIGNAL(pressed()), this, SLOT(accept()) ); - connect( ClipBoardCopy, SIGNAL(pressed()), this, SLOT(slotCopyToCliboard()) ); + connect( okButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(accept()) ); + connect( ClipBoardCopy, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotCopyToCliboard()) ); // add the debugging output diff --git a/kipi-plugins/mpegencoder/kshowdebuggingoutput.h b/kipi-plugins/mpegencoder/kshowdebuggingoutput.h index eecb0f0..60a2433 100644 --- a/kipi-plugins/mpegencoder/kshowdebuggingoutput.h +++ b/kipi-plugins/mpegencoder/kshowdebuggingoutput.h @@ -24,11 +24,11 @@ #ifndef KShowDebuggingOutput_included #define KShowDebuggingOutput_included -// Qt includes +// TQt includes -#include <qpushbutton.h> -#include <qtextview.h> -#include <qlayout.h> +#include <tqpushbutton.h> +#include <tqtextview.h> +#include <tqlayout.h> // KDElib includes @@ -41,19 +41,20 @@ namespace KIPIMPEGEncoderPlugin class KShowDebuggingOutput : public KDialog { Q_OBJECT + TQ_OBJECT public: - KShowDebuggingOutput( QString Messages, QString Header, QString Foot, QWidget* parent ); + KShowDebuggingOutput( TQString Messages, TQString Header, TQString Foot, TQWidget* tqparent ); ~KShowDebuggingOutput(); public slots: void slotCopyToCliboard( void ); private: - QPushButton* okButton; - QPushButton* ClipBoardCopy; - QTextView* debugView; - QGridLayout* grid; + TQPushButton* okButton; + TQPushButton* ClipBoardCopy; + TQTextView* debugView; + TQGridLayout* grid; }; } // NameSpace KIPIMPEGEncoderPlugin diff --git a/kipi-plugins/mpegencoder/optionsdialog.cpp b/kipi-plugins/mpegencoder/optionsdialog.cpp index 615c321..fe7ef1d 100644 --- a/kipi-plugins/mpegencoder/optionsdialog.cpp +++ b/kipi-plugins/mpegencoder/optionsdialog.cpp @@ -20,15 +20,15 @@ // ////////////////////////////////////////////////////////////////////////////// -// Include files for Qt +// Include files for TQt -#include <qvbox.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qstring.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqstring.h> // Include files for KDE @@ -47,39 +47,39 @@ namespace KIPIMPEGEncoderPlugin ////////////////////////////////// CONSTRUCTOR ////////////////////////////////////////////// -OptionsDialog::OptionsDialog(QWidget *parent) - : KDialogBase( parent, "MPEGEncoderOptionsDialog", true, +OptionsDialog::OptionsDialog(TQWidget *tqparent) + : KDialogBase( tqparent, "MPEGEncoderOptionsDialog", true, i18n("MPEG Encoder Plugin Settings"), Ok|Cancel, Ok, false) { - Icons = new KIconLoader( QString( "MenuDlg" ) ); + Icons = new KIconLoader( TQString( "MenuDlg" ) ); - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout* vbox = new QVBoxLayout (box, 10); - QHBoxLayout* h1 = new QHBoxLayout( vbox ); - QVBoxLayout* v1 = new QVBoxLayout( h1 ); + TQVBoxLayout* vbox = new TQVBoxLayout (box, 10); + TQHBoxLayout* h1 = new TQHBoxLayout( vbox ); + TQVBoxLayout* v1 = new TQVBoxLayout( h1 ); h1->addSpacing( 5 ); - QGridLayout* g1 = new QGridLayout( v1, 3, 3 ); + TQGridLayout* g1 = new TQGridLayout( v1, 3, 3 ); // ImageMagick binary programs folder - QGroupBox* IMBinFolderGroup = new QGroupBox( 3, Qt::Horizontal, i18n( "ImageMagick Binary Programs Path" ), box); - g1->addWidget( IMBinFolderGroup, 1, 1, Qt::AlignLeft); + TQGroupBox* IMBinFolderGroup = new TQGroupBox( 3, Qt::Horizontal, i18n( "ImageMagick Binary Programs Path" ), box); + g1->addWidget( IMBinFolderGroup, 1, 1, TQt::AlignLeft); IMBinFolderEditFilename = new KLineEdit( IMBinFolderGroup ); IMBinFolderEditFilename->setMinimumWidth( 300 ); - QPushButton* IMBinFolderButtonFilename = new QPushButton( IMBinFolderGroup ); - IMBinFolderButtonFilename->setPixmap( LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) ); - connect( IMBinFolderButtonFilename, SIGNAL( clicked() ), this, SLOT( slotIMBinFolderFilenameDialog())); + TQPushButton* IMBinFolderButtonFilename = new TQPushButton( IMBinFolderGroup ); + IMBinFolderButtonFilename->setPixmap( LoadIcon( TQString( "fileopen" ), KIcon::Toolbar ) ); + connect( IMBinFolderButtonFilename, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotIMBinFolderFilenameDialog())); // MjpegTools binary programs folder - QGroupBox* MJBinFolderGroup = new QGroupBox( 3, Qt::Horizontal, i18n( "MjpegTools Binary Programs Path" ), box); - g1->addWidget( MJBinFolderGroup, 2, 1, Qt::AlignLeft); + TQGroupBox* MJBinFolderGroup = new TQGroupBox( 3, Qt::Horizontal, i18n( "MjpegTools Binary Programs Path" ), box); + g1->addWidget( MJBinFolderGroup, 2, 1, TQt::AlignLeft); MJBinFolderEditFilename = new KLineEdit( MJBinFolderGroup ); MJBinFolderEditFilename->setMinimumWidth( 300 ); - QPushButton* MJBinFolderButtonFilename = new QPushButton( MJBinFolderGroup ); - MJBinFolderButtonFilename->setPixmap( LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) ); - connect( MJBinFolderButtonFilename, SIGNAL( clicked() ), this, SLOT( slotMJBinFolderFilenameDialog())); + TQPushButton* MJBinFolderButtonFilename = new TQPushButton( MJBinFolderGroup ); + MJBinFolderButtonFilename->setPixmap( LoadIcon( TQString( "fileopen" ), KIcon::Toolbar ) ); + connect( MJBinFolderButtonFilename, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMJBinFolderFilenameDialog())); } @@ -92,7 +92,7 @@ OptionsDialog::~OptionsDialog() //////////////////////////////////// FONCTIONS ////////////////////////////////////////////// -QPixmap OptionsDialog::LoadIcon( QString Name, int Group ) +TQPixmap OptionsDialog::LoadIcon( TQString Name, int Group ) { return Icons->loadIcon( Name, (KIcon::Group)Group ); } @@ -102,7 +102,7 @@ QPixmap OptionsDialog::LoadIcon( QString Name, int Group ) void OptionsDialog::slotIMBinFolderFilenameDialog( void ) { - QString temp; + TQString temp; temp = KFileDialog::getExistingDirectory(IMBinFolderEditFilename->text(), this, @@ -117,7 +117,7 @@ void OptionsDialog::slotIMBinFolderFilenameDialog( void ) void OptionsDialog::slotMJBinFolderFilenameDialog( void ) { - QString temp; + TQString temp; temp = KFileDialog::getExistingDirectory(MJBinFolderEditFilename->text(), this, diff --git a/kipi-plugins/mpegencoder/optionsdialog.h b/kipi-plugins/mpegencoder/optionsdialog.h index e5a1f92..b107576 100644 --- a/kipi-plugins/mpegencoder/optionsdialog.h +++ b/kipi-plugins/mpegencoder/optionsdialog.h @@ -24,9 +24,9 @@ #ifndef OptionsDialog_H #define OptionsDialog_H -// Qt includes. +// TQt includes. -#include <qpixmap.h> +#include <tqpixmap.h> // KDE includes. @@ -41,9 +41,10 @@ namespace KIPIMPEGEncoderPlugin class OptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - OptionsDialog(QWidget *parent=0); + OptionsDialog(TQWidget *tqparent=0); ~OptionsDialog(); KLineEdit* IMBinFolderEditFilename; @@ -55,7 +56,7 @@ Q_OBJECT private: KIconLoader* Icons; - QPixmap LoadIcon( QString Name, int Group ); + TQPixmap LoadIcon( TQString Name, int Group ); }; } // NameSpace KIPIMPEGEncoderPlugin diff --git a/kipi-plugins/mpegencoder/plugin_mpegencoder.cpp b/kipi-plugins/mpegencoder/plugin_mpegencoder.cpp index 101df43..f8e438a 100644 --- a/kipi-plugins/mpegencoder/plugin_mpegencoder.cpp +++ b/kipi-plugins/mpegencoder/plugin_mpegencoder.cpp @@ -21,10 +21,10 @@ * * ============================================================ */ -// Include files for Qt +// Include files for TQt -#include <qpushbutton.h> -#include <qgroupbox.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> // Include files for KDE @@ -49,13 +49,13 @@ typedef KGenericFactory<Plugin_Mpegencoder> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_mpegencoder, Factory("kipiplugin_mpegencoder")) -Plugin_Mpegencoder::Plugin_Mpegencoder(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "MPEGEncoder") +Plugin_Mpegencoder::Plugin_Mpegencoder(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "MPEGEncoder") { kdDebug( 51001 ) << "Plugin_Mpegencoder plugin loaded" << endl; } -void Plugin_Mpegencoder::setup( QWidget* widget ) +void Plugin_Mpegencoder::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -63,7 +63,7 @@ void Plugin_Mpegencoder::setup( QWidget* widget ) "video", 0, this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "mpeg_encoder"); @@ -76,7 +76,7 @@ Plugin_Mpegencoder::~Plugin_Mpegencoder() void Plugin_Mpegencoder::slotActivate() { - KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( parent() ); + KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( tqparent() ); if ( !interface ) { @@ -85,7 +85,7 @@ void Plugin_Mpegencoder::slotActivate() } KIPIMPEGEncoderPlugin::KImg2mpgData *MPEGconverterDialog = - new KIPIMPEGEncoderPlugin::KImg2mpgData( interface, kapp->activeWindow() ); + new KIPIMPEGEncoderPlugin::KImg2mpgData( interface, TQT_TQWIDGET(kapp->activeWindow()) ); KIPIMPEGEncoderPlugin::CheckBinProg* CheckExternalPrograms = new KIPIMPEGEncoderPlugin::CheckBinProg(this); diff --git a/kipi-plugins/mpegencoder/plugin_mpegencoder.h b/kipi-plugins/mpegencoder/plugin_mpegencoder.h index fcd5d4f..0b8a5cf 100644 --- a/kipi-plugins/mpegencoder/plugin_mpegencoder.h +++ b/kipi-plugins/mpegencoder/plugin_mpegencoder.h @@ -31,13 +31,14 @@ class KAction; class Plugin_Mpegencoder : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_Mpegencoder(QObject *parent, const char* name, const QStringList &args); + Plugin_Mpegencoder(TQObject *tqparent, const char* name, const TQStringList &args); virtual ~Plugin_Mpegencoder(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); public slots: diff --git a/kipi-plugins/picasawebexport/PicasawebNewAlbumDialog.ui b/kipi-plugins/picasawebexport/PicasawebNewAlbumDialog.ui index 6de4039..13cbfd3 100644 --- a/kipi-plugins/picasawebexport/PicasawebNewAlbumDialog.ui +++ b/kipi-plugins/picasawebexport/PicasawebNewAlbumDialog.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KIPIPicasawebExportPlugin::NewAlbumDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>NewAlbumDialog</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -15,11 +15,11 @@ <property name="caption"> <string>New Album Dialog</string> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>30</x> <y>20</y> @@ -31,11 +31,11 @@ <string>Title</string> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_accessRadioButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>160</x> <y>220</y> @@ -46,11 +46,11 @@ <property name="title"> <string>Access Level</string> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_isUnlistedRadioButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>40</y> @@ -62,11 +62,11 @@ <string>Unlisted </string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_isPublicRadioButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>20</y> @@ -79,11 +79,11 @@ </property> </widget> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_cancelButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>400</x> <y>300</y> @@ -95,11 +95,11 @@ <string>Cancel</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>30</x> <y>50</y> @@ -111,11 +111,11 @@ <string>Date</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>30</x> <y>90</y> @@ -127,11 +127,11 @@ <string>Description</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>30</x> <y>200</y> @@ -143,11 +143,11 @@ <string>Place Taken</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_titleLineEdit</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>160</x> <y>20</y> @@ -156,11 +156,11 @@ </rect> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_locationLineEdit</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>160</x> <y>200</y> @@ -169,11 +169,11 @@ </rect> </property> </widget> - <widget class="QDateTimeEdit"> + <widget class="TQDateTimeEdit"> <property name="name"> <cstring>m_dateAndTimeEdit</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>160</x> <y>50</y> @@ -182,11 +182,11 @@ </rect> </property> </widget> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>m_descriptionTextBox</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>160</x> <y>90</y> @@ -195,11 +195,11 @@ </rect> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_createAlbumButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>290</x> <y>300</y> @@ -229,9 +229,9 @@ <includes> <include location="local" impldecl="in implementation">PicasawebNewAlbumDialog.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot access="protected" specifier="non virtual">creatAlbumSlot()</slot> <slot access="protected" specifier="non virtual">cancelWindowSlot()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kipi-plugins/picasawebexport/mpform.cpp b/kipi-plugins/picasawebexport/mpform.cpp index 4730bec..3fdeac6 100644 --- a/kipi-plugins/picasawebexport/mpform.cpp +++ b/kipi-plugins/picasawebexport/mpform.cpp @@ -26,11 +26,11 @@ #include <cstring> #include <cstdio> -// Qt includes. +// TQt includes. -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> // KDE includes. @@ -63,20 +63,20 @@ void MPForm::reset() void MPForm::finish() { - QCString str; + TQCString str; str += "--"; str += m_boundary; str += "--"; - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << str; } -bool MPForm::addPair(const QString& name, const QString& value, const QString& contentType) +bool MPForm::addPair(const TQString& name, const TQString& value, const TQString& contentType) { - QCString str; - QString content_length = QString("%1").arg(value.length()); + TQCString str; + TQString content_length = TQString("%1").tqarg(value.length()); str += "--"; str += m_boundary; str += "\r\n"; @@ -90,7 +90,7 @@ bool MPForm::addPair(const QString& name, const QString& value, const QString& c if (!contentType.isEmpty()) { - str += "Content-Type: "+ QCString(contentType.ascii()); + str += "Content-Type: "+ TQCString(contentType.ascii()); str += "\r\n"; str += "Mime-version: 1.0 "; str += "\r\n"; @@ -106,17 +106,17 @@ bool MPForm::addPair(const QString& name, const QString& value, const QString& c //m_buffer.resize(oldSize + str.size()); //memcpy(m_buffer.data() + oldSize, str.data(), str.size()); - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); - ts << QString::fromUtf8(str); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); + ts << TQString::fromUtf8(str); return true; } -bool MPForm::addFile(const QString& name,const QString& path) +bool MPForm::addFile(const TQString& name,const TQString& path) { KMimeType::Ptr ptr = KMimeType::findByURL(path); - QString mime = ptr->name(); + TQString mime = ptr->name(); if (mime.isEmpty()) { // if we ourselves can't determine the mime of the local file, @@ -124,14 +124,14 @@ bool MPForm::addFile(const QString& name,const QString& path) return false; } - QFile imageFile(path); + TQFile imageFile(path); if (!imageFile.open(IO_ReadOnly)) return false; - QByteArray imageData = imageFile.readAll(); + TQByteArray imageData = imageFile.readAll(); - QCString str; - QString file_size = QString("%1").arg(imageFile.size()); + TQCString str; + TQString file_size = TQString("%1").tqarg(imageFile.size()); str += "--"; str += m_boundary; @@ -140,7 +140,7 @@ bool MPForm::addFile(const QString& name,const QString& path) str += name.ascii(); str += "\"; "; str += "filename=\""; - str += QFile::encodeName(KURL(path).filename()); + str += TQFile::encodeName(KURL(path).filename()); str += "\"\r\n"; str += "Content-Length: " ; str += file_size.ascii(); @@ -150,8 +150,8 @@ bool MPForm::addFile(const QString& name,const QString& path) str += "\r\n\r\n"; imageFile.close(); - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << str; int oldSize = m_buffer.size(); @@ -163,17 +163,17 @@ bool MPForm::addFile(const QString& name,const QString& path) return true; } -QString MPForm::contentType() const +TQString MPForm::contentType() const { - return QString("Content-Type: multipart/related; boundary=" + m_boundary); + return TQString("Content-Type: multipart/related; boundary=" + m_boundary); } -QString MPForm::boundary() const +TQString MPForm::boundary() const { return m_boundary; } -QByteArray MPForm::formData() const +TQByteArray MPForm::formData() const { return m_buffer; } diff --git a/kipi-plugins/picasawebexport/mpform.h b/kipi-plugins/picasawebexport/mpform.h index edfa558..28586aa 100644 --- a/kipi-plugins/picasawebexport/mpform.h +++ b/kipi-plugins/picasawebexport/mpform.h @@ -24,10 +24,10 @@ #ifndef MPFORM_H #define MPFORM_H -// Qt includes +// TQt includes -#include <qcstring.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqstring.h> namespace KIPIPicasawebExportPlugin { @@ -43,17 +43,17 @@ public: void finish(); void reset(); - bool addPair(const QString& name, const QString& value, const QString& contentType=QString()); - bool addFile(const QString& name, const QString& path); + bool addPair(const TQString& name, const TQString& value, const TQString& contentType=TQString()); + bool addFile(const TQString& name, const TQString& path); - QString contentType() const; - QByteArray formData() const; - QString boundary() const; + TQString contentType() const; + TQByteArray formData() const; + TQString boundary() const; private: - QByteArray m_buffer; - QCString m_boundary; + TQByteArray m_buffer; + TQCString m_boundary; }; } // namespace KIPIPicasawebExportPlugin diff --git a/kipi-plugins/picasawebexport/picasawebitem.h b/kipi-plugins/picasawebexport/picasawebitem.h index 2984053..c89bb5d 100644 --- a/kipi-plugins/picasawebexport/picasawebitem.h +++ b/kipi-plugins/picasawebexport/picasawebitem.h @@ -23,9 +23,9 @@ #ifndef PICASAWEBITEM_H #define PICASAWEBITEM_H -// Qt includes. +// TQt includes. -#include <qstring.h> +#include <tqstring.h> namespace KIPIPicasawebExportPlugin { @@ -46,9 +46,9 @@ public: int ref_num; - QStrList tags; - QString title; - QString description; + TQStrList tags; + TQString title; + TQString description; }; // ------------------------------------------------------ @@ -69,9 +69,9 @@ public: bool is_friend; bool is_family; - QString title; - QString description; - QStringList tags; + TQString title; + TQString description; + TQStringList tags; }; // ------------------------------------------------------ @@ -84,7 +84,7 @@ public: GAlbum() { ref_num = -1; - parent_ref_num = -1; + tqparent_ref_num = -1; add = false; write = false; @@ -94,7 +94,7 @@ public: } int ref_num; - int parent_ref_num; + int tqparent_ref_num; bool add; bool write; @@ -102,11 +102,11 @@ public: bool del_alb; bool create_sub; - QString name; - QString parentName; - QString title; - QString summary; - QString baseurl; + TQString name; + TQString tqparentName; + TQString title; + TQString summary; + TQString baseurl; }; // ------------------------------------------------------ @@ -121,13 +121,13 @@ public: id="-1"; } - QString id; - QString primary; //="2483" - QString secret; //="abcdef" - QString server; - QString photos; - QString title; - QString description; + TQString id; + TQString primary; //="2483" + TQString secret; //="abcdef" + TQString server; + TQString photos; + TQString title; + TQString description; }; } // namespace KIPIPicasawebExportPlugin diff --git a/kipi-plugins/picasawebexport/picasaweblogin.cpp b/kipi-plugins/picasawebexport/picasaweblogin.cpp index cb65ec6..2d6a275 100644 --- a/kipi-plugins/picasawebexport/picasaweblogin.cpp +++ b/kipi-plugins/picasawebexport/picasaweblogin.cpp @@ -20,13 +20,13 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qlabel.h> -#include <qframe.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqlayout.h> // KDE includes. @@ -41,62 +41,62 @@ namespace KIPIPicasawebExportPlugin { -PicasawebLogin::PicasawebLogin(QWidget* parent, const QString& header, - const QString& _name, const QString& _passwd) - : QDialog(parent) +PicasawebLogin::PicasawebLogin(TQWidget* tqparent, const TQString& header, + const TQString& _name, const TQString& _passwd) + : TQDialog(tqparent) { setSizeGripEnabled(false); - QVBoxLayout* vbox = new QVBoxLayout( this, 5, 5, "vbox"); + TQVBoxLayout* vbox = new TQVBoxLayout( this, 5, 5, "vbox"); - m_headerLabel = new QLabel(this); - m_headerLabel->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, - QSizePolicy::Fixed)); + m_headerLabel = new TQLabel(this); + m_headerLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, + TQSizePolicy::Fixed)); m_headerLabel->setText(header); vbox->addWidget( m_headerLabel ); - QFrame* hline = new QFrame( this, "hline" ); - hline->setFrameShape( QFrame::HLine ); - hline->setFrameShadow( QFrame::Sunken ); - hline->setFrameShape( QFrame::HLine ); + TQFrame* hline = new TQFrame( this, "hline" ); + hline->setFrameShape( TQFrame::HLine ); + hline->setFrameShadow( TQFrame::Sunken ); + hline->setFrameShape( TQFrame::HLine ); vbox->addWidget( hline ); - QGridLayout* centerLayout = new QGridLayout(0, 1, 1, 5, 5); + TQGridLayout* centerLayout = new TQGridLayout(0, 1, 1, 5, 5); - m_nameEdit = new QLineEdit( this ); + m_nameEdit = new TQLineEdit( this ); centerLayout->addWidget(m_nameEdit, 0, 1); - m_passwdEdit = new QLineEdit( this ); - m_passwdEdit->setEchoMode(QLineEdit::Password); + m_passwdEdit = new TQLineEdit( this ); + m_passwdEdit->setEchoMode(TQLineEdit::Password); centerLayout->addWidget(m_passwdEdit, 1, 1); - QLabel* nameLabel = new QLabel(this); + TQLabel* nameLabel = new TQLabel(this); nameLabel->setText(i18n( "Username:" )); centerLayout->addWidget(nameLabel, 0, 0); - QLabel* passwdLabel = new QLabel(this); + TQLabel* passwdLabel = new TQLabel(this); passwdLabel->setText(i18n( "Password:" )); centerLayout->addWidget(passwdLabel, 1, 0); vbox->addLayout( centerLayout ); - QHBoxLayout* btnLayout = new QHBoxLayout(0, 0, 5); - btnLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, - QSizePolicy::Minimum ) ); + TQHBoxLayout* btnLayout = new TQHBoxLayout(0, 0, 5); + btnLayout->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, + TQSizePolicy::Minimum ) ); - QPushButton *okBtn = new QPushButton( this ); + TQPushButton *okBtn = new TQPushButton( this ); okBtn->setAutoDefault( true ); okBtn->setDefault( true ); okBtn->setText( i18n( "&OK" ) ); btnLayout->addWidget( okBtn ); - QPushButton *cancelBtn = new QPushButton( this ); + TQPushButton *cancelBtn = new TQPushButton( this ); cancelBtn->setText( i18n( "&Cancel" ) ); btnLayout->addWidget( cancelBtn ); vbox->addLayout( btnLayout ); - resize( QSize(300, 150).expandedTo(minimumSizeHint()) ); + resize( TQSize(300, 150).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); m_nameEdit->setText(_name); @@ -104,40 +104,40 @@ PicasawebLogin::PicasawebLogin(QWidget* parent, const QString& header, // signals and slots connections - connect(okBtn, SIGNAL(clicked()), - this, SLOT(accept())); + connect(okBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(accept())); - connect(cancelBtn, SIGNAL(clicked()), - this, SLOT(reject())); + connect(cancelBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(reject())); } PicasawebLogin::~PicasawebLogin() { } -QString PicasawebLogin::name() const +TQString PicasawebLogin::name() const { return m_nameEdit->text(); } -QString PicasawebLogin::password() const +TQString PicasawebLogin::password() const { return m_passwdEdit->text(); } -QString PicasawebLogin::username() const +TQString PicasawebLogin::username() const { return m_nameEdit->text(); } -void PicasawebLogin::setUsername(const QString& username) +void PicasawebLogin::setUsername(const TQString& username) { kdDebug()<<" The username passed to me is "<<username <<endl; m_nameEdit->setText(username); kdDebug()<<" The username passed to me is "<<username <<endl; } -void PicasawebLogin::setPassword(const QString& password) +void PicasawebLogin::setPassword(const TQString& password) { m_passwdEdit->setText(password); } diff --git a/kipi-plugins/picasawebexport/picasaweblogin.h b/kipi-plugins/picasawebexport/picasaweblogin.h index f689773..69e0f37 100644 --- a/kipi-plugins/picasawebexport/picasaweblogin.h +++ b/kipi-plugins/picasawebexport/picasaweblogin.h @@ -23,37 +23,38 @@ #ifndef PICASAWEBLOGIN_H #define PICASAWEBLOGIN_H -// Qt includes. +// TQt includes. -#include <qdialog.h> +#include <tqdialog.h> -class QLabel; -class QLineEdit; +class TQLabel; +class TQLineEdit; namespace KIPIPicasawebExportPlugin { -class PicasawebLogin : public QDialog +class PicasawebLogin : public TQDialog { Q_OBJECT + TQ_OBJECT public: - PicasawebLogin(QWidget* parent, const QString& header, const QString& _name=QString(), - const QString& _passwd=QString()); + PicasawebLogin(TQWidget* tqparent, const TQString& header, const TQString& _name=TQString(), + const TQString& _passwd=TQString()); ~PicasawebLogin(); - QString name() const; - QString password() const; - QString username() const; - void setUsername(const QString&); - void setPassword(const QString&); + TQString name() const; + TQString password() const; + TQString username() const; + void setUsername(const TQString&); + void setPassword(const TQString&); private: - QLabel* m_headerLabel; - QLineEdit* m_nameEdit; - QLineEdit* m_passwdEdit; + TQLabel* m_headerLabel; + TQLineEdit* m_nameEdit; + TQLineEdit* m_passwdEdit; }; } // namespace KIPIPicasawebExportPlugin diff --git a/kipi-plugins/picasawebexport/picasawebtalker.cpp b/kipi-plugins/picasawebexport/picasawebtalker.cpp index 693b81e..bc9afd6 100644 --- a/kipi-plugins/picasawebexport/picasawebtalker.cpp +++ b/kipi-plugins/picasawebexport/picasawebtalker.cpp @@ -28,18 +28,18 @@ #include <cstdlib> #include <string> -// Qt includes. - -#include <qcstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qimage.h> -#include <qstringlist.h> -#include <qurl.h> -#include <qlineedit.h> -#include <qmessagebox.h> -#include <qdom.h> +// TQt includes. + +#include <tqcstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqimage.h> +#include <tqstringlist.h> +#include <tqurl.h> +#include <tqlineedit.h> +#include <tqmessagebox.h> +#include <tqdom.h> // KDE includes. @@ -82,16 +82,16 @@ class PicasawebLogin; namespace KIPIPicasawebExportPlugin { -PicasawebTalker::PicasawebTalker( QWidget* parent ) - : m_parent( parent ), m_job( 0 ) +PicasawebTalker::PicasawebTalker( TQWidget* tqparent ) + : m_parent( tqparent ), m_job( 0 ) { m_apikey="49d585bafa0758cb5c58ab67198bf632"; m_secret="34b39925e6273ffd"; - connect(this, SIGNAL(signalError(const QString&)), - this, SLOT(slotError(const QString&))); + connect(this, TQT_SIGNAL(signalError(const TQString&)), + this, TQT_SLOT(slotError(const TQString&))); - authProgressDlg=new QProgressDialog(); + authProgressDlg=new TQProgressDialog(); } PicasawebTalker::~PicasawebTalker() @@ -100,25 +100,25 @@ PicasawebTalker::~PicasawebTalker() m_job->kill(); } -QString PicasawebTalker::getApiSig(QString secret, QStringList headers) +TQString PicasawebTalker::getApiSig(TQString secret, TQStringList headers) { - QStringList compressed ;//= new List<string>(headers.Length); + TQStringList compressed ;//= new List<string>(headers.Length); - for ( QStringList::Iterator it = headers.begin(); it != headers.end(); ++it ) { - QStringList str=QStringList::split("=",(*it)); + for ( TQStringList::Iterator it = headers.begin(); it != headers.end(); ++it ) { + TQStringList str=TQStringList::split("=",(*it)); compressed.append(str[0].stripWhiteSpace()+str[1].stripWhiteSpace()); } compressed.sort(); - QString merged=compressed.join(""); - QString final = secret + merged; + TQString merged=compressed.join(""); + TQString final = secret + merged; const char *test=final.ascii(); KMD5 context (test); //kdDebug()<< "Test Hex Digest output: " << context.hexDigest().data() << endl; return context.hexDigest().data(); } -void PicasawebTalker::getToken(const QString& username, const QString& password ) +void PicasawebTalker::getToken(const TQString& username, const TQString& password ) { if (m_job) { @@ -126,9 +126,9 @@ void PicasawebTalker::getToken(const QString& username, const QString& password m_job = 0; } - QString url = "https://www.google.com/accounts/ClientLogin"; + TQString url = "https://www.google.com/accounts/ClientLogin"; - PicasawebLogin *loginDialog = new PicasawebLogin(kapp->activeWindow(), QString("LoginWindow"), username, password); + PicasawebLogin *loginDialog = new PicasawebLogin(TQT_TQWIDGET(kapp->activeWindow()), TQString("LoginWindow"), username, password); /*if (username!=NULL && username.length() > 0){ // kdDebug()<<"Showing stored username"<< username << endl; loginDialog->setUsername(username); @@ -140,14 +140,14 @@ void PicasawebTalker::getToken(const QString& username, const QString& password } */ - QString username_edit, password_edit; + TQString username_edit, password_edit; if (!loginDialog) { kdDebug()<<" Out of memory error "<< endl; } - if (loginDialog->exec() == QDialog::Accepted) + if (loginDialog->exec() == TQDialog::Accepted) { username_edit = loginDialog->username(); password_edit = loginDialog->password(); @@ -160,22 +160,22 @@ void PicasawebTalker::getToken(const QString& username, const QString& password m_username = username_edit; username_edit = username; - QString accountType = "GOOGLE"; + TQString accountType = "GOOGLE"; if (!(username_edit.endsWith("@gmail.com"))) username_edit += "@gmail.com"; - QByteArray buffer; - QStringList qsl; + TQByteArray buffer; + TQStringList qsl; qsl.append("Email="+username_edit); qsl.append("Passwd="+password_edit); qsl.append("accountType="+accountType); qsl.append("service=lh2"); qsl.append("source=kipi-picasaweb-client"); - QString dataParameters = qsl.join("&"); + TQString dataParameters = qsl.join("&"); - QTextStream ts(buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << dataParameters; KIO::TransferJob* job = KIO::http_post(url, buffer, false); @@ -183,18 +183,18 @@ void PicasawebTalker::getToken(const QString& username, const QString& password m_state = FE_GETTOKEN; authProgressDlg->setLabelText(i18n("Getting the token")); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_job = job; m_buffer.resize(0); emit signalBusy( true ); } -void PicasawebTalker::authenticate(const QString& token, const QString& username, const QString& password) +void PicasawebTalker::authenticate(const TQString& token, const TQString& username, const TQString& password) { if (!token || token.length() < 1) { @@ -209,7 +209,7 @@ void PicasawebTalker::authenticate(const QString& token, const QString& username } } -void PicasawebTalker::checkToken(const QString& /*token*/) +void PicasawebTalker::checkToken(const TQString& /*token*/) { if (m_job) { @@ -217,19 +217,19 @@ void PicasawebTalker::checkToken(const QString& /*token*/) m_job = 0; } - QString url = "https://www.google.com/accounts/ClientLogin"; - QString auth_string = "GoogleLogin auth=" + m_token; - QByteArray tmp; + TQString url = "https://www.google.com/accounts/ClientLogin"; + TQString auth_string = "GoogleLogin auth=" + m_token; + TQByteArray tmp; KIO::TransferJob* job = KIO::http_post(url, tmp, false); job->addMetaData("customHTTPHeader", "Authorization: " + auth_string); job->addMetaData("content-type", "Content-Type: application/x-www-form-urlencoded"); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_CHECKTOKEN; authProgressDlg->setLabelText(i18n("Checking if previous token is still valid")); @@ -253,18 +253,18 @@ void PicasawebTalker::listAllAlbums() { m_job = 0; } - QString url = "http://picasaweb.google.com/data/feed/api/user/" + m_username + "?kind=album"; - QByteArray tmp; - QString auth_string = "GoogleLogin auth=" + m_token; - KIO::TransferJob* job = KIO::get(url, tmp, false); + TQString url = "http://picasaweb.google.com/data/feed/api/user/" + m_username + "?kind=album"; + TQByteArray tmp; + TQString auth_string = "GoogleLogin auth=" + m_token; + KIO::TransferJob* job = KIO::get(url, !tmp.isNull(), false); job->addMetaData("content-type", "Content-Type: application/x-www-form-urlencoded" ); job->addMetaData("customHTTPHeader", "Authorization: " + auth_string ); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_LISTALBUMS; m_job = job; @@ -273,7 +273,7 @@ void PicasawebTalker::listAllAlbums() { } -void PicasawebTalker::getPhotoProperty(const QString& method,const QString& argList) +void PicasawebTalker::getPhotoProperty(const TQString& method,const TQString& argList) { if (m_job) { @@ -281,25 +281,25 @@ void PicasawebTalker::getPhotoProperty(const QString& method,const QString& argL m_job = 0; } - QString url="http://www.picasaweb.com/services/rest/?"; - QStringList headers; + TQString url="http://www.picasaweb.com/services/rest/?"; + TQStringList headers; headers.append("api_key="+ m_apikey); headers.append("method="+method); headers.append("frob="+ m_frob); headers.append(argList); - QString md5=getApiSig(m_secret,headers); + TQString md5=getApiSig(m_secret,headers); headers.append("api_sig="+ md5); - QString queryStr=headers.join("&"); - QString postUrl=url+queryStr; - QByteArray tmp; + TQString queryStr=headers.join("&"); + TQString postUrl=url+queryStr; + TQByteArray tmp; KIO::TransferJob* job = KIO::http_post(postUrl, tmp, false); job->addMetaData("content-type", "Content-Type: application/x-www-form-urlencoded" ); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_GETPHOTOPROPERTY; m_job = job; @@ -309,35 +309,35 @@ void PicasawebTalker::getPhotoProperty(const QString& method,const QString& argL //authProgressDlg->setProgress(3,4); } -void PicasawebTalker::addPhotoTag(const QString& photoURI, const QString& tag) +void PicasawebTalker::addPhotoTag(const TQString& photoURI, const TQString& tag) { //if (m_job && m_state != FE_ADDTAG){ //we shouldn't kill the old tag request // m_job->kill(); // m_job = 0; //} - QString addTagXML = QString("<entry xmlns='http://www.w3.org/2005/Atom'> " + TQString addTagXML = TQString("<entry xmlns='http://www.w3.org/2005/Atom'> " "<title>%1</title> " "<category scheme='http://schemas.google.com/g/2005#kind' " "term='http://schemas.google.com/photos/2007#tag'/> " - "</entry>").arg(tag); - QString postUrl = QString("%1").arg(photoURI); - QByteArray buffer; - QTextStream ts(buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + "</entry>").tqarg(tag); + TQString postUrl = TQString("%1").tqarg(photoURI); + TQByteArray buffer; + TQTextStream ts(buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << addTagXML; - QString auth_string = "GoogleLogin auth=" + m_token; + TQString auth_string = "GoogleLogin auth=" + m_token; KIO::TransferJob* job = KIO::http_post(postUrl, buffer, false); job->addMetaData("content-type", "Content-Type: application/atom+xml"); - job->addMetaData("content-length", QString("Content-Length: %1").arg(addTagXML.length())); + job->addMetaData("content-length", TQString("Content-Length: %1").tqarg(addTagXML.length())); job->addMetaData("customHTTPHeader", "Authorization: " + auth_string ); - //connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - // this, SLOT(data(KIO::Job*, const QByteArray&))); + //connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + // this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_ADDTAG; m_job = job; @@ -345,14 +345,14 @@ void PicasawebTalker::addPhotoTag(const QString& photoURI, const QString& tag) emit signalBusy(true); } -void PicasawebTalker::listPhotos(const QString& /*albumName*/) +void PicasawebTalker::listPhotos(const TQString& /*albumName*/) { // TODO } -void PicasawebTalker::createAlbum(const QString& albumTitle, const QString& albumDesc, - const QString& location, uint timestamp, const QString& access, - const QString& media_keywords, bool isCommentsEnabled) +void PicasawebTalker::createAlbum(const TQString& albumTitle, const TQString& albumDesc, + const TQString& location, uint timestamp, const TQString& access, + const TQString& media_keywords, bool isCommentsEnabled) { if (m_job) { @@ -360,7 +360,7 @@ void PicasawebTalker::createAlbum(const QString& albumTitle, const QString& albu m_job = 0; } - QString newAlbumXML = QString("<entry xmlns='http://www.w3.org/2005/Atom' " + TQString newAlbumXML = TQString("<entry xmlns='http://www.w3.org/2005/Atom' " "xmlns:media='http://search.yahoo.com/mrss/' " "xmlns:gphoto='http://schemas.google.com/photos/2007'> " "<title type='text'>%1</title> " @@ -374,32 +374,32 @@ void PicasawebTalker::createAlbum(const QString& albumTitle, const QString& albu "</media:group> " "<category scheme='http://schemas.google.com/g/2005#kind' " "term='http://schemas.google.com/photos/2007#album'></category> " - "</entry> ").arg(albumTitle) - .arg(albumDesc) - .arg(location) - .arg(access) - .arg(isCommentsEnabled==true?"true":"false") - .arg(timestamp) - .arg(media_keywords); - - QByteArray buffer; - QTextStream ts(buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + "</entry> ").tqarg(albumTitle) + .tqarg(albumDesc) + .tqarg(location) + .tqarg(access) + .tqarg(isCommentsEnabled==true?"true":"false") + .tqarg(timestamp) + .tqarg(media_keywords); + + TQByteArray buffer; + TQTextStream ts(buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << newAlbumXML; MPForm form; - QString postUrl = "http://www.picasaweb.google.com/data/feed/api/user/" + m_username ; - QString auth_string = "GoogleLogin auth=" + m_token; + TQString postUrl = "http://www.picasaweb.google.com/data/feed/api/user/" + m_username ; + TQString auth_string = "GoogleLogin auth=" + m_token; KIO::TransferJob* job = KIO::http_post(postUrl, buffer, false); job->addMetaData("content-type", "Content-Type: application/atom+xml"); - job->addMetaData("content-length", QString("Content-Length: %1").arg(newAlbumXML.length())); + job->addMetaData("content-length", TQString("Content-Length: %1").tqarg(newAlbumXML.length())); job->addMetaData("customHTTPHeader", "Authorization: " + auth_string ); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_CREATEALBUM; m_job = job; @@ -407,8 +407,8 @@ void PicasawebTalker::createAlbum(const QString& albumTitle, const QString& albu emit signalBusy(true); } -bool PicasawebTalker::addPhoto(const QString& photoPath, FPhotoInfo& info, - const QString& albumId, bool rescale, +bool PicasawebTalker::addPhoto(const TQString& photoPath, FPhotoInfo& info, + const TQString& albumId, bool rescale, int maxDim, int imageQuality) { // Disabling this totally may be checking the m_state and doing selecting @@ -419,21 +419,21 @@ bool PicasawebTalker::addPhoto(const QString& photoPath, FPhotoInfo& info, m_job = 0; }*/ - QString album_id = albumId; + TQString album_id = albumId; if (album_id.length() == 0) album_id = "test"; - QString postUrl = "http://www.picasaweb.google.com/data/feed/api/user/" + KURL::encode_string(m_username) + "/albumid/" + album_id; - QString path = postUrl; - QStringList headers; + TQString postUrl = "http://www.picasaweb.google.com/data/feed/api/user/" + KURL::encode_string(m_username) + "/albumid/" + album_id; + TQString path = postUrl; + TQStringList headers; MPForm form; - QString auth_string = "GoogleLogin auth=" + m_token; + TQString auth_string = "GoogleLogin auth=" + m_token; //form.addPair("Authorization", auth_string); //Create the Body in atom-xml - QStringList body_xml; + TQStringList body_xml; body_xml.append("<entry xmlns=\'http://www.w3.org/2005/Atom\'>"); body_xml.append("<title>"+ info.title +"</title>"); body_xml.append("<summary>"+ info.description +"</summary>"); @@ -441,32 +441,32 @@ bool PicasawebTalker::addPhoto(const QString& photoPath, FPhotoInfo& info, "term=\"http://schemas.google.com/photos/2007#photo\" />"); body_xml.append("</entry>"); - QString body = body_xml.join(""); + TQString body = body_xml.join(""); form.addPair("test", body, "application/atom+xml"); // save the tags for this photo in to the tags hashmap tags_map.insert(info.title, info.tags); - QImage image; + TQImage image; // Check if RAW file. #if KDCRAW_VERSION < 0x000106 - QString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); + TQString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); #else - QString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); + TQString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); #endif - QFileInfo fileInfo(photoPath); - if (rawFilesExt.upper().contains(fileInfo.extension(false).upper())) + TQFileInfo fileInfo(photoPath); + if (rawFilesExt.upper().tqcontains(fileInfo.extension(false).upper())) KDcrawIface::KDcraw::loadDcrawPreview(image, photoPath); else image.load(photoPath); if (!image.isNull()) { - path = locateLocal("tmp", QFileInfo(photoPath).baseName().stripWhiteSpace() + ".jpg"); + path = locateLocal("tmp", TQFileInfo(photoPath).baseName().stripWhiteSpace() + ".jpg"); if (rescale && (image.width() > maxDim || image.height() > maxDim)) - image = image.smoothScale(maxDim, maxDim, QImage::ScaleMin); + image = image.smoothScale(maxDim, maxDim, TQ_ScaleMin); image.save(path, "JPEG", imageQuality); @@ -476,7 +476,7 @@ bool PicasawebTalker::addPhoto(const QString& photoPath, FPhotoInfo& info, if (exiv2Iface.load(photoPath)) { - exiv2Iface.setImageProgramId(QString("Kipi-plugins"), QString(kipiplugins_version)); + exiv2Iface.setImageProgramId(TQString("Kipi-plugins"), TQString(kipiplugins_version)); exiv2Iface.setImageDimensions(image.size()); exiv2Iface.save(path); } @@ -497,11 +497,11 @@ bool PicasawebTalker::addPhoto(const QString& photoPath, FPhotoInfo& info, job->addMetaData("content-type", form.contentType()); job->addMetaData("customHTTPHeader", "Authorization: " + auth_string ); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(data(KIO::Job*, const QByteArray&))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(data(KIO::Job*, const TQByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); m_state = FE_ADDPHOTO; m_job = job; @@ -510,12 +510,12 @@ bool PicasawebTalker::addPhoto(const QString& photoPath, FPhotoInfo& info, return true; } -QString PicasawebTalker::getUserName() +TQString PicasawebTalker::getUserName() { return m_username; } -QString PicasawebTalker::getUserId() +TQString PicasawebTalker::getUserId() { return m_userId; } @@ -532,24 +532,24 @@ void PicasawebTalker::cancel() authProgressDlg->hide(); } -void PicasawebTalker::info(KIO::Job* /*job*/, const QString& /*str*/) +void PicasawebTalker::info(KIO::Job* /*job*/, const TQString& /*str*/) { } -void PicasawebTalker::data(KIO::Job*, const QByteArray& data) +void PicasawebTalker::data(KIO::Job*, const TQByteArray& data) { if (data.isEmpty()) return; int oldSize = m_buffer.size(); m_buffer.resize(m_buffer.size() + data.size()); - QString output_data = QString(data); + TQString output_data = TQString(data); memcpy(m_buffer.data()+oldSize, data.data(), data.size()); } -void PicasawebTalker::slotError(const QString & error) +void PicasawebTalker::slotError(const TQString & error) { - QString transError; + TQString transError; int errorNo = 0; if (!error.isEmpty()) @@ -593,7 +593,7 @@ void PicasawebTalker::slotError(const QString & error) transError=i18n("Unknown error"); }; - KMessageBox::error(kapp->activeWindow(), i18n("Error Occured: %1\n We can not proceed further").arg(transError)); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Error Occured: %1\n We can not proceed further").tqarg(transError)); //kdDebug()<<"Not handling the error now will see it later"<<endl; } @@ -652,12 +652,12 @@ void PicasawebTalker::slotResult(KIO::Job *job) } } -void PicasawebTalker::parseResponseCheckToken(const QByteArray &data) +void PicasawebTalker::parseResponseCheckToken(const TQByteArray &data) { bool success = false; - QString errorString; - QString username; - QString transReturn(data); + TQString errorString; + TQString username; + TQString transReturn(data); // If checktoken failed. // getToken ... @@ -671,18 +671,18 @@ void PicasawebTalker::parseResponseCheckToken(const QByteArray &data) //emit signalError(errorString); } -void PicasawebTalker::parseResponseGetToken(const QByteArray &data) +void PicasawebTalker::parseResponseGetToken(const TQByteArray &data) { bool success = false; - QString errorString; - QString str(data); + TQString errorString; + TQString str(data); //Check the response code should it be 200, proceed //if it is 403 handle the error mesg //figure out the auth string from this response - if (str.find("Auth=")) + if (str.tqfind("Auth=")) { - QStringList strList = QStringList::split("Auth=", str); + TQStringList strList = TQStringList::split("Auth=", str); m_token = strList[1]; success = 1; } @@ -700,29 +700,29 @@ void PicasawebTalker::parseResponseGetToken(const QByteArray &data) emit signalBusy(false); } -void PicasawebTalker::getHTMLResponseCode(const QString& /*str*/) +void PicasawebTalker::getHTMLResponseCode(const TQString& /*str*/) { } -void PicasawebTalker::parseResponseListAlbums(const QByteArray &data) +void PicasawebTalker::parseResponseListAlbums(const TQByteArray &data) { bool success = false; - QString str(data); - QDomDocument doc( "feed" ); + TQString str(data); + TQDomDocument doc( "feed" ); if ( !doc.setContent( data ) ) { return; } - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); - QDomElement e; - QString feed_id, feed_updated, feed_title, feed_subtitle; - QString feed_icon_url, feed_link_url; - QString feed_username, feed_user_uri; + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); + TQDomElement e; + TQString feed_id, feed_updated, feed_title, feed_subtitle; + TQString feed_icon_url, feed_link_url; + TQString feed_username, feed_user_uri; - QString album_id, album_title, album_description; - m_albumsList = new QValueList <PicasaWebAlbum>(); + TQString album_id, album_title, album_description; + m_albumsList = new TQValueList <PicasaWebAlbum>(); while(!node.isNull()) { @@ -730,9 +730,9 @@ void PicasawebTalker::parseResponseListAlbums(const QByteArray &data) { success = true; e = node.toElement(); - QDomNode details=e.firstChild(); + TQDomNode details=e.firstChild(); PicasaWebAlbum fps; - QDomNode detailsNode = details; + TQDomNode detailsNode = details; while(!detailsNode.isNull()) { @@ -742,10 +742,10 @@ void PicasawebTalker::parseResponseListAlbums(const QByteArray &data) { // The node data is a URL of which album id is the string following the last / // like <id>http://www.picasaweb.google.com/.../AlbumID<id> - QString albumIdUrl = detailsNode.toElement().text(); - int index = albumIdUrl.findRev("/"); + TQString albumIdUrl = detailsNode.toElement().text(); + int index = albumIdUrl.tqfindRev("/"); int length = albumIdUrl.length(); - QString album_id = albumIdUrl.right(length - index - 1); + TQString album_id = albumIdUrl.right(length - index - 1); fps.id = album_id; } @@ -762,7 +762,7 @@ void PicasawebTalker::parseResponseListAlbums(const QByteArray &data) if(detailsNode.nodeName()=="gphoto:name") { - QString name = detailsNode.toElement().text(); + TQString name = detailsNode.toElement().text(); } } @@ -786,38 +786,38 @@ void PicasawebTalker::parseResponseListAlbums(const QByteArray &data) } } -void PicasawebTalker::parseResponseListPhotos(const QByteArray &data) +void PicasawebTalker::parseResponseListPhotos(const TQByteArray &data) { - QDomDocument doc( "getPhotosList" ); + TQDomDocument doc( "getPhotosList" ); if ( !doc.setContent( data ) ) { return; } - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); - //QDomElement e; + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); + //TQDomElement e; // TODO } -void PicasawebTalker::parseResponseCreateAlbum(const QByteArray &data) +void PicasawebTalker::parseResponseCreateAlbum(const TQByteArray &data) { bool success = false; - QString errorString; - QString response(data); - QDomDocument doc( "AddPhoto Response" ); + TQString errorString; + TQString response(data); + TQDomDocument doc( "AddPhoto Response" ); // parse the new album name - QDomElement docElem = doc.documentElement(); - QString title, photo_id, album_id, photoURI; - QDomNode node = docElem.firstChild(); //this should mean <entry> - QDomElement e; + TQDomElement docElem = doc.documentElement(); + TQString title, photo_id, album_id, photoURI; + TQDomNode node = docElem.firstChild(); //this should mean <entry> + TQDomElement e; while( !node.isNull() ) { if ( node.isElement()) { - QString node_name = node.nodeName(); - QString node_value = node.toElement().text(); + TQString node_name = node.nodeName(); + TQString node_value = node.toElement().text(); if(node_name == "title") { success = true; @@ -837,9 +837,9 @@ void PicasawebTalker::parseResponseCreateAlbum(const QByteArray &data) // Raise a popup informing success } -void PicasawebTalker::parseResponseAddTag(const QByteArray &data) +void PicasawebTalker::parseResponseAddTag(const TQByteArray &data) { - QString str(data); + TQString str(data); remaining_tags_count -= 1; emit signalBusy( false ); m_buffer.resize(0); @@ -848,30 +848,30 @@ void PicasawebTalker::parseResponseAddTag(const QByteArray &data) emit signalAddPhotoSucceeded(); } -void PicasawebTalker::parseResponseAddPhoto(const QByteArray &data) +void PicasawebTalker::parseResponseAddPhoto(const TQByteArray &data) { bool success = false; - QString line; - QString str(data); + TQString line; + TQString str(data); success = 1; - QDomDocument doc( "AddPhoto Response" ); + TQDomDocument doc( "AddPhoto Response" ); if ( !doc.setContent( data ) ) { return; } - QDomElement docElem = doc.documentElement(); - QString title, photo_id, album_id, photoURI; - QDomNode node = docElem.firstChild(); //this should mean <entry> - QDomElement e; + TQDomElement docElem = doc.documentElement(); + TQString title, photo_id, album_id, photoURI; + TQDomNode node = docElem.firstChild(); //this should mean <entry> + TQDomElement e; while( !node.isNull() ) { if ( node.isElement()) { - QString node_name = node.nodeName(); - QString node_value = node.toElement().text(); + TQString node_name = node.nodeName(); + TQString node_value = node.toElement().text(); if(node_name == "title") { success = true; @@ -895,49 +895,49 @@ void PicasawebTalker::parseResponseAddPhoto(const QByteArray &data) else { // Update the tags information from the tags_map - QStringList tags = tags_map[title]; + TQStringList tags = tags_map[title]; remaining_tags_count = tags.count(); if (tags.count() == 0) emit signalAddPhotoSucceeded(); - for ( QStringList::Iterator it = tags.begin(); it != tags.end(); ++it ) + for ( TQStringList::Iterator it = tags.begin(); it != tags.end(); ++it ) { - QString photoURI= QString("http://picasaweb.google.com/data/feed/api/user/" - "%1/albumid/%2/photoid/%3").arg(m_username).arg(album_id).arg(photo_id); + TQString photoURI= TQString("http://picasaweb.google.com/data/feed/api/user/" + "%1/albumid/%2/photoid/%3").tqarg(m_username).tqarg(album_id).tqarg(photo_id); addPhotoTag( photoURI, *it); } } } -void PicasawebTalker::parseResponsePhotoProperty(const QByteArray &data) +void PicasawebTalker::parseResponsePhotoProperty(const TQByteArray &data) { bool success = false; - QString line; - QDomDocument doc( "Photos Properties" ); + TQString line; + TQDomDocument doc( "Photos Properties" ); if ( !doc.setContent( data ) ) { return; } - QDomElement docElem = doc.documentElement(); - QDomNode node = docElem.firstChild(); - QDomElement e; + TQDomElement docElem = doc.documentElement(); + TQDomNode node = docElem.firstChild(); + TQDomElement e; while( !node.isNull() ) { if ( node.isElement() && node.nodeName() == "photoid" ) { e = node.toElement(); // try to convert the node to an element. - QDomNode details=e.firstChild(); + TQDomNode details=e.firstChild(); success=true; } if ( node.isElement() && node.nodeName() == "err" ) { kdDebug()<<"Checking Error in response"<<endl; - QString code=node.toElement().attribute("code"); + TQString code=node.toElement().attribute("code"); kdDebug()<<"Error code="<<code<<endl; kdDebug()<<"Msg="<<node.toElement().attribute("msg")<<endl; emit signalError(code); diff --git a/kipi-plugins/picasawebexport/picasawebtalker.h b/kipi-plugins/picasawebexport/picasawebtalker.h index c59f71a..05adacc 100644 --- a/kipi-plugins/picasawebexport/picasawebtalker.h +++ b/kipi-plugins/picasawebexport/picasawebtalker.h @@ -24,12 +24,12 @@ #ifndef PICASAWEBTALKER_H #define PICASAWEBTALKER_H -// Qt includes. +// TQt includes. -#include <qvaluelist.h> -#include <qobject.h> -#include <qprogressdialog.h> -#include <qmap.h> +#include <tqvaluelist.h> +#include <tqobject.h> +#include <tqprogressdialog.h> +#include <tqmap.h> // KDE includes. @@ -51,9 +51,10 @@ class GPhoto; class FPhotoInfo; class PicasaWebAlbum; -class PicasawebTalker : public QObject +class PicasawebTalker : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -74,84 +75,84 @@ public: public: - PicasawebTalker(QWidget* parent); + PicasawebTalker(TQWidget* tqparent); ~PicasawebTalker(); - QValueList <PicasaWebAlbum> * m_albumsList; - QString getApiSig(QString,QStringList) ; - void addPhotoTag(const QString& photoURI, const QString& tag); - void getToken(const QString& user, const QString& passwd) ; - void checkToken(const QString& token) ; - void authenticate(const QString& token=NULL, const QString& username=NULL, const QString& password=NULL) ; - void getPhotoProperty(const QString& method, const QString& argList) ; - void getHTMLResponseCode(const QString& str); + TQValueList <PicasaWebAlbum> * m_albumsList; + TQString getApiSig(TQString,TQStringList) ; + void addPhotoTag(const TQString& photoURI, const TQString& tag); + void getToken(const TQString& user, const TQString& passwd) ; + void checkToken(const TQString& token) ; + void authenticate(const TQString& token=NULL, const TQString& username=NULL, const TQString& password=NULL) ; + void getPhotoProperty(const TQString& method, const TQString& argList) ; + void getHTMLResponseCode(const TQString& str); void listAllAlbums(); - void listPhotos( const QString& albumName ); - void createAlbum( const QString& albumTitle, const QString& albumDesc, const QString& location, - uint timestamp, const QString& access, const QString& media_keywords, bool isCommentEnabled=true); - bool addPhoto( const QString& photoPath, - FPhotoInfo& info, const QString& albumname, + void listPhotos( const TQString& albumName ); + void createAlbum( const TQString& albumTitle, const TQString& albumDesc, const TQString& location, + uint timestamp, const TQString& access, const TQString& media_keywords, bool isCommentEnabled=true); + bool addPhoto( const TQString& photoPath, + FPhotoInfo& info, const TQString& albumname, bool rescale=false, int maxDim=600 , int imageQuality=85 ); - QString getUserName(); - QString getUserId(); + TQString getUserName(); + TQString getUserId(); void cancel(); public: - QProgressDialog *authProgressDlg; + TQProgressDialog *authProgressDlg; signals: - void signalError( const QString& msg ); -// void signalLoginFailed( const QString& msg ); + void signalError( const TQString& msg ); +// void signalLoginFailed( const TQString& msg ); void signalBusy( bool val ); - void signalAlbums( const QValueList<GAlbum>& albumList ); - void signalPhotos( const QValueList<GPhoto>& photoList ); + void signalAlbums( const TQValueList<GAlbum>& albumList ); + void signalPhotos( const TQValueList<GPhoto>& photoList ); void signalAddPhotoSucceeded( ); void signalGetAlbumsListSucceeded(); - void signalGetAlbumsListFailed( const QString& msg ); - void signalAddPhotoFailed( const QString& msg ); + void signalGetAlbumsListFailed( const TQString& msg ); + void signalAddPhotoFailed( const TQString& msg ); void signalAuthenticate() ; - void signalTokenObtained(const QString& token); + void signalTokenObtained(const TQString& token); private: -// void parseResponseLogin(const QByteArray &data); - void parseResponseListAlbums(const QByteArray &data); - void parseResponseListPhotos(const QByteArray &data); - void parseResponseCreateAlbum(const QByteArray &data); - void parseResponseAddPhoto(const QByteArray &data); - void parseResponseAddTag(const QByteArray &data); - void parseResponseGetToken(const QByteArray &data); - void parseResponseCheckToken(const QByteArray &data); - void parseResponsePhotoProperty(const QByteArray &data); +// void parseResponseLogin(const TQByteArray &data); + void parseResponseListAlbums(const TQByteArray &data); + void parseResponseListPhotos(const TQByteArray &data); + void parseResponseCreateAlbum(const TQByteArray &data); + void parseResponseAddPhoto(const TQByteArray &data); + void parseResponseAddTag(const TQByteArray &data); + void parseResponseGetToken(const TQByteArray &data); + void parseResponseCheckToken(const TQByteArray &data); + void parseResponsePhotoProperty(const TQByteArray &data); private slots: - void slotError( const QString& msg ); + void slotError( const TQString& msg ); // void slotAuthenticate() ; - void data(KIO::Job *job, const QByteArray &data); - void info(KIO::Job *job, const QString& str); + void data(KIO::Job *job, const TQByteArray &data); + void info(KIO::Job *job, const TQString& str); void slotResult (KIO::Job *job); private: int remaining_tags_count; - QWidget* m_parent; + TQWidget* m_parent; - QByteArray m_buffer; + TQByteArray m_buffer; -// QString m_cookie; - QString m_apikey; - QString m_secret; - QString m_frob; - QString m_token; - QString m_username; - QString m_password; - QString m_userId; +// TQString m_cookie; + TQString m_apikey; + TQString m_secret; + TQString m_frob; + TQString m_token; + TQString m_username; + TQString m_password; + TQString m_userId; - QMap<QString, QStringList > tags_map; + TQMap<TQString, TQStringList > tags_map; // KURL m_url; KIO::Job* m_job; diff --git a/kipi-plugins/picasawebexport/picasawebviewitem.cpp b/kipi-plugins/picasawebexport/picasawebviewitem.cpp index 817b3ff..c847743 100644 --- a/kipi-plugins/picasawebexport/picasawebviewitem.cpp +++ b/kipi-plugins/picasawebexport/picasawebviewitem.cpp @@ -21,10 +21,10 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> // Local includes. @@ -33,23 +33,23 @@ namespace KIPIPicasawebExportPlugin { -void GAlbumViewItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int) +void GAlbumViewItem::paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int) { if (!p) return; - QListView *lv = listView(); + TQListView *lv = listView(); if (!lv) return; - QFontMetrics fm(p->fontMetrics()); + TQFontMetrics fm(p->fontMetrics()); if (isSelected()) p->fillRect(0, 0, width, height(), cg.highlight()); else p->fillRect(0, 0, width, height(), cg.base()); - const QPixmap * icon = pixmap( column ); + const TQPixmap * icon = pixmap( column ); int iconWidth = 0; if (icon) @@ -67,21 +67,21 @@ void GAlbumViewItem::paintCell(QPainter* p, const QColorGroup& cg, int column, i int r = lv->itemMargin() + iconWidth; int h = lv->fontMetrics().height() + 2; - p->drawText(r, 0, width-r, h, Qt::AlignVCenter, album.title); + p->drawText(r, 0, width-r, h, TQt::AlignVCenter, album.title); - QFont fn(lv->font()); + TQFont fn(lv->font()); fn.setPointSize(fn.pointSize()-2); fn.setItalic(true); p->setFont(fn); - p->setPen(isSelected() ? cg.highlightedText() : Qt::gray); - p->drawText(r, h, width-r, h, Qt::AlignVCenter, album.name); + p->setPen(isSelected() ? cg.highlightedText() : TQt::gray); + p->drawText(r, h, width-r, h, TQt::AlignVCenter, album.name); } void GAlbumViewItem::setup() { int h = listView()->fontMetrics().height(); int margin = 4; - setHeight(QMAX(2*h + margin, 32)); + setHeight(TQMAX(2*h + margin, 32)); } } // namespace KIPIPicasawebExportPlugin diff --git a/kipi-plugins/picasawebexport/picasawebviewitem.h b/kipi-plugins/picasawebexport/picasawebviewitem.h index 28904a7..bdf1e18 100644 --- a/kipi-plugins/picasawebexport/picasawebviewitem.h +++ b/kipi-plugins/picasawebexport/picasawebviewitem.h @@ -24,9 +24,9 @@ #ifndef PICASAWEBVIEWITEM_H #define PICASAWEBVIEWITEM_H -// Qt includes. +// TQt includes. -#include <qlistview.h> +#include <tqlistview.h> // Local includes. @@ -35,16 +35,16 @@ namespace KIPIPicasawebExportPlugin { -class GAlbumViewItem : public QListViewItem +class GAlbumViewItem : public TQListViewItem { public: - GAlbumViewItem(QListView* parent, const QString& name, const GAlbum& _album) - : QListViewItem(parent, name), album(_album) {}; + GAlbumViewItem(TQListView* tqparent, const TQString& name, const GAlbum& _album) + : TQListViewItem(tqparent, name), album(_album) {}; - GAlbumViewItem(QListViewItem* parent, const QString& name, const GAlbum& _album) - : QListViewItem(parent, name), album(_album) {}; + GAlbumViewItem(TQListViewItem* tqparent, const TQString& name, const GAlbum& _album) + : TQListViewItem(tqparent, name), album(_album) {}; ~GAlbumViewItem() {}; @@ -54,8 +54,8 @@ public: protected: - void paintCell(QPainter *p, const QColorGroup& cg, int column, int width, int); - void paintFocus (QPainter*, const QColorGroup&, const QRect&) {} + void paintCell(TQPainter *p, const TQColorGroup& cg, int column, int width, int); + void paintFocus (TQPainter*, const TQColorGroup&, const TQRect&) {} void setup(); }; diff --git a/kipi-plugins/picasawebexport/picasawebwidget.cpp b/kipi-plugins/picasawebexport/picasawebwidget.cpp index f76e180..c9096c4 100644 --- a/kipi-plugins/picasawebexport/picasawebwidget.cpp +++ b/kipi-plugins/picasawebexport/picasawebwidget.cpp @@ -20,23 +20,23 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qpushbutton.h> -#include <qlabel.h> -#include <qframe.h> -#include <qheader.h> -#include <qlistview.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qgroupbox.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qsplitter.h> -#include <qwhatsthis.h> -#include <qlineedit.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqheader.h> +#include <tqlistview.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqgroupbox.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqsplitter.h> +#include <tqwhatsthis.h> +#include <tqlineedit.h> // KDE includes. @@ -52,13 +52,13 @@ namespace KIPIPicasawebExportPlugin { -PicasawebWidget::PicasawebWidget(QWidget* parent, const char* name, WFlags fl) - : UploadWidget(parent, name, fl) +PicasawebWidget::PicasawebWidget(TQWidget* tqparent, const char* name, WFlags fl) + : UploadWidget(tqparent, name, fl) { if ( !name ) setName("PicasawebWidget"); - //resize( QSize(600, 400).expandedTo(minimumSizeHint()) ); + //resize( TQSize(600, 400).expandedTo(tqminimumSizeHint()) ); //clearWState( WState_Polished ); } diff --git a/kipi-plugins/picasawebexport/picasawebwidget.h b/kipi-plugins/picasawebexport/picasawebwidget.h index b6ba85d..ca76c30 100644 --- a/kipi-plugins/picasawebexport/picasawebwidget.h +++ b/kipi-plugins/picasawebexport/picasawebwidget.h @@ -23,20 +23,20 @@ #ifndef PICASAWEBWIDGET_H #define PICASAWEBWIDGET_H -// Qt includes. +// TQt includes. -#include <qwidget.h> +#include <tqwidget.h> // Local includes. #include "uploadwidget.h" -class QListView; -class QPushButton; -class QSpinBox; -class QCheckBox; -class QLineEdit; -class QRadioButton; +class TQListView; +class TQPushButton; +class TQSpinBox; +class TQCheckBox; +class TQLineEdit; +class TQRadioButton; class KHTMLPart; @@ -48,10 +48,11 @@ class UploadWidget; class PicasawebWidget : public UploadWidget { Q_OBJECT + TQ_OBJECT public: - PicasawebWidget(QWidget* parent=0, const char* name=0, WFlags fl= 0); + PicasawebWidget(TQWidget* tqparent=0, const char* name=0, WFlags fl= 0); ~PicasawebWidget(); private slots: @@ -61,12 +62,12 @@ private slots: private: - QListView* m_tagView; + TQListView* m_tagView; - QButtonGroup* m_fileSrcButtonGroup; + TQButtonGroup* m_fileSrcButtonGroup; -// QCheckBox* m_resizeCheckBox; -// QCheckBox* m_exportApplicationTags; +// TQCheckBox* m_resizeCheckBox; +// TQCheckBox* m_exportApplicationTags; KHTMLPart* m_photoView; diff --git a/kipi-plugins/picasawebexport/picasawebwindow.cpp b/kipi-plugins/picasawebexport/picasawebwindow.cpp index 9e796a3..38d7af1 100644 --- a/kipi-plugins/picasawebexport/picasawebwindow.cpp +++ b/kipi-plugins/picasawebexport/picasawebwindow.cpp @@ -21,23 +21,23 @@ * * ============================================================ */ -// Qt includes. - -#include <qlistview.h> -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qtimer.h> -#include <qpixmap.h> -#include <qcursor.h> -#include <qlineedit.h> -#include <qprogressdialog.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qstringlist.h> -#include <qradiobutton.h> -#include <qdatetimeedit.h> -#include <qdatetime.h> -#include <qtextedit.h> +// TQt includes. + +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqtimer.h> +#include <tqpixmap.h> +#include <tqcursor.h> +#include <tqlineedit.h> +#include <tqprogressdialog.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqstringlist.h> +#include <tqradiobutton.h> +#include <tqdatetimeedit.h> +#include <tqdatetime.h> +#include <tqtextedit.h> // KDE includes. @@ -80,7 +80,7 @@ namespace KIPIPicasawebExportPlugin { -PicasawebWindow::PicasawebWindow(KIPI::Interface* interface, const QString &tmpFolder, QWidget* /*parent*/) +PicasawebWindow::PicasawebWindow(KIPI::Interface* interface, const TQString &tmpFolder, TQWidget* /*tqparent*/) : KDialogBase(0, 0, false, i18n("Export to Picasa Web Service"), Help|Close, Close, false), m_tmp(tmpFolder) { @@ -130,60 +130,60 @@ PicasawebWindow::PicasawebWindow(KIPI::Interface* interface, const QString &tmpF KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup(helpMenu->menu()); // ------------------------------------------------------------ m_talker = new PicasawebTalker(this); - connect(m_talker, SIGNAL(signalBusy(bool)), - this, SLOT(slotBusy( bool))); + connect(m_talker, TQT_SIGNAL(signalBusy(bool)), + this, TQT_SLOT(slotBusy( bool))); - connect(m_talker, SIGNAL(signalAddPhotoSucceeded()), - this, SLOT(slotAddPhotoSucceeded())); + connect(m_talker, TQT_SIGNAL(signalAddPhotoSucceeded()), + this, TQT_SLOT(slotAddPhotoSucceeded())); - connect(m_talker, SIGNAL(signalGetAlbumsListSucceeded()), - this, SLOT(slotGetAlbumsListSucceeded())); + connect(m_talker, TQT_SIGNAL(signalGetAlbumsListSucceeded()), + this, TQT_SLOT(slotGetAlbumsListSucceeded())); - connect(m_talker, SIGNAL(signalGetAlbumsListFailed(const QString&)), - this, SLOT(slotGetAlbumsListFailed(const QString&))); + connect(m_talker, TQT_SIGNAL(signalGetAlbumsListFailed(const TQString&)), + this, TQT_SLOT(slotGetAlbumsListFailed(const TQString&))); - connect(m_talker, SIGNAL( signalAddPhotoFailed(const QString&)), - this, SLOT(slotAddPhotoFailed(const QString&))); + connect(m_talker, TQT_SIGNAL( signalAddPhotoFailed(const TQString&)), + this, TQT_SLOT(slotAddPhotoFailed(const TQString&))); -// connect(m_talker, SIGNAL( signalListPhotoSetsSucceeded( const QValueList<FPhotoSet>& ) ), -// this, SLOT( slotListPhotoSetsResponse( const QValueList<FPhotoSet>& ) ) ); +// connect(m_talker, TQT_SIGNAL( signalListPhotoSetsSucceeded( const TQValueList<FPhotoSet>& ) ), +// this, TQT_SLOT( slotListPhotoSetsResponse( const TQValueList<FPhotoSet>& ) ) ); // ------------------------------------------------------------ - m_progressDlg = new QProgressDialog(this, 0, true); + m_progressDlg = new TQProgressDialog(this, 0, true); m_progressDlg->setAutoReset(true); m_progressDlg->setAutoClose(true); - connect(m_progressDlg, SIGNAL(canceled()), - this, SLOT(slotAddPhotoCancel())); + connect(m_progressDlg, TQT_SIGNAL(canceled()), + this, TQT_SLOT(slotAddPhotoCancel())); - connect(m_changeUserButton, SIGNAL(clicked()), - this, SLOT(slotUserChangeRequest())); + connect(m_changeUserButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotUserChangeRequest())); - connect(m_reloadAlbumsListButton, SIGNAL(clicked()), - this, SLOT(slotUpdateAlbumsList())); + connect(m_reloadAlbumsListButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotUpdateAlbumsList())); - connect(m_newAlbumButton, SIGNAL(clicked()), - this, SLOT(slotCreateNewAlbum())); + connect(m_newAlbumButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCreateNewAlbum())); - connect(m_talker, SIGNAL(signalTokenObtained(const QString&)), - this, SLOT(slotTokenObtained(const QString&))); + connect(m_talker, TQT_SIGNAL(signalTokenObtained(const TQString&)), + this, TQT_SLOT(slotTokenObtained(const TQString&))); - connect(m_addPhotoButton, SIGNAL(clicked()), - this, SLOT(slotAddPhotos())); + connect(m_addPhotoButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddPhotos())); - connect(m_startUploadButton, SIGNAL(clicked()), - this, SLOT(slotUploadImages())); + connect(m_startUploadButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotUploadImages())); - connect(m_resizeCheckBox, SIGNAL(toggled(bool )), - this, SLOT(slotRefreshSizeButtons(bool))); + connect(m_resizeCheckBox, TQT_SIGNAL(toggled(bool )), + this, TQT_SLOT(slotRefreshSizeButtons(bool))); // ------------------------------------------------------------ // read config @@ -191,8 +191,8 @@ PicasawebWindow::PicasawebWindow(KIPI::Interface* interface, const QString &tmpF KSimpleConfig config("kipirc"); config.setGroup("PicasawebExport Settings"); m_token = config.readEntry("token"); - QString username = config.readEntry("username"); - QString password = config.readEntry("password"); + TQString username = config.readEntry("username"); + TQString password = config.readEntry("password"); //no saving password rt now if (config.readBoolEntry("Resize", false)) @@ -203,12 +203,12 @@ PicasawebWindow::PicasawebWindow(KIPI::Interface* interface, const QString &tmpF // ------------------------------------------------------------ - m_authProgressDlg = new QProgressDialog( this, 0, true ); + m_authProgressDlg = new TQProgressDialog( this, 0, true ); m_authProgressDlg->setAutoReset( true ); m_authProgressDlg->setAutoClose( true ); - connect(m_authProgressDlg, SIGNAL(canceled()), - this, SLOT(slotAuthCancel())); + connect(m_authProgressDlg, TQT_SIGNAL(canceled()), + this, TQT_SLOT(slotAuthCancel())); m_talker->authProgressDlg = m_authProgressDlg; m_widget->setEnabled(false); @@ -273,9 +273,9 @@ PicasawebWindow::~PicasawebWindow() delete m_about; } -void PicasawebWindow::getToken(QString& username, QString& password) +void PicasawebWindow::getToken(TQString& username, TQString& password) { - PicasawebLogin *loginDialog = new PicasawebLogin(this, QString("LoginWindow"), username, password); + PicasawebLogin *loginDialog = new PicasawebLogin(this, TQString("LoginWindow"), username, password); if (!loginDialog) { return; @@ -291,9 +291,9 @@ void PicasawebWindow::getToken(QString& username, QString& password) } }*/ - QString username_edit, password_edit; + TQString username_edit, password_edit; - if (loginDialog->exec() == QDialog::Accepted) + if (loginDialog->exec() == TQDialog::Accepted) { username_edit = loginDialog->username(); password_edit = loginDialog->password(); @@ -314,14 +314,14 @@ void PicasawebWindow::slotGetAlbumsListSucceeded() { if (m_talker && m_talker->m_albumsList) { - QValueList <PicasaWebAlbum> *list = m_talker->m_albumsList; + TQValueList <PicasaWebAlbum> *list = m_talker->m_albumsList; m_albumsListComboBox->clear(); - QValueList<PicasaWebAlbum>::iterator it = list->begin(); + TQValueList<PicasaWebAlbum>::iterator it = list->begin(); while(it != list->end()) { PicasaWebAlbum pwa=*it; - QString name = pwa.title; + TQString name = pwa.title; m_albumsListComboBox->insertItem(name); it++; } @@ -332,7 +332,7 @@ void PicasawebWindow::slotDoLogin() { } -void PicasawebWindow::slotTokenObtained( const QString& token ) +void PicasawebWindow::slotTokenObtained( const TQString& token ) { m_token=token; m_username=m_talker->getUserName(); @@ -346,15 +346,15 @@ void PicasawebWindow::slotBusy( bool val ) { if ( val ) { - setCursor(QCursor::WaitCursor); + setCursor(TQCursor::WaitCursor); } else { - setCursor(QCursor::ArrowCursor); + setCursor(TQCursor::ArrowCursor); } } -void PicasawebWindow::slotError( const QString& msg ) +void PicasawebWindow::slotError( const TQString& msg ) { KMessageBox::error(this, msg); } @@ -373,32 +373,32 @@ void PicasawebWindow::slotAuthCancel() void PicasawebWindow::slotCreateNewAlbum() { - NewAlbumDialog *dlg = new NewAlbumDialog(kapp->activeWindow()); - dlg->m_dateAndTimeEdit->setDateTime(QDateTime::currentDateTime()); - QString test; + NewAlbumDialog *dlg = new NewAlbumDialog(TQT_TQWIDGET(kapp->activeWindow())); + dlg->m_dateAndTimeEdit->setDateTime(TQDateTime::tqcurrentDateTime()); + TQString test; int t = dlg->exec(); - if(t == QDialog::Accepted) + if(t == TQDialog::Accepted) { if (dlg->m_isPublicRadioButton->isChecked()) - test = QString("public"); + test = TQString("public"); else - test = QString("unlisted"); + test = TQString("unlisted"); m_talker->createAlbum(dlg->m_titleLineEdit->text(), dlg->m_descriptionTextBox->text(), dlg->m_locationLineEdit->text(), dlg->m_dateAndTimeEdit->dateTime().toTime_t(), - test, QString(), true); + test, TQString(), true); } else { - if (t == QDialog::Rejected) + if (t == TQDialog::Rejected) { kdDebug()<<"Album Creation cancelled" <<endl; } } } /* -void PicasawebWindow::slotPhotos( const QValueList<GPhoto>& photoList) +void PicasawebWindow::slotPhotos( const TQValueList<GPhoto>& photoList) { // TODO } @@ -414,7 +414,7 @@ void PicasawebWindow::slotOpenPhoto( const KURL& url ) } */ -void PicasawebWindow::slotListPhotoSetsResponse(const QValueList <FPhotoSet>& /*photoSetList*/) +void PicasawebWindow::slotListPhotoSetsResponse(const TQValueList <FPhotoSet>& /*photoSetList*/) { } @@ -437,7 +437,7 @@ void PicasawebWindow::slotUploadImages() if (m_urls == NULL || m_urls->isEmpty()) return; - typedef QPair<QString,FPhotoInfo> Pair; + typedef TQPair<TQString,FPhotoInfo> Pair; m_uploadQueue.clear(); @@ -449,10 +449,10 @@ void PicasawebWindow::slotUploadImages() temp.title=info.title(); temp.description=info.description(); - QStringList allTags; + TQStringList allTags; - QStringList tagsFromDialog = QStringList::split(" ", m_tagsLineEdit->text(), false); - QStringList::Iterator itTags; + TQStringList tagsFromDialog = TQStringList::split(" ", m_tagsLineEdit->text(), false); + TQStringList::Iterator itTags; //Tags from the interface itTags= tagsFromDialog.begin(); @@ -464,8 +464,8 @@ void PicasawebWindow::slotUploadImages() } //Tags from the database - QMap <QString, QVariant> attribs = info.attributes(); - QStringList tagsFromDatabase; + TQMap <TQString, TQVariant> attribs = info.attributes(); + TQStringList tagsFromDatabase; if(m_exportApplicationTags->isChecked()) { @@ -508,7 +508,7 @@ void PicasawebWindow::slotAddPhotoNext() return; } - typedef QPair<QString,FPhotoInfo> Pair; + typedef TQPair<TQString,FPhotoInfo> Pair; Pair pathComments = m_uploadQueue.first(); FPhotoInfo info=pathComments.second; m_uploadQueue.pop_front(); @@ -517,13 +517,13 @@ void PicasawebWindow::slotAddPhotoNext() int upload_image_quality;*/ // Get the albums' Id from the name. - QString albumId = ""; - QString selectedAlbumName = m_albumsListComboBox->currentText(); + TQString albumId = ""; + TQString selectedAlbumName = m_albumsListComboBox->currentText(); - QValueList<PicasaWebAlbum>::iterator it = m_talker->m_albumsList->begin(); + TQValueList<PicasaWebAlbum>::iterator it = m_talker->m_albumsList->begin(); while(it != m_talker->m_albumsList->end()) { PicasaWebAlbum pwa=*it; - QString name = pwa.title; + TQString name = pwa.title; if (name == selectedAlbumName) { albumId = pwa.id; break; @@ -541,7 +541,7 @@ void PicasawebWindow::slotAddPhotoNext() return; } - m_progressDlg->setLabelText(i18n("Uploading file %1 ").arg( KURL(pathComments.first).filename())); + m_progressDlg->setLabelText(i18n("Uploading file %1 ").tqarg( KURL(pathComments.first).filename())); if (m_progressDlg->isHidden()) m_progressDlg->show(); @@ -554,11 +554,11 @@ void PicasawebWindow::slotAddPhotoSucceeded() slotAddPhotoNext(); } -void PicasawebWindow::slotAddPhotoFailed(const QString& msg) +void PicasawebWindow::slotAddPhotoFailed(const TQString& msg) { if ( KMessageBox::warningContinueCancel(this, i18n("Failed to upload photo into Picasaweb. %1\nDo you want to continue?") - .arg( msg )) != KMessageBox::Continue) + .tqarg( msg )) != KMessageBox::Continue) { m_uploadQueue.clear(); m_progressDlg->reset(); @@ -574,7 +574,7 @@ void PicasawebWindow::slotAddPhotoFailed(const QString& msg) } } -void PicasawebWindow::slotGetAlbumsListFailed(const QString& /*msg*/) +void PicasawebWindow::slotGetAlbumsListFailed(const TQString& /*msg*/) { // Raise some errors } diff --git a/kipi-plugins/picasawebexport/picasawebwindow.h b/kipi-plugins/picasawebexport/picasawebwindow.h index 215dd79..fa2c8d7 100644 --- a/kipi-plugins/picasawebexport/picasawebwindow.h +++ b/kipi-plugins/picasawebexport/picasawebwindow.h @@ -24,11 +24,11 @@ #ifndef PICASAWEBWINDOW_H #define PICASAWEBWINDOW_H -// Qt includes. +// TQt includes. -#include <qvaluelist.h> -#include <qpair.h> -#include <qintdict.h> +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqintdict.h> // KDE includes. @@ -43,16 +43,16 @@ #include "kpaboutdata.h" -class QListView; -class QPushButton; -class QRadioButton; -class QSpinBox; -class QCheckBox; -class QProgressDialog; +class TQListView; +class TQPushButton; +class TQRadioButton; +class TQSpinBox; +class TQCheckBox; +class TQProgressDialog; class KHTMLPart; class KURL; -class QLineEdit; -class QComboBox; +class TQLineEdit; +class TQComboBox; namespace KIPI { @@ -77,48 +77,49 @@ class GAlbumViewItem; class PicasawebWindow : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PicasawebWindow(KIPI::Interface *interface, const QString &tmpFolder,QWidget *parent); + PicasawebWindow(KIPI::Interface *interface, const TQString &tmpFolder,TQWidget *tqparent); ~PicasawebWindow(); - void getToken(QString& username, QString& password); + void getToken(TQString& username, TQString& password); private: unsigned int m_uploadCount; unsigned int m_uploadTotal; - QListView *m_tagView; + TQListView *m_tagView; - QSpinBox *m_dimensionSpinBox; - QSpinBox *m_imageQualitySpinBox; + TQSpinBox *m_dimensionSpinBox; + TQSpinBox *m_imageQualitySpinBox; - QPushButton *m_newAlbumButton; - QPushButton *m_addPhotoButton; - QPushButton *m_startUploadButton; - QPushButton *m_reloadAlbumsListButton; - QPushButton *m_changeUserButton; + TQPushButton *m_newAlbumButton; + TQPushButton *m_addPhotoButton; + TQPushButton *m_startUploadButton; + TQPushButton *m_reloadAlbumsListButton; + TQPushButton *m_changeUserButton; - QString m_tmp; - QString m_token; - QString m_username; - QString m_userId; - QString m_lastSelectedAlbum; + TQString m_tmp; + TQString m_token; + TQString m_username; + TQString m_userId; + TQString m_lastSelectedAlbum; - QCheckBox *m_resizeCheckBox; + TQCheckBox *m_resizeCheckBox; - QLineEdit *m_tagsLineEdit; + TQLineEdit *m_tagsLineEdit; - QRadioButton *m_exportApplicationTags; + TQRadioButton *m_exportApplicationTags; - QProgressDialog *m_progressDlg; - QProgressDialog *m_authProgressDlg; + TQProgressDialog *m_progressDlg; + TQProgressDialog *m_authProgressDlg; - QComboBox *m_albumsListComboBox; + TQComboBox *m_albumsListComboBox; - QLabel *m_userNameDisplayLabel; + TQLabel *m_userNameDisplayLabel; // KWallet::Wallet *m_wallet; @@ -128,38 +129,38 @@ private: PicasawebWidget *m_widget; PicasawebTalker *m_talker; - QIntDict<GAlbumViewItem> m_albumDict; + TQIntDict<GAlbumViewItem> m_albumDict; - QValueList< QPair<QString,FPhotoInfo> > m_uploadQueue; + TQValueList< TQPair<TQString,FPhotoInfo> > m_uploadQueue; KIPI::Interface *m_interface; KIPIPlugins::KPAboutData *m_about; private slots: - void slotTokenObtained(const QString& token); + void slotTokenObtained(const TQString& token); void slotDoLogin(); -// void slotLoginFailed( const QString& msg ); +// void slotLoginFailed( const TQString& msg ); void slotBusy( bool val ); - void slotError( const QString& msg ); -// void slotAlbums( const QValueList<GAlbum>& albumList ); -// void slotPhotos( const QValueList<GPhoto>& photoList ); + void slotError( const TQString& msg ); +// void slotAlbums( const TQValueList<GAlbum>& albumList ); +// void slotPhotos( const TQValueList<GPhoto>& photoList ); // void slotTagSelected(); // void slotOpenPhoto( const KURL& url ); void slotUpdateAlbumsList(); void slotUserChangeRequest(); - void slotListPhotoSetsResponse(const QValueList <FPhotoSet>& photoSetList); + void slotListPhotoSetsResponse(const TQValueList <FPhotoSet>& photoSetList); void slotAddPhotos(); void slotUploadImages(); void slotAddPhotoNext(); void slotAddPhotoSucceeded(); - void slotAddPhotoFailed( const QString& msg ); + void slotAddPhotoFailed( const TQString& msg ); void slotAddPhotoCancel(); void slotAuthCancel(); void slotHelp(); void slotCreateNewAlbum(); void slotGetAlbumsListSucceeded(); - void slotGetAlbumsListFailed(const QString& msg); + void slotGetAlbumsListFailed(const TQString& msg); void slotRefreshSizeButtons(bool); // void slotHandleLogin(); diff --git a/kipi-plugins/picasawebexport/plugin_picasawebexport.cpp b/kipi-plugins/picasawebexport/plugin_picasawebexport.cpp index 99d1c99..01eae69 100644 --- a/kipi-plugins/picasawebexport/plugin_picasawebexport.cpp +++ b/kipi-plugins/picasawebexport/plugin_picasawebexport.cpp @@ -53,13 +53,13 @@ typedef KGenericFactory<Plugin_PicasawebExport> Factory; K_EXPORT_COMPONENT_FACTORY(kipiplugin_picasawebexport, Factory("kipiplugin_picasawebexport")) -Plugin_PicasawebExport::Plugin_PicasawebExport(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin(Factory::instance(), parent, "PicasawebExport") +Plugin_PicasawebExport::Plugin_PicasawebExport(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin(Factory::instance(), tqparent, "PicasawebExport") { kdDebug(51001) << "Plugin_PicasawebExport plugin loaded" << endl; } -void Plugin_PicasawebExport::setup(QWidget* widget) +void Plugin_PicasawebExport::setup(TQWidget* widget) { KIPI::Plugin::setup(widget); @@ -67,11 +67,11 @@ void Plugin_PicasawebExport::setup(QWidget* widget) "www", 0, this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "picasawebexport"); - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { @@ -90,7 +90,7 @@ Plugin_PicasawebExport::~Plugin_PicasawebExport() void Plugin_PicasawebExport::slotActivate() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { kdError(51000) << "Kipi interface is null!" << endl; @@ -98,9 +98,9 @@ void Plugin_PicasawebExport::slotActivate() } KStandardDirs dir; - QString Tmp = dir.saveLocation("tmp", "kipi-picasawebexportplugin-" + QString::number(getpid()) + "/"); + TQString Tmp = dir.saveLocation("tmp", "kipi-picasawebexportplugin-" + TQString::number(getpid()) + "/"); - m_dlg = new KIPIPicasawebExportPlugin::PicasawebWindow(interface,Tmp,kapp->activeWindow()); + m_dlg = new KIPIPicasawebExportPlugin::PicasawebWindow(interface,Tmp,TQT_TQWIDGET(kapp->activeWindow())); m_dlg->show(); } diff --git a/kipi-plugins/picasawebexport/plugin_picasawebexport.h b/kipi-plugins/picasawebexport/plugin_picasawebexport.h index ddf2fc0..4ac156d 100644 --- a/kipi-plugins/picasawebexport/plugin_picasawebexport.h +++ b/kipi-plugins/picasawebexport/plugin_picasawebexport.h @@ -38,14 +38,15 @@ using namespace KIPIPicasawebExportPlugin; class Plugin_PicasawebExport : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_PicasawebExport(QObject *parent, const char* name, const QStringList &args); + Plugin_PicasawebExport(TQObject *tqparent, const char* name, const TQStringList &args); ~Plugin_PicasawebExport(); virtual KIPI::Category category(KAction* action) const; - virtual void setup(QWidget*); + virtual void setup(TQWidget*); public slots: diff --git a/kipi-plugins/picasawebexport/uploadwidget.ui b/kipi-plugins/picasawebexport/uploadwidget.ui index d290d2f..3cd024e 100644 --- a/kipi-plugins/picasawebexport/uploadwidget.ui +++ b/kipi-plugins/picasawebexport/uploadwidget.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KIPIPicasawebExportPlugin::UploadWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>UploadWidget</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -23,11 +23,11 @@ <property name="caption"> <string>PicasaWeb Exporter Upload</string> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_selectionFrame</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>390</x> <y>50</y> @@ -41,11 +41,11 @@ <property name="frameShadow"> <enum>Raised</enum> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>20</y> @@ -56,11 +56,11 @@ <property name="title"> <string>Images to upload</string> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_selectImagesButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>40</y> @@ -72,11 +72,11 @@ <string>Select Images for Upload</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_currentSelectionButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>20</y> @@ -89,11 +89,11 @@ </property> </widget> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_selectPhotosButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>60</x> <y>100</y> @@ -106,11 +106,11 @@ </property> </widget> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>390</x> <y>200</y> @@ -121,11 +121,11 @@ <property name="title"> <string>Account Details</string> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_changeUserButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>90</x> <y>50</y> @@ -137,11 +137,11 @@ <string>Change User</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>20</y> @@ -153,11 +153,11 @@ <string>Username:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_userNameDisplayLabel</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>90</x> <y>20</y> @@ -168,16 +168,16 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_WidgetLabel</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>10</y> @@ -193,15 +193,15 @@ <property name="text"> <string>PicasaWeb Uploader</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_startUploadButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>490</x> <y>10</y> @@ -213,11 +213,11 @@ <string>Start Uploading</string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>50</y> @@ -228,11 +228,11 @@ <property name="title"> <string></string> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>tagsTxtLabel</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>80</y> @@ -244,11 +244,11 @@ <string>Tags:<p align="center"></p></string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_newAlbumButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>280</x> <y>20</y> @@ -260,11 +260,11 @@ <string>New &Album</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_reloadAlbumsListButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>210</x> <y>20</y> @@ -276,11 +276,11 @@ <string>Reload</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>20</y> @@ -292,11 +292,11 @@ <string>Album:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_tagsLineEdit</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>60</x> <y>80</y> @@ -305,11 +305,11 @@ </rect> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_exportApplicationTags</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>60</x> <y>110</y> @@ -324,11 +324,11 @@ <string>Alt+X</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>m_albumsListComboBox</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>60</x> <y>20</y> @@ -340,11 +340,11 @@ <bool>false</bool> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_resizeGroupBox</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>150</y> @@ -355,11 +355,11 @@ <property name="title"> <string></string> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_resizeCheckBox</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>10</y> @@ -374,11 +374,11 @@ <string>Alt+Z</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>40</y> @@ -390,11 +390,11 @@ <string>Size (pixels):</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>180</x> <y>40</y> @@ -406,11 +406,11 @@ <string>Compression:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_dimensionSpinBox</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>100</x> <y>40</y> @@ -422,11 +422,11 @@ <number>3200</number> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_imageQualitySpinBox</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>280</x> <y>40</y> @@ -438,5 +438,5 @@ </widget> </widget> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kipi-plugins/printwizard/cropframe.cpp b/kipi-plugins/printwizard/cropframe.cpp index 60eb532..1f86ae5 100644 --- a/kipi-plugins/printwizard/cropframe.cpp +++ b/kipi-plugins/printwizard/cropframe.cpp @@ -23,10 +23,10 @@ extern "C" #include <stdio.h> } -// Qt includes. +// TQt includes. -#include <qpainter.h> -#include <qimage.h> +#include <tqpainter.h> +#include <tqimage.h> // Local includes. @@ -36,8 +36,8 @@ extern "C" namespace KIPIPrintWizardPlugin { -CropFrame::CropFrame(QWidget *parent=0, const char *name=0) - : QWidget(parent, name) +CropFrame::CropFrame(TQWidget *tqparent=0, const char *name=0) + : TQWidget(tqparent, name) { m_mouseDown = false; } @@ -49,10 +49,10 @@ CropFrame::CropFrame(QWidget *parent=0, const char *name=0) void CropFrame::init(TPhoto *photo, int width, int height, bool autoRotate, bool paint) { m_photo = photo; - QImage scaledImg = m_photo->thumbnail().convertToImage(); + TQImage scaledImg = m_photo->thumbnail().convertToImage(); // has the cropRegion been set yet? - bool resetCropRegion = (m_photo->cropRegion == QRect(-1, -1, -1, -1)); + bool resetCropRegion = (m_photo->cropRegion == TQRect(-1, -1, -1, -1)); if (resetCropRegion) { // first, let's see if we should rotate @@ -70,22 +70,22 @@ void CropFrame::init(TPhoto *photo, int width, int height, bool autoRotate, bool else { // does the crop region need updating (but the image shouldn't be rotated)? - resetCropRegion = (m_photo->cropRegion == QRect(-2, -2, -2, -2)); + resetCropRegion = (m_photo->cropRegion == TQRect(-2, -2, -2, -2)); } // rotate - QWMatrix matrix; + TQWMatrix matrix; matrix.rotate(m_photo->rotation); scaledImg = scaledImg.xForm(matrix); - scaledImg = scaledImg.smoothScale(this->width(), this->height(), QImage::ScaleMin); + scaledImg = scaledImg.smoothScale(this->width(), this->height(), TQ_ScaleMin); - m_pixmap = new QPixmap(); + m_pixmap = new TQPixmap(); m_pixmap->convertFromImage(scaledImg); m_pixmapX = (this->width() / 2) - (m_pixmap->width() / 2); m_pixmapY = (this->height() / 2) - (m_pixmap->height() / 2); - m_color = Qt::red; + m_color = TQt::red; // size the rectangle based on the minimum image dimension int w = m_pixmap->width(); int h = m_pixmap->height();; @@ -118,10 +118,10 @@ void CropFrame::init(TPhoto *photo, int width, int height, bool autoRotate, bool m_cropRegion = _photoToScreenRect(m_photo->cropRegion); if (paint) - repaint(false); + tqrepaint(false); } -QRect CropFrame::_screenToPhotoRect(QRect r) +TQRect CropFrame::_screenToPhotoRect(TQRect r) { // r is given in screen coordinates, and we want to convert that // to photo coordinates @@ -155,12 +155,12 @@ QRect CropFrame::_screenToPhotoRect(QRect r) int w = NINT(r.width() * xRatio); int h = NINT(r.height() * yRatio); - QRect result; + TQRect result; result.setRect(x1, y1, w, h); return result; } -QRect CropFrame::_photoToScreenRect(QRect r) +TQRect CropFrame::_photoToScreenRect(TQRect r) { // r is given in photo coordinates, and we want to convert that // to screen coordinates @@ -195,7 +195,7 @@ QRect CropFrame::_photoToScreenRect(QRect r) int w = NINT(r.width() * xRatio); int h = NINT(r.height() * yRatio); - QRect result; + TQRect result; result.setRect(x1, y1, w, h); return result; } @@ -203,11 +203,11 @@ QRect CropFrame::_photoToScreenRect(QRect r) CropFrame::~CropFrame() { } -void CropFrame::paintEvent (QPaintEvent *) +void CropFrame::paintEvent (TQPaintEvent *) { - QPixmap bmp(this->width(), this->height()); - QPainter p; + TQPixmap bmp(this->width(), this->height()); + TQPainter p; p.begin(&bmp); p.eraseRect(0, 0, this->width(), this->height()); @@ -216,7 +216,7 @@ void CropFrame::paintEvent (QPaintEvent *) p.drawPixmap(m_pixmapX, m_pixmapY, *m_pixmap); // draw the rectangle - p.setPen(QPen(m_color, 2)); + p.setPen(TQPen(m_color, 2)); p.drawRect(m_cropRegion); // draw the crosshairs int midX = m_cropRegion.left() + m_cropRegion.width() / 2; @@ -225,13 +225,13 @@ void CropFrame::paintEvent (QPaintEvent *) p.drawLine(midX, midY - 10, midX, midY + 10); p.end(); - QPainter newp(this); + TQPainter newp(this); newp.drawPixmap(0, 0, bmp); } -void CropFrame::mousePressEvent(QMouseEvent *e) +void CropFrame::mousePressEvent(TQMouseEvent *e) { - if (e->button() == QMouseEvent::LeftButton) + if (e->button() == Qt::LeftButton) { m_mouseDown = true; this->mouseMoveEvent(e); @@ -239,13 +239,13 @@ void CropFrame::mousePressEvent(QMouseEvent *e) } -void CropFrame::mouseReleaseEvent(QMouseEvent *e) +void CropFrame::mouseReleaseEvent(TQMouseEvent *e) { - if (e->button() == QMouseEvent::LeftButton) + if (e->button() == Qt::LeftButton) m_mouseDown = false; } -void CropFrame::mouseMoveEvent(QMouseEvent *e) +void CropFrame::mouseMoveEvent(TQMouseEvent *e) { if (m_mouseDown) { @@ -263,23 +263,23 @@ void CropFrame::mouseMoveEvent(QMouseEvent *e) m_cropRegion.setRect(newX, newY, newW, newH); m_photo->cropRegion = _screenToPhotoRect(m_cropRegion); - repaint(false); + tqrepaint(false); } } -void CropFrame::keyPressEvent(QKeyEvent *e) +void CropFrame::keyPressEvent(TQKeyEvent *e) { int newX = m_cropRegion.x(); int newY = m_cropRegion.y(); switch (e->key()) { - case Qt::Key_Up : newY--; + case TQt::Key_Up : newY--; break; - case Qt::Key_Down : newY++; + case TQt::Key_Down : newY++; break; - case Qt::Key_Left : newX--; + case TQt::Key_Left : newX--; break; - case Qt::Key_Right : newX++; + case TQt::Key_Right : newX++; break; } @@ -295,17 +295,17 @@ void CropFrame::keyPressEvent(QKeyEvent *e) m_cropRegion.setRect(newX, newY, w, h); m_photo->cropRegion = _screenToPhotoRect(m_cropRegion); - repaint(false); + tqrepaint(false); } -void CropFrame::setColor(QColor c) +void CropFrame::setColor(TQColor c) { m_color = c; - repaint(false); + tqrepaint(false); } -QColor CropFrame::color() +TQColor CropFrame::color() { return m_color; } diff --git a/kipi-plugins/printwizard/cropframe.h b/kipi-plugins/printwizard/cropframe.h index ce90b5d..08ebcaa 100644 --- a/kipi-plugins/printwizard/cropframe.h +++ b/kipi-plugins/printwizard/cropframe.h @@ -18,10 +18,10 @@ #ifndef CROPFRAME_H #define CROPFRAME_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qpixmap.h> +#include <tqwidget.h> +#include <tqpixmap.h> // Local includes. @@ -30,38 +30,39 @@ namespace KIPIPrintWizardPlugin { -class CropFrame : public QWidget +class CropFrame : public TQWidget { Q_OBJECT + TQ_OBJECT public: - CropFrame(QWidget *parent, const char *name); + CropFrame(TQWidget *tqparent, const char *name); ~CropFrame(); void init(TPhoto *photo, int width, int height, bool autoRotate, bool paint = true); - void setColor(QColor); - QColor color(); + void setColor(TQColor); + TQColor color(); private: TPhoto *m_photo; bool m_mouseDown; - QPixmap *m_pixmap; + TQPixmap *m_pixmap; int m_pixmapX; int m_pixmapY; - QColor m_color; + TQColor m_color; - QRect m_cropRegion; + TQRect m_cropRegion; - QRect _screenToPhotoRect(QRect r); - QRect _photoToScreenRect(QRect r); + TQRect _screenToPhotoRect(TQRect r); + TQRect _photoToScreenRect(TQRect r); protected: - void paintEvent (QPaintEvent *); - void mousePressEvent(QMouseEvent *); - void mouseReleaseEvent(QMouseEvent *); - void mouseMoveEvent(QMouseEvent *); - void keyPressEvent(QKeyEvent *); + void paintEvent (TQPaintEvent *); + void mousePressEvent(TQMouseEvent *); + void mouseReleaseEvent(TQMouseEvent *); + void mouseMoveEvent(TQMouseEvent *); + void keyPressEvent(TQKeyEvent *); }; } // NameSpace KIPIPrintWizardPlugin diff --git a/kipi-plugins/printwizard/frmprintwizard.cpp b/kipi-plugins/printwizard/frmprintwizard.cpp index 52fbeb0..29ae448 100644 --- a/kipi-plugins/printwizard/frmprintwizard.cpp +++ b/kipi-plugins/printwizard/frmprintwizard.cpp @@ -23,17 +23,17 @@ extern "C" #include <unistd.h> } -// Include files for Qt - -#include <qlabel.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qpainter.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qdir.h> -#include <qslider.h> +// Include files for TQt + +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqpainter.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqdir.h> +#include <tqslider.h> // Include files for KDE @@ -72,25 +72,14 @@ extern "C" namespace KIPIPrintWizardPlugin { -#if QT_VERSION<0x030200 -// This function emulates int QButtonGroup::selectedId() which does not exist -// in Qt 3.1 -inline int buttonGroupSelectedId(const QButtonGroup* group) -{ - QButton* button=group->selected(); - if (!button) return -1; - return group->id(button); -} -#else -inline int buttonGroupSelectedId(const QButtonGroup* group) +inline int buttonGroupSelectedId(const TQButtonGroup* group) { return group->selectedId(); } -#endif -FrmPrintWizard::FrmPrintWizard(QWidget *parent, const char *name ) - : FrmPrintWizardBase(parent, name) +FrmPrintWizard::FrmPrintWizard(TQWidget *tqparent, const char *name ) + : FrmPrintWizardBase(tqparent, name) { // enable help buttons for(int i = 0; i < pageCount(); ++i) @@ -132,7 +121,7 @@ FrmPrintWizard::FrmPrintWizard(QWidget *parent, const char *name ) BtnCropRotate->setIconSet( SmallIconSet( "rotate" ) ); // wizard buttons - QPushButton *pBtn = backButton (); + TQPushButton *pBtn = backButton (); pBtn->setText(""); pBtn->setIconSet( SmallIconSet( "previous" ) ); pBtn = nextButton (); @@ -142,7 +131,7 @@ FrmPrintWizard::FrmPrintWizard(QWidget *parent, const char *name ) m_helpButton = helpButton(); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); // NOTE does it work???? @@ -156,44 +145,44 @@ FrmPrintWizard::FrmPrintWizard(QWidget *parent, const char *name ) m_pageSize = Unknown; // select a different page to force a refresh in initPhotoSizes. initPhotoSizes(A4); // default to A4 for now. - EditOutputPath->setText(QDir::homeDirPath()); + EditOutputPath->setText(TQDir::homeDirPath()); - connect(this, SIGNAL(selected(const QString &)), - this, SLOT(FrmPrintWizardBaseSelected(const QString &))); + connect(this, TQT_SIGNAL(selected(const TQString &)), + this, TQT_SLOT(FrmPrintWizardBaseSelected(const TQString &))); - connect(GrpOutputSettings, SIGNAL(clicked(int)), - this, SLOT(GrpOutputSettings_clicked(int))); + connect(GrpOutputSettings, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(GrpOutputSettings_clicked(int))); - connect(m_captions, SIGNAL(activated(int)), - this, SLOT(CaptionChanged(int))); + connect(m_captions, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(CaptionChanged(int))); - connect(EditOutputPath, SIGNAL(textChanged(const QString &)), - this, SLOT(EditOutputPath_textChanged(const QString &))); + connect(EditOutputPath, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(EditOutputPath_textChanged(const TQString &))); - connect(BtnBrowseOutputPath, SIGNAL(clicked(void)), - this, SLOT(BtnBrowseOutputPath_clicked(void))); + connect(BtnBrowseOutputPath, TQT_SIGNAL(clicked(void)), + this, TQT_SLOT(BtnBrowseOutputPath_clicked(void))); CmbPaperSize->setCurrentItem(0); - connect(CmbPaperSize, SIGNAL(activated(int)), - this, SLOT(CmbPaperSize_activated(int))); + connect(CmbPaperSize, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(CmbPaperSize_activated(int))); - connect(BtnPrintOrderDown, SIGNAL(clicked(void)), - this, SLOT(BtnPrintOrderDown_clicked(void))); - connect(BtnPrintOrderUp, SIGNAL(clicked(void)), - this, SLOT(BtnPrintOrderUp_clicked(void))); - connect(BtnPreviewPageUp, SIGNAL(clicked(void)), - this, SLOT(BtnPreviewPageUp_clicked(void))); - connect(BtnPreviewPageDown, SIGNAL(clicked(void)), - this, SLOT(BtnPreviewPageDown_clicked(void))); + connect(BtnPrintOrderDown, TQT_SIGNAL(clicked(void)), + this, TQT_SLOT(BtnPrintOrderDown_clicked(void))); + connect(BtnPrintOrderUp, TQT_SIGNAL(clicked(void)), + this, TQT_SLOT(BtnPrintOrderUp_clicked(void))); + connect(BtnPreviewPageUp, TQT_SIGNAL(clicked(void)), + this, TQT_SLOT(BtnPreviewPageUp_clicked(void))); + connect(BtnPreviewPageDown, TQT_SIGNAL(clicked(void)), + this, TQT_SLOT(BtnPreviewPageDown_clicked(void))); - connect(BtnCropPrev, SIGNAL(clicked()), - this, SLOT(BtnCropPrev_clicked())); - connect(BtnCropNext, SIGNAL(clicked()), - this, SLOT(BtnCropNext_clicked())); + connect(BtnCropPrev, TQT_SIGNAL(clicked()), + this, TQT_SLOT(BtnCropPrev_clicked())); + connect(BtnCropNext, TQT_SIGNAL(clicked()), + this, TQT_SLOT(BtnCropNext_clicked())); - connect(BtnCropRotate, SIGNAL(clicked()), - this, SLOT(BtnCropRotate_clicked())); + connect(BtnCropRotate, TQT_SIGNAL(clicked()), + this, TQT_SLOT(BtnCropRotate_clicked())); loadSettings(); @@ -221,7 +210,7 @@ void FrmPrintWizard::slotHelp() KApplication::kApplication()->invokeHelp("printwizard","kipi-plugins"); } -void FrmPrintWizard::print( KURL::List fileList, QString tempPath) +void FrmPrintWizard::print( KURL::List fileList, TQString tempPath) { for(unsigned int i=0; i < m_photos.count(); i++) if (m_photos.at(i)) @@ -240,7 +229,7 @@ void FrmPrintWizard::print( KURL::List fileList, QString tempPath) ListPrintOrder->setCurrentItem(0); m_tempPath = tempPath; - LblPhotoCount->setText(QString::number(m_photos.count())); + LblPhotoCount->setText(TQString::number(m_photos.count())); BtnCropPrev->setEnabled(false); @@ -256,7 +245,7 @@ void FrmPrintWizard::BtnCropRotate_clicked() // tells the cropFrame to reset the crop region, but don't // automagically rotate the image to fit. TPhoto *photo = m_photos.current(); - photo->cropRegion = QRect(-2, -2, -2, -2); + photo->cropRegion = TQRect(-2, -2, -2, -2); photo->rotation = (photo->rotation + 90) % 360; updateCropFrame(photo, m_photos.at()); @@ -293,7 +282,7 @@ void FrmPrintWizard::updateCropFrame(TPhoto *photo, int photoIndex) { TPhotoSize *s = m_photoSizes.at(ListPhotoSizes->currentItem()); cropFrame->init(photo, getLayout(photoIndex)->width(), getLayout(photoIndex)->height(), s->autoRotate); - LblCropPhoto->setText(i18n("Photo %1 of %2").arg( QString::number(m_photos.at() + 1) ).arg( QString::number(m_photos.count()) )); + LblCropPhoto->setText(i18n("Photo %1 of %2").tqarg( TQString::number(m_photos.at() + 1) ).tqarg( TQString::number(m_photos.count()) )); } void FrmPrintWizard::BtnCropPrev_clicked() @@ -311,9 +300,9 @@ void FrmPrintWizard::BtnCropPrev_clicked() updateCropFrame(photo, m_photos.at()); } -void FrmPrintWizard::FrmPrintWizardBaseSelected(const QString &) +void FrmPrintWizard::FrmPrintWizardBaseSelected(const TQString &) { - QString pageName = this->currentPage()->name(); + TQString pageName = this->currentPage()->name(); if (pageName == "pgPrinter") { // use this method to enable/disable the next button @@ -342,7 +331,7 @@ void FrmPrintWizard::FrmPrintWizardBaseSelected(const QString &) int i = 0; for (TPhoto *photo = m_photos.first(); photo != 0; photo = m_photos.next()) { - if (photo->cropRegion == QRect(-1, -1, -1, -1)) + if (photo->cropRegion == TQRect(-1, -1, -1, -1)) cropFrame->init(photo, getLayout(i)->width(), getLayout(i)->height(), s->autoRotate); i++; } @@ -371,13 +360,13 @@ void FrmPrintWizard::FrmPrintWizardBaseSelected(const QString &) printer.setUsePrinterResolution(true); #endif if (printer.setup()) - printPhotos(m_photos, s->layouts, printer); + printPhotos(m_photos, s->tqlayouts, printer); } else if (RdoOutputFile->isChecked()) { // now output the items - QString path = EditOutputPath->text(); + TQString path = EditOutputPath->text(); if (path.right(1) != "/") path = path + "/"; path = path + "kipi_printwizard_"; @@ -386,16 +375,16 @@ void FrmPrintWizard::FrmPrintWizardBaseSelected(const QString &) if (RdoOutputGimp->isChecked()) { // now output the items - QString path = m_tempPath; + TQString path = m_tempPath; if (!checkTempPath(this, path)) return; path = path + "kipi_tmp_"; if (m_gimpFiles.count() > 0) removeGimpFiles(); m_gimpFiles = printPhotosToFile(m_photos, path, s); - QStringList args; + TQStringList args; args << "gimp-remote"; - for(QStringList::Iterator it = m_gimpFiles.begin(); it != m_gimpFiles.end(); ++it) + for(TQStringList::Iterator it = m_gimpFiles.begin(); it != m_gimpFiles.end(); ++it) args << (*it); if (!launchExternalApp(args)) { @@ -406,11 +395,11 @@ void FrmPrintWizard::FrmPrintWizardBaseSelected(const QString &) } } -double getMaxDPI(QPtrList<TPhoto> photos, QPtrList<QRect> layouts, unsigned int current) +double getMaxDPI(TQPtrList<TPhoto> photos, TQPtrList<TQRect> tqlayouts, unsigned int current) { - Q_ASSERT(layouts.count() > 1); + Q_ASSERT(tqlayouts.count() > 1); - QRect *layout = layouts.at(1); + TQRect *tqlayout = tqlayouts.at(1); double maxDPI = 0.0; @@ -418,12 +407,12 @@ double getMaxDPI(QPtrList<TPhoto> photos, QPtrList<QRect> layouts, unsigned int { TPhoto *photo = photos.at(current); double dpi = ((double)photo->cropRegion.width() + (double)photo->cropRegion.height()) / - (((double)layout->width() / 1000.0) + ((double)layout->height() / 1000.0)); + (((double)tqlayout->width() / 1000.0) + ((double)tqlayout->height() / 1000.0)); if (dpi > maxDPI) maxDPI = dpi; // iterate to the next position - layout = layouts.next(); - if (layout == 0) + tqlayout = tqlayouts.next(); + if (tqlayout == 0) { break; } @@ -431,30 +420,30 @@ double getMaxDPI(QPtrList<TPhoto> photos, QPtrList<QRect> layouts, unsigned int return maxDPI; } -QRect * FrmPrintWizard::getLayout(int photoIndex) +TQRect * FrmPrintWizard::getLayout(int photoIndex) { TPhotoSize *s = m_photoSizes.at(ListPhotoSizes->currentItem()); // how many photos would actually be printed, including copies? int photoCount = (photoIndex + 1); - // how many pages? Recall that the first layout item is the paper size - int photosPerPage = s->layouts.count() - 1; + // how many pages? Recall that the first tqlayout item is the paper size + int photosPerPage = s->tqlayouts.count() - 1; int remainder = photoCount % photosPerPage; int retVal = remainder; if (remainder == 0) retVal = photosPerPage; - return s->layouts.at(retVal); + return s->tqlayouts.at(retVal); } int FrmPrintWizard::getPageCount() { - // get the selected layout + // get the selected tqlayout TPhotoSize *s = m_photoSizes.at(ListPhotoSizes->currentItem()); int photoCount = m_photos.count(); - // how many pages? Recall that the first layout item is the paper size - int photosPerPage = s->layouts.count() - 1; + // how many pages? Recall that the first tqlayout item is the paper size + int photosPerPage = s->tqlayouts.count() - 1; int remainder = photoCount % photosPerPage; int emptySlots = 0; if (remainder > 0) @@ -468,25 +457,25 @@ int FrmPrintWizard::getPageCount() const float FONT_HEIGHT_RATIO = 0.8; -void FrmPrintWizard::printCaption(QPainter &p, TPhoto*photo, int captionW, int captionH, QString caption) +void FrmPrintWizard::printCaption(TQPainter &p, TPhoto*photo, int captionW, int captionH, TQString caption) { // PENDING anaselli TPhoto*photo will be needed to add a per photo caption management - QStringList captionByLines; + TQStringList captionByLines; uint captionIndex = 0; while (captionIndex < caption.length()) { - QString newLine; + TQString newLine; bool breakLine = false; // End Of Line found - uint currIndex; // Caption QString current index + uint currIndex; // Caption TQString current index // Check minimal lines dimension //TODO fix length, maybe useless uint captionLineLocalLength = 40; for ( currIndex = captionIndex; currIndex < caption.length() && !breakLine; currIndex++ ) - if( caption[currIndex] == QChar('\n') || caption[currIndex].isSpace() ) + if( caption[currIndex] == TQChar('\n') || caption[currIndex].isSpace() ) breakLine = true; if (captionLineLocalLength <= (currIndex - captionIndex)) @@ -499,7 +488,7 @@ void FrmPrintWizard::printCaption(QPainter &p, TPhoto*photo, int captionW, int c currIndex < caption.length() && !breakLine; currIndex++ ) { - breakLine = (caption[currIndex] == QChar('\n')) ? true : false; + breakLine = (caption[currIndex] == TQChar('\n')) ? true : false; if (breakLine) newLine.append( ' ' ); @@ -519,12 +508,12 @@ void FrmPrintWizard::printCaption(QPainter &p, TPhoto*photo, int captionW, int c captionByLines.prepend(newLine.stripWhiteSpace()); } - QFont font(m_font_name->currentFont()); - font.setStyleHint(QFont::SansSerif); + TQFont font(m_font_name->currentFont()); + font.setStyleHint(TQFont::SansSerif); font.setPixelSize( (int)(captionH * FONT_HEIGHT_RATIO) ); - font.setWeight(QFont::Normal); + font.setWeight(TQFont::Normal); - QFontMetrics fm( font ); + TQFontMetrics fm( font ); int pixelsHigh = fm.height(); p.setFont(font); @@ -537,24 +526,24 @@ void FrmPrintWizard::printCaption(QPainter &p, TPhoto*photo, int captionW, int c { if (lineNumber > 0) p.translate(0, -(int)(pixelsHigh)); - QRect r(0, 0, captionW, captionH); - p.drawText(r, Qt::AlignLeft, captionByLines[lineNumber], -1, &r); + TQRect r(0, 0, captionW, captionH); + p.drawText(r, TQt::AlignLeft, captionByLines[lineNumber], -1, &r); } } -QString FrmPrintWizard::captionFormatter(TPhoto *photo, const QString& format) +TQString FrmPrintWizard::captionFormatter(TPhoto *photo, const TQString& format) { - QString str=format; + TQString str=format; - QFileInfo fi(photo->filename.path()); - QString resolution; - QSize imageSize = photo->exiv2Iface()->getImageDimensions(); + TQFileInfo fi(photo->filename.path()); + TQString resolution; + TQSize imageSize = photo->exiv2Iface()->getImageDimensions(); if (imageSize.isValid()) { - resolution = QString( "%1x%2" ).arg( imageSize.width()).arg( imageSize.height()); + resolution = TQString( "%1x%2" ).tqarg( imageSize.width()).tqarg( imageSize.height()); } - str.replace("\\n", "\n"); + str.tqreplace("\\n", "\n"); // %f filename // %c comment @@ -564,28 +553,28 @@ QString FrmPrintWizard::captionFormatter(TPhoto *photo, const QString& format) // %r resolution // %a aperture // %l focal length - str.replace("%f", fi.fileName()); - str.replace("%c", photo->exiv2Iface()->getExifComment()); - str.replace("%d", KGlobal::locale()->formatDateTime(photo->exiv2Iface()->getImageDateTime(), + str.tqreplace("%f", fi.fileName()); + str.tqreplace("%c", photo->exiv2Iface()->getExifComment()); + str.tqreplace("%d", KGlobal::locale()->formatDateTime(photo->exiv2Iface()->getImageDateTime(), false, false)); - str.replace("%t", photo->exiv2Iface()->getExifTagString("Exif.Photo.ExposureTime")); - str.replace("%i", photo->exiv2Iface()->getExifTagString("Exif.Photo.ISOSpeedRatings")); - str.replace("%r", resolution); - str.replace("%a", photo->exiv2Iface()->getExifTagString("Exif.Photo.FNumber")); - str.replace("%l", photo->exiv2Iface()->getExifTagString("Exif.Photo.FocalLength")); + str.tqreplace("%t", photo->exiv2Iface()->getExifTagString("Exif.Photo.ExposureTime")); + str.tqreplace("%i", photo->exiv2Iface()->getExifTagString("Exif.Photo.ISOSpeedRatings")); + str.tqreplace("%r", resolution); + str.tqreplace("%a", photo->exiv2Iface()->getExifTagString("Exif.Photo.FNumber")); + str.tqreplace("%l", photo->exiv2Iface()->getExifTagString("Exif.Photo.FocalLength")); return str; } -bool FrmPrintWizard::paintOnePage(QPainter &p, QPtrList<TPhoto> photos, QPtrList<QRect> layouts, +bool FrmPrintWizard::paintOnePage(TQPainter &p, TQPtrList<TPhoto> photos, TQPtrList<TQRect> tqlayouts, int captionType, unsigned int ¤t, bool useThumbnails) { - Q_ASSERT(layouts.count() > 1); + Q_ASSERT(tqlayouts.count() > 1); if (photos.count() == 0) return true; // no photos => last photo - QRect *srcPage = layouts.at(0); - QRect *layout = layouts.at(1); + TQRect *srcPage = tqlayouts.at(0); + TQRect *tqlayout = tqlayouts.at(1); // scale the page size to best fit the painter // size the rectangle based on the minimum image dimension @@ -628,7 +617,7 @@ bool FrmPrintWizard::paintOnePage(QPainter &p, QPtrList<TPhoto> photos, QPtrList { TPhoto *photo = photos.at(current); // crop - QImage img; + TQImage img; if (useThumbnails) img = photo->thumbnail().convertToImage(); else @@ -638,7 +627,7 @@ bool FrmPrintWizard::paintOnePage(QPainter &p, QPtrList<TPhoto> photos, QPtrList if (photo->rotation != 0) { // rotate - QWMatrix matrix; + TQWMatrix matrix; matrix.rotate(photo->rotation); img = img.xForm(matrix); } @@ -660,23 +649,23 @@ bool FrmPrintWizard::paintOnePage(QPainter &p, QPtrList<TPhoto> photos, QPtrList int w = NINT((double)photo->cropRegion.width() * xRatio); int h = NINT((double)photo->cropRegion.height() * yRatio); - img = img.copy(QRect(x1, y1, w, h)); + img = img.copy(TQRect(x1, y1, w, h)); } else img = img.copy(photo->cropRegion); - int x1 = NINT((double)layout->left() * xRatio); - int y1 = NINT((double)layout->top() * yRatio); - int w = NINT((double)layout->width() * xRatio); - int h = NINT((double)layout->height() * yRatio); + int x1 = NINT((double)tqlayout->left() * xRatio); + int y1 = NINT((double)tqlayout->top() * yRatio); + int w = NINT((double)tqlayout->width() * xRatio); + int h = NINT((double)tqlayout->height() * yRatio); - p.drawImage( QRect(x1 + left, y1 + top, w, h), img ); + p.drawImage( TQRect(x1 + left, y1 + top, w, h), img ); if (captionType > 0) { p.save(); - QString caption; - QString format; + TQString caption; + TQString format; switch (captionType) { case FileNames: @@ -703,7 +692,7 @@ bool FrmPrintWizard::paintOnePage(QPainter &p, QPtrList<TPhoto> photos, QPtrList // next, do we rotate? int captionW = w-2; double ratio = m_font_size->value() * 0.01; - int captionH = (int)(QMIN(w, h) * ratio); + int captionH = (int)(TQMIN(w, h) * ratio); int exifOrientation = photo->exiv2Iface()->getImageOrientation(); int orientatation = photo->rotation; @@ -753,8 +742,8 @@ bool FrmPrintWizard::paintOnePage(QPainter &p, QPtrList<TPhoto> photos, QPtrList } // caption // iterate to the next position - layout = layouts.next(); - if (layout == 0) + tqlayout = tqlayouts.next(); + if (tqlayout == 0) { current++; break; @@ -765,19 +754,19 @@ bool FrmPrintWizard::paintOnePage(QPainter &p, QPtrList<TPhoto> photos, QPtrList } -// Like above, but outputs to an initialized QImage. UseThumbnails is +// Like above, but outputs to an initialized TQImage. UseThumbnails is // not an option. -// We have to use QImage for saving to a file, otherwise we would have -// to use a QPixmap, which will have the same bit depth as the display. +// We have to use TQImage for saving to a file, otherwise we would have +// to use a TQPixmap, which will have the same bit depth as the display. // So someone with an 8-bit display would not be able to save 24-bit // images! -bool FrmPrintWizard::paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<QRect> layouts, +bool FrmPrintWizard::paintOnePage(TQImage &p, TQPtrList<TPhoto> photos, TQPtrList<TQRect> tqlayouts, int captionType, unsigned int ¤t) { - Q_ASSERT(layouts.count() > 1); + Q_ASSERT(tqlayouts.count() > 1); - QRect *srcPage = layouts.at(0); - QRect *layout = layouts.at(1); + TQRect *srcPage = tqlayouts.at(0); + TQRect *tqlayout = tqlayouts.at(1); // scale the page size to best fit the painter // size the rectangle based on the minimum image dimension @@ -818,27 +807,27 @@ bool FrmPrintWizard::paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<Q { TPhoto *photo = photos.at(current); // crop - QImage img; + TQImage img; img = photo->loadPhoto(); // next, do we rotate? if (photo->rotation != 0) { // rotate - QWMatrix matrix; + TQWMatrix matrix; matrix.rotate(photo->rotation); img = img.xForm(matrix); } img = img.copy(photo->cropRegion); - int x1 = NINT((double)layout->left() * xRatio); - int y1 = NINT((double)layout->top() * yRatio); - int w = NINT((double)layout->width() * xRatio); - int h = NINT((double)layout->height() * yRatio); + int x1 = NINT((double)tqlayout->left() * xRatio); + int y1 = NINT((double)tqlayout->top() * yRatio); + int w = NINT((double)tqlayout->width() * xRatio); + int h = NINT((double)tqlayout->height() * yRatio); // We can use scaleFree because the crop frame should have the proper dimensions. - img = img.smoothScale(w, h, QImage::ScaleFree); + img = img.smoothScale(w, h, TQ_ScaleFree); // don't have drawimage, so we copy the pixels over manually for(int srcY = 0; srcY < img.height(); srcY++) for(int srcX = 0; srcX < img.width(); srcX++) @@ -849,8 +838,8 @@ bool FrmPrintWizard::paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<Q if (captionType != NoCaptions) { // Now draw the caption - QString caption; - QString format; + TQString caption; + TQString format; switch (captionType) { case FileNames: @@ -874,7 +863,7 @@ bool FrmPrintWizard::paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<Q int captionW = w-2; double ratio = m_font_size->value() * 0.01; - int captionH = (int)(QMIN(w, h) * ratio); + int captionH = (int)(TQMIN(w, h) * ratio); int exifOrientation = photo->exiv2Iface()->getImageOrientation(); int orientatation = photo->rotation; @@ -891,10 +880,10 @@ bool FrmPrintWizard::paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<Q captionW = h; } - QPixmap pixmap(w-2, img.height()-2); + TQPixmap pixmap(w-2, img.height()-2); //TODO black is not ok if font is black... - pixmap.fill(Qt::black); - QPainter painter; + pixmap.fill(TQt::black); + TQPainter painter; painter.begin(&pixmap); painter.rotate(orientatation); kdDebug( 51000 ) << "rotation " << photo->rotation << " orientation " << orientatation << endl; @@ -929,8 +918,8 @@ bool FrmPrintWizard::paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<Q painter.end(); // now put it on picture - QImage fontImage = pixmap.convertToImage(); - QRgb black = QColor(0, 0, 0).rgb(); + TQImage fontImage = pixmap.convertToImage(); + TQRgb black = TQColor(0, 0, 0).rgb(); for(int srcY = 0; srcY < fontImage.height(); srcY++) for(int srcX = 0; srcX < fontImage.width(); srcX++) { @@ -940,8 +929,8 @@ bool FrmPrintWizard::paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<Q } // caption // iterate to the next position - layout = layouts.next(); - if (layout == 0) + tqlayout = tqlayouts.next(); + if (tqlayout == 0) { current++; break; @@ -955,12 +944,12 @@ bool FrmPrintWizard::paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<Q // update the pages to be printed and preview first/last pages void FrmPrintWizard::previewPhotos() { - // get the selected layout + // get the selected tqlayout TPhotoSize *s = m_photoSizes.at(ListPhotoSizes->currentItem()); int photoCount = m_photos.count(); - // how many pages? Recall that the first layout item is the paper size - int photosPerPage = s->layouts.count() - 1; + // how many pages? Recall that the first tqlayout item is the paper size + int photosPerPage = s->tqlayouts.count() - 1; int remainder = photoCount % photosPerPage; int emptySlots = 0; if (remainder > 0) @@ -969,9 +958,9 @@ void FrmPrintWizard::previewPhotos() if (emptySlots > 0) pageCount++; - LblPhotoCount->setText(QString::number(photoCount)); - LblSheetsPrinted->setText(QString::number(pageCount)); - LblEmptySlots->setText(QString::number(emptySlots)); + LblPhotoCount->setText(TQString::number(photoCount)); + LblSheetsPrinted->setText(TQString::number(pageCount)); + LblEmptySlots->setText(TQString::number(emptySlots)); // photo previews // preview the first page. @@ -984,8 +973,8 @@ void FrmPrintWizard::previewPhotos() if (page == m_currentPreviewPage) { photo->cropRegion.setRect(-1, -1, -1, -1); photo->rotation = 0; - int w = s->layouts.at(count+1)->width(); - int h = s->layouts.at(count+1)->height(); + int w = s->tqlayouts.at(count+1)->width(); + int h = s->tqlayouts.at(count+1)->height(); cropFrame->init(photo, w, h, s->autoRotate, false); } count++; @@ -1000,15 +989,15 @@ void FrmPrintWizard::previewPhotos() } // send this photo list to the painter - QPixmap img(BmpFirstPagePreview->width(), BmpFirstPagePreview->height()); - QPainter p; + TQPixmap img(BmpFirstPagePreview->width(), BmpFirstPagePreview->height()); + TQPainter p; p.begin(&img); p.fillRect(0, 0, img.width(), img.height(), this->paletteBackgroundColor()); - paintOnePage(p, m_photos, s->layouts, m_captions->currentItem(), current, true); + paintOnePage(p, m_photos, s->tqlayouts, m_captions->currentItem(), current, true); p.end(); BmpFirstPagePreview->setPixmap(img); - LblPreview->setText(i18n("Page ") + QString::number(m_currentPreviewPage + 1) + i18n(" of ") + QString::number(getPageCount())); - LblPreview->setText(i18n("Page %1 of %2").arg(m_currentPreviewPage + 1).arg(getPageCount())); + LblPreview->setText(i18n("Page ") + TQString::number(m_currentPreviewPage + 1) + i18n(" of ") + TQString::number(getPageCount())); + LblPreview->setText(i18n("Page %1 of %2").tqarg(m_currentPreviewPage + 1).tqarg(getPageCount())); manageBtnPreviewPage(); manageBtnPrintOrder(); @@ -1025,7 +1014,7 @@ void FrmPrintWizard::ListPhotoSizes_highlighted ( int ) previewPhotos(); } -void FrmPrintWizard::ListPhotoSizes_selected( QListBoxItem * ) +void FrmPrintWizard::ListPhotoSizes_selected( TQListBoxItem * ) { previewPhotos(); } @@ -1071,7 +1060,7 @@ void FrmPrintWizard::ListPhotoOrder_highlighted ( int index ) manageBtnPrintOrder(); } -void FrmPrintWizard::ListPrintOrder_selected( QListBoxItem * ) +void FrmPrintWizard::ListPrintOrder_selected( TQListBoxItem * ) { int currentIndex = ListPrintOrder->currentItem(); EditCopies->blockSignals(true); @@ -1087,7 +1076,7 @@ void FrmPrintWizard::EditCopies_valueChanged( int copies ) return; int currentIndex = ListPrintOrder->currentItem(); - QString item = ListPrintOrder->selectedItem()->text(); + TQString item = ListPrintOrder->selectedItem()->text(); TPhoto *pCurPhoto = m_photos.at(currentIndex); KURL fileName = pCurPhoto->filename; @@ -1128,7 +1117,7 @@ void FrmPrintWizard::EditCopies_valueChanged( int copies ) } } - LblPhotoCount->setText(QString::number(m_photos.count())); + LblPhotoCount->setText(TQString::number(m_photos.count())); int index = 0; for (TPhoto *pPhoto = m_photos.first(); pPhoto != 0; pPhoto = m_photos.next(), index++) @@ -1149,11 +1138,11 @@ void FrmPrintWizard::EditCopies_valueChanged( int copies ) void FrmPrintWizard::removeGimpFiles() { - for(QStringList::Iterator it = m_gimpFiles.begin(); it != m_gimpFiles.end(); ++it) + for(TQStringList::Iterator it = m_gimpFiles.begin(); it != m_gimpFiles.end(); ++it) { - if (QFile::exists(*it)) + if (TQFile::exists(*it)) { - if (QFile::remove(*it) == false) + if (TQFile::remove(*it) == false) { KMessageBox::sorry(this, i18n("Could not remove the Gimp's temporary files.")); break; @@ -1170,7 +1159,7 @@ void FrmPrintWizard::accept() // if we output to Gimp, we need to remove the temp files if (m_gimpFiles.count() > 0) removeGimpFiles(); - QDialog::accept(); + TQDialog::accept(); } // this is called when Cancel is clicked. @@ -1179,10 +1168,10 @@ void FrmPrintWizard::reject() m_cancelPrinting = true; if (m_gimpFiles.count() > 0) removeGimpFiles(); - QDialog::reject(); + TQDialog::reject(); } -void FrmPrintWizard::printPhotos(QPtrList<TPhoto> photos, QPtrList<QRect> layouts, KPrinter &printer) +void FrmPrintWizard::printPhotos(TQPtrList<TPhoto> photos, TQPtrList<TQRect> tqlayouts, KPrinter &printer) { m_cancelPrinting = false; LblPrintProgress->setText(""); @@ -1191,7 +1180,7 @@ void FrmPrintWizard::printPhotos(QPtrList<TPhoto> photos, QPtrList<QRect> layout this->finishButton()->setEnabled(false); KApplication::kApplication()->processEvents(); - QPainter p; + TQPainter p; p.begin(&printer); unsigned int current = 0; @@ -1199,7 +1188,7 @@ void FrmPrintWizard::printPhotos(QPtrList<TPhoto> photos, QPtrList<QRect> layout bool printing = true; while(printing) { - printing = paintOnePage(p, photos, layouts, m_captions->currentItem(), current); + printing = paintOnePage(p, photos, tqlayouts, m_captions->currentItem(), current); if (printing) printer.newPage(); PrgPrintProgress->setProgress(current); @@ -1219,9 +1208,9 @@ void FrmPrintWizard::printPhotos(QPtrList<TPhoto> photos, QPtrList<QRect> layout LblPrintProgress->setText(i18n("Complete. Click Finish to exit the Print Wizard.")); } -QStringList FrmPrintWizard::printPhotosToFile(QPtrList<TPhoto> photos, QString &baseFilename, TPhotoSize* layouts) +TQStringList FrmPrintWizard::printPhotosToFile(TQPtrList<TPhoto> photos, TQString &baseFilename, TPhotoSize* tqlayouts) { - Q_ASSERT(layouts->layouts.count() > 1); + Q_ASSERT(tqlayouts->tqlayouts.count() > 1); m_cancelPrinting = false; LblPrintProgress->setText(""); @@ -1233,27 +1222,27 @@ QStringList FrmPrintWizard::printPhotosToFile(QPtrList<TPhoto> photos, QString & unsigned int current = 0; int pageCount = 1; bool printing = true; - QStringList files; + TQStringList files; - QRect *srcPage = layouts->layouts.at(0); + TQRect *srcPage = tqlayouts->tqlayouts.at(0); while (printing) { // make a pixmap to save to file. Make it just big enough to show the // highest-dpi image on the page without losing data. - double dpi = layouts->dpi; + double dpi = tqlayouts->dpi; if (dpi == 0.0) - dpi = getMaxDPI(photos, layouts->layouts, current) * 1.1; + dpi = getMaxDPI(photos, tqlayouts->tqlayouts, current) * 1.1; int w = NINT(srcPage->width() / 1000.0 * dpi); int h = NINT(srcPage->height() / 1000.0 * dpi); - QImage *img = new QImage(w, h, 32); + TQImage *img = new TQImage(w, h, 32); if (!img) break; // save this page out to file - QString filename = baseFilename + QString::number(pageCount) + ".jpeg"; + TQString filename = baseFilename + TQString::number(pageCount) + ".jpeg"; bool saveFile = true; - if (QFile::exists(filename)) + if (TQFile::exists(filename)) { int result = KMessageBox::warningYesNoCancel( this, i18n("The following file will be overwritten. Do you want to overwrite this file?") + @@ -1269,7 +1258,7 @@ QStringList FrmPrintWizard::printPhotosToFile(QPtrList<TPhoto> photos, QString & // paint this page, even if we aren't saving it to keep the page // count accurate. - printing = paintOnePage(*img, photos, layouts->layouts, m_captions->currentItem(), current); + printing = paintOnePage(*img, photos, tqlayouts->tqlayouts, m_captions->currentItem(), current); if (saveFile) { @@ -1315,24 +1304,24 @@ void FrmPrintWizard::loadSettings() int captions = config.readNumEntry("ImageCaptions", 0); m_captions->setCurrentItem(captions); // caption color - QColor defColor(Qt::yellow); - QColor color = config.readColorEntry("CaptionColor", &defColor); + TQColor defColor(TQt::yellow); + TQColor color = config.readColorEntry("CaptionColor", &defColor); m_font_color->setColor(color); // caption font - QFont defFont("Sans Serif"); - QFont font = config.readFontEntry ( "CaptionFont", &defFont); + TQFont defFont("Sans Serif"); + TQFont font = config.readFontEntry ( "CaptionFont", &defFont); m_font_name->setCurrentFont(font.family()); // caption size int fontSize = config.readNumEntry("CaptionSize", 4); m_font_size->setValue(fontSize); // free caption - QString captionTxt = config.readEntry("FreeCaption"); + TQString captionTxt = config.readEntry("FreeCaption"); m_FreeCaptionFormat->setText(captionTxt); //enable right caption stuff CaptionChanged(captions); // set the last output path - QString outputPath = config.readPathEntry("OutputPath", EditOutputPath->text()); + TQString outputPath = config.readPathEntry("OutputPath", EditOutputPath->text()); EditOutputPath->setText(outputPath); // set the proper radio button @@ -1340,8 +1329,8 @@ void FrmPrintWizard::loadSettings() GrpOutputSettings->setButton(id); // photo size - QString photoSize = config.readEntry("PhotoSize"); - QListBoxItem *item = ListPhotoSizes->findItem(photoSize); + TQString photoSize = config.readEntry("PhotoSize"); + TQListBoxItem *item = ListPhotoSizes->tqfindItem(photoSize); if (item) ListPhotoSizes->setCurrentItem(item); else @@ -1378,7 +1367,7 @@ void FrmPrintWizard::saveSettings() // caption color config.writeEntry("CaptionColor", m_font_color->color()); // caption font - config.writeEntry ("CaptionFont", QFont(m_font_name->currentFont())); + config.writeEntry ("CaptionFont", TQFont(m_font_name->currentFont())); // caption size config.writeEntry("CaptionSize", m_font_size->value()); // free caption @@ -1405,7 +1394,7 @@ void FrmPrintWizard::GrpOutputSettings_clicked(int id) { if (!EditOutputPath->text().isEmpty()) { - QFileInfo fileInfo(EditOutputPath->text()); + TQFileInfo fileInfo(EditOutputPath->text()); if (fileInfo.exists() && fileInfo.isDir()) this->nextButton()->setEnabled(true); } @@ -1419,7 +1408,7 @@ void FrmPrintWizard::GrpOutputSettings_clicked(int id) void FrmPrintWizard::BtnBrowseOutputPath_clicked( void ) { - QString newPath = KFileDialog::getExistingDirectory(EditOutputPath->text(), this, "Select Output Folder"); + TQString newPath = KFileDialog::getExistingDirectory(EditOutputPath->text(), this, "Select Output Folder"); if (newPath.isEmpty()) return; // assume this directory exists @@ -1460,7 +1449,7 @@ void FrmPrintWizard::CaptionChanged(int captionUsed) -void FrmPrintWizard::EditOutputPath_textChanged(const QString &) +void FrmPrintWizard::EditOutputPath_textChanged(const TQString &) { GrpOutputSettings_clicked(GrpOutputSettings->id(GrpOutputSettings->selected())); } @@ -1483,8 +1472,8 @@ void FrmPrintWizard::BtnPrintOrderUp_clicked() { return; int currentIndex = ListPrintOrder->currentItem(); - QString item1 = ListPrintOrder->selectedItem()->text(); - QString item2 = ListPrintOrder->item(currentIndex - 1)->text(); + TQString item1 = ListPrintOrder->selectedItem()->text(); + TQString item2 = ListPrintOrder->item(currentIndex - 1)->text(); // swap these items ListPrintOrder->changeItem(item2, currentIndex); @@ -1505,8 +1494,8 @@ void FrmPrintWizard::BtnPrintOrderDown_clicked() { return; int currentIndex = ListPrintOrder->currentItem(); - QString item1 = ListPrintOrder->selectedItem()->text(); - QString item2 = ListPrintOrder->item(currentIndex + 1)->text(); + TQString item1 = ListPrintOrder->selectedItem()->text(); + TQString item2 = ListPrintOrder->item(currentIndex + 1)->text(); // swap these items ListPrintOrder->changeItem(item2, currentIndex); @@ -1536,7 +1525,7 @@ void FrmPrintWizard::BtnPreviewPageUp_clicked() { } // create a MxN grid of photos, fitting on the page -TPhotoSize * createPhotoGrid(int pageWidth, int pageHeight, QString label, int rows, int columns) { +TPhotoSize * createPhotoGrid(int pageWidth, int pageHeight, TQString label, int rows, int columns) { int MARGIN = (int)((pageWidth + pageHeight) / 2 * 0.04 + 0.5); int GAP = MARGIN / 4; int photoWidth = (pageWidth - (MARGIN * 2) - ((columns-1) * GAP)) / columns; @@ -1546,13 +1535,13 @@ TPhotoSize * createPhotoGrid(int pageWidth, int pageHeight, QString label, int r p->label = label; p->dpi = 100; p->autoRotate = false; - p->layouts.append(new QRect(0, 0, pageWidth, pageHeight)); + p->tqlayouts.append(new TQRect(0, 0, pageWidth, pageHeight)); int row = 0; for(int y=MARGIN; row < rows && y < pageHeight - MARGIN; y += photoHeight + GAP) { int col = 0; for(int x=MARGIN; col < columns && x < pageWidth - MARGIN; x += photoWidth + GAP) { - p->layouts.append(new QRect(x, y, photoWidth, photoHeight)); + p->tqlayouts.append(new TQRect(x, y, photoWidth, photoHeight)); col++; } row++; @@ -1586,12 +1575,12 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->dpi = 0; p->autoRotate = true; // page size - p->layouts.append(new QRect(0, 0, 8500, 11000)); - // photo layouts - p->layouts.append(new QRect( 700, 500, 3500, 5000)); - p->layouts.append(new QRect(4300, 500, 3500, 5000)); - p->layouts.append(new QRect( 700, 5600, 3500, 5000)); - p->layouts.append(new QRect(4300, 5600, 3500, 5000)); + p->tqlayouts.append(new TQRect(0, 0, 8500, 11000)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 700, 500, 3500, 5000)); + p->tqlayouts.append(new TQRect(4300, 500, 3500, 5000)); + p->tqlayouts.append(new TQRect( 700, 5600, 3500, 5000)); + p->tqlayouts.append(new TQRect(4300, 5600, 3500, 5000)); // add to the list m_photoSizes.append(p); @@ -1601,11 +1590,11 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->dpi = 0; p->autoRotate = true; // page size - p->layouts.append(new QRect(0, 0, 8500, 11000)); - // photo layouts - p->layouts.append(new QRect( 225, 500, 4000, 6000)); - p->layouts.append(new QRect(4275, 500, 4000, 6000)); - p->layouts.append(new QRect(1250, 6600, 6000, 4000)); + p->tqlayouts.append(new TQRect(0, 0, 8500, 11000)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 225, 500, 4000, 6000)); + p->tqlayouts.append(new TQRect(4275, 500, 4000, 6000)); + p->tqlayouts.append(new TQRect(1250, 6600, 6000, 4000)); // add to the list m_photoSizes.append(p); @@ -1615,10 +1604,10 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->dpi = 0; p->autoRotate = true; // page size - p->layouts.append(new QRect(0, 0, 8500, 11000)); - // photo layouts - p->layouts.append(new QRect( 1250, 1000, 6000, 4000)); - p->layouts.append(new QRect( 1250, 6000, 6000, 4000)); + p->tqlayouts.append(new TQRect(0, 0, 8500, 11000)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 1250, 1000, 6000, 4000)); + p->tqlayouts.append(new TQRect( 1250, 6000, 6000, 4000)); // add to the list m_photoSizes.append(p); @@ -1628,10 +1617,10 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->dpi = 0; p->autoRotate = true; // page size - p->layouts.append(new QRect(0, 0, 8500, 11000)); - // photo layouts - p->layouts.append(new QRect( 750, 500, 7000, 5000)); - p->layouts.append(new QRect( 750, 5750, 7000, 5000)); + p->tqlayouts.append(new TQRect(0, 0, 8500, 11000)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 750, 500, 7000, 5000)); + p->tqlayouts.append(new TQRect( 750, 5750, 7000, 5000)); // add to the list m_photoSizes.append(p); @@ -1641,9 +1630,9 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->dpi = 0; p->autoRotate = true; // page size - p->layouts.append(new QRect(0, 0, 8500, 11000)); - // photo layouts - p->layouts.append(new QRect(250, 500, 8000, 10000)); + p->tqlayouts.append(new TQRect(0, 0, 8500, 11000)); + // photo tqlayouts + p->tqlayouts.append(new TQRect(250, 500, 8000, 10000)); // add to the list m_photoSizes.append(p); @@ -1659,20 +1648,20 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->dpi = 0; p->autoRotate = false; // page size - p->layouts.append(new QRect(0, 0, 8500, 11000)); - // photo layouts + p->tqlayouts.append(new TQRect(0, 0, 8500, 11000)); + // photo tqlayouts // photo 1 is in the center, 3x4.5 - p->layouts.append(new QRect(2750, 3250, 3000, 4500)); + p->tqlayouts.append(new TQRect(2750, 3250, 3000, 4500)); // the remaining 1.5x2 photos begin with upper left and circle around // top row - p->layouts.append(new QRect(750, 750, 1500, 2000)); - p->layouts.append(new QRect(3500, 750, 1500, 2000)); - p->layouts.append(new QRect(6250, 750, 1500, 2000)); - p->layouts.append(new QRect(6250, 4500, 1500, 2000)); - p->layouts.append(new QRect(6250, 8250, 1500, 2000)); - p->layouts.append(new QRect(3500, 8250, 1500, 2000)); - p->layouts.append(new QRect(750, 8250, 1500, 2000)); - p->layouts.append(new QRect(750, 4500, 1500, 2000)); + p->tqlayouts.append(new TQRect(750, 750, 1500, 2000)); + p->tqlayouts.append(new TQRect(3500, 750, 1500, 2000)); + p->tqlayouts.append(new TQRect(6250, 750, 1500, 2000)); + p->tqlayouts.append(new TQRect(6250, 4500, 1500, 2000)); + p->tqlayouts.append(new TQRect(6250, 8250, 1500, 2000)); + p->tqlayouts.append(new TQRect(3500, 8250, 1500, 2000)); + p->tqlayouts.append(new TQRect(750, 8250, 1500, 2000)); + p->tqlayouts.append(new TQRect(750, 4500, 1500, 2000)); m_photoSizes.append(p); // album collage 2 @@ -1681,14 +1670,14 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->dpi = 0; p->autoRotate = false; // page size - p->layouts.append(new QRect(0, 0, 8500, 11000)); - // photo layouts - p->layouts.append(new QRect(1000, 1000, 3000, 3000)); - p->layouts.append(new QRect(5000, 1000, 2500, 1250)); - p->layouts.append(new QRect(5000, 2750, 2500, 1250)); - p->layouts.append(new QRect(1000, 5000, 1500, 2000)); - p->layouts.append(new QRect(2750, 5000, 4750, 2000)); - p->layouts.append(new QRect(1000, 8000, 6500, 2000)); + p->tqlayouts.append(new TQRect(0, 0, 8500, 11000)); + // photo tqlayouts + p->tqlayouts.append(new TQRect(1000, 1000, 3000, 3000)); + p->tqlayouts.append(new TQRect(5000, 1000, 2500, 1250)); + p->tqlayouts.append(new TQRect(5000, 2750, 2500, 1250)); + p->tqlayouts.append(new TQRect(1000, 5000, 1500, 2000)); + p->tqlayouts.append(new TQRect(2750, 5000, 4750, 2000)); + p->tqlayouts.append(new TQRect(1000, 8000, 6500, 2000)); m_photoSizes.append(p); } // letter break; @@ -1705,9 +1694,9 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("21 x 29.7cm"); // page size - p->layouts.append(new QRect(0, 0, 2100, 2970)); - // photo layouts - p->layouts.append(new QRect( 0, 0, 2100, 2970)); + p->tqlayouts.append(new TQRect(0, 0, 2100, 2970)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 0, 0, 2100, 2970)); // add to the list m_photoSizes.append(p); @@ -1717,16 +1706,16 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("6 x 9cm (8 photos)"); // page size - p->layouts.append(new QRect(0, 0, 2100, 2970)); - // photo layouts - p->layouts.append(new QRect( 100, 100, 900, 600)); - p->layouts.append(new QRect(1100, 100, 900, 600)); - p->layouts.append(new QRect( 100, 800, 900, 600)); - p->layouts.append(new QRect(1100, 800, 900, 600)); - p->layouts.append(new QRect( 100, 1500, 900, 600)); - p->layouts.append(new QRect(1100, 1500, 900, 600)); - p->layouts.append(new QRect( 100, 2200, 900, 600)); - p->layouts.append(new QRect(1100, 2200, 900, 600)); + p->tqlayouts.append(new TQRect(0, 0, 2100, 2970)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 100, 100, 900, 600)); + p->tqlayouts.append(new TQRect(1100, 100, 900, 600)); + p->tqlayouts.append(new TQRect( 100, 800, 900, 600)); + p->tqlayouts.append(new TQRect(1100, 800, 900, 600)); + p->tqlayouts.append(new TQRect( 100, 1500, 900, 600)); + p->tqlayouts.append(new TQRect(1100, 1500, 900, 600)); + p->tqlayouts.append(new TQRect( 100, 2200, 900, 600)); + p->tqlayouts.append(new TQRect(1100, 2200, 900, 600)); // add to the list m_photoSizes.append(p); @@ -1736,12 +1725,12 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("9 x 13cm"); // page size - p->layouts.append(new QRect(0, 0, 2100, 2970)); - // photo layouts - p->layouts.append(new QRect( 100, 100, 900, 1300)); - p->layouts.append(new QRect(1100, 100, 900, 1300)); - p->layouts.append(new QRect( 100, 1500, 900, 1300)); - p->layouts.append(new QRect(1100, 1500, 900, 1300)); + p->tqlayouts.append(new TQRect(0, 0, 2100, 2970)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 100, 100, 900, 1300)); + p->tqlayouts.append(new TQRect(1100, 100, 900, 1300)); + p->tqlayouts.append(new TQRect( 100, 1500, 900, 1300)); + p->tqlayouts.append(new TQRect(1100, 1500, 900, 1300)); // add to the list m_photoSizes.append(p); @@ -1751,12 +1740,12 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("10 x 13.33cm"); // page size - p->layouts.append(new QRect(0, 0, 2100, 2970)); - // photo layouts - p->layouts.append(new QRect( 50, 100, 1000, 1333)); - p->layouts.append(new QRect(1060, 100, 1000, 1333)); - p->layouts.append(new QRect( 50, 1500, 1000, 1333)); - p->layouts.append(new QRect(1060, 1500, 1000, 1333)); + p->tqlayouts.append(new TQRect(0, 0, 2100, 2970)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 50, 100, 1000, 1333)); + p->tqlayouts.append(new TQRect(1060, 100, 1000, 1333)); + p->tqlayouts.append(new TQRect( 50, 1500, 1000, 1333)); + p->tqlayouts.append(new TQRect(1060, 1500, 1000, 1333)); // add to the list m_photoSizes.append(p); @@ -1766,11 +1755,11 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("10 x 15cm"); // page size - p->layouts.append(new QRect(0, 0, 2100, 2970)); - // photo layouts - p->layouts.append(new QRect( 50, 150, 1000, 1500)); - p->layouts.append(new QRect(1060, 150, 1000, 1500)); - p->layouts.append(new QRect( 300, 1750, 1500, 1000)); + p->tqlayouts.append(new TQRect(0, 0, 2100, 2970)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 50, 150, 1000, 1500)); + p->tqlayouts.append(new TQRect(1060, 150, 1000, 1500)); + p->tqlayouts.append(new TQRect( 300, 1750, 1500, 1000)); // add to the list m_photoSizes.append(p); @@ -1780,10 +1769,10 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("10 x 15cm Album"); // page size - p->layouts.append(new QRect(0, 0, 2100, 2970)); - // photo layouts - p->layouts.append(new QRect( 300, 350, 1500, 1000)); - p->layouts.append(new QRect( 300, 1620, 1500, 1000)); + p->tqlayouts.append(new TQRect(0, 0, 2100, 2970)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 300, 350, 1500, 1000)); + p->tqlayouts.append(new TQRect( 300, 1620, 1500, 1000)); // add to the list m_photoSizes.append(p); @@ -1793,10 +1782,10 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("11.5 x 15cm Album"); // page size - p->layouts.append(new QRect(0, 0, 2100, 2970)); - // photo layouts - p->layouts.append(new QRect( 300, 250, 1500, 1100)); - p->layouts.append(new QRect( 300, 1570, 1500, 1100)); + p->tqlayouts.append(new TQRect(0, 0, 2100, 2970)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 300, 250, 1500, 1100)); + p->tqlayouts.append(new TQRect( 300, 1570, 1500, 1100)); // add to the list m_photoSizes.append(p); @@ -1806,10 +1795,10 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("13 x 18cm"); // page size - p->layouts.append(new QRect(0, 0, 2100, 2970)); - // photo layouts - p->layouts.append(new QRect( 150, 150, 1800, 1300)); - p->layouts.append(new QRect( 150, 1520, 1800, 1300)); + p->tqlayouts.append(new TQRect(0, 0, 2100, 2970)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 150, 150, 1800, 1300)); + p->tqlayouts.append(new TQRect( 150, 1520, 1800, 1300)); // add to the list m_photoSizes.append(p); @@ -1819,9 +1808,9 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("20 x 25cm"); // page size - p->layouts.append(new QRect(0, 0, 2100, 2970)); - // photo layouts - p->layouts.append(new QRect( 50, 230, 2000, 2500)); + p->tqlayouts.append(new TQRect(0, 0, 2100, 2970)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 50, 230, 2000, 2500)); // add to the list m_photoSizes.append(p); @@ -1844,9 +1833,9 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("9 x 13cm"); // page size - p->layouts.append(new QRect(0, 0, 1050, 1480)); - // photo layouts - p->layouts.append(new QRect( 50, 100, 900, 1300)); + p->tqlayouts.append(new TQRect(0, 0, 1050, 1480)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 50, 100, 900, 1300)); // add to the list m_photoSizes.append(p); @@ -1856,9 +1845,9 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("10.5 x 14.8cm"); // page size - p->layouts.append(new QRect(0, 0, 1050, 1480)); - // photo layouts - p->layouts.append(new QRect(0, 0, 1050, 1480)); + p->tqlayouts.append(new TQRect(0, 0, 1050, 1480)); + // photo tqlayouts + p->tqlayouts.append(new TQRect(0, 0, 1050, 1480)); // add to the list m_photoSizes.append(p); @@ -1881,9 +1870,9 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("10 x 15cm"); // page size - p->layouts.append(new QRect(0, 0, 1016, 1524)); - // photo layouts - p->layouts.append(new QRect(0, 0, 1016, 1524)); + p->tqlayouts.append(new TQRect(0, 0, 1016, 1524)); + // photo tqlayouts + p->tqlayouts.append(new TQRect(0, 0, 1016, 1524)); // add to the list m_photoSizes.append(p); @@ -1893,9 +1882,9 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("9 x 13cm"); // page size - p->layouts.append(new QRect(0, 0, 1016, 1524)); - // photo layouts - p->layouts.append(new QRect( 50, 100, 900, 1300)); + p->tqlayouts.append(new TQRect(0, 0, 1016, 1524)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 50, 100, 900, 1300)); // add to the list m_photoSizes.append(p); @@ -1920,9 +1909,9 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("13 x 18cm"); // page size - p->layouts.append(new QRect(0, 0, 1270, 1778)); - // photo layouts - p->layouts.append(new QRect(0, 0, 1270, 1778)); + p->tqlayouts.append(new TQRect(0, 0, 1270, 1778)); + // photo tqlayouts + p->tqlayouts.append(new TQRect(0, 0, 1270, 1778)); // add to the list m_photoSizes.append(p); @@ -1932,9 +1921,9 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("10 x 15cm"); // page size - p->layouts.append(new QRect(0, 0, 1270, 1778)); - // photo layouts - p->layouts.append(new QRect(0, 0, 1016, 1524)); + p->tqlayouts.append(new TQRect(0, 0, 1270, 1778)); + // photo tqlayouts + p->tqlayouts.append(new TQRect(0, 0, 1016, 1524)); // add to the list m_photoSizes.append(p); @@ -1944,9 +1933,9 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = true; p->label = i18n("9 x 13cm"); // page size - p->layouts.append(new QRect(0, 0, 1270, 1778)); - // photo layouts - p->layouts.append(new QRect( 50, 100, 900, 1300)); + p->tqlayouts.append(new TQRect(0, 0, 1270, 1778)); + // photo tqlayouts + p->tqlayouts.append(new TQRect( 50, 100, 900, 1300)); // add to the list m_photoSizes.append(p); @@ -1961,7 +1950,7 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) default: { - kdDebug( 51000 ) << "Initializing Unsupported page layouts\n"; + kdDebug( 51000 ) << "Initializing Unsupported page tqlayouts\n"; // We don't support this page size yet. Just create a default page. TPhotoSize *p; p = new TPhotoSize; @@ -1969,8 +1958,8 @@ void FrmPrintWizard::initPhotoSizes(PageSize pageSize) p->autoRotate = false; p->label = i18n("Unsupported Paper Size"); // page size - p->layouts.append(new QRect(0, 0, 8500, 11000)); - p->layouts.append(new QRect(0, 0, 8500, 11000)); + p->tqlayouts.append(new TQRect(0, 0, 8500, 11000)); + p->tqlayouts.append(new TQRect(0, 0, 8500, 11000)); // add to the list m_photoSizes.append(p); } diff --git a/kipi-plugins/printwizard/frmprintwizard.h b/kipi-plugins/printwizard/frmprintwizard.h index 2eb25e1..1234317 100644 --- a/kipi-plugins/printwizard/frmprintwizard.h +++ b/kipi-plugins/printwizard/frmprintwizard.h @@ -18,9 +18,9 @@ #ifndef FRMPRINTWIZARD_H #define FRMPRINTWIZARD_H -// Qt includes. +// TQt includes. -#include <qwidget.h> +#include <tqwidget.h> // KDE includes. @@ -32,7 +32,7 @@ #include "tphoto.h" #include "frmprintwizardbase.h" -class QPushButton; +class TQPushButton; class KProcess; namespace KIPIPrintWizardPlugin @@ -41,15 +41,16 @@ namespace KIPIPrintWizardPlugin class FrmPrintWizardBase; typedef struct _TPhotoSize { - QString label; + TQString label; int dpi; bool autoRotate; - QPtrList<QRect> layouts; // first element is page size + TQPtrList<TQRect> tqlayouts; // first element is page size } TPhotoSize; class FrmPrintWizard : public FrmPrintWizardBase { Q_OBJECT + TQ_OBJECT private: @@ -70,17 +71,17 @@ private: Free }; - QPtrList<TPhoto> m_photos; - QPtrList<TPhotoSize> m_photoSizes; + TQPtrList<TPhoto> m_photos; + TQPtrList<TPhotoSize> m_photoSizes; PageSize m_pageSize; KProcess *m_Proc; - QString m_tempPath; + TQString m_tempPath; int m_currentPreviewPage; - QStringList m_gimpFiles; + TQStringList m_gimpFiles; - QPushButton *m_helpButton; + TQPushButton *m_helpButton; bool m_cancelPrinting; @@ -91,20 +92,20 @@ private: void removeGimpFiles(); void initPhotoSizes(PageSize pageSize); void previewPhotos(); - void printPhotos(QPtrList<TPhoto> photos, QPtrList<QRect> layouts, KPrinter &printer); - QStringList printPhotosToFile(QPtrList<TPhoto> photos, QString &baseFilename, TPhotoSize *layouts); + void printPhotos(TQPtrList<TPhoto> photos, TQPtrList<TQRect> tqlayouts, KPrinter &printer); + TQStringList printPhotosToFile(TQPtrList<TPhoto> photos, TQString &baseFilename, TPhotoSize *tqlayouts); void loadSettings(); void saveSettings(); int getPageCount(); - QString captionFormatter(TPhoto *photo, const QString& format); - void printCaption(QPainter &p, TPhoto*photo, int captionW, int captionH, QString caption); + TQString captionFormatter(TPhoto *photo, const TQString& format); + void printCaption(TQPainter &p, TPhoto*photo, int captionW, int captionH, TQString caption); - bool paintOnePage(QPainter &p, QPtrList<TPhoto> photos, QPtrList<QRect> layouts, + bool paintOnePage(TQPainter &p, TQPtrList<TPhoto> photos, TQPtrList<TQRect> tqlayouts, int captionType, unsigned int ¤t, bool useThumbnails = false); - bool paintOnePage(QImage &p, QPtrList<TPhoto> photos, QPtrList<QRect> layouts, + bool paintOnePage(TQImage &p, TQPtrList<TPhoto> photos, TQPtrList<TQRect> tqlayouts, int captionType, unsigned int ¤t); void manageBtnPrintOrder(); @@ -112,24 +113,24 @@ private: public: - FrmPrintWizard(QWidget *parent=0, const char *name=0); + FrmPrintWizard(TQWidget *tqparent=0, const char *name=0); ~FrmPrintWizard(); - void print( KURL::List fileList, QString tempPath); - QRect * getLayout(int photoIndex); + void print( KURL::List fileList, TQString tempPath); + TQRect * getLayout(int photoIndex); public slots: void BtnCropRotate_clicked(); void BtnCropNext_clicked(); void BtnCropPrev_clicked(); - void FrmPrintWizardBaseSelected(const QString &); - void ListPhotoSizes_selected( QListBoxItem * ); + void FrmPrintWizardBaseSelected(const TQString &); + void ListPhotoSizes_selected( TQListBoxItem * ); void ListPhotoSizes_highlighted ( int ); - void ListPrintOrder_selected( QListBoxItem * ); + void ListPrintOrder_selected( TQListBoxItem * ); void ListPhotoOrder_highlighted ( int ); void EditCopies_valueChanged( int ); void GrpOutputSettings_clicked(int id); - void EditOutputPath_textChanged(const QString &); + void EditOutputPath_textChanged(const TQString &); void CaptionChanged( int ); void BtnBrowseOutputPath_clicked(); void CmbPaperSize_activated( int ); diff --git a/kipi-plugins/printwizard/frmprintwizardbase.ui b/kipi-plugins/printwizard/frmprintwizardbase.ui index a353296..c2e7157 100644 --- a/kipi-plugins/printwizard/frmprintwizardbase.ui +++ b/kipi-plugins/printwizard/frmprintwizardbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KIPIPrintWizardPlugin::FrmPrintWizardBase</class> -<widget class="QWizard"> +<widget class="TQWizard"> <property name="name"> <cstring>FrmPrintWizardBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -28,18 +28,18 @@ <pointsize>16</pointsize> </font> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>pgWelcome</cstring> </property> <attribute name="title"> <string>Welcome to the Print Wizard</string> </attribute> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout53</cstring> + <cstring>tqlayout53</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>10</y> @@ -51,15 +51,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout24</cstring> + <cstring>tqlayout24</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>PixmapLabel1_4</cstring> </property> @@ -91,7 +91,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>300</height> @@ -114,9 +114,9 @@ <enum>Vertical</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout52</cstring> + <cstring>tqlayout52</cstring> </property> <vbox> <property name="name"> @@ -132,14 +132,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -156,7 +156,7 @@ Click the 'Next' button to begin.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -170,7 +170,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>381</height> @@ -182,7 +182,7 @@ Click the 'Next' button to begin.</string> </hbox> </widget> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>pgPrinter</cstring> </property> @@ -193,15 +193,15 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout88</cstring> + <cstring>tqlayout88</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>PixmapLabel1</cstring> </property> @@ -233,7 +233,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>471</height> @@ -242,15 +242,15 @@ Click the 'Next' button to begin.</string> </spacer> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout87</cstring> + <cstring>tqlayout87</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -269,23 +269,23 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout37</cstring> + <cstring>tqlayout37</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout36</cstring> + <cstring>tqlayout36</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -341,9 +341,9 @@ Click the 'Next' button to begin.</string> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout36</cstring> + <cstring>tqlayout36</cstring> </property> <hbox> <property name="name"> @@ -359,14 +359,14 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>210</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_fullbleed</cstring> </property> @@ -392,15 +392,15 @@ Click the 'Next' button to begin.</string> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout86</cstring> + <cstring>tqlayout86</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_imageCaptions</cstring> </property> @@ -468,7 +468,7 @@ Click the 'Next' button to begin.</string> <string>%d %c</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_free_label</cstring> </property> @@ -483,7 +483,7 @@ Click the 'Next' button to begin.</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>110</height> @@ -496,13 +496,13 @@ Click the 'Next' button to begin.</string> %a aperture %l focal length \n newline</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_font_frame</cstring> </property> @@ -562,15 +562,15 @@ Click the 'Next' button to begin.</string> <enum>NoInsertion</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout37</cstring> + <cstring>tqlayout37</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -586,7 +586,7 @@ Click the 'Next' button to begin.</string> <string>Size</string> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>m_font_size</cstring> </property> @@ -625,7 +625,7 @@ Click the 'Next' button to begin.</string> </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>GrpOutputSettings</cstring> </property> @@ -644,7 +644,7 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>RdoOutputPrinter</cstring> </property> @@ -663,15 +663,15 @@ Click the 'Next' button to begin.</string> <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout24</cstring> + <cstring>tqlayout24</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>RdoOutputGimp</cstring> </property> @@ -725,7 +725,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -734,7 +734,7 @@ Click the 'Next' button to begin.</string> </spacer> </hbox> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>RdoOutputFile</cstring> </property> @@ -750,9 +750,9 @@ Click the 'Next' button to begin.</string> <string>Output to image file</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout23</cstring> + <cstring>tqlayout23</cstring> </property> <hbox> <property name="name"> @@ -768,14 +768,14 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>19</width> <height>26</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> @@ -793,15 +793,15 @@ Click the 'Next' button to begin.</string> <property name="text"> <string>This wizard will output each page to this folder with the filename kipi_printwizard_1, kipi_printwizard_2, etc.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout23</cstring> + <cstring>tqlayout23</cstring> </property> <hbox> <property name="name"> @@ -817,7 +817,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>19</width> <height>26</height> @@ -862,7 +862,7 @@ Click the 'Next' button to begin.</string> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>pgLayout</cstring> </property> @@ -873,7 +873,7 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout16</cstring> </property> @@ -887,7 +887,7 @@ Click the 'Next' button to begin.</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>PixmapLabel3</cstring> </property> @@ -916,7 +916,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>20</height> @@ -939,31 +939,31 @@ Click the 'Next' button to begin.</string> <enum>Vertical</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout113</cstring> + <cstring>tqlayout113</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout88</cstring> + <cstring>tqlayout88</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout86</cstring> + <cstring>tqlayout86</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -988,7 +988,7 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>ListPhotoSizes</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>150</width> <height>200</height> @@ -997,15 +997,15 @@ Click the 'Next' button to begin.</string> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout87</cstring> + <cstring>tqlayout87</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -1024,15 +1024,15 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout90</cstring> + <cstring>tqlayout90</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel4_2</cstring> </property> @@ -1047,11 +1047,11 @@ Click the 'Next' button to begin.</string> <property name="text"> <string>Photos:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>LblPhotoCount</cstring> </property> @@ -1063,7 +1063,7 @@ Click the 'Next' button to begin.</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>30</width> <height>0</height> @@ -1072,21 +1072,21 @@ Click the 'Next' button to begin.</string> <property name="text"> <string><p align="right">0</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout91</cstring> + <cstring>tqlayout91</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel4</cstring> </property> @@ -1101,11 +1101,11 @@ Click the 'Next' button to begin.</string> <property name="text"> <string>Sheets:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>LblSheetsPrinted</cstring> </property> @@ -1117,7 +1117,7 @@ Click the 'Next' button to begin.</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>30</width> <height>0</height> @@ -1126,21 +1126,21 @@ Click the 'Next' button to begin.</string> <property name="text"> <string><p align="right">0</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout92</cstring> + <cstring>tqlayout92</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel6</cstring> </property> @@ -1153,13 +1153,13 @@ Click the 'Next' button to begin.</string> </sizepolicy> </property> <property name="text"> - <string>Empty slots:</string> + <string>Empty Q_SLOTS:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>LblEmptySlots</cstring> </property> @@ -1171,7 +1171,7 @@ Click the 'Next' button to begin.</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>30</width> <height>0</height> @@ -1180,7 +1180,7 @@ Click the 'Next' button to begin.</string> <property name="text"> <string><p align="right">0</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> </widget> @@ -1198,7 +1198,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>105</height> @@ -1209,7 +1209,7 @@ Click the 'Next' button to begin.</string> </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -1228,7 +1228,7 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListBox"> + <widget class="TQListBox"> <item> <property name="text"> <string>New Item</string> @@ -1238,15 +1238,15 @@ Click the 'Next' button to begin.</string> <cstring>ListPrintOrder</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout112</cstring> + <cstring>tqlayout112</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>BtnPrintOrderUp</cstring> </property> @@ -1283,14 +1283,14 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>80</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>BtnPrintOrderDown</cstring> </property> @@ -1320,15 +1320,15 @@ Click the 'Next' button to begin.</string> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout75</cstring> + <cstring>tqlayout75</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>LblCopies_2</cstring> </property> @@ -1343,11 +1343,11 @@ Click the 'Next' button to begin.</string> <property name="text"> <string>Number of times to print selected photo:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>EditCopies</cstring> </property> @@ -1368,15 +1368,15 @@ Click the 'Next' button to begin.</string> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout40</cstring> + <cstring>tqlayout40</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox6</cstring> </property> @@ -1387,7 +1387,7 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>LblPreview</cstring> </property> @@ -1403,9 +1403,9 @@ Click the 'Next' button to begin.</string> <string>Preview</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout37</cstring> + <cstring>tqlayout37</cstring> </property> <hbox> <property name="name"> @@ -1421,14 +1421,14 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>BmpFirstPagePreview</cstring> </property> @@ -1440,13 +1440,13 @@ Click the 'Next' button to begin.</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>260</width> <height>367</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>260</width> <height>367</height> @@ -1461,7 +1461,7 @@ Click the 'Next' button to begin.</string> <property name="scaledContents"> <bool>true</bool> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> @@ -1475,7 +1475,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>21</height> @@ -1484,15 +1484,15 @@ Click the 'Next' button to begin.</string> </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout35</cstring> + <cstring>tqlayout35</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>BtnPreviewPageDown</cstring> </property> @@ -1504,7 +1504,7 @@ Click the 'Next' button to begin.</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> @@ -1530,14 +1530,14 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>161</width> <height>21</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>BtnPreviewPageUp</cstring> </property> @@ -1549,7 +1549,7 @@ Click the 'Next' button to begin.</string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> @@ -1579,7 +1579,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -1590,7 +1590,7 @@ Click the 'Next' button to begin.</string> </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>pgCrop</cstring> </property> @@ -1601,15 +1601,15 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout110</cstring> + <cstring>tqlayout110</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>PixmapLabel1_2</cstring> </property> @@ -1628,7 +1628,7 @@ Click the 'Next' button to begin.</string> <bool>false</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel8</cstring> </property> @@ -1649,13 +1649,13 @@ Click the 'Next' button to begin.</string> <property name="scaledContents"> <bool>false</bool> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop|AlignLeft</set> </property> </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel10</cstring> </property> @@ -1671,9 +1671,9 @@ Click the 'Next' button to begin.</string> <string>Click and Drag the mouse</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout121</cstring> + <cstring>tqlayout121</cstring> </property> <hbox> <property name="name"> @@ -1689,16 +1689,16 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>21</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout119</cstring> + <cstring>tqlayout119</cstring> </property> <vbox> <property name="name"> @@ -1708,22 +1708,22 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>cropFrame</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>200</height> </size> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout118</cstring> + <cstring>tqlayout118</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>BtnCropRotate</cstring> </property> @@ -1750,14 +1750,14 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>127</width> <height>16</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>BtnCropPrev</cstring> </property> @@ -1774,7 +1774,7 @@ Click the 'Next' button to begin.</string> <string>Previous photo</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>BtnCropNext</cstring> </property> @@ -1801,14 +1801,14 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>127</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>LblCropPhoto</cstring> </property> @@ -1838,7 +1838,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>21</height> @@ -1849,18 +1849,18 @@ Click the 'Next' button to begin.</string> </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>pgPrint</cstring> </property> <attribute name="title"> <string>Print</string> </attribute> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout62</cstring> + <cstring>tqlayout62</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>11</x> <y>11</y> @@ -1872,15 +1872,15 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout61</cstring> + <cstring>tqlayout61</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>PixmapLabel1_3</cstring> </property> @@ -1912,7 +1912,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>438</height> @@ -1935,9 +1935,9 @@ Click the 'Next' button to begin.</string> <enum>Vertical</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout60</cstring> + <cstring>tqlayout60</cstring> </property> <vbox> <property name="name"> @@ -1953,14 +1953,14 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>70</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>LblPrintClickFinish</cstring> </property> @@ -1975,7 +1975,7 @@ Click the 'Next' button to begin.</string> <property name="text"> <string>Click the Next button to print.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignHCenter</set> </property> </widget> @@ -1989,16 +1989,16 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>361</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout35</cstring> + <cstring>tqlayout35</cstring> </property> <hbox> <property name="name"> @@ -2014,14 +2014,14 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>360</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_kjobviewer</cstring> </property> @@ -2047,7 +2047,7 @@ Click the 'Next' button to begin.</string> </hbox> </widget> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>pgFinished</cstring> </property> @@ -2058,15 +2058,15 @@ Click the 'Next' button to begin.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout55</cstring> + <cstring>tqlayout55</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout18_2</cstring> </property> @@ -2080,7 +2080,7 @@ Click the 'Next' button to begin.</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>PixmapLabel1_3_2</cstring> </property> @@ -2112,7 +2112,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>289</height> @@ -2135,9 +2135,9 @@ Click the 'Next' button to begin.</string> <enum>Vertical</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout54</cstring> + <cstring>tqlayout54</cstring> </property> <vbox> <property name="name"> @@ -2153,7 +2153,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>70</height> @@ -2165,7 +2165,7 @@ Click the 'Next' button to begin.</string> <cstring>PrgPrintProgress</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>LblPrintProgress</cstring> </property> @@ -2180,7 +2180,7 @@ Click the 'Next' button to begin.</string> <property name="text"> <string>Complete. Click Finish to exit the Print Wizard.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignHCenter</set> </property> </widget> @@ -2194,7 +2194,7 @@ Click the 'Next' button to begin.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>371</height> @@ -2255,15 +2255,15 @@ Click the 'Next' button to begin.</string> </connection> <connection> <sender>ListPhotoSizes</sender> - <signal>selected(QListBoxItem*)</signal> + <signal>selected(TQListBoxItem*)</signal> <receiver>FrmPrintWizardBase</receiver> - <slot>ListPhotoSizes_selected(QListBoxItem*)</slot> + <slot>ListPhotoSizes_selected(TQListBoxItem*)</slot> </connection> <connection> <sender>ListPrintOrder</sender> - <signal>selected(QListBoxItem*)</signal> + <signal>selected(TQListBoxItem*)</signal> <receiver>FrmPrintWizardBase</receiver> - <slot>ListPrintOrder_selected(QListBoxItem*)</slot> + <slot>ListPrintOrder_selected(TQListBoxItem*)</slot> </connection> <connection> <sender>ListPrintOrder</sender> @@ -2302,17 +2302,17 @@ Click the 'Next' button to begin.</string> <slot>setEnabled(bool)</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>BtnCropNext_clicked()</slot> <slot>BtnCropPrev_clicked()</slot> <slot>BtnCropRotate_clicked()</slot> - <slot>ListPhotoSizes_selected( QListBoxItem * )</slot> + <slot>ListPhotoSizes_selected( TQListBoxItem * )</slot> <slot>ListPhotoSizes_highlighted( int )</slot> <slot>EditCopies_valueChanged( int )</slot> - <slot>ListPrintOrder_selected( QListBoxItem * )</slot> + <slot>ListPrintOrder_selected( TQListBoxItem * )</slot> <slot>ListPhotoOrder_highlighted( int )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kcombobox.h</includehint> diff --git a/kipi-plugins/printwizard/plugin_printwizard.cpp b/kipi-plugins/printwizard/plugin_printwizard.cpp index a82b3f2..bf80e05 100644 --- a/kipi-plugins/printwizard/plugin_printwizard.cpp +++ b/kipi-plugins/printwizard/plugin_printwizard.cpp @@ -25,9 +25,9 @@ extern "C" #include <unistd.h> } -// Include files for Qt +// Include files for TQt -#include <qdir.h> +#include <tqdir.h> // Include files for KDE @@ -53,14 +53,14 @@ typedef KGenericFactory<Plugin_PrintWizard> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_printwizard, Factory("kipiplugin_printwizard")) -Plugin_PrintWizard::Plugin_PrintWizard(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin(Factory::instance(), parent, "PrintWizard") +Plugin_PrintWizard::Plugin_PrintWizard(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin(Factory::instance(), tqparent, "PrintWizard") { kdDebug( 51001 ) << "Plugin_PrintWizard plugin loaded" << endl; } -void Plugin_PrintWizard::setup( QWidget* widget ) +void Plugin_PrintWizard::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -68,13 +68,13 @@ void Plugin_PrintWizard::setup( QWidget* widget ) "fileprint", CTRL+Key_P, this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "printwizard"); addAction( m_printAction ); - m_interface = dynamic_cast< KIPI::Interface* >( parent() ); + m_interface = dynamic_cast< KIPI::Interface* >( tqparent() ); if ( !m_interface ) { @@ -86,8 +86,8 @@ void Plugin_PrintWizard::setup( QWidget* widget ) m_printAction->setEnabled( selection.isValid() && !selection.images().isEmpty() ); - connect( m_interface, SIGNAL( selectionChanged( bool ) ), - m_printAction, SLOT( setEnabled( bool ) ) ); + connect( m_interface, TQT_SIGNAL( selectionChanged( bool ) ), + m_printAction, TQT_SLOT( setEnabled( bool ) ) ); } Plugin_PrintWizard::~Plugin_PrintWizard() @@ -105,14 +105,14 @@ void Plugin_PrintWizard::slotActivate() if (fileList.count() == 0) { - KMessageBox::sorry(kapp->activeWindow(), i18n("Please select one or more photos to print."), + KMessageBox::sorry(TQT_TQWIDGET(kapp->activeWindow()), i18n("Please select one or more photos to print."), i18n("Print Wizard")); return; } - KIPIPrintWizardPlugin::FrmPrintWizard frm(kapp->activeWindow()); + KIPIPrintWizardPlugin::FrmPrintWizard frm(TQT_TQWIDGET(kapp->activeWindow())); KStandardDirs dir; - QString tempPath = dir.saveLocation("tmp", "kipi-printwizardplugin-" + QString::number(getpid()) + "/"); + TQString tempPath = dir.saveLocation("tmp", "kipi-printwizardplugin-" + TQString::number(getpid()) + "/"); frm.print(fileList, tempPath); frm.exec(); } diff --git a/kipi-plugins/printwizard/plugin_printwizard.h b/kipi-plugins/printwizard/plugin_printwizard.h index bb84928..8844294 100644 --- a/kipi-plugins/printwizard/plugin_printwizard.h +++ b/kipi-plugins/printwizard/plugin_printwizard.h @@ -30,15 +30,16 @@ class KAction; class Plugin_PrintWizard : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_PrintWizard(QObject *parent, + Plugin_PrintWizard(TQObject *tqparent, const char* name, - const QStringList &args); + const TQStringList &args); ~Plugin_PrintWizard(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); public slots: diff --git a/kipi-plugins/printwizard/tphoto.cpp b/kipi-plugins/printwizard/tphoto.cpp index f81a53b..f0e766d 100644 --- a/kipi-plugins/printwizard/tphoto.cpp +++ b/kipi-plugins/printwizard/tphoto.cpp @@ -16,15 +16,15 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. -#include <qpainter.h> -#include <qdir.h> -#include <qmessagebox.h> -#include <qdragobject.h> -#include <qstringlist.h> -#include <qurl.h> -#include <qstrlist.h> +#include <tqpainter.h> +#include <tqdir.h> +#include <tqmessagebox.h> +#include <tqdragobject.h> +#include <tqstringlist.h> +#include <tqurl.h> +#include <tqstrlist.h> // KDE includes. @@ -56,7 +56,7 @@ namespace KIPIPrintWizardPlugin TPhoto::TPhoto(int thumbnailSize) { m_size = 0; - cropRegion = QRect(-1, -1, -1, -1); + cropRegion = TQRect(-1, -1, -1, -1); rotation = 0; copies = 1; @@ -85,34 +85,34 @@ void TPhoto::loadCache() delete m_thumbnail; - QImage photo = loadPhoto(); + TQImage photo = loadPhoto(); - m_thumbnail = new QPixmap(QImage( photo.scale(m_thumbnailSize, m_thumbnailSize, QImage::ScaleMin) )); + m_thumbnail = new TQPixmap(TQImage( photo.scale(m_thumbnailSize, m_thumbnailSize, TQ_ScaleMin) )); if (m_size) delete m_size; - m_size = new QSize(photo.width(), photo.height()); + m_size = new TQSize(photo.width(), photo.height()); } -QPixmap & TPhoto::thumbnail() +TQPixmap & TPhoto::thumbnail() { if (!m_thumbnail) loadCache(); return *m_thumbnail; } -QImage TPhoto::loadPhoto() +TQImage TPhoto::loadPhoto() { - QImage photo; + TQImage photo; // Check if RAW file. #if KDCRAW_VERSION < 0x000106 - QString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); + TQString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); #else - QString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); + TQString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); #endif - QFileInfo fileInfo(filename.path()); - if (rawFilesExt.upper().contains( fileInfo.extension(false).upper() )) + TQFileInfo fileInfo(filename.path()); + if (rawFilesExt.upper().tqcontains( fileInfo.extension(false).upper() )) KDcrawIface::KDcraw::loadDcrawPreview(photo, filename.path()); else photo.load(filename.path()); // PENDING(blackie) handle URL @@ -120,7 +120,7 @@ QImage TPhoto::loadPhoto() return photo; } -QSize & TPhoto::size() // private +TQSize & TPhoto::size() // private { if (m_size == 0) loadCache(); diff --git a/kipi-plugins/printwizard/tphoto.h b/kipi-plugins/printwizard/tphoto.h index a71d991..84888b2 100644 --- a/kipi-plugins/printwizard/tphoto.h +++ b/kipi-plugins/printwizard/tphoto.h @@ -19,20 +19,20 @@ #ifndef TPHOTO_H #define TPHOTO_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qptrlist.h> -#include <qrect.h> -#include <qiconview.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqrect.h> +#include <tqiconview.h> // KDE includes. #include <kurl.h> #include <libkexiv2/kexiv2.h> -class QImage; -class QPixmap; +class TQImage; +class TQPixmap; class KPrinter; @@ -47,24 +47,24 @@ class TPhoto KURL filename; // full path - QPixmap & thumbnail(); - QImage loadPhoto(); + TQPixmap & thumbnail(); + TQImage loadPhoto(); int m_thumbnailSize; int width(); int height(); - QRect cropRegion; + TQRect cropRegion; int copies; int rotation; KExiv2Iface::KExiv2 *exiv2Iface(); private: - QPixmap *m_thumbnail; + TQPixmap *m_thumbnail; void loadCache(); - QSize & size(); - QSize * m_size; + TQSize & size(); + TQSize * m_size; KExiv2Iface::KExiv2 *m_exiv2Iface; }; diff --git a/kipi-plugins/printwizard/utils.cpp b/kipi-plugins/printwizard/utils.cpp index cab5ccd..bff1bd7 100644 --- a/kipi-plugins/printwizard/utils.cpp +++ b/kipi-plugins/printwizard/utils.cpp @@ -23,12 +23,12 @@ extern "C" #include <stdio.h> } -// Include files for Qt +// Include files for TQt -#include <qstringlist.h> -#include <qwidget.h> -#include <qdir.h> -#include <qprocess.h> +#include <tqstringlist.h> +#include <tqwidget.h> +#include <tqdir.h> +#include <tqprocess.h> // Include files for KDE @@ -63,10 +63,10 @@ int MAX(int a, int b) // given a list of args, launch this app as a separate thread. // args[0] is the application to run. -bool launchExternalApp(QStringList &args) +bool launchExternalApp(TQStringList &args) { - QProcess process; - for(QStringList::Iterator it = args.begin(); it != args.end(); ++it) + TQProcess process; + for(TQStringList::Iterator it = args.begin(); it != args.end(); ++it) { process.addArgument(*it); } @@ -74,15 +74,15 @@ bool launchExternalApp(QStringList &args) return process.start(); } -bool checkTempPath(QWidget *parent, QString tempPath) +bool checkTempPath(TQWidget *tqparent, TQString tempPath) { // does the temp path exist? - QDir tempDir(tempPath); + TQDir tempDir(tempPath); if (!tempDir.exists()) { if (!tempDir.mkdir(tempDir.path())) { - KMessageBox::sorry(parent, + KMessageBox::sorry(tqparent, i18n("Unable to create a temporary folder; " "please make sure you have proper permissions to this folder and try again.")); return false; diff --git a/kipi-plugins/printwizard/utils.h b/kipi-plugins/printwizard/utils.h index 43d5fc4..bacab08 100644 --- a/kipi-plugins/printwizard/utils.h +++ b/kipi-plugins/printwizard/utils.h @@ -18,8 +18,8 @@ #ifndef UTILS_H #define UTILS_H -class QWidget; -class QStringList; +class TQWidget; +class TQStringList; namespace KIPIPrintWizardPlugin { @@ -28,8 +28,8 @@ int NINT(double n); int MIN(int a, int b); int MAX(int a, int b); -bool launchExternalApp(QStringList &args); -bool checkTempPath(QWidget *parent, QString tempPath); +bool launchExternalApp(TQStringList &args); +bool checkTempPath(TQWidget *tqparent, TQString tempPath); } // NameSpace KIPIPrintWizardPlugin diff --git a/kipi-plugins/rawconverter/actions.h b/kipi-plugins/rawconverter/actions.h index 5dd3e3e..5479165 100644 --- a/kipi-plugins/rawconverter/actions.h +++ b/kipi-plugins/rawconverter/actions.h @@ -49,11 +49,11 @@ public: bool starting; bool success; - QString filePath; - QString destPath; - QString message; + TQString filePath; + TQString destPath; + TQString message; - QImage image; + TQImage image; Action action; }; diff --git a/kipi-plugins/rawconverter/actionthread.cpp b/kipi-plugins/rawconverter/actionthread.cpp index 52a41b5..ad85b81 100644 --- a/kipi-plugins/rawconverter/actionthread.cpp +++ b/kipi-plugins/rawconverter/actionthread.cpp @@ -32,11 +32,11 @@ extern "C" #include <unistd.h> } -// Qt includes. +// TQt includes. -#include <qapplication.h> -#include <qdir.h> -#include <qdeepcopy.h> +#include <tqapplication.h> +#include <tqdir.h> +#include <tqdeepcopy.h> // KDE includes. @@ -54,8 +54,8 @@ extern "C" namespace KIPIRawConverterPlugin { -ActionThread::ActionThread(QObject *parent) - : QThread(), m_parent(parent) +ActionThread::ActionThread(TQObject *tqparent) + : TQThread(), m_parent(tqparent) { } @@ -80,7 +80,7 @@ void ActionThread::identifyRawFiles(const KURL::List& urlList, bool full) it != urlList.end(); ++it ) { Task *t = new Task; - t->filePath = QDeepCopy<QString>((*it).path()); //deep copy + t->filePath = TQDeepCopy<TQString>((*it).path()); //deep copy t->action = full ? IDENTIFY_FULL : IDENTIFY; m_taskQueue.enqueue(t); } @@ -113,7 +113,7 @@ void ActionThread::processRawFiles(const KURL::List& urlList) it != urlList.end(); ++it ) { Task *t = new Task; - t->filePath = QDeepCopy<QString>((*it).path()); //deep copy + t->filePath = TQDeepCopy<TQString>((*it).path()); //deep copy t->outputFormat = m_outputFormat; t->decodingSettings = m_rawDecodingSettings; t->action = PROCESS; @@ -127,7 +127,7 @@ void ActionThread::processHalfRawFiles(const KURL::List& urlList) it != urlList.end(); ++it ) { Task *t = new Task; - t->filePath = QDeepCopy<QString>((*it).path()); //deep copy + t->filePath = TQDeepCopy<TQString>((*it).path()); //deep copy t->outputFormat = m_outputFormat; t->decodingSettings = m_rawDecodingSettings; t->action = PREVIEW; @@ -148,7 +148,7 @@ void ActionThread::run() Task *t = m_taskQueue.dequeue(); if (!t) continue; - QString errString; + TQString errString; EventData *d = new EventData; @@ -158,47 +158,47 @@ void ActionThread::run() case IDENTIFY_FULL: { // Get embedded RAW file thumbnail. - QImage image; + TQImage image; m_dcrawIface.loadDcrawPreview(image, t->filePath); // Identify Camera model. KDcrawIface::DcrawInfoContainer info; m_dcrawIface.rawFileIdentify(info, t->filePath); - QString identify = i18n("Cannot identify Raw image"); + TQString identify = i18n("Cannot identify Raw image"); if (info.isDecodable) { if (t->action == IDENTIFY) - identify = info.make + QString("-") + info.model; + identify = info.make + TQString("-") + info.model; else { - identify = i18n("Make: %1\n").arg(info.make); - identify.append(i18n("Model: %1\n").arg(info.model)); + identify = i18n("Make: %1\n").tqarg(info.make); + identify.append(i18n("Model: %1\n").tqarg(info.model)); if (info.dateTime.isValid()) { identify.append(i18n("Created: %1\n") - .arg(KGlobal::locale()->formatDateTime(info.dateTime, true, true))); + .tqarg(KGlobal::locale()->formatDateTime(info.dateTime, true, true))); } if (info.aperture != -1.0) { - identify.append(i18n("Aperture: f/%1\n").arg(QString::number(info.aperture))); + identify.append(i18n("Aperture: f/%1\n").tqarg(TQString::number(info.aperture))); } if (info.focalLength != -1.0) { - identify.append(i18n("Focal: %1 mm\n").arg(info.focalLength)); + identify.append(i18n("Focal: %1 mm\n").tqarg(info.focalLength)); } if (info.exposureTime != -1.0) { - identify.append(i18n("Exposure: 1/%1 s\n").arg(info.exposureTime)); + identify.append(i18n("Exposure: 1/%1 s\n").tqarg(info.exposureTime)); } if (info.sensitivity != -1) { - identify.append(i18n("Sensitivity: %1 ISO").arg(info.sensitivity)); + identify.append(i18n("Sensitivity: %1 ISO").tqarg(info.sensitivity)); } } } @@ -209,7 +209,7 @@ void ActionThread::run() r->image = image; r->message = identify; r->success = true; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, r)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, r)); break; } @@ -218,9 +218,9 @@ void ActionThread::run() d->action = PREVIEW; d->filePath = t->filePath; d->starting = true; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); - QString destPath; + TQString destPath; bool result = m_dcrawIface.decodeHalfRAWImage(t->filePath, destPath, t->outputFormat, t->decodingSettings); @@ -229,7 +229,7 @@ void ActionThread::run() r->filePath = t->filePath; r->destPath = destPath; r->success = result; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, r)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, r)); break; } @@ -238,9 +238,9 @@ void ActionThread::run() d->action = PROCESS; d->filePath = t->filePath; d->starting = true; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); - QString destPath; + TQString destPath; bool result = m_dcrawIface.decodeRAWImage(t->filePath, destPath, t->outputFormat, t->decodingSettings); @@ -249,7 +249,7 @@ void ActionThread::run() r->filePath = t->filePath; r->destPath = destPath; r->success = result; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, r)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, r)); break; } diff --git a/kipi-plugins/rawconverter/actionthread.h b/kipi-plugins/rawconverter/actionthread.h index bebc7b9..044ca84 100644 --- a/kipi-plugins/rawconverter/actionthread.h +++ b/kipi-plugins/rawconverter/actionthread.h @@ -24,10 +24,10 @@ #ifndef ACTIONTHREAD_H #define ACTIONTHREAD_H -// Qt includes. +// TQt includes. -#include <qthread.h> -#include <qstring.h> +#include <tqthread.h> +#include <tqstring.h> // KDE includes. @@ -44,17 +44,17 @@ #include "actions.h" #include "mtqueue.h" -class QObject; +class TQObject; namespace KIPIRawConverterPlugin { -class ActionThread : public QThread +class ActionThread : public TQThread { public: - ActionThread(QObject *parent); + ActionThread(TQObject *tqparent); ~ActionThread(); void setRawDecodingSettings(KDcrawIface::RawDecodingSettings rawDecodingSettings, @@ -79,7 +79,7 @@ private: struct Task_ { - QString filePath; + TQString filePath; Action action; SaveSettingsWidget::OutputFormat outputFormat; KDcrawIface::RawDecodingSettings decodingSettings; @@ -87,7 +87,7 @@ private: typedef struct Task_ Task; - QObject *m_parent; + TQObject *m_parent; SaveSettingsWidget::OutputFormat m_outputFormat; diff --git a/kipi-plugins/rawconverter/batchdialog.cpp b/kipi-plugins/rawconverter/batchdialog.cpp index 63447e6..06b30cd 100644 --- a/kipi-plugins/rawconverter/batchdialog.cpp +++ b/kipi-plugins/rawconverter/batchdialog.cpp @@ -34,18 +34,18 @@ extern "C" #include <cstdio> -// Qt includes. - -#include <qframe.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qtimer.h> -#include <qfileinfo.h> -#include <qevent.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qfile.h> +// TQt includes. + +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqtimer.h> +#include <tqfileinfo.h> +#include <tqevent.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqfile.h> // KDE includes. @@ -83,16 +83,16 @@ extern "C" namespace KIPIRawConverterPlugin { -BatchDialog::BatchDialog(QWidget* /*parent*/) +BatchDialog::BatchDialog(TQWidget* /*tqparent*/) : KDialogBase(0, 0, false, i18n("Raw Images Batch Converter"), Help|Default|User1|User2|Close, Close, true, i18n("Con&vert"), i18n("&Abort")) { m_currentConvertItem = 0; m_thread = 0; - m_page = new QWidget( this ); + m_page = new TQWidget( this ); setMainWidget( m_page ); - QGridLayout *mainLayout = new QGridLayout(m_page, 2, 1, 0, spacingHint()); + TQGridLayout *mainLayout = new TQGridLayout(m_page, 2, 1, 0, spacingHint()); //--------------------------------------------- @@ -101,11 +101,11 @@ BatchDialog::BatchDialog(QWidget* /*parent*/) m_listView->addColumn( i18n("Raw File") ); m_listView->addColumn( i18n("Target File") ); m_listView->addColumn( i18n("Camera") ); - m_listView->setResizeMode(QListView::AllColumns); + m_listView->setResizeMode(TQListView::AllColumns); m_listView->setAllColumnsShowFocus(true); m_listView->setSorting(-1); - m_listView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - m_listView->setSelectionMode(QListView::Single); + m_listView->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_listView->setSelectionMode(TQListView::Single); m_listView->setMinimumWidth(450); // --------------------------------------------------------------- @@ -149,7 +149,7 @@ BatchDialog::BatchDialog(QWidget* /*parent*/) KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), - this, SLOT(slotHelp()), 0, -1, 0); + this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // --------------------------------------------------------------- @@ -158,16 +158,16 @@ BatchDialog::BatchDialog(QWidget* /*parent*/) setButtonTip( User2, i18n("<p>Abort the current Raw files conversion")); setButtonTip( Close, i18n("<p>Exit Raw Converter")); - m_blinkConvertTimer = new QTimer(this); - m_thread = new ActionThread(this); + m_blinkConvertTimer = new TQTimer(this); + m_thread = new ActionThread(TQT_TQOBJECT(this)); // --------------------------------------------------------------- - connect(m_blinkConvertTimer, SIGNAL(timeout()), - this, SLOT(slotConvertBlinkTimerDone())); + connect(m_blinkConvertTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotConvertBlinkTimerDone())); - connect(m_saveSettingsBox, SIGNAL(signalSaveFormatChanged()), - this, SLOT(slotSaveFormatChanged())); + connect(m_saveSettingsBox, TQT_SIGNAL(signalSaveFormatChanged()), + this, TQT_SLOT(slotSaveFormatChanged())); // --------------------------------------------------------------- @@ -182,7 +182,7 @@ BatchDialog::~BatchDialog() delete m_thread; } -void BatchDialog::closeEvent(QCloseEvent *e) +void BatchDialog::closeEvent(TQCloseEvent *e) { if (!e) return; m_blinkConvertTimer->stop(); @@ -248,7 +248,7 @@ void BatchDialog::readSettings() (SaveSettingsWidget::ConflictRule)config.readNumEntry("Conflict", (int)(SaveSettingsWidget::OVERWRITE))); - resize(configDialogSize(config, QString("Batch Raw Converter Dialog"))); + resize(configDialogSize(config, TQString("Batch Raw Converter Dialog"))); } void BatchDialog::saveSettings() @@ -281,7 +281,7 @@ void BatchDialog::saveSettings() config.writeEntry("Output Format", (int)m_saveSettingsBox->fileFormat()); config.writeEntry("Conflict", (int)m_saveSettingsBox->conflictRule()); - saveDialogSize(config, QString("Batch Raw Converter Dialog")); + saveDialogSize(config, TQString("Batch Raw Converter Dialog")); config.sync(); } @@ -294,14 +294,14 @@ void BatchDialog::slotUser1() { m_fileList.clear(); - QListViewItemIterator it( m_listView ); + TQListViewItemIterator it( m_listView ); while ( it.current() ) { CListViewItem *item = (CListViewItem*) it.current(); if (item->isEnabled()) { item->setPixmap(1, 0); - m_fileList.append(item->rawItem->directory + QString("/") + item->rawItem->src); + m_fileList.append(item->rawItem->directory + TQString("/") + item->rawItem->src); } ++it; } @@ -355,7 +355,7 @@ void BatchDialog::slotUser2() if (m_currentConvertItem) m_currentConvertItem->viewItem->setPixmap(1, SmallIcon("cancel")); - QTimer::singleShot(500, this, SLOT(slotAborted())); + TQTimer::singleShot(500, this, TQT_SLOT(slotAborted())); } void BatchDialog::slotAborted() @@ -364,9 +364,9 @@ void BatchDialog::slotAborted() m_progressBar->hide(); } -void BatchDialog::addItems(const QStringList& itemList) +void BatchDialog::addItems(const TQStringList& itemList) { - QString ext; + TQString ext; switch(m_saveSettingsBox->fileFormat()) { @@ -386,18 +386,18 @@ void BatchDialog::addItems(const QStringList& itemList) KURL::List urlList; - QPixmap pix(SmallIcon( "file_broken", KIcon::SizeLarge, KIcon::DisabledState )); + TQPixmap pix(SmallIcon( "file_broken", KIcon::SizeLarge, KIcon::DisabledState )); - for (QStringList::const_iterator it = itemList.begin(); + for (TQStringList::const_iterator it = itemList.begin(); it != itemList.end(); ++it) { - QFileInfo fi(*it); - if (fi.exists() && !m_itemDict.find(fi.fileName())) + TQFileInfo fi(*it); + if (fi.exists() && !m_itemDict.tqfind(fi.fileName())) { RawItem *item = new RawItem; item->directory = fi.dirPath(); item->src = fi.fileName(); - item->dest = fi.baseName() + QString(".") + ext; + item->dest = fi.baseName() + TQString(".") + ext; new CListViewItem(m_listView, pix, item, m_listView->lastItem()); m_itemDict.insert(item->src, item); urlList.append(fi.absFilePath()); @@ -414,7 +414,7 @@ void BatchDialog::addItems(const QStringList& itemList) void BatchDialog::slotSaveFormatChanged() { - QString ext; + TQString ext; switch(m_saveSettingsBox->fileFormat()) { @@ -432,15 +432,15 @@ void BatchDialog::slotSaveFormatChanged() break; } - QListViewItemIterator it( m_listView ); + TQListViewItemIterator it( m_listView ); while ( it.current() ) { CListViewItem *item = (CListViewItem*) it.current(); if (item->isEnabled()) { RawItem *rawItem = item->rawItem; - QFileInfo fi(rawItem->directory + QString("/") + rawItem->src); - rawItem->dest = fi.baseName() + QString(".") + ext; + TQFileInfo fi(rawItem->directory + TQString("/") + rawItem->src); + rawItem->dest = fi.baseName() + TQString(".") + ext; item->setText(2, rawItem->dest); } ++it; @@ -456,7 +456,7 @@ void BatchDialog::processOne() return; } - QString file(m_fileList.first()); + TQString file(m_fileList.first()); m_fileList.pop_front(); m_thread->processRawFile(KURL(file)); @@ -494,10 +494,10 @@ void BatchDialog::slotConvertBlinkTimerDone() m_blinkConvertTimer->start(500); } -void BatchDialog::processing(const QString& file) +void BatchDialog::processing(const TQString& file) { - QString filename = QFileInfo(file).fileName(); - m_currentConvertItem = m_itemDict.find(filename); + TQString filename = TQFileInfo(file).fileName(); + m_currentConvertItem = m_itemDict.tqfind(filename); if (m_currentConvertItem) { m_listView->setSelected(m_currentConvertItem->viewItem, true); @@ -508,19 +508,19 @@ void BatchDialog::processing(const QString& file) m_blinkConvertTimer->start(500); } -void BatchDialog::processed(const QString& file, const QString& tmpFile) +void BatchDialog::processed(const TQString& file, const TQString& tmpFile) { m_blinkConvertTimer->stop(); - QString filename = QFileInfo(file).fileName(); - QString destFile(m_currentConvertItem->directory + QString("/") + m_currentConvertItem->dest); + TQString filename = TQFileInfo(file).fileName(); + TQString destFile(m_currentConvertItem->directory + TQString("/") + m_currentConvertItem->dest); if (m_saveSettingsBox->conflictRule() != SaveSettingsWidget::OVERWRITE) { struct stat statBuf; - if (::stat(QFile::encodeName(destFile), &statBuf) == 0) + if (::stat(TQFile::encodeName(destFile), &statBuf) == 0) { KIO::RenameDlg dlg(this, i18n("Save Raw Image converted from '%1' as") - .arg(m_currentConvertItem->src), + .tqarg(m_currentConvertItem->src), tmpFile, destFile, KIO::RenameDlg_Mode(KIO::M_SINGLE | KIO::M_OVERWRITE | KIO::M_SKIP)); @@ -529,7 +529,7 @@ void BatchDialog::processed(const QString& file, const QString& tmpFile) case KIO::R_CANCEL: case KIO::R_SKIP: { - destFile = QString(); + destFile = TQString(); m_currentConvertItem->viewItem->setPixmap(1, SmallIcon("cancel")); break; } @@ -546,14 +546,14 @@ void BatchDialog::processed(const QString& file, const QString& tmpFile) if (!destFile.isEmpty()) { - if (::rename(QFile::encodeName(tmpFile), QFile::encodeName(destFile)) != 0) + if (::rename(TQFile::encodeName(tmpFile), TQFile::encodeName(destFile)) != 0) { - KMessageBox::error(this, i18n("Failed to save image %1").arg( destFile )); + KMessageBox::error(this, i18n("Failed to save image %1").tqarg( destFile )); m_currentConvertItem->viewItem->setPixmap(1, SmallIcon("cancel")); } else { - m_currentConvertItem->dest = QFileInfo(destFile).fileName(); + m_currentConvertItem->dest = TQFileInfo(destFile).fileName(); m_currentConvertItem->viewItem->setText(2, m_currentConvertItem->dest); m_currentConvertItem->viewItem->setPixmap(1, SmallIcon("ok")); } @@ -563,22 +563,22 @@ void BatchDialog::processed(const QString& file, const QString& tmpFile) m_currentConvertItem = 0; } -void BatchDialog::processingFailed(const QString& file) +void BatchDialog::processingFailed(const TQString& file) { - QString filename = QFileInfo(file).fileName(); + TQString filename = TQFileInfo(file).fileName(); m_currentConvertItem->viewItem->setPixmap(1, SmallIcon("no")); m_progressBar->advance(1); m_currentConvertItem = 0; } -void BatchDialog::customEvent(QCustomEvent *event) +void BatchDialog::customEvent(TQCustomEvent *event) { if (!event) return; EventData *d = (EventData*) event->data(); if (!d) return; - QString text; + TQString text; if (d->starting) // Something have been started... { @@ -626,13 +626,13 @@ void BatchDialog::customEvent(QCustomEvent *event) { case(IDENTIFY): { - QFileInfo fi(d->filePath); - RawItem *rawItem = m_itemDict.find(fi.fileName()); + TQFileInfo fi(d->filePath); + RawItem *rawItem = m_itemDict.tqfind(fi.fileName()); if (rawItem) { if (!d->image.isNull()) { - QPixmap pix = QPixmap(d->image.scale(64, 64, QImage::ScaleMin)); + TQPixmap pix = TQPixmap(d->image.scale(64, 64, TQ_ScaleMin)); rawItem->viewItem->setThumbnail(pix); } rawItem->viewItem->setText(3, d->message); diff --git a/kipi-plugins/rawconverter/batchdialog.h b/kipi-plugins/rawconverter/batchdialog.h index 792fca6..f7013cd 100644 --- a/kipi-plugins/rawconverter/batchdialog.h +++ b/kipi-plugins/rawconverter/batchdialog.h @@ -24,10 +24,10 @@ #ifndef BATCHDIALOG_H #define BATCHDIALOG_H -// Qt includes. +// TQt includes. -#include <qstringlist.h> -#include <qdict.h> +#include <tqstringlist.h> +#include <tqdict.h> // KDE includes. @@ -37,10 +37,10 @@ #include "kpaboutdata.h" -class QTimer; -class QWidget; -class QCustomEvent; -class QCloseEvent; +class TQTimer; +class TQWidget; +class TQCustomEvent; +class TQCloseEvent; class KListView; class KProgress; @@ -61,18 +61,19 @@ class BatchDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - BatchDialog(QWidget *parent); + BatchDialog(TQWidget *tqparent); ~BatchDialog(); - void addItems(const QStringList& itemList); + void addItems(const TQStringList& itemList); protected: - void customEvent(QCustomEvent *event); - void closeEvent(QCloseEvent *e); + void customEvent(TQCustomEvent *event); + void closeEvent(TQCloseEvent *e); private: @@ -82,9 +83,9 @@ private: void busy(bool busy); void processOne(); - void processing(const QString& file); - void processed(const QString& file, const QString& tmpFile); - void processingFailed(const QString& file); + void processing(const TQString& file); + void processed(const TQString& file, const TQString& tmpFile); + void processingFailed(const TQString& file); private slots: @@ -102,13 +103,13 @@ private: bool m_convertBlink; - QTimer *m_blinkConvertTimer; + TQTimer *m_blinkConvertTimer; - QWidget *m_page; + TQWidget *m_page; - QDict<RawItem> m_itemDict; + TQDict<RawItem> m_itemDict; - QStringList m_fileList; + TQStringList m_fileList; KProgress *m_progressBar; diff --git a/kipi-plugins/rawconverter/clistviewitem.h b/kipi-plugins/rawconverter/clistviewitem.h index f7e3065..a964594 100644 --- a/kipi-plugins/rawconverter/clistviewitem.h +++ b/kipi-plugins/rawconverter/clistviewitem.h @@ -24,16 +24,16 @@ #ifndef CLISTVIEWITEM_H #define CLISTVIEWITEM_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qpainter.h> +#include <tqstring.h> +#include <tqpainter.h> // KDE includes. #include <klistview.h> -class QPixmap; +class TQPixmap; namespace KIPIRawConverterPlugin { @@ -42,10 +42,10 @@ class CListViewItem; struct RawItem { - QString src; - QString dest; - QString directory; - QString identity; + TQString src; + TQString dest; + TQString directory; + TQString identity; CListViewItem *viewItem; }; @@ -59,8 +59,8 @@ public: public: - CListViewItem(KListView *view, const QPixmap& pixmap, - RawItem *item, QListViewItem *after) + CListViewItem(KListView *view, const TQPixmap& pixmap, + RawItem *item, TQListViewItem *after) : KListViewItem(view, after), rawItem(item) { rawItem->viewItem = this; @@ -72,7 +72,7 @@ public: ~CListViewItem(){} - void setThumbnail(const QPixmap& pixmap) + void setThumbnail(const TQPixmap& pixmap) { setPixmap(0, pixmap); } @@ -80,7 +80,7 @@ public: void setEnabled(bool d) { m_enabled = d; - repaint(); + tqrepaint(); } bool isEnabled(void) @@ -90,19 +90,19 @@ public: protected: - 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) { if (m_enabled) { - KListViewItem::paintCell(p, cg, column, width, alignment); + KListViewItem::paintCell(p, cg, column, width, tqalignment); } else { - QColorGroup _cg( cg ); - QColor c = _cg.text(); - _cg.setColor( QColorGroup::Text, Qt::gray ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); - _cg.setColor( QColorGroup::Text, c ); + TQColorGroup _cg( cg ); + TQColor c = _cg.text(); + _cg.setColor( TQColorGroup::Text, TQt::gray ); + KListViewItem::paintCell( p, _cg, column, width, tqalignment ); + _cg.setColor( TQColorGroup::Text, c ); } } diff --git a/kipi-plugins/rawconverter/iccjpeg.c b/kipi-plugins/rawconverter/iccjpeg.c index fefa950..dc57124 100644 --- a/kipi-plugins/rawconverter/iccjpeg.c +++ b/kipi-plugins/rawconverter/iccjpeg.c @@ -133,7 +133,7 @@ write_icc_profile (j_compress_ptr cinfo, void setup_read_icc_profile (j_decompress_ptr cinfo) { - /* Tell the library to keep any APP2 data it may find */ + /* Tell the library to keep any APP2 data it may tqfind */ jpeg_save_markers(cinfo, ICC_MARKER, 0xFFFF); } @@ -193,10 +193,10 @@ read_icc_profile (j_decompress_ptr cinfo, int seq_no; JOCTET *icc_data; unsigned int total_length; -#define MAX_SEQ_NO 255 /* sufficient since marker numbers are bytes */ - char marker_present[MAX_SEQ_NO+1]; /* 1 if marker found */ - unsigned int data_length[MAX_SEQ_NO+1]; /* size of profile data in marker */ - unsigned int data_offset[MAX_SEQ_NO+1]; /* offset for data in marker */ +#define MAX_SETQ_NO 255 /* sufficient since marker numbers are bytes */ + char marker_present[MAX_SETQ_NO+1]; /* 1 if marker found */ + unsigned int data_length[MAX_SETQ_NO+1]; /* size of profile data in marker */ + unsigned int data_offset[MAX_SETQ_NO+1]; /* offset for data in marker */ *icc_data_ptr = NULL; /* avoid confusion if FALSE return */ *icc_data_len = 0; @@ -205,7 +205,7 @@ read_icc_profile (j_decompress_ptr cinfo, * any ICC markers and verifies the consistency of the marker numbering. */ - for (seq_no = 1; seq_no <= MAX_SEQ_NO; seq_no++) + for (seq_no = 1; seq_no <= MAX_SETQ_NO; seq_no++) marker_present[seq_no] = 0; for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { diff --git a/kipi-plugins/rawconverter/mtqueue.h b/kipi-plugins/rawconverter/mtqueue.h index 14ff5f2..6feb4d7 100644 --- a/kipi-plugins/rawconverter/mtqueue.h +++ b/kipi-plugins/rawconverter/mtqueue.h @@ -23,10 +23,10 @@ #ifndef MTQUEUE_H #define MTQUEUE_H -// Qt includes. +// TQt includes. -#include <qptrqueue.h> -#include <qmutex.h> +#include <tqptrqueue.h> +#include <tqmutex.h> namespace KIPIRawConverterPlugin { @@ -78,8 +78,8 @@ public: private: - QPtrQueue<Type> m_queue; - QMutex m_mutex; + TQPtrQueue<Type> m_queue; + TQMutex m_mutex; }; } // NameSpace KIPIRawConverterPlugin diff --git a/kipi-plugins/rawconverter/plugin_rawconverter.cpp b/kipi-plugins/rawconverter/plugin_rawconverter.cpp index e77a146..1135d93 100644 --- a/kipi-plugins/rawconverter/plugin_rawconverter.cpp +++ b/kipi-plugins/rawconverter/plugin_rawconverter.cpp @@ -35,10 +35,10 @@ extern "C" #include <cstdlib> -// Qt Includes. +// TQt Includes. -#include <qprocess.h> -#include <qfileinfo.h> +#include <tqprocess.h> +#include <tqfileinfo.h> // KDE includes. @@ -72,20 +72,20 @@ typedef KGenericFactory<Plugin_RawConverter> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_rawconverter, Factory("kipiplugin_rawconverter")) -Plugin_RawConverter::Plugin_RawConverter(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "RawConverter") +Plugin_RawConverter::Plugin_RawConverter(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "RawConverter") { kdDebug( 51001 ) << "Loaded RawConverter" << endl; } -void Plugin_RawConverter::setup( QWidget* widget ) +void Plugin_RawConverter::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); singleAction_ = new KAction (i18n("Raw Image Converter..."), "rawconvertersingle", 0, this, - SLOT(slotActivateSingle()), + TQT_SLOT(slotActivateSingle()), actionCollection(), "raw_converter_single"); @@ -93,14 +93,14 @@ void Plugin_RawConverter::setup( QWidget* widget ) "rawconverterbatch", 0, this, - SLOT(slotActivateBatch()), + TQT_SLOT(slotActivateBatch()), actionCollection(), "raw_converter_batch"); addAction( singleAction_ ); addAction( batchAction_ ); - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -108,27 +108,27 @@ void Plugin_RawConverter::setup( QWidget* widget ) return; } - connect( interface, SIGNAL( selectionChanged( bool ) ), - singleAction_, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( selectionChanged( bool ) ), + singleAction_, TQT_SLOT( setEnabled( bool ) ) ); - connect( interface, SIGNAL( currentAlbumChanged( bool ) ), - batchAction_, SLOT( setEnabled( bool ) ) ); + connect( interface, TQT_SIGNAL( currentAlbumChanged( bool ) ), + batchAction_, TQT_SLOT( setEnabled( bool ) ) ); } Plugin_RawConverter::~Plugin_RawConverter() { } -bool Plugin_RawConverter::isRAWFile(const QString& filePath) +bool Plugin_RawConverter::isRAWFile(const TQString& filePath) { #if KDCRAW_VERSION < 0x000106 - QString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); + TQString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); #else - QString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); + TQString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); #endif - QFileInfo fileInfo(filePath); - if (rawFilesExt.upper().contains( fileInfo.extension(false).upper() )) + TQFileInfo fileInfo(filePath); + if (rawFilesExt.upper().tqcontains( fileInfo.extension(false).upper() )) return true; return false; @@ -147,7 +147,7 @@ bool Plugin_RawConverter::checkBinaries() void Plugin_RawConverter::slotActivateSingle() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if (!interface) { @@ -166,21 +166,21 @@ void Plugin_RawConverter::slotActivateSingle() if (!isRAWFile(images.images()[0].path())) { - KMessageBox::error(kapp->activeWindow(), - i18n("\"%1\" is not a Raw file.").arg(images.images()[0].fileName())); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), + i18n("\"%1\" is not a Raw file.").tqarg(images.images()[0].fileName())); return; } KIPIRawConverterPlugin::SingleDialog *converter = new KIPIRawConverterPlugin::SingleDialog(images.images()[0].path(), - kapp->activeWindow()); + TQT_TQWIDGET(kapp->activeWindow())); converter->show(); } void Plugin_RawConverter::slotActivateBatch() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if (!interface) { @@ -198,10 +198,10 @@ void Plugin_RawConverter::slotActivateBatch() return; KIPIRawConverterPlugin::BatchDialog *converter = - new KIPIRawConverterPlugin::BatchDialog(kapp->activeWindow()); + new KIPIRawConverterPlugin::BatchDialog(TQT_TQWIDGET(kapp->activeWindow())); KURL::List urls = images.images(); - QStringList files; + TQStringList files; for( KURL::List::Iterator it = urls.begin(); it != urls.end(); ++it ) { diff --git a/kipi-plugins/rawconverter/plugin_rawconverter.h b/kipi-plugins/rawconverter/plugin_rawconverter.h index 3b159ca..12b700f 100644 --- a/kipi-plugins/rawconverter/plugin_rawconverter.h +++ b/kipi-plugins/rawconverter/plugin_rawconverter.h @@ -34,21 +34,22 @@ class KAction; class Plugin_RawConverter : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_RawConverter(QObject *parent, + Plugin_RawConverter(TQObject *tqparent, const char* name, - const QStringList &args); + const TQStringList &args); ~Plugin_RawConverter(); KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); private: bool checkBinaries(); - bool isRAWFile(const QString& filePath); + bool isRAWFile(const TQString& filePath); private slots: diff --git a/kipi-plugins/rawconverter/previewwidget.cpp b/kipi-plugins/rawconverter/previewwidget.cpp index e1958f5..4718e0e 100644 --- a/kipi-plugins/rawconverter/previewwidget.cpp +++ b/kipi-plugins/rawconverter/previewwidget.cpp @@ -21,14 +21,14 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qpainter.h> -#include <qimage.h> -#include <qstring.h> -#include <qevent.h> -#include <qtimer.h> -#include <qfile.h> +#include <tqpainter.h> +#include <tqimage.h> +#include <tqstring.h> +#include <tqevent.h> +#include <tqtimer.h> +#include <tqfile.h> // KDE includes. @@ -52,34 +52,34 @@ public: timer = 0; } - QPixmap *pix; - QPixmap preview; + TQPixmap *pix; + TQPixmap preview; - QTimer *timer; + TQTimer *timer; - QString text; + TQString text; - QImage image; + TQImage image; }; -PreviewWidget::PreviewWidget(QWidget *parent) - : QFrame(parent, 0, Qt::WRepaintNoErase) +PreviewWidget::PreviewWidget(TQWidget *tqparent) + : TQFrame(tqparent, 0, TQt::WRepaintNoErase) { d = new PreviewWidgetPriv; - setFrameStyle(QFrame::GroupBoxPanel|QFrame::Plain); + setFrameStyle(TQFrame::GroupBoxPanel|TQFrame::Plain); setMargin(0); setLineWidth(1); - setMinimumSize(QSize(400, 300)); - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + setMinimumSize(TQSize(400, 300)); + tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); - d->pix = new QPixmap(400, 300); - d->pix->fill(Qt::black); + d->pix = new TQPixmap(400, 300); + d->pix->fill(TQt::black); - d->timer = new QTimer(this); + d->timer = new TQTimer(this); - connect(d->timer, SIGNAL(timeout()), - this, SLOT(slotResize())); + connect(d->timer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotResize())); } PreviewWidget::~PreviewWidget() @@ -87,21 +87,21 @@ PreviewWidget::~PreviewWidget() delete d; } -void PreviewWidget::load(const QString& file) +void PreviewWidget::load(const TQString& file) { d->text = ""; - d->pix->fill(Qt::black); + d->pix->fill(TQt::black); d->image.load(file); if (!d->image.isNull()) { - QImage img = d->image.scale(width(),height(),QImage::ScaleMin); + TQImage img = d->image.scale(width(),height(),TQ_ScaleMin); int x = d->pix->width()/2 - img.width()/2; int y = d->pix->height()/2 - img.height()/2; - QPainter p(d->pix); + TQPainter p(d->pix); p.drawImage(x, y, img); - p.setPen(QPen(Qt::white)); + p.setPen(TQPen(TQt::white)); p.drawRect(x,y,img.width(),img.height()); p.end(); } @@ -114,37 +114,37 @@ void PreviewWidget::load(const QString& file) update(); } -void PreviewWidget::setInfo(const QString& text, const QColor& color, const QPixmap& preview) +void PreviewWidget::setInfo(const TQString& text, const TQColor& color, const TQPixmap& preview) { d->text = text; d->preview = preview; - d->pix->fill(Qt::black); - QPainter p(d->pix); - p.setPen(QPen(color)); + d->pix->fill(TQt::black); + TQPainter p(d->pix); + p.setPen(TQPen(color)); if (!d->preview.isNull()) { p.drawPixmap(d->pix->width()/2-d->preview.width()/2, d->pix->height()/4-d->preview.height()/2, d->preview, 0, 0, d->preview.width(), d->preview.height()); p.drawText(0, d->pix->height()/2, d->pix->width(), d->pix->height()/2, - Qt::AlignCenter|Qt::WordBreak, d->text); + TQt::AlignCenter|TQt::WordBreak, d->text); } else { p.drawText(0, 0, d->pix->width(), d->pix->height(), - Qt::AlignCenter|Qt::WordBreak, d->text); + TQt::AlignCenter|TQt::WordBreak, d->text); } p.end(); update(); } -void PreviewWidget::paintEvent(QPaintEvent *e) +void PreviewWidget::paintEvent(TQPaintEvent *e) { - QRect r(e->rect()); - bitBlt(this, r.topLeft(), d->pix, r, Qt::CopyROP); + TQRect r(e->rect()); + bitBlt(this, r.topLeft(), d->pix, r, TQt::CopyROP); } -void PreviewWidget::resizeEvent(QResizeEvent*) +void PreviewWidget::resizeEvent(TQResizeEvent*) { d->timer->start(10,true); } @@ -154,23 +154,23 @@ void PreviewWidget::slotResize() if (d->timer->isActive()) return; d->pix->resize(width(),height()); - d->pix->fill(Qt::black); + d->pix->fill(TQt::black); if (!d->text.isEmpty()) { - QPainter p(d->pix); - p.setPen(QPen(Qt::white)); + TQPainter p(d->pix); + p.setPen(TQPen(TQt::white)); if (!d->preview.isNull()) { p.drawPixmap(d->pix->width()/2-d->preview.width()/2, d->pix->height()/4-d->preview.height()/2, d->preview, 0, 0, d->preview.width(), d->preview.height()); p.drawText(0, d->pix->height()/2, d->pix->width(), d->pix->height()/2, - Qt::AlignCenter|Qt::WordBreak, d->text); + TQt::AlignCenter|TQt::WordBreak, d->text); } else { p.drawText(0, 0, d->pix->width(), d->pix->height(), - Qt::AlignCenter|Qt::WordBreak, d->text); + TQt::AlignCenter|TQt::WordBreak, d->text); } p.end(); @@ -179,13 +179,13 @@ void PreviewWidget::slotResize() { if (!d->image.isNull()) { - QImage img = d->image.scale(width(),height(), QImage::ScaleMin); + TQImage img = d->image.scale(width(),height(), TQ_ScaleMin); int x = d->pix->width()/2 - img.width()/2; int y = d->pix->height()/2 - img.height()/2; - QPainter p(d->pix); + TQPainter p(d->pix); p.drawImage(x, y, img); - p.setPen(QPen(Qt::white)); + p.setPen(TQPen(TQt::white)); p.drawRect(x,y,img.width(),img.height()); p.end(); } diff --git a/kipi-plugins/rawconverter/previewwidget.h b/kipi-plugins/rawconverter/previewwidget.h index f1e6ca7..58abf0f 100644 --- a/kipi-plugins/rawconverter/previewwidget.h +++ b/kipi-plugins/rawconverter/previewwidget.h @@ -25,37 +25,38 @@ #ifndef PREVIEWWIDGET_H #define PREVIEWWIDGET_H -// Qt includes. +// TQt includes. -#include <qcolor.h> -#include <qframe.h> -#include <qpixmap.h> -#include <qstring.h> +#include <tqcolor.h> +#include <tqframe.h> +#include <tqpixmap.h> +#include <tqstring.h> -class QPaintEvent; -class QResizeEvent; +class TQPaintEvent; +class TQResizeEvent; namespace KIPIRawConverterPlugin { class PreviewWidgetPriv; -class PreviewWidget : public QFrame +class PreviewWidget : public TQFrame { Q_OBJECT + TQ_OBJECT public: - PreviewWidget(QWidget *parent); + PreviewWidget(TQWidget *tqparent); ~PreviewWidget(); - void load(const QString& file); - void setInfo(const QString& text, const QColor& color=Qt::white, - const QPixmap& preview=QPixmap()); + void load(const TQString& file); + void setInfo(const TQString& text, const TQColor& color=TQt::white, + const TQPixmap& preview=TQPixmap()); protected: - void paintEvent(QPaintEvent *e); - void resizeEvent(QResizeEvent *e); + void paintEvent(TQPaintEvent *e); + void resizeEvent(TQResizeEvent *e); private slots: diff --git a/kipi-plugins/rawconverter/rawdecodingiface.cpp b/kipi-plugins/rawconverter/rawdecodingiface.cpp index 1a86bae..70aff48 100644 --- a/kipi-plugins/rawconverter/rawdecodingiface.cpp +++ b/kipi-plugins/rawconverter/rawdecodingiface.cpp @@ -46,10 +46,10 @@ extern "C" #include "iccjpeg.h" } -// Qt Includes. +// TQt Includes. -#include <qcstring.h> -#include <qfileinfo.h> +#include <tqcstring.h> +#include <tqfileinfo.h> // KDE includes. @@ -77,9 +77,9 @@ RawDecodingIface::~RawDecodingIface() { } -QByteArray RawDecodingIface::getICCProfilFromFile(KDcrawIface::RawDecodingSettings::OutputColorSpace colorSpace) +TQByteArray RawDecodingIface::getICCProfilFromFile(KDcrawIface::RawDecodingSettings::OutputColorSpace colorSpace) { - QString filePath; + TQString filePath; KGlobal::dirs()->addResourceType("profiles", KGlobal::dirs()->kde_default("data") + "kipiplugin_rawconverter/profiles"); @@ -114,25 +114,25 @@ QByteArray RawDecodingIface::getICCProfilFromFile(KDcrawIface::RawDecodingSettin } if ( filePath.isEmpty() ) - return QByteArray(); + return TQByteArray(); - QFile file(filePath); + TQFile file(filePath); if ( !file.open(IO_ReadOnly) ) - return QByteArray(); + return TQByteArray(); - QByteArray data(file.size()); - QDataStream stream( &file ); + TQByteArray data(file.size()); + TQDataStream stream( &file ); stream.readRawBytes(data.data(), data.size()); file.close(); return data; } -bool RawDecodingIface::decodeHalfRAWImage(const QString& filePath, - QString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, +bool RawDecodingIface::decodeHalfRAWImage(const TQString& filePath, + TQString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, KDcrawIface::RawDecodingSettings rawDecodingSettings) { int width, height, rgbmax; - QByteArray imageData; + TQByteArray imageData; if (!KDcrawIface::KDcraw::decodeHalfRAWImage(filePath, rawDecodingSettings, imageData, width, height, rgbmax)) return false; @@ -141,12 +141,12 @@ bool RawDecodingIface::decodeHalfRAWImage(const QString& filePath, imageData, width, height)); } -bool RawDecodingIface::decodeRAWImage(const QString& filePath, - QString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, +bool RawDecodingIface::decodeRAWImage(const TQString& filePath, + TQString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, KDcrawIface::RawDecodingSettings rawDecodingSettings) { int width, height, rgbmax; - QByteArray imageData; + TQByteArray imageData; if (!KDcrawIface::KDcraw::decodeRAWImage(filePath, rawDecodingSettings, imageData, width, height, rgbmax)) return false; @@ -157,13 +157,13 @@ bool RawDecodingIface::decodeRAWImage(const QString& filePath, // ---------------------------------------------------------------------------------- -bool RawDecodingIface::loadedFromDcraw(const QString& filePath, - QString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, - const QByteArray& imageData, int width, int height) +bool RawDecodingIface::loadedFromDcraw(const TQString& filePath, + TQString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, + const TQByteArray& imageData, int width, int height) { - // -- Use a QImage instance to write IPTC preview and Exif thumbnail ------- + // -- Use a TQImage instance to write IPTC preview and Exif thumbnail ------- - QImage img(width, height, 32); + TQImage img(width, height, 32); uchar* dptr = img.bits(); uchar* sptr = (uchar*)imageData.data(); @@ -178,22 +178,22 @@ bool RawDecodingIface::loadedFromDcraw(const QString& filePath, sptr += 3; } - QImage iptcPreview = img.scale(1280, 1024, QImage::ScaleMin); - QImage exifThumbnail = iptcPreview.scale(160, 120, QImage::ScaleMin); + TQImage iptcPreview = img.scale(1280, 1024, TQ_ScaleMin); + TQImage exifThumbnail = iptcPreview.scale(160, 120, TQ_ScaleMin); // -- Write image data into destination file ------------------------------- - QByteArray ICCColorProfile = getICCProfilFromFile(m_rawDecodingSettings.outputColorSpace); - QString soft = QString("Kipi-plugins v.%1").arg(kipiplugins_version); - QFileInfo fi(filePath); - destPath = fi.dirPath(true) + QString("/") + ".kipi-rawconverter-tmp-" - + QString::number(::time(0)); + TQByteArray ICCColorProfile = getICCProfilFromFile(m_rawDecodingSettings.outputColorSpace); + TQString soft = TQString("Kipi-plugins v.%1").tqarg(kipiplugins_version); + TQFileInfo fi(filePath); + destPath = fi.dirPath(true) + TQString("/") + ".kipi-rawconverter-tmp-" + + TQString::number(::time(0)); // Metadata restoration and update. KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.load(filePath); - exiv2Iface.setImageProgramId(QString("Kipi-plugins"), QString(kipiplugins_version)); - exiv2Iface.setImageDimensions(QSize(width, height)); + exiv2Iface.setImageProgramId(TQString("Kipi-plugins"), TQString(kipiplugins_version)); + exiv2Iface.setImageDimensions(TQSize(width, height)); exiv2Iface.setExifThumbnail(exifThumbnail); // Update Iptc preview. @@ -211,7 +211,7 @@ bool RawDecodingIface::loadedFromDcraw(const QString& filePath, case SaveSettingsWidget::OUTPUT_JPEG: { FILE* f = 0; - f = fopen(QFile::encodeName(destPath), "wb"); + f = fopen(TQFile::encodeName(destPath), "wb"); if (!f) { @@ -272,7 +272,7 @@ bool RawDecodingIface::loadedFromDcraw(const QString& filePath, case SaveSettingsWidget::OUTPUT_PNG: { FILE* f = 0; - f = fopen(QFile::encodeName(destPath), "wb"); + f = fopen(TQFile::encodeName(destPath), "wb"); if (!f) { @@ -302,9 +302,9 @@ bool RawDecodingIface::loadedFromDcraw(const QString& filePath, ICCColorProfile.data(), ICCColorProfile.size()); } - QString libpngver(PNG_HEADER_VERSION_STRING); - libpngver.replace('\n', ' '); - soft.append(QString(" (%1)").arg(libpngver)); + TQString libpngver(PNG_HEADER_VERSION_STRING); + libpngver.tqreplace('\n', ' '); + soft.append(TQString(" (%1)").tqarg(libpngver)); png_text text; text.key = "Software"; text.text = (char *)soft.ascii(); @@ -312,15 +312,15 @@ bool RawDecodingIface::loadedFromDcraw(const QString& filePath, png_set_text(png_ptr, info_ptr, &(text), 1); // Store Exif data. - QByteArray ba = exiv2Iface.getExif(); + TQByteArray ba = exiv2Iface.getExif(); const uchar ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; - QByteArray profile = QByteArray(ba.size() + sizeof(ExifHeader)); + TQByteArray profile = TQByteArray(ba.size() + sizeof(ExifHeader)); memcpy(profile.data(), ExifHeader, sizeof(ExifHeader)); memcpy(profile.data()+sizeof(ExifHeader), ba.data(), ba.size()); writeRawProfile(png_ptr, info_ptr, "exif", profile.data(), (png_uint_32) profile.size()); // Store Iptc data. - QByteArray ba2 = exiv2Iface.getIptc(); + TQByteArray ba2 = exiv2Iface.getIptc(); writeRawProfile(png_ptr, info_ptr, "iptc", ba2.data(), (png_uint_32) ba2.size()); png_write_info(png_ptr, info_ptr); @@ -349,7 +349,7 @@ bool RawDecodingIface::loadedFromDcraw(const QString& filePath, int y; int w; - tif = TIFFOpen(QFile::encodeName(destPath), "wb"); + tif = TIFFOpen(TQFile::encodeName(destPath), "wb"); if (!tif) { @@ -377,14 +377,14 @@ bool RawDecodingIface::loadedFromDcraw(const QString& filePath, TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(tif, 0)); // Store Iptc data. - QByteArray ba2 = exiv2Iface.getIptc(true); + TQByteArray ba2 = exiv2Iface.getIptc(true); #if defined(TIFFTAG_PHOTOSHOP) TIFFSetField (tif, TIFFTAG_PHOTOSHOP, (uint32)ba2.size(), (uchar *)ba2.data()); #endif - QString libtiffver(TIFFLIB_VERSION_STR); - libtiffver.replace('\n', ' '); - soft.append(QString(" ( %1 )").arg(libtiffver)); + TQString libtiffver(TIFFLIB_VERSION_STR); + libtiffver.tqreplace('\n', ' '); + soft.append(TQString(" ( %1 )").tqarg(libtiffver)); TIFFSetField(tif, TIFFTAG_SOFTWARE, (const char*)soft.ascii()); // Write ICC profil. @@ -408,7 +408,7 @@ bool RawDecodingIface::loadedFromDcraw(const QString& filePath, // Write thumbnail in tiff directory IFD1 - QImage thumb = exiv2Iface.getExifThumbnail(false); + TQImage thumb = exiv2Iface.getExifThumbnail(false); if (!thumb.isNull()) { TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32)thumb.width()); @@ -470,7 +470,7 @@ bool RawDecodingIface::loadedFromDcraw(const QString& filePath, case SaveSettingsWidget::OUTPUT_PPM: { - FILE* f = fopen(QFile::encodeName(destPath), "wb"); + FILE* f = fopen(TQFile::encodeName(destPath), "wb"); if (!f) { qDebug("Failed to open ppm file for writing"); @@ -491,7 +491,7 @@ bool RawDecodingIface::loadedFromDcraw(const QString& filePath, if (m_cancel) { - ::remove(QFile::encodeName(destPath)); + ::remove(TQFile::encodeName(destPath)); return false; } diff --git a/kipi-plugins/rawconverter/rawdecodingiface.h b/kipi-plugins/rawconverter/rawdecodingiface.h index 6233447..94788c4 100644 --- a/kipi-plugins/rawconverter/rawdecodingiface.h +++ b/kipi-plugins/rawconverter/rawdecodingiface.h @@ -36,11 +36,11 @@ extern "C" } -// Qt Includes. +// TQt Includes. -#include <qstring.h> -#include <qobject.h> -#include <qimage.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqimage.h> // LibKDcraw includes. @@ -57,6 +57,7 @@ namespace KIPIRawConverterPlugin class RawDecodingIface : public KDcrawIface::KDcraw { Q_OBJECT + TQ_OBJECT public: @@ -68,24 +69,24 @@ public: /** Extract a small size of decode RAW data in 8 bits/color/pixels using sRGB color space. */ - bool decodeHalfRAWImage(const QString& filePath, - QString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, + bool decodeHalfRAWImage(const TQString& filePath, + TQString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, KDcrawIface::RawDecodingSettings rawDecodingSettings); /** Extract a full size of RAW data in 8 bits/color/pixels using sRGB color space. */ - bool decodeRAWImage(const QString& filePath, - QString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, + bool decodeRAWImage(const TQString& filePath, + TQString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, KDcrawIface::RawDecodingSettings rawDecodingSettings); private: - QByteArray getICCProfilFromFile(KDcrawIface::RawDecodingSettings::OutputColorSpace colorSpace); + TQByteArray getICCProfilFromFile(KDcrawIface::RawDecodingSettings::OutputColorSpace colorSpace); - bool loadedFromDcraw(const QString& filePath, - QString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, - const QByteArray& imageData, int width, int height); + bool loadedFromDcraw(const TQString& filePath, + TQString& destPath, SaveSettingsWidget::OutputFormat outputFileFormat, + const TQByteArray& imageData, int width, int height); void writeRawProfile(png_struct *ping, png_info *ping_info, char *profile_type, char *profile_data, png_uint_32 length); diff --git a/kipi-plugins/rawconverter/savesettingswidget.cpp b/kipi-plugins/rawconverter/savesettingswidget.cpp index 8531863..c6af08a 100644 --- a/kipi-plugins/rawconverter/savesettingswidget.cpp +++ b/kipi-plugins/rawconverter/savesettingswidget.cpp @@ -20,15 +20,15 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qcombobox.h> -#include <qvbuttongroup.h> -#include <qradiobutton.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qstring.h> +#include <tqcombobox.h> +#include <tqvbuttongroup.h> +#include <tqradiobutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> +#include <tqstring.h> // KDE includes. @@ -57,30 +57,30 @@ public: promptButton = 0; } - QLabel *formatLabel; - QLabel *conflictLabel; + TQLabel *formatLabel; + TQLabel *conflictLabel; - QVButtonGroup *conflictButtonGroup; + TQVButtonGroup *conflictButtonGroup; - QComboBox *formatComboBox; + TQComboBox *formatComboBox; - QRadioButton *overwriteButton; - QRadioButton *promptButton; + TQRadioButton *overwriteButton; + TQRadioButton *promptButton; }; -SaveSettingsWidget::SaveSettingsWidget(QWidget *parent) - : QWidget(parent, 0, Qt::WDestructiveClose) +SaveSettingsWidget::SaveSettingsWidget(TQWidget *tqparent) + : TQWidget(tqparent, 0, TQt::WDestructiveClose) { d = new SaveSettingsWidgetPriv; - QGridLayout* settingsBoxLayout = new QGridLayout(this, 3, 1, KDialog::spacingHint()); + TQGridLayout* settingsBoxLayout = new TQGridLayout(this, 3, 1, KDialog::spacingHint()); - d->formatLabel = new QLabel(i18n("Output file format:"), this); - d->formatComboBox = new QComboBox( false, this ); + d->formatLabel = new TQLabel(i18n("Output file format:"), this); + d->formatComboBox = new TQComboBox( false, this ); d->formatComboBox->insertItem( "JPEG", OUTPUT_JPEG ); d->formatComboBox->insertItem( "TIFF", OUTPUT_TIFF ); d->formatComboBox->insertItem( "PPM", OUTPUT_PPM ); d->formatComboBox->insertItem( "PNG", OUTPUT_PNG ); - QWhatsThis::add(d->formatComboBox, i18n("<p>Set here the output file format to use:<p>" + TQWhatsThis::add(d->formatComboBox, i18n("<p>Set here the output file format to use:<p>" "<b>JPEG</b>: output the processed image in JPEG Format. " "this format will give smaller-sized files. Minimum JPEG " "compression level will be used during Raw conversion.<p>" @@ -98,15 +98,15 @@ SaveSettingsWidget::SaveSettingsWidget(QWidget *parent) "losing quality. Maximum PNG compression " "will be used during conversion.")); - d->conflictLabel = new QLabel(i18n("If Target File Exists:"), this); - d->conflictButtonGroup = new QVButtonGroup(this); - d->overwriteButton = new QRadioButton(i18n("Overwrite automatically"), d->conflictButtonGroup); - d->promptButton = new QRadioButton(i18n("Open rename-file dialog"), d->conflictButtonGroup); + d->conflictLabel = new TQLabel(i18n("If Target File Exists:"), this); + d->conflictButtonGroup = new TQVButtonGroup(this); + d->overwriteButton = new TQRadioButton(i18n("Overwrite automatically"), d->conflictButtonGroup); + d->promptButton = new TQRadioButton(i18n("Open rename-file dialog"), d->conflictButtonGroup); d->conflictButtonGroup->insert(d->overwriteButton, OVERWRITE); d->conflictButtonGroup->insert(d->promptButton, ASKTOUSER); d->conflictButtonGroup->setRadioButtonExclusive(true); d->overwriteButton->setChecked(true); - d->conflictButtonGroup->setFrameStyle(QFrame::NoFrame|QFrame::Plain); + d->conflictButtonGroup->setFrameStyle(TQFrame::NoFrame|TQFrame::Plain); d->conflictButtonGroup->setInsideMargin(0); settingsBoxLayout->addMultiCellWidget(d->formatLabel, 0, 0, 0, 0); @@ -115,8 +115,8 @@ SaveSettingsWidget::SaveSettingsWidget(QWidget *parent) settingsBoxLayout->addMultiCellWidget(d->conflictButtonGroup, 2, 2, 0, 1); settingsBoxLayout->setRowStretch(3, 10); - connect(d->formatComboBox, SIGNAL(activated(int)), - this, SIGNAL(signalSaveFormatChanged())); + connect(d->formatComboBox, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalSaveFormatChanged())); } SaveSettingsWidget::~SaveSettingsWidget() diff --git a/kipi-plugins/rawconverter/savesettingswidget.h b/kipi-plugins/rawconverter/savesettingswidget.h index a7b1f14..a5425a5 100644 --- a/kipi-plugins/rawconverter/savesettingswidget.h +++ b/kipi-plugins/rawconverter/savesettingswidget.h @@ -23,18 +23,19 @@ #ifndef SAVESETTINGSWIDGET_H #define SAVESETTINGSWIDGET_H -// Qt includes. +// TQt includes. -#include <qwidget.h> +#include <tqwidget.h> namespace KIPIRawConverterPlugin { class SaveSettingsWidgetPriv; -class SaveSettingsWidget : public QWidget +class SaveSettingsWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: @@ -54,7 +55,7 @@ public: public: - SaveSettingsWidget(QWidget *parent); + SaveSettingsWidget(TQWidget *tqparent); ~SaveSettingsWidget(); SaveSettingsWidget::OutputFormat fileFormat(); diff --git a/kipi-plugins/rawconverter/singledialog.cpp b/kipi-plugins/rawconverter/singledialog.cpp index e7c30b5..fb954cf 100644 --- a/kipi-plugins/rawconverter/singledialog.cpp +++ b/kipi-plugins/rawconverter/singledialog.cpp @@ -34,17 +34,17 @@ extern "C" #include <cstdio> -// Qt includes. - -#include <qtimer.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qfileinfo.h> -#include <qevent.h> -#include <qpushbutton.h> -#include <qfile.h> +// TQt includes. + +#include <tqtimer.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqfileinfo.h> +#include <tqevent.h> +#include <tqpushbutton.h> +#include <tqfile.h> // KDE includes. @@ -79,17 +79,17 @@ extern "C" namespace KIPIRawConverterPlugin { -SingleDialog::SingleDialog(const QString& file, QWidget */*parent*/) +SingleDialog::SingleDialog(const TQString& file, TQWidget */*tqparent*/) : KDialogBase(0, 0, false, i18n("Raw Image Converter"), Help|Default|User1|User2|User3|Close, Close, true, i18n("&Preview"), i18n("Con&vert"), i18n("&Abort")) { m_inputFile = file; - m_inputFileName = QFileInfo(file).fileName(); + m_inputFileName = TQFileInfo(file).fileName(); - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget( page ); - QGridLayout *mainLayout = new QGridLayout(page, 1, 1, 0, spacingHint()); + TQGridLayout *mainLayout = new TQGridLayout(page, 1, 1, 0, spacingHint()); m_previewWidget = new PreviewWidget(page); @@ -128,7 +128,7 @@ SingleDialog::SingleDialog(const QString& file, QWidget */*parent*/) KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // --------------------------------------------------------------- @@ -144,23 +144,23 @@ SingleDialog::SingleDialog(const QString& file, QWidget */*parent*/) setButtonTip( Close, i18n("<p>Exit Raw Converter")); - m_blinkPreviewTimer = new QTimer(this); - m_blinkConvertTimer = new QTimer(this); - m_thread = new ActionThread(this); + m_blinkPreviewTimer = new TQTimer(this); + m_blinkConvertTimer = new TQTimer(this); + m_thread = new ActionThread(TQT_TQOBJECT(this)); // --------------------------------------------------------------- - connect(m_blinkPreviewTimer, SIGNAL(timeout()), - this, SLOT(slotPreviewBlinkTimerDone())); + connect(m_blinkPreviewTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotPreviewBlinkTimerDone())); - connect(m_blinkConvertTimer, SIGNAL(timeout()), - this, SLOT(slotConvertBlinkTimerDone())); + connect(m_blinkConvertTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotConvertBlinkTimerDone())); // --------------------------------------------------------------- busy(false); readSettings(); - QTimer::singleShot(0, this, SLOT( slotIdentify() ) ); + TQTimer::singleShot(0, this, TQT_SLOT( slotIdentify() ) ); } SingleDialog::~SingleDialog() @@ -169,7 +169,7 @@ SingleDialog::~SingleDialog() delete m_thread; } -void SingleDialog::closeEvent(QCloseEvent *e) +void SingleDialog::closeEvent(TQCloseEvent *e) { if (!e) return; m_blinkPreviewTimer->stop(); @@ -237,7 +237,7 @@ void SingleDialog::readSettings() (SaveSettingsWidget::ConflictRule)config.readNumEntry("Conflict", (int)(SaveSettingsWidget::OVERWRITE))); - resize(configDialogSize(config, QString("Single Raw Converter Dialog"))); + resize(configDialogSize(config, TQString("Single Raw Converter Dialog"))); } void SingleDialog::saveSettings() @@ -270,7 +270,7 @@ void SingleDialog::saveSettings() config.writeEntry("Output Format", (int)m_saveSettingsBox->fileFormat()); config.writeEntry("Conflict", (int)m_saveSettingsBox->conflictRule()); - saveDialogSize(config, QString("Single Raw Converter Dialog")); + saveDialogSize(config, TQString("Single Raw Converter Dialog")); config.sync(); } @@ -366,47 +366,47 @@ void SingleDialog::busy(bool val) enableButton (Close, !val); } -void SingleDialog::identified(const QString&, const QString& identity, const QPixmap& preview) +void SingleDialog::identified(const TQString&, const TQString& identity, const TQPixmap& preview) { - m_previewWidget->setInfo(m_inputFileName + QString(" :\n") + identity, Qt::white, preview); + m_previewWidget->setInfo(m_inputFileName + TQString(" :\n") + identity, TQt::white, preview); } -void SingleDialog::previewing(const QString&) +void SingleDialog::previewing(const TQString&) { m_previewBlink = false; m_previewWidget->setCursor( KCursor::waitCursor() ); m_blinkPreviewTimer->start(200); } -void SingleDialog::previewed(const QString&, const QString& tmpFile) +void SingleDialog::previewed(const TQString&, const TQString& tmpFile) { m_previewWidget->unsetCursor(); m_blinkPreviewTimer->stop(); m_previewWidget->load(tmpFile); - ::remove(QFile::encodeName(tmpFile)); + ::remove(TQFile::encodeName(tmpFile)); } -void SingleDialog::previewFailed(const QString&) +void SingleDialog::previewFailed(const TQString&) { m_previewWidget->unsetCursor(); m_blinkPreviewTimer->stop(); - m_previewWidget->setInfo(i18n("Failed to generate preview"), Qt::red); + m_previewWidget->setInfo(i18n("Failed to generate preview"), TQt::red); } -void SingleDialog::processing(const QString&) +void SingleDialog::processing(const TQString&) { m_convertBlink = false; m_previewWidget->setCursor( KCursor::waitCursor() ); m_blinkConvertTimer->start(200); } -void SingleDialog::processed(const QString&, const QString& tmpFile) +void SingleDialog::processed(const TQString&, const TQString& tmpFile) { m_previewWidget->unsetCursor(); m_blinkConvertTimer->stop(); m_previewWidget->load(tmpFile); - QString filter("*."); - QString ext; + TQString filter("*."); + TQString ext; switch(m_saveSettingsBox->fileFormat()) { @@ -425,15 +425,15 @@ void SingleDialog::processed(const QString&, const QString& tmpFile) } filter += ext; - QFileInfo fi(m_inputFile); - QString destFile = fi.dirPath(true) + QString("/") + fi.baseName() + QString(".") + ext; + TQFileInfo fi(m_inputFile); + TQString destFile = fi.dirPath(true) + TQString("/") + fi.baseName() + TQString(".") + ext; if (m_saveSettingsBox->conflictRule() != SaveSettingsWidget::OVERWRITE) { struct stat statBuf; - if (::stat(QFile::encodeName(destFile), &statBuf) == 0) + if (::stat(TQFile::encodeName(destFile), &statBuf) == 0) { - KIO::RenameDlg dlg(this, i18n("Save Raw Image converted from '%1' as").arg(fi.fileName()), + KIO::RenameDlg dlg(this, i18n("Save Raw Image converted from '%1' as").tqarg(fi.fileName()), tmpFile, destFile, KIO::RenameDlg_Mode(KIO::M_SINGLE | KIO::M_OVERWRITE | KIO::M_SKIP)); @@ -442,7 +442,7 @@ void SingleDialog::processed(const QString&, const QString& tmpFile) case KIO::R_CANCEL: case KIO::R_SKIP: { - destFile = QString(); + destFile = TQString(); break; } case KIO::R_RENAME: @@ -458,28 +458,28 @@ void SingleDialog::processed(const QString&, const QString& tmpFile) if (!destFile.isEmpty()) { - if (::rename(QFile::encodeName(tmpFile), QFile::encodeName(destFile)) != 0) + if (::rename(TQFile::encodeName(tmpFile), TQFile::encodeName(destFile)) != 0) { - KMessageBox::error(this, i18n("Failed to save image %1").arg( destFile )); + KMessageBox::error(this, i18n("Failed to save image %1").tqarg( destFile )); } } } -void SingleDialog::processingFailed(const QString&) +void SingleDialog::processingFailed(const TQString&) { m_previewWidget->unsetCursor(); m_blinkConvertTimer->stop(); - m_previewWidget->setInfo(i18n("Failed to convert Raw image"), Qt::red); + m_previewWidget->setInfo(i18n("Failed to convert Raw image"), TQt::red); } void SingleDialog::slotPreviewBlinkTimerDone() { - QString preview = i18n("Generating Preview..."); + TQString preview = i18n("Generating Preview..."); if (m_previewBlink) - m_previewWidget->setInfo(preview, Qt::green); + m_previewWidget->setInfo(preview, TQt::green); else - m_previewWidget->setInfo(preview, Qt::darkGreen); + m_previewWidget->setInfo(preview, TQt::darkGreen); m_previewBlink = !m_previewBlink; m_blinkPreviewTimer->start(200); @@ -487,25 +487,25 @@ void SingleDialog::slotPreviewBlinkTimerDone() void SingleDialog::slotConvertBlinkTimerDone() { - QString convert = i18n("Converting Raw Image..."); + TQString convert = i18n("Converting Raw Image..."); if (m_convertBlink) - m_previewWidget->setInfo(convert, Qt::green); + m_previewWidget->setInfo(convert, TQt::green); else - m_previewWidget->setInfo(convert, Qt::darkGreen); + m_previewWidget->setInfo(convert, TQt::darkGreen); m_convertBlink = !m_convertBlink; m_blinkConvertTimer->start(200); } -void SingleDialog::customEvent(QCustomEvent *event) +void SingleDialog::customEvent(TQCustomEvent *event) { if (!event) return; EventData *d = (EventData*) event->data(); if (!d) return; - QString text; + TQString text; if (d->starting) // Something have been started... { @@ -565,7 +565,7 @@ void SingleDialog::customEvent(QCustomEvent *event) { case(IDENTIFY_FULL): { - QPixmap pix = QPixmap(d->image.scale(256, 256, QImage::ScaleMin)); + TQPixmap pix = TQPixmap(d->image.scale(256, 256, TQ_ScaleMin)); identified(d->filePath, d->message, pix); busy(false); break; diff --git a/kipi-plugins/rawconverter/singledialog.h b/kipi-plugins/rawconverter/singledialog.h index 2038031..04cdd63 100644 --- a/kipi-plugins/rawconverter/singledialog.h +++ b/kipi-plugins/rawconverter/singledialog.h @@ -24,9 +24,9 @@ #ifndef SINGLEDIALOG_H #define SINGLEDIALOG_H -// Qt includes. +// TQt includes. -#include <qstring.h> +#include <tqstring.h> // KDE includes. @@ -36,9 +36,9 @@ #include "kpaboutdata.h" -class QCloseEvent; -class QCustomEvent; -class QTimer; +class TQCloseEvent; +class TQCustomEvent; +class TQTimer; namespace KDcrawIface { @@ -55,16 +55,17 @@ class SaveSettingsWidget; class SingleDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - SingleDialog(const QString& file, QWidget *parent); + SingleDialog(const TQString& file, TQWidget *tqparent); ~SingleDialog(); protected: - void customEvent(QCustomEvent *event); - void closeEvent(QCloseEvent *e); + void customEvent(TQCustomEvent *event); + void closeEvent(TQCloseEvent *e); private: @@ -73,15 +74,15 @@ private: void busy(bool busy); - void identified(const QString&, const QString& identity, const QPixmap& preview); + void identified(const TQString&, const TQString& identity, const TQPixmap& preview); - void previewing(const QString&); - void previewed(const QString&, const QString& tmpFile); - void previewFailed(const QString&); + void previewing(const TQString&); + void previewed(const TQString&, const TQString& tmpFile); + void previewFailed(const TQString&); - void processing(const QString&); - void processed(const QString&, const QString& tmpFile); - void processingFailed(const QString&); + void processing(const TQString&); + void processed(const TQString&, const TQString& tmpFile); + void processingFailed(const TQString&); private slots: @@ -102,11 +103,11 @@ private: bool m_previewBlink; bool m_convertBlink; - QString m_inputFile; - QString m_inputFileName; + TQString m_inputFile; + TQString m_inputFileName; - QTimer *m_blinkPreviewTimer; - QTimer *m_blinkConvertTimer; + TQTimer *m_blinkPreviewTimer; + TQTimer *m_blinkConvertTimer; PreviewWidget *m_previewWidget; diff --git a/kipi-plugins/sendimages/actions.h b/kipi-plugins/sendimages/actions.h index 6946e19..a1a72c8 100644 --- a/kipi-plugins/sendimages/actions.h +++ b/kipi-plugins/sendimages/actions.h @@ -50,9 +50,9 @@ public: int total; - QString fileName; - QString albumName; - QString errString; + TQString fileName; + TQString albumName; + TQString errString; Action action; }; diff --git a/kipi-plugins/sendimages/listimageserrordialog.cpp b/kipi-plugins/sendimages/listimageserrordialog.cpp index 307c7fa..6272e32 100644 --- a/kipi-plugins/sendimages/listimageserrordialog.cpp +++ b/kipi-plugins/sendimages/listimageserrordialog.cpp @@ -20,15 +20,15 @@ * * ============================================================ */ -// Qt includes +// TQt includes -#include <qpushbutton.h> -#include <qlayout.h> -#include <qstringlist.h> -#include <qstring.h> -#include <qlabel.h> -#include <qfileinfo.h> -#include <qframe.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqstringlist.h> +#include <tqstring.h> +#include <tqlabel.h> +#include <tqfileinfo.h> +#include <tqframe.h> // KDElib includes @@ -45,31 +45,31 @@ namespace KIPISendimagesPlugin { -listImagesErrorDialog::listImagesErrorDialog(QWidget* parent, QString Caption, - const QString &Mess1, const QString &Mess2, +listImagesErrorDialog::listImagesErrorDialog(TQWidget* tqparent, TQString Caption, + const TQString &Mess1, const TQString &Mess2, KURL::List ListOfiles) - : KDialogBase( Caption, Yes|No|Cancel, Yes, Cancel, parent, + : KDialogBase( Caption, Yes|No|Cancel, Yes, Cancel, tqparent, "listImagesErrorDialog", true, false ) { - QWidget* box = new QWidget( this ); + TQWidget* box = new TQWidget( this ); setMainWidget(box); - QVBoxLayout* ml = new QVBoxLayout(box); + TQVBoxLayout* ml = new TQVBoxLayout(box); //--------------------------------------------- - QHBoxLayout* h1 = new QHBoxLayout( ml ); - QVBoxLayout* v1 = new QVBoxLayout( h1 ); + TQHBoxLayout* h1 = new TQHBoxLayout( ml ); + TQVBoxLayout* v1 = new TQVBoxLayout( h1 ); h1->addSpacing( 5 ); - QGridLayout* g1 = new QGridLayout( v1, 1, 3 ); + TQGridLayout* g1 = new TQGridLayout( v1, 1, 3 ); - QLabel *labelMess1 = new QLabel ( Mess1, box); + TQLabel *labelMess1 = new TQLabel ( Mess1, box); m_listFiles = new KListView( box ); m_listFiles->addColumn(i18n("Image File Name")); m_listFiles->addColumn(i18n("From Album")); m_listFiles->setSorting(1); m_listFiles->setItemMargin(3); - m_listFiles->setResizeMode(QListView::LastColumn); - QLabel *labelMess2 = new QLabel ( Mess2, box); + m_listFiles->setResizeMode(TQListView::LastColumn); + TQLabel *labelMess2 = new TQLabel ( Mess2, box); g1->addWidget (labelMess1, 1, 1); g1->addWidget (m_listFiles, 2, 1); diff --git a/kipi-plugins/sendimages/listimageserrordialog.h b/kipi-plugins/sendimages/listimageserrordialog.h index 494b4d4..39f27f8 100644 --- a/kipi-plugins/sendimages/listimageserrordialog.h +++ b/kipi-plugins/sendimages/listimageserrordialog.h @@ -36,11 +36,12 @@ namespace KIPISendimagesPlugin class listImagesErrorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - listImagesErrorDialog(QWidget* parent, QString Caption, - const QString &Mess1, const QString &Mess2, + listImagesErrorDialog(TQWidget* tqparent, TQString Caption, + const TQString &Mess1, const TQString &Mess2, KURL::List ListOfiles); ~listImagesErrorDialog(); diff --git a/kipi-plugins/sendimages/plugin_sendimages.cpp b/kipi-plugins/sendimages/plugin_sendimages.cpp index f6441a0..09d5ffa 100644 --- a/kipi-plugins/sendimages/plugin_sendimages.cpp +++ b/kipi-plugins/sendimages/plugin_sendimages.cpp @@ -62,14 +62,14 @@ K_EXPORT_COMPONENT_FACTORY( kipiplugin_sendimages, Factory("kipiplugin_sendimages")) // ----------------------------------------------------------- -Plugin_SendImages::Plugin_SendImages(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "SendImages") +Plugin_SendImages::Plugin_SendImages(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "SendImages") { kdDebug( 51001 ) << "Plugin_SendImages plugin loaded" << endl; } -void Plugin_SendImages::setup( QWidget* widget ) +void Plugin_SendImages::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -77,13 +77,13 @@ void Plugin_SendImages::setup( QWidget* widget ) "mail_new", // Menu icon. 0, this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "send_images"); addAction( m_action_sendimages ); - KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( parent() ); + KIPI::Interface* interface = dynamic_cast< KIPI::Interface* >( tqparent() ); if ( !interface ) { kdError( 51000 ) << "Kipi interface is null!" << endl; @@ -94,8 +94,8 @@ void Plugin_SendImages::setup( QWidget* widget ) m_action_sendimages->setEnabled( selection.isValid() && !selection.images().isEmpty() ); - connect( interface, SIGNAL(selectionChanged(bool)), - m_action_sendimages, SLOT(setEnabled(bool))); + connect( interface, TQT_SIGNAL(selectionChanged(bool)), + m_action_sendimages, TQT_SLOT(setEnabled(bool))); } Plugin_SendImages::~Plugin_SendImages() @@ -106,7 +106,7 @@ void Plugin_SendImages::slotActivate() { m_progressDlg = 0; - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { kdError( 51000 ) << "Kipi interface is null!" << endl; @@ -119,7 +119,7 @@ void Plugin_SendImages::slotActivate() return; KStandardDirs dir; - QString Tmp = dir.saveLocation("tmp", "kipi-sendimagesplugin-" + QString::number(getpid()) + "/"); + TQString Tmp = dir.saveLocation("tmp", "kipi-sendimagesplugin-" + TQString::number(getpid()) + "/"); m_sendImagesOperation = new KIPISendimagesPlugin::SendImages( interface, Tmp, images, this ); @@ -139,16 +139,16 @@ void Plugin_SendImages::slotCancel() m_sendImagesOperation->removeTmpFiles(); } -void Plugin_SendImages::customEvent(QCustomEvent *event) +void Plugin_SendImages::customEvent(TQCustomEvent *event) { if (!event) return; if (!m_progressDlg) { - m_progressDlg = new KIPI::BatchProgressDialog(kapp->activeWindow(), i18n("Preparing images to send")); + m_progressDlg = new KIPI::BatchProgressDialog(TQT_TQWIDGET(kapp->activeWindow()), i18n("Preparing images to send")); - connect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + connect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); m_current = 0; m_progressDlg->show(); @@ -160,7 +160,7 @@ void Plugin_SendImages::customEvent(QCustomEvent *event) if (d->starting) { - QString text; + TQString text; switch (d->action) { @@ -174,14 +174,14 @@ void Plugin_SendImages::customEvent(QCustomEvent *event) case(KIPISendimagesPlugin::ResizeImages): { text = i18n("Resizing '%1' from Album '%2'...") - .arg(d->fileName).arg(d->albumName); + .tqarg(d->fileName).tqarg(d->albumName); break; } case(KIPISendimagesPlugin::Progress): { text = i18n("Using '%1' from Album '%2' without resizing...") - .arg(d->fileName).arg(d->albumName); + .tqarg(d->fileName).tqarg(d->albumName); break; } @@ -195,7 +195,7 @@ void Plugin_SendImages::customEvent(QCustomEvent *event) } else { - QString text; + TQString text; if (!d->success) { @@ -204,7 +204,7 @@ void Plugin_SendImages::customEvent(QCustomEvent *event) case(KIPISendimagesPlugin::ResizeImages): { text = i18n("Failed to resize '%1' from Album '%2'") - .arg(d->fileName).arg(d->albumName); + .tqarg(d->fileName).tqarg(d->albumName); break; } @@ -223,7 +223,7 @@ void Plugin_SendImages::customEvent(QCustomEvent *event) case(KIPISendimagesPlugin::ResizeImages): { text = i18n("Resizing '%1' from Album '%2' completed.") - .arg(d->fileName).arg(d->albumName); + .tqarg(d->fileName).tqarg(d->albumName); break; } @@ -261,8 +261,8 @@ void Plugin_SendImages::customEvent(QCustomEvent *event) m_progressDlg->setButtonCancelText( i18n("&Close") ); #endif - disconnect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + disconnect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); // Create a text file with images comments if necessary. diff --git a/kipi-plugins/sendimages/plugin_sendimages.h b/kipi-plugins/sendimages/plugin_sendimages.h index dee11c5..fd1eb20 100644 --- a/kipi-plugins/sendimages/plugin_sendimages.h +++ b/kipi-plugins/sendimages/plugin_sendimages.h @@ -27,7 +27,7 @@ #include <libkipi/plugin.h> -class QCustomEvent; +class TQCustomEvent; class KAction; class KIPISendimagesPlugin::SendImages; @@ -40,14 +40,15 @@ namespace KIPI class Plugin_SendImages : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_SendImages(QObject *parent, const char* name, const QStringList &args); + Plugin_SendImages(TQObject *tqparent, const char* name, const TQStringList &args); ~Plugin_SendImages(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* ); + virtual void setup( TQWidget* ); public slots: @@ -57,7 +58,7 @@ public slots: private: - void customEvent(QCustomEvent *event); + void customEvent(TQCustomEvent *event); private: diff --git a/kipi-plugins/sendimages/sendimages.cpp b/kipi-plugins/sendimages/sendimages.cpp index abbdf62..b90e7d0 100644 --- a/kipi-plugins/sendimages/sendimages.cpp +++ b/kipi-plugins/sendimages/sendimages.cpp @@ -22,17 +22,17 @@ * * ============================================================ */ -// Qt includes. - -#include <qfileinfo.h> -#include <qdir.h> -#include <qimage.h> -#include <qprogressdialog.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qtimer.h> -#include <qurl.h> -#include <qdeepcopy.h> +// TQt includes. + +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqimage.h> +#include <tqprogressdialog.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqtimer.h> +#include <tqurl.h> +#include <tqdeepcopy.h> // KDE includes @@ -79,20 +79,20 @@ namespace KIPISendimagesPlugin { ///Constructor: saves system handoff parameters in member variables -SendImages::SendImages(KIPI::Interface* interface, const QString &tmpFolder, - const KIPI::ImageCollection& imagesCollection, QObject *parent) - : QObject(parent), QThread() +SendImages::SendImages(KIPI::Interface* interface, const TQString &tmpFolder, + const KIPI::ImageCollection& imagesCollection, TQObject *tqparent) + : TQObject(tqparent), TQThread() { m_invokedBefore = false; m_interface = interface; m_tmp = tmpFolder; m_collection = imagesCollection; - m_parent = parent; - m_mozillaTimer = new QTimer(this); + m_parent = tqparent; + m_mozillaTimer = new TQTimer(this); KImageIO::registerFormats(); - connect(m_mozillaTimer, SIGNAL(timeout()), - this, SLOT(slotMozillaTimeout())); + connect(m_mozillaTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotMozillaTimeout())); } ///Destructor @@ -105,12 +105,12 @@ SendImages::~SendImages() ///Invokes the User Dialog Window void SendImages::showDialog() { - m_sendImagesDialog = new KIPISendimagesPlugin::SendImagesDialog(kapp->activeWindow(), + m_sendImagesDialog = new KIPISendimagesPlugin::SendImagesDialog(TQT_TQWIDGET(kapp->activeWindow()), m_interface, m_collection); m_sendImagesDialog->show(); - connect(m_sendImagesDialog, SIGNAL(signalAccepted()), - m_parent, SLOT(slotAcceptedConfigDlg())); + connect(m_sendImagesDialog, TQT_SIGNAL(signalAccepted()), + m_parent, TQT_SLOT(slotAcceptedConfigDlg())); } /** Execute the no threadable operations before the real thread. @@ -142,12 +142,12 @@ void SendImages::run() d->starting = true; d->success = false; d->total = m_images.count(); - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); for( KURL::List::Iterator it = m_images.begin() ; it != m_images.end() ; ++it ) { - QString imageName = (*it).path(); - QString ItemName = imageName.section( '/', -1 ); + TQString imageName = (*it).path(); + TQString ItemName = imageName.section( '/', -1 ); d = new KIPISendimagesPlugin::EventData; d->action = KIPISendimagesPlugin::ResizeImages; @@ -155,15 +155,15 @@ void SendImages::run() d->albumName = (*it).directory().section('/', -1); d->starting = true; d->success = false; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); // Prepare resized target images to send. - QString imageFileName=""; + TQString imageFileName=""; KIPI::ImageInfo info = m_interface->info( *it ); ///Generate filename of destination image - QString commentItem = info.description(); + TQString commentItem = info.description(); if ((m_sendImagesDialog->m_comment2ImageName->isChecked() == true ) && !commentItem.isEmpty() ) @@ -172,41 +172,41 @@ void SendImages::run() } else { - commentItem = ItemName.left(ItemName.findRev('.')); + commentItem = ItemName.left(ItemName.tqfindRev('.')); qDebug("commentItem is empty"); } - //QString TempFileName = (*it).directory().section('/', -1); - QString TempFileName=(*it).path().section('/', -2,-2)+"/"+commentItem+ + //TQString TempFileName = (*it).directory().section('/', -1); + TQString TempFileName=(*it).path().section('/', -2,-2)+"/"+commentItem+ +"."+(*it).path().section('.', -1,-1); qDebug("TempFileName: %s",TempFileName.ascii()); // Thunderbird does not like (). Replace them, BUG:131343 - TempFileName.replace(QChar('('), "_").replace(QChar(')'), "_"); + TempFileName.tqreplace(TQChar('('), "_").tqreplace(TQChar(')'), "_"); // and these characters are better eliminated, too ;-) - TempFileName.replace(QChar(','), "_").replace(QChar(' '), "_"); - TempFileName.replace(QChar(';'), "_").replace(QChar('%'), "_"); - TempFileName.replace(QChar('/'), "-").replace(QChar('?'), ""); - TempFileName.replace(QChar('"'), ""); + TempFileName.tqreplace(TQChar(','), "_").tqreplace(TQChar(' '), "_"); + TempFileName.tqreplace(TQChar(';'), "_").tqreplace(TQChar('%'), "_"); + TempFileName.tqreplace(TQChar('/'), "-").tqreplace(TQChar('?'), ""); + TempFileName.tqreplace(TQChar('"'), ""); //If TempFileName already exists, add a number oder increase number if (entry_already_exists(m_filesSendList,m_tmp + TempFileName)) { qDebug ("I entered"); - QString secondpart=(m_tmp+TempFileName).section(".",-1,-1); - QString firstpart= + TQString secondpart=(m_tmp+TempFileName).section(".",-1,-1); + TQString firstpart= (m_tmp+TempFileName).left((m_tmp+TempFileName).length()-secondpart.length()-1); qDebug("Firstpart: %s \n Secondpart: %s",firstpart.ascii(), secondpart.ascii()); //Add _integer value in the end and prove again int int_index=2; - QString index=QString::number(int_index,10); + TQString index=TQString::number(int_index,10); while (entry_already_exists(m_filesSendList,firstpart + "_"+index+"."+secondpart)) { int_index++; - index=QString::number(int_index,10); + index=TQString::number(int_index,10); qDebug("Index: %s",index.ascii()); } - QString temp=firstpart + "_"+index+"."+secondpart; + TQString temp=firstpart + "_"+index+"."+secondpart; TempFileName=temp.right(temp.length()-m_tmp.length()); // .section("-",-2,-1); // m_tmp=(firstpart + "_"+index+"."+secondpart).section("-",-2); @@ -216,7 +216,7 @@ void SendImages::run() { // Prepare resizing images. - //QString imageNameFormat = TempFileName.replace(QChar('.'), "_") + + //TQString imageNameFormat = TempFileName.tqreplace(TQChar('.'), "_") + // extension(m_imageFormat); qDebug( "Resizing %s-> '%s %s ' (%s ; %d )",imageName.ascii(), @@ -224,7 +224,7 @@ void SendImages::run() // Return value for resizeImageProcess-function, in order to avoid reopening // the image for exiv-writing. - QSize newsize; + TQSize newsize; if ( resizeImageProcess( imageName, m_tmp, m_imageFormat, TempFileName, m_sizeFactor, m_imageCompression, newsize) == false ) @@ -237,7 +237,7 @@ void SendImages::run() d->albumName = (*it).directory().section('/', -1); d->starting = false; d->success = false; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); m_imagesResizedWithError.append(*it); } @@ -245,15 +245,15 @@ void SendImages::run() { // Only try to write Exif if both src and destination are JPEG files. - if (QString(QImageIO::imageFormat(imageName)).upper() == "JPEG" && + if (TQString(TQImageIO::imageFormat(imageName)).upper() == "JPEG" && m_imageFormat.upper() == "JPEG") { - QString targetFile = m_tmp + TempFileName; + TQString targetFile = m_tmp + TempFileName; KExiv2Iface::KExiv2 exiv2Iface; if (exiv2Iface.load(imageName)) { - exiv2Iface.setImageProgramId(QString("Kipi-plugins"), QString(kipiplugins_version)); + exiv2Iface.setImageProgramId(TQString("Kipi-plugins"), TQString(kipiplugins_version)); exiv2Iface.setImageDimensions(newsize); exiv2Iface.save(targetFile); } @@ -269,7 +269,7 @@ void SendImages::run() d->albumName = (*it).directory().section('/', -1); d->starting = false; d->success = true; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); m_filesSendList.append(m_tmp + TempFileName); m_imagesPackage.append(*it); @@ -286,7 +286,7 @@ void SendImages::run() d->albumName = (*it).directory().section('/', -1); d->starting = true; d->success = false; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); m_filesSendList.append(m_tmp + TempFileName); m_imagesPackage.append(*it); @@ -299,10 +299,10 @@ void SendImages::run() d->action = KIPISendimagesPlugin::Progress; d->starting = false; d->success = true; - QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d)); + TQApplication::postEvent(m_parent, new TQCustomEvent(TQEvent::User, d)); } -bool SendImages::entry_already_exists(KURL::List filenamelist,QString entry) +bool SendImages::entry_already_exists(KURL::List filenamelist,TQString entry) { KURL::List::Iterator it = filenamelist.begin(); while( it != filenamelist.end() ) @@ -318,7 +318,7 @@ void SendImages::makeCommentsFile(void) { if ( m_sendImagesDialog->m_addComments->isChecked() == true ) { - QString ImageCommentsText; + TQString ImageCommentsText; KURL::List::Iterator it = m_imagesPackage.begin(); bool anyCommentsPresent = false; @@ -327,9 +327,9 @@ void SendImages::makeCommentsFile(void) { KIPI::ImageInfo info = m_interface->info( *it ); - QString commentItem = info.description(); + TQString commentItem = info.description(); ++it; - QString targetFile = (*it).filename(); + TQString targetFile = (*it).filename(); if ( commentItem.isEmpty() ) commentItem = i18n("no caption"); @@ -337,15 +337,15 @@ void SendImages::makeCommentsFile(void) anyCommentsPresent = true; ImageCommentsText += i18n("Caption for image \"%1\": %2\n") - .arg(targetFile).arg(commentItem); + .tqarg(targetFile).tqarg(commentItem); //Tags from the database if (m_interface->hasFeature(KIPI::HostSupportsTags)) { - QMap <QString, QVariant> attribs=info.attributes(); + TQMap <TQString, TQVariant> attribs=info.attributes(); if (attribs["tags"].asStringList().count() > 0) { - ImageCommentsText += i18n("Tags: %2\n").arg(attribs["tags"].asStringList().join(",")); + ImageCommentsText += i18n("Tags: %2\n").tqarg(attribs["tags"].asStringList().join(",")); anyCommentsPresent = true; } } @@ -356,9 +356,9 @@ void SendImages::makeCommentsFile(void) if ( anyCommentsPresent ) { - QFile commentsFile( m_tmp + i18n("comments.txt") ); - QTextStream stream( &commentsFile ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQFile commentsFile( m_tmp + i18n("comments.txt") ); + TQTextStream stream( &commentsFile ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); commentsFile.open( IO_WriteOnly ); stream << ImageCommentsText << "\n"; commentsFile.close(); @@ -372,7 +372,7 @@ bool SendImages::showErrors() { if ( m_imagesResizedWithError.isEmpty() == false ) { - listImagesErrorDialog *ErrorImagesDialog = new listImagesErrorDialog(kapp->activeWindow(), + listImagesErrorDialog *ErrorImagesDialog = new listImagesErrorDialog(TQT_TQWIDGET(kapp->activeWindow()), i18n("Error during resize images process."), i18n("Cannot resize the following image files:"), i18n("Do you want them to be added as attachments " @@ -419,9 +419,9 @@ KURL::List SendImages::divideEmails(void) for ( KURL::List::Iterator it = m_filesSendList.begin() ; it != m_filesSendList.end() ; ++it ) { qDebug("m_attachmentlimit: %lu ", m_attachmentlimit); - QString imageName = (*it).path(); + TQString imageName = (*it).path(); qDebug("Imagename: %s", imageName.ascii()); - QFile file(imageName); + TQFile file(imageName); qDebug("filesize: %lu", file.size()); if ((mylistsize + file.size()) <= m_attachmentlimit) @@ -460,12 +460,12 @@ bool SendImages::invokeMailAgent(void) if ( m_sendImagesDialog->m_mailAgentName->currentText() == "Default" ) { KApplication::kApplication()->invokeMailer( - QString::null, // Destination address. - QString::null, // Carbon Copy address. - QString::null, // Blind Carbon Copy address - QString::null, // Message Subject. - QString::null, // Message Body. - QString::null, // Message Body File. + TQString(), // Destination address. + TQString(), // Carbon Copy address. + TQString(), // Blind Carbon Copy address + TQString(), // Message Subject. + TQString(), // Message Body. + TQString(), // Message Body File. filelist.toStringList()); // Images attachments (+ comments). agentInvoked = true; } @@ -480,14 +480,14 @@ bool SendImages::invokeMailAgent(void) for ( KURL::List::Iterator it = filelist.begin() ; it != filelist.end() ; ++it ) { *m_mailAgentProc << "--attach"; - *m_mailAgentProc << QFile::encodeName((*it).path()); + *m_mailAgentProc << TQFile::encodeName((*it).path()).data(); } if ( m_mailAgentProc->start() == false ) - KMessageBox::error(kapp->activeWindow(), + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Cannot start '%1' program;\nplease " "check your installation.") - .arg(m_sendImagesDialog->m_mailAgentName->currentText())); + .tqarg(m_sendImagesDialog->m_mailAgentName->currentText())); else agentInvoked = true; } @@ -510,13 +510,13 @@ bool SendImages::invokeMailAgent(void) *m_mailAgentProc << "--compose" << "--attach"; for ( KURL::List::Iterator it = filelist.begin() ; it != filelist.end() ; ++it ) - *m_mailAgentProc << QFile::encodeName((*it).path()); + *m_mailAgentProc << TQFile::encodeName((*it).path()).data(); if ( m_mailAgentProc->start() == false ) - KMessageBox::error(kapp->activeWindow(), + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Cannot start '%1' program;\nplease " "check your installation.") - .arg(m_sendImagesDialog->m_mailAgentName->currentText())); + .tqarg(m_sendImagesDialog->m_mailAgentName->currentText())); else agentInvoked = true; } @@ -531,14 +531,14 @@ bool SendImages::invokeMailAgent(void) for ( KURL::List::Iterator it = filelist.begin() ; it != filelist.end() ; ++it ) { *m_mailAgentProc << "-a"; - *m_mailAgentProc << QFile::encodeName((*it).path()); + *m_mailAgentProc << TQFile::encodeName((*it).path()).data(); } if ( m_mailAgentProc->start() == false ) - KMessageBox::error(kapp->activeWindow(), + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Cannot start '%1' program;\nplease " "check your installation.") - .arg(m_sendImagesDialog->m_mailAgentName->currentText())); + .tqarg(m_sendImagesDialog->m_mailAgentName->currentText())); else agentInvoked = true; } @@ -550,21 +550,21 @@ bool SendImages::invokeMailAgent(void) m_mailAgentProc = new KProcess; *m_mailAgentProc << "evolution"; - QString Temp = "mailto:?subject="; + TQString Temp = "mailto:?subject="; for ( KURL::List::Iterator it = filelist.begin() ; it != filelist.end() ; ++it ) { Temp.append("&attach="); - Temp.append( QFile::encodeName((*it).path()) ); + Temp.append( TQFile::encodeName((*it).path()) ); } *m_mailAgentProc << Temp; if ( m_mailAgentProc->start() == false ) - KMessageBox::error(kapp->activeWindow(), + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Cannot start '%1' program;\nplease " "check your installation.") - .arg(m_sendImagesDialog->m_mailAgentName->currentText())); + .tqarg(m_sendImagesDialog->m_mailAgentName->currentText())); else agentInvoked = true; } @@ -598,12 +598,12 @@ bool SendImages::invokeMailAgent(void) *m_mailAgentProc << "netscape" << "-remote"; } - QString Temp = " xfeDoCommand(composeMessage,attachment='"; + TQString Temp = " xfeDoCommand(composeMessage,attachment='"; for ( KURL::List::Iterator it = filelist.begin() ; it != filelist.end() ; ++it ) { Temp.append( "file://" ); - QString toencode=(*it).encodedPathAndQuery(); + TQString toencode=(*it).encodedPathAndQuery(); Temp.append(toencode); Temp.append( "," ); } @@ -615,19 +615,19 @@ bool SendImages::invokeMailAgent(void) if (!m_invokedBefore) { - connect(m_mailAgentProc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotMozillaExited(KProcess*))); + connect(m_mailAgentProc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotMozillaExited(KProcess*))); - connect(m_mailAgentProc, SIGNAL(receivedStderr(KProcess *, char*, int)), - this, SLOT(slotMozillaReadStderr(KProcess*, char*, int))); + connect(m_mailAgentProc, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)), + this, TQT_SLOT(slotMozillaReadStderr(KProcess*, char*, int))); } qDebug ("%s", Temp.ascii()); if ( m_mailAgentProc->start(KProcess::NotifyOnExit , KProcess::All) == false ) - KMessageBox::error(kapp->activeWindow(), + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Cannot start '%1' program;\nplease " "check your installation.") - .arg(m_sendImagesDialog->m_mailAgentName->currentText())); + .tqarg(m_sendImagesDialog->m_mailAgentName->currentText())); else { agentInvoked = true; m_invokedBefore=true; @@ -642,15 +642,15 @@ bool SendImages::invokeMailAgent(void) void SendImages::removeTmpFiles(void) { if (DeleteDir(m_tmp) == false) - KMessageBox::error(kapp->activeWindow(), i18n("Cannot remove temporary folder %1.").arg(m_tmp)); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Cannot remove temporary folder %1.").tqarg(m_tmp)); } ///Checks if directory is empty and invokes its deletion -bool SendImages::DeleteDir(QString dirname) +bool SendImages::DeleteDir(TQString dirname) { if ( !dirname.isEmpty() ) { - QDir dir; + TQDir dir; if (dir.exists ( dirname ) == true) { @@ -670,14 +670,14 @@ bool SendImages::DeleteDir(QString dirname) } ///Deletes a directory and all its contents - Please call it using "DeleteDir" -bool SendImages::deldir(QString dirname) +bool SendImages::deldir(TQString dirname) { - QDir *dir = new QDir(dirname); - dir->setFilter ( QDir::Dirs | QDir::Files | QDir::NoSymLinks ); + TQDir *dir = new TQDir(dirname); + dir->setFilter ( TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks ); - const QFileInfoList* fileinfolist = dir->entryInfoList(); - QFileInfoListIterator it(*fileinfolist); - QFileInfo* fi; + const TQFileInfoList* fileinfolist = dir->entryInfoList(); + TQFileInfoListIterator it(*fileinfolist); + TQFileInfo* fi; while( (fi = it.current() ) ) { @@ -707,7 +707,7 @@ bool SendImages::deldir(QString dirname) } ///Returns the file-extension of the corresponding fileformat -QString SendImages::extension(const QString& imageFileFormat) +TQString SendImages::extension(const TQString& imageFileFormat) { if (imageFileFormat == "PNG") return ".png"; @@ -751,9 +751,9 @@ int SendImages::getSize ( int choice ) /** This function should copy the images to tempfolder in order to avoid suspicious filenames It is used, when no resizing should take place - This function can be replaced with Qt4 QFile.copy */ -bool SendImages::copyImageProcess(const QString &oldFilePath, const QString &DestPath, - const QString &ImageName) + This function can be replaced with TQt4 TQFile.copy */ +bool SendImages::copyImageProcess(const TQString &oldFilePath, const TQString &DestPath, + const TQString &ImageName) { //same file, no need to copy qDebug("DestPath: %s",(DestPath).ascii()); @@ -762,8 +762,8 @@ bool SendImages::copyImageProcess(const QString &oldFilePath, const QString &Des return true; //load both files - QFile oldFile(oldFilePath); - QFile newFile(DestPath+ImageName); + TQFile oldFile(oldFilePath); + TQFile newFile(DestPath+ImageName); bool openOld = oldFile.open( IO_ReadOnly ); bool openNew = newFile.open( IO_WriteOnly ); @@ -775,7 +775,7 @@ bool SendImages::copyImageProcess(const QString &oldFilePath, const QString &Des char* buffer = new char[BUFFER_SIZE]; while(!oldFile.atEnd()) { - Q_LONG len = oldFile.readBlock( buffer, BUFFER_SIZE ); + TQ_LONG len = oldFile.readBlock( buffer, BUFFER_SIZE ); newFile.writeBlock( buffer, len ); } @@ -786,20 +786,20 @@ bool SendImages::copyImageProcess(const QString &oldFilePath, const QString &Des } ///Resizes the Images before Sending... -bool SendImages::resizeImageProcess(const QString &SourcePath, const QString &DestPath, - const QString &ImageFormat, const QString &ImageName, - int SizeFactor, int ImageCompression, QSize &newsize) +bool SendImages::resizeImageProcess(const TQString &SourcePath, const TQString &DestPath, + const TQString &ImageFormat, const TQString &ImageName, + int SizeFactor, int ImageCompression, TQSize &newsize) { - QImage img; + TQImage img; // Check if RAW file. #if KDCRAW_VERSION < 0x000106 - QString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); + TQString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); #else - QString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); + TQString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); #endif - QFileInfo fileInfo(SourcePath); - if (rawFilesExt.upper().contains( fileInfo.extension(false).upper() )) + TQFileInfo fileInfo(SourcePath); + if (rawFilesExt.upper().tqcontains( fileInfo.extension(false).upper() )) KDcrawIface::KDcraw::loadDcrawPreview(img, SourcePath); else img.load(SourcePath); @@ -830,7 +830,7 @@ bool SendImages::resizeImageProcess(const QString &SourcePath, const QString &De Q_ASSERT( w <= SizeFactor ); } - const QImage scaleImg(img.smoothScale( w, h )); + const TQImage scaleImg(img.smoothScale( w, h )); if ( scaleImg.width() != w || scaleImg.height() != h ) { @@ -862,10 +862,10 @@ void SendImages::slotMozillaExited(KProcess*) ///Here would be the right point to clear the sendlist in order to avoid infinite resendings!! m_filesSendList.clear(); ///Also disconnect SLOT - m_mailAgentProc->disconnect(SIGNAL(processExited(KProcess *)), this, SLOT(slotMozillaExited(KProcess*))); + m_mailAgentProc->disconnect(TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotMozillaExited(KProcess*))); qDebug("Number of elements in m_filesSendList=%d, and in m_filesSendList_copy=%d)",(int)m_filesSendList.size(),(int)m_filesSendList_copy.size()); - if ( m_mozillaStdErr.find("No running window found") != -1 ) // No remote Mozilla | Netscape | + if ( m_mozillaStdErr.tqfind("No running window found") != -1 ) // No remote Mozilla | Netscape | { // Thunderbird env. loaded ! m_mailAgentProc2 = new KProcess; // Init a new env. @@ -881,10 +881,10 @@ void SendImages::slotMozillaExited(KProcess*) if ( m_mailAgentProc2->start() == false ) { - KMessageBox::error(kapp->activeWindow(), + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Cannot start '%1' program;\nplease " "check your installation.") - .arg(m_sendImagesDialog->m_mailAgentName->currentText())); + .tqarg(m_sendImagesDialog->m_mailAgentName->currentText())); } else { @@ -900,7 +900,7 @@ void SendImages::slotMozillaExited(KProcess*) ///If Mozilla wasn't started before, now it is and so we can begin with the transmission void SendImages::slotMozillaTimeout(void) { - m_mozillaTimer->disconnect(SIGNAL(timeout()), this, SLOT(slotMozillaTimeout())); + m_mozillaTimer->disconnect(TQT_SIGNAL(timeout()), this, TQT_SLOT(slotMozillaTimeout())); qDebug("slotMozillaTimeout: Number of elements in m_filesSendList=%d, and in m_filesSendList_copy=%d)",(int)m_filesSendList.size(),(int)m_filesSendList_copy.size()); kurllistdeepcopy(m_filesSendList,m_filesSendList_copy); @@ -911,7 +911,7 @@ void SendImages::slotMozillaTimeout(void) ///Handles mozillas errors void SendImages::slotMozillaReadStderr(KProcess*, char *buffer, int buflen) { - m_mozillaStdErr = QString::fromLocal8Bit(buffer, buflen); + m_mozillaStdErr = TQString::fromLocal8Bit(buffer, buflen); } ///Makes a deep copy of a KURL-list: Real and slow copying instead of only pointer arithmetics @@ -921,9 +921,9 @@ bool SendImages::kurllistdeepcopy(KURL::List &Destination, KURL::List Source) qDebug("kurllistdeepcopy started"); for ( KURL::List::Iterator it = Source.begin() ; it != Source.end() ; ++it ) { - //QString Tempstring; - QString Getstring=(*it).path(); - QString Tempstring=Getstring.copy(); + //TQString Tempstring; + TQString Getstring=(*it).path(); + TQString Tempstring=Getstring.copy(); Destination.append(Tempstring); qDebug("%s",Tempstring.ascii()); } diff --git a/kipi-plugins/sendimages/sendimages.h b/kipi-plugins/sendimages/sendimages.h index 762300a..696aec4 100644 --- a/kipi-plugins/sendimages/sendimages.h +++ b/kipi-plugins/sendimages/sendimages.h @@ -23,12 +23,12 @@ #ifndef SENDIMAGES_H #define SENDIMAGES_H -// Qt includes. +// TQt includes. -#include <qobject.h> -#include <qstring.h> -#include <qthread.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqthread.h> +#include <tqstringlist.h> // KDE includes. @@ -39,9 +39,9 @@ #include <libkipi/imagecollection.h> #include <libkipi/interface.h> -class QFile; -class QTimer; -class QCustomEvent; +class TQFile; +class TQTimer; +class TQCustomEvent; class KProcess; @@ -50,15 +50,16 @@ namespace KIPISendimagesPlugin class SendImagesDialog; -class SendImages : public QObject, public QThread +class SendImages : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: ///Constructor: saves system handoff parameters in member variables - SendImages(KIPI::Interface* interface, const QString &tmpFolder, - const KIPI::ImageCollection& imagesCollection, QObject *parent=0); + SendImages(KIPI::Interface* interface, const TQString &tmpFolder, + const KIPI::ImageCollection& imagesCollection, TQObject *tqparent=0); ///Destructor ~SendImages(); @@ -104,30 +105,30 @@ private slots: private: ///Returns the file-extension of the corresponding fileformat - QString extension(const QString& imageFileFormat); + TQString extension(const TQString& imageFileFormat); ///in sendimagesplugin dialog the user can select a compression of images ///this function returns the pixel-size of the selected entry int getSize( int choice ); ///Checks if directory is empty and invokes its deletion - bool DeleteDir(QString dirname); + bool DeleteDir(TQString dirname); ///Deletes a directory and all its contents - Please call it using "DeleteDir" - bool deldir(QString dirname); + bool deldir(TQString dirname); ///Resizes the Images before Sending... - bool resizeImageProcess(const QString &SourcePath, const QString &DestPath, - const QString &ImageFormat, const QString &ImageName, - int SizeFactor, int ImageCompression, QSize &newsize); + bool resizeImageProcess(const TQString &SourcePath, const TQString &DestPath, + const TQString &ImageFormat, const TQString &ImageName, + int SizeFactor, int ImageCompression, TQSize &newsize); ///This function should copy the images to tempfolder in order to avoid suspicious filenames ///It is used, when no resizing should take place - bool copyImageProcess(const QString &oldFilePath, const QString &DestPath, - const QString &ImageName); + bool copyImageProcess(const TQString &oldFilePath, const TQString &DestPath, + const TQString &ImageName); ///Tests if an entry already exists in the filename list - bool entry_already_exists(KURL::List filenamelist,QString entry); + bool entry_already_exists(KURL::List filenamelist,TQString entry); ///Makes a deep copy of a KURL-list: Real and slow copying instead of only pointer arithmetics bool kurllistdeepcopy(KURL::List &Destination, KURL::List Source); @@ -148,16 +149,16 @@ private: /** Biggest permitted email.*/ unsigned long m_attachmentlimit; - QObject *m_parent; + TQObject *m_parent; - QTimer *m_mozillaTimer; + TQTimer *m_mozillaTimer; - QString m_mozillaStdErr; - QString m_tmp; + TQString m_mozillaStdErr; + TQString m_tmp; /** Image format option in the setup dialog.*/ - QString m_imageFormat; - QString m_thunderbirdUrl; + TQString m_imageFormat; + TQString m_thunderbirdUrl; KProcess *m_mailAgentProc; KProcess *m_mailAgentProc2; diff --git a/kipi-plugins/sendimages/sendimagesdialog.cpp b/kipi-plugins/sendimages/sendimagesdialog.cpp index de502bb..2e91b61 100644 --- a/kipi-plugins/sendimages/sendimagesdialog.cpp +++ b/kipi-plugins/sendimages/sendimagesdialog.cpp @@ -22,26 +22,26 @@ * * ============================================================ */ -// Qt includes. - -#include <qvbox.h> -#include <qlayout.h> -#include <qdir.h> -#include <qwidget.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qlabel.h> -#include <qgroupbox.h> -#include <qwhatsthis.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qprogressdialog.h> -#include <qimage.h> -#include <qevent.h> -#include <qdragobject.h> -#include <qstrlist.h> -#include <qfileinfo.h> -#include <qpushbutton.h> +// TQt includes. + +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqwidget.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqlabel.h> +#include <tqgroupbox.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqprogressdialog.h> +#include <tqimage.h> +#include <tqevent.h> +#include <tqdragobject.h> +#include <tqstrlist.h> +#include <tqfileinfo.h> +#include <tqpushbutton.h> // KDE includes. @@ -77,53 +77,53 @@ namespace KIPISendimagesPlugin { -class ImageItem : public QListBoxText +class ImageItem : public TQListBoxText { public: - ImageItem(QListBox * parent, QString const & comments, KURL const & url) - : QListBoxText(parent), _comments(comments), _url(url) + ImageItem(TQListBox * tqparent, TQString const & comments, KURL const & url) + : TQListBoxText(tqparent), _comments(comments), _url(url) {} - QString comments() { return _comments; } - QString name() { return _url.fileName(); } + TQString comments() { return _comments; } + TQString name() { return _url.fileName(); } KURL url() { return _url; } - QString album() { return _url.directory().section('/', -1); } - void setName(const QString &newName) { setText(newName); } + TQString album() { return _url.directory().section('/', -1); } + void setName(const TQString &newName) { setText(newName); } private: - QString _comments; + TQString _comments; KURL _url; }; -ListImageItems::ListImageItems(QWidget *parent, const char *name) - : KListBox(parent, name) +ListImageItems::ListImageItems(TQWidget *tqparent, const char *name) + : KListBox(tqparent, name) { - setSelectionMode (QListBox::Extended); + setSelectionMode (TQListBox::Extended); setAcceptDrops(true); } -void ListImageItems::dragEnterEvent(QDragEnterEvent *e) +void ListImageItems::dragEnterEvent(TQDragEnterEvent *e) { - e->accept(QUriDrag::canDecode(e)); + e->accept(TQUriDrag::canDecode(e)); } -void ListImageItems::dropEvent(QDropEvent *e) +void ListImageItems::dropEvent(TQDropEvent *e) { - QStrList strList; - QStringList FilesPath; + TQStrList strList; + TQStringList FilesPath; - if ( !QUriDrag::decode(e, strList) ) return; + if ( !TQUriDrag::decode(e, strList) ) return; - QStrList stringList; - QStrListIterator it(strList); + TQStrList stringList; + TQStrListIterator it(strList); char *str; while ( (str = it.current()) != 0 ) { - QString filePath = QUriDrag::uriToLocalFile(str); - QFileInfo fileInfo(filePath); + TQString filePath = TQUriDrag::uriToLocalFile(str); + TQFileInfo fileInfo(filePath); if (fileInfo.isFile() && fileInfo.exists()) FilesPath.append(fileInfo.filePath()); @@ -135,10 +135,10 @@ void ListImageItems::dropEvent(QDropEvent *e) emit addedDropItems(FilesPath); } -SendImagesDialog::SendImagesDialog(QWidget *parent, KIPI::Interface* interface, +SendImagesDialog::SendImagesDialog(TQWidget *tqparent, KIPI::Interface* interface, const KIPI::ImageCollection& images ) : KDialogBase( IconList, i18n("Email Images Options"), Help|Ok|Cancel, - Ok, parent, "SendImagesDialog", false, true ) + Ok, tqparent, "SendImagesDialog", false, true ) { m_interface = interface; m_thumbJob = 0; @@ -173,7 +173,7 @@ SendImagesDialog::SendImagesDialog(QWidget *parent, KIPI::Interface* interface, m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); slotMailAgentChanged(m_mailAgentName->currentItem()); @@ -194,7 +194,7 @@ void SendImagesDialog::readSettings(void) KConfig config("kipirc"); config.setGroup("SendImages Settings"); - QString t = config.readEntry("MailAgentName", "Default"); + TQString t = config.readEntry("MailAgentName", "Default"); // The _old_ Kmail (mind the lowercase 'm') called the default mailer. // this is now renamed to 'Default'. It should not interfere with KMail, which @@ -246,60 +246,60 @@ void SendImagesDialog::writeSettings(void) void SendImagesDialog::setupImagesList(void) { - QString whatsThis; + TQString whatsThis; page_setupImagesList = addPage(i18n("Images"), i18n("Images to EMail"), BarIcon("image", KIcon::SizeMedium)); - QVBoxLayout *vlay = new QVBoxLayout( page_setupImagesList, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page_setupImagesList, 0, spacingHint() ); //--------------------------------------------- - m_groupBoxImageList = new QGroupBox( page_setupImagesList ); + m_groupBoxImageList = new TQGroupBox( page_setupImagesList ); m_groupBoxImageList->setFlat(false); - QGridLayout* grid = new QGridLayout( m_groupBoxImageList, 2, 2 , 20, 20); + TQGridLayout* grid = new TQGridLayout( m_groupBoxImageList, 2, 2 , 20, 20); m_ImagesFilesListBox = new ListImageItems( m_groupBoxImageList, "ListImageItems" ); - QWhatsThis::add( m_ImagesFilesListBox, i18n( "<p>This is the list of images to email. " + TQWhatsThis::add( m_ImagesFilesListBox, i18n( "<p>This is the list of images to email. " "If you want to add some images click on the 'Add Images...' " "button or use the drag-and-drop.")); grid->addMultiCellWidget(m_ImagesFilesListBox, 0, 2, 0, 1); - KButtonBox* imagesListButtonBox = new KButtonBox( m_groupBoxImageList, Vertical ); - QPushButton* m_addImagesButton = imagesListButtonBox->addButton ( i18n( "&Add ..." ) ); - QWhatsThis::add( m_addImagesButton, i18n("<p>Add images to the list.") ); - QPushButton* m_remImagesButton = imagesListButtonBox->addButton ( i18n( "&Remove" )); - QWhatsThis::add( m_remImagesButton, i18n("<p>Remove selected images from the list.") ); - imagesListButtonBox->layout(); + KButtonBox* imagesListButtonBox = new KButtonBox( m_groupBoxImageList,Qt::Vertical ); + TQPushButton* m_addImagesButton = imagesListButtonBox->addButton ( i18n( "&Add ..." ) ); + TQWhatsThis::add( m_addImagesButton, i18n("<p>Add images to the list.") ); + TQPushButton* m_remImagesButton = imagesListButtonBox->addButton ( i18n( "&Remove" )); + TQWhatsThis::add( m_remImagesButton, i18n("<p>Remove selected images from the list.") ); + imagesListButtonBox->tqlayout(); grid->addMultiCellWidget(imagesListButtonBox, 0, 1, 2, 2); - m_imageLabel = new QLabel( m_groupBoxImageList ); + m_imageLabel = new TQLabel( m_groupBoxImageList ); m_imageLabel->setFixedHeight( 120 ); - m_imageLabel->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - m_imageLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); - QWhatsThis::add( m_imageLabel, i18n( "<p>Preview of the currently selected image on the list." ) ); + m_imageLabel->tqsetAlignment( TQt::AlignHCenter | TQt::AlignVCenter ); + m_imageLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); + TQWhatsThis::add( m_imageLabel, i18n( "<p>Preview of the currently selected image on the list." ) ); grid->addMultiCellWidget(m_imageLabel, 2, 2, 2, 2); vlay->addWidget( m_groupBoxImageList ); //--------------------------------------------- - QGroupBox * groupBox2 = new QGroupBox( i18n("Image Description"), page_setupImagesList ); + TQGroupBox * groupBox2 = new TQGroupBox( i18n("Image Description"), page_setupImagesList ); groupBox2->setColumnLayout(0, Qt::Vertical ); - groupBox2->layout()->setSpacing( 6 ); - groupBox2->layout()->setMargin( 11 ); - QWhatsThis::add( groupBox2, i18n("<p>The description of the currently selected image on the list.") ); + groupBox2->tqlayout()->setSpacing( 6 ); + groupBox2->tqlayout()->setMargin( 11 ); + TQWhatsThis::add( groupBox2, i18n("<p>The description of the currently selected image on the list.") ); - QVBoxLayout * groupBox2Layout = new QVBoxLayout( groupBox2->layout() ); - groupBox2Layout->setAlignment( Qt::AlignTop ); + TQVBoxLayout * groupBox2Layout = new TQVBoxLayout( groupBox2->tqlayout() ); + groupBox2Layout->tqsetAlignment( TQt::AlignTop ); m_ImageComments = new KSqueezedTextLabel( groupBox2 ); - m_ImageComments->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + m_ImageComments->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); groupBox2Layout->addWidget( m_ImageComments ); m_ImageAlbum = new KSqueezedTextLabel( groupBox2 ); - m_ImageAlbum->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + m_ImageAlbum->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); groupBox2Layout->addWidget( m_ImageAlbum ); vlay->addWidget( groupBox2 ); @@ -307,17 +307,17 @@ void SendImagesDialog::setupImagesList(void) //--------------------------------------------- - connect(m_addImagesButton, SIGNAL(clicked()), - this, SLOT(slotImagesFilesButtonAdd())); + connect(m_addImagesButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotImagesFilesButtonAdd())); - connect(m_remImagesButton, SIGNAL(clicked()), - this, SLOT(slotImagesFilesButtonRem())); + connect(m_remImagesButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotImagesFilesButtonRem())); - connect(m_ImagesFilesListBox, SIGNAL( currentChanged( QListBoxItem * ) ), - this, SLOT( slotImageSelected( QListBoxItem * ))); + connect(m_ImagesFilesListBox, TQT_SIGNAL( currentChanged( TQListBoxItem * ) ), + this, TQT_SLOT( slotImageSelected( TQListBoxItem * ))); - connect(m_ImagesFilesListBox, SIGNAL( addedDropItems(QStringList) ), - this, SLOT( slotAddDropItems(QStringList))); + connect(m_ImagesFilesListBox, TQT_SIGNAL( addedDropItems(TQStringList) ), + this, TQT_SLOT( slotAddDropItems(TQStringList))); } void SendImagesDialog::setImagesList( const KURL::List& Files ) @@ -327,7 +327,7 @@ void SendImagesDialog::setImagesList( const KURL::List& Files ) for( KURL::List::ConstIterator it = Files.begin(); it != Files.end(); ++it ) { KIPI::ImageInfo imageInfo = m_interface->info( *it ); - QString comments = imageInfo.description(); + TQString comments = imageInfo.description(); // Check if the new item already exist in the list. @@ -359,22 +359,22 @@ void SendImagesDialog::setImagesList( const KURL::List& Files ) void SendImagesDialog::setupEmailOptions(void) { - QString whatsThis; + TQString whatsThis; page_setupEmailOptions = addPage(i18n("Mail"), i18n("Mail Options"), BarIcon("mail_generic", KIcon::SizeMedium)); - QVBoxLayout *vlay = new QVBoxLayout( page_setupEmailOptions, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page_setupEmailOptions, 0, spacingHint() ); //--------------------------------------------- - QHBoxLayout *hlay10 = new QHBoxLayout( ); + TQHBoxLayout *hlay10 = new TQHBoxLayout( ); vlay->addLayout( hlay10 ); - QLabel *m_mailAgentLabel = new QLabel( i18n("Mail agent:"), page_setupEmailOptions); + TQLabel *m_mailAgentLabel = new TQLabel( i18n("Mail agent:"), page_setupEmailOptions); - m_mailAgentName = new QComboBox( false, page_setupEmailOptions ); + m_mailAgentName = new TQComboBox( false, page_setupEmailOptions ); m_mailAgentName->insertItem( i18n("Default") ); m_mailAgentName->insertItem( "Balsa" ); m_mailAgentName->insertItem( "Claws Mail" ); @@ -387,7 +387,7 @@ void SendImagesDialog::setupEmailOptions(void) m_mailAgentName->insertItem( "Sylpheed-Claws" ); m_mailAgentName->insertItem( "Thunderbird" ); m_mailAgentName->setCurrentText( i18n("Default") ); - QWhatsThis::add( m_mailAgentName, i18n("<p>Select here your preferred external mail agent program." + TQWhatsThis::add( m_mailAgentName, i18n("<p>Select here your preferred external mail agent program." "These mail agent versions are supported:<p>" "<b>Balsa</b>: >= 2.x<p>" "<b>Claws Mail</b>: >= 2.6.1<p>" @@ -404,53 +404,53 @@ void SendImagesDialog::setupEmailOptions(void) hlay10->addStretch( 1 ); hlay10->addWidget( m_mailAgentName ); - connect(m_mailAgentName, SIGNAL(activated(int)), - this, SLOT(slotMailAgentChanged(int))); + connect(m_mailAgentName, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotMailAgentChanged(int))); //--------------------------------------------- - m_labelThunderbirdBinPath = new QLabel(i18n("&Thunderbird binary path:"), page_setupEmailOptions); + m_labelThunderbirdBinPath = new TQLabel(i18n("&Thunderbird binary path:"), page_setupEmailOptions); vlay->addWidget( m_labelThunderbirdBinPath ); m_ThunderbirdBinPath = new KURLRequester( "/usr/bin/thunderbird", page_setupEmailOptions); m_labelThunderbirdBinPath->setBuddy( m_ThunderbirdBinPath ); vlay->addWidget(m_ThunderbirdBinPath); - connect(m_ThunderbirdBinPath, SIGNAL(textChanged(const QString&)), - this, SLOT(slotThunderbirdBinPathChanged(const QString&))); + connect(m_ThunderbirdBinPath, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotThunderbirdBinPathChanged(const TQString&))); - QWhatsThis::add( m_ThunderbirdBinPath, i18n("<p>The path name to the Thunderbird binary program.") ); + TQWhatsThis::add( m_ThunderbirdBinPath, i18n("<p>The path name to the Thunderbird binary program.") ); //--------------------------------------------- - m_addComments = new QCheckBox( i18n("Attach a file with caption and tags"), page_setupEmailOptions); - QWhatsThis::add( m_addComments, i18n("<p>If you enable this option, all image captions and tags " + m_addComments = new TQCheckBox( i18n("Attach a file with caption and tags"), page_setupEmailOptions); + TQWhatsThis::add( m_addComments, i18n("<p>If you enable this option, all image captions and tags " "will be added as an attached file.") ); vlay->addWidget( m_addComments ); - m_comment2ImageName = new QCheckBox( i18n("Generate new filenames from image captions (if available)"), page_setupEmailOptions); + m_comment2ImageName = new TQCheckBox( i18n("Generate new filenames from image captions (if available)"), page_setupEmailOptions); vlay->addWidget( m_comment2ImageName ); //--------------------------------------------- - QGroupBox * groupBox2 = new QGroupBox( i18n("Image Properties"), page_setupEmailOptions ); + TQGroupBox * groupBox2 = new TQGroupBox( i18n("Image Properties"), page_setupEmailOptions ); groupBox2->setColumnLayout(0, Qt::Vertical ); - groupBox2->layout()->setSpacing( 6 ); - groupBox2->layout()->setMargin( 11 ); - QWhatsThis::add( groupBox2, i18n("<p>The properties of images to send.") ); + groupBox2->tqlayout()->setSpacing( 6 ); + groupBox2->tqlayout()->setMargin( 11 ); + TQWhatsThis::add( groupBox2, i18n("<p>The properties of images to send.") ); - QVBoxLayout * groupBox2Layout = new QVBoxLayout( groupBox2->layout() ); - groupBox2Layout->setAlignment( Qt::AlignTop ); + TQVBoxLayout * groupBox2Layout = new TQVBoxLayout( groupBox2->tqlayout() ); + groupBox2Layout->tqsetAlignment( TQt::AlignTop ); - m_changeImagesProp = new QCheckBox(i18n("Adjust image properties"), groupBox2); - QWhatsThis::add( m_changeImagesProp, i18n("<p>If you enable this option, " + m_changeImagesProp = new TQCheckBox(i18n("Adjust image properties"), groupBox2); + TQWhatsThis::add( m_changeImagesProp, i18n("<p>If you enable this option, " "all images to send can be resized and recompressed.") ); m_changeImagesProp->setChecked( true ); groupBox2Layout->addWidget( m_changeImagesProp ); - QHBoxLayout *hlay12 = new QHBoxLayout(); + TQHBoxLayout *hlay12 = new TQHBoxLayout(); groupBox2Layout->addLayout( hlay12 ); - m_imagesResize = new QComboBox(false, groupBox2); + m_imagesResize = new TQComboBox(false, groupBox2); m_imagesResize->insertItem(i18n("Very Small (320 pixels)")); m_imagesResize->insertItem(i18n("Small (640 pixels)")); m_imagesResize->insertItem(i18n("Medium (800 pixels)")); @@ -469,15 +469,15 @@ void SendImagesDialog::setupEmailOptions(void) "and if the target mailbox size is not limited.<p>" "<b>%5</b>: use this if you have no size or speed restrictions.<p>" "<b>%6</b>: use this only for printing purpose.<p>") - .arg(i18n("very small (320 pixels)")) - .arg(i18n("small (640 pixels)")) - .arg(i18n("medium (800 pixels)")) - .arg(i18n("big (1024 pixels)")) - .arg(i18n("very big (1280 pixels)")) - .arg(i18n("huge - for printing (1600 pixels)")); - QWhatsThis::add( m_imagesResize, whatsThis ); - - m_labelImageSize = new QLabel( i18n("Sent image size:"), groupBox2); + .tqarg(i18n("very small (320 pixels)")) + .tqarg(i18n("small (640 pixels)")) + .tqarg(i18n("medium (800 pixels)")) + .tqarg(i18n("big (1024 pixels)")) + .tqarg(i18n("very big (1280 pixels)")) + .tqarg(i18n("huge - for printing (1600 pixels)")); + TQWhatsThis::add( m_imagesResize, whatsThis ); + + m_labelImageSize = new TQLabel( i18n("Sent image size:"), groupBox2); hlay12->addWidget( m_labelImageSize ); m_labelImageSize->setBuddy( m_imagesResize ); hlay12->addStretch( 1 ); @@ -496,14 +496,14 @@ void SendImagesDialog::setupEmailOptions(void) "<b>75</b>: low compression (default value)<p>" "<b>100</b>: no compression"); - QWhatsThis::add( m_imageCompression, whatsThis); + TQWhatsThis::add( m_imageCompression, whatsThis); //--------------------------------------------- - QHBoxLayout *hlay13 = new QHBoxLayout(); + TQHBoxLayout *hlay13 = new TQHBoxLayout(); groupBox2Layout->addLayout( hlay13 ); - m_imagesFormat = new QComboBox(false, groupBox2); + m_imagesFormat = new TQComboBox(false, groupBox2); m_imagesFormat->insertItem("JPEG"); m_imagesFormat->insertItem("PNG"); m_imagesFormat->setCurrentText ("JPEG"); @@ -516,9 +516,9 @@ void SendImagesDialog::setupEmailOptions(void) "PNG is designed to work well in online viewing applications, such as the World Wide Web, " "so it is fully streamable with a progressive display option. Also, PNG can store gamma " "and chromaticity data for improved color matching on heterogeneous platforms."); - QWhatsThis::add( m_imagesFormat, whatsThis ); + TQWhatsThis::add( m_imagesFormat, whatsThis ); - m_labelImageFormat = new QLabel(i18n("Image file format:"), groupBox2); + m_labelImageFormat = new TQLabel(i18n("Image file format:"), groupBox2); hlay13->addWidget(m_labelImageFormat); m_labelImageFormat->setBuddy(m_imagesFormat); hlay13->addStretch(1); @@ -535,20 +535,20 @@ void SendImagesDialog::setupEmailOptions(void) //--------------------------------------------- - connect(m_changeImagesProp, SIGNAL(toggled(bool)), - m_labelImageSize, SLOT(setEnabled(bool))); + connect(m_changeImagesProp, TQT_SIGNAL(toggled(bool)), + m_labelImageSize, TQT_SLOT(setEnabled(bool))); - connect(m_changeImagesProp, SIGNAL(toggled(bool)), - m_imagesResize, SLOT(setEnabled(bool))); + connect(m_changeImagesProp, TQT_SIGNAL(toggled(bool)), + m_imagesResize, TQT_SLOT(setEnabled(bool))); - connect(m_changeImagesProp, SIGNAL(toggled(bool)), - m_imageCompression, SLOT(setEnabled(bool))); + connect(m_changeImagesProp, TQT_SIGNAL(toggled(bool)), + m_imageCompression, TQT_SLOT(setEnabled(bool))); - connect(m_changeImagesProp, SIGNAL(toggled(bool)), - m_labelImageFormat, SLOT(setEnabled(bool))); + connect(m_changeImagesProp, TQT_SIGNAL(toggled(bool)), + m_labelImageFormat, TQT_SLOT(setEnabled(bool))); - connect(m_changeImagesProp, SIGNAL(toggled(bool)), - m_imagesFormat, SLOT(setEnabled(bool))); + connect(m_changeImagesProp, TQT_SIGNAL(toggled(bool)), + m_imagesFormat, TQT_SLOT(setEnabled(bool))); } void SendImagesDialog::slotHelp() @@ -570,13 +570,13 @@ void SendImagesDialog::slotMailAgentChanged(int) } } -void SendImagesDialog::slotThunderbirdBinPathChanged(const QString &url ) +void SendImagesDialog::slotThunderbirdBinPathChanged(const TQString &url ) { if ( m_mailAgentName->currentText() == "Thunderbird" ) enableButtonOK( !url.isEmpty()); } -void SendImagesDialog::slotAddDropItems(QStringList filesPath) +void SendImagesDialog::slotAddDropItems(TQStringList filesPath) { setImagesList( KURL::List( filesPath) ); } @@ -608,7 +608,7 @@ void SendImagesDialog::slotImagesFilesButtonRem( void ) setNbItems(); } -void SendImagesDialog::slotImageSelected( QListBoxItem * item ) +void SendImagesDialog::slotImageSelected( TQListBoxItem * item ) { if ( !item || m_ImagesFilesListBox->count() == 0 ) { @@ -620,8 +620,8 @@ void SendImagesDialog::slotImageSelected( QListBoxItem * item ) if ( !pitem ) return; - m_ImageComments->setText( i18n("Caption: %1").arg(pitem->comments()) ); - m_ImageAlbum->setText( i18n("Album: %1").arg(pitem->album()) ); + m_ImageComments->setText( i18n("Caption: %1").tqarg(pitem->comments()) ); + m_ImageAlbum->setText( i18n("Album: %1").tqarg(pitem->album()) ); m_imageLabel->clear(); if ( m_thumbJob ) @@ -629,14 +629,14 @@ void SendImagesDialog::slotImageSelected( QListBoxItem * item ) m_thumbJob = KIO::filePreview( pitem->url(), m_imageLabel->height() ); - connect(m_thumbJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), - SLOT(slotGotPreview(const KFileItem*, const QPixmap&))); + connect(m_thumbJob, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), + TQT_SLOT(slotGotPreview(const KFileItem*, const TQPixmap&))); - connect(m_thumbJob, SIGNAL(failed(const KFileItem*)), - SLOT(slotFailedPreview(const KFileItem*))); + connect(m_thumbJob, TQT_SIGNAL(failed(const KFileItem*)), + TQT_SLOT(slotFailedPreview(const KFileItem*))); } -void SendImagesDialog::slotGotPreview(const KFileItem*, const QPixmap &pixmap) +void SendImagesDialog::slotGotPreview(const KFileItem*, const TQPixmap &pixmap) { m_imageLabel->setPixmap(pixmap); m_thumbJob = 0L; @@ -657,7 +657,7 @@ void SendImagesDialog::slotOk() if ( m_mailAgentName->currentText() == "Thunderbird" ) { - QFile fileThunderbird(m_ThunderbirdBinPath->url()); + TQFile fileThunderbird(m_ThunderbirdBinPath->url()); if (fileThunderbird.exists() == false) { diff --git a/kipi-plugins/sendimages/sendimagesdialog.h b/kipi-plugins/sendimages/sendimagesdialog.h index 3fd4984..dd162e6 100644 --- a/kipi-plugins/sendimages/sendimagesdialog.h +++ b/kipi-plugins/sendimages/sendimagesdialog.h @@ -23,10 +23,10 @@ #ifndef SENDIMAGESDIALOG_H #define SENDIMAGESDIALOG_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qguardedptr.h> +#include <tqstring.h> +#include <tqguardedptr.h> // KDE includes. @@ -45,13 +45,13 @@ #include "kpaboutdata.h" -class QComboBox; -class QGroupBox; -class QLabel; -class QCheckBox; -class QFrame; -class QPushButton; -class QFileInfo; +class TQComboBox; +class TQGroupBox; +class TQLabel; +class TQCheckBox; +class TQFrame; +class TQPushButton; +class TQFileInfo; class KFileItem; class KIntNumInput; @@ -65,42 +65,44 @@ namespace KIPISendimagesPlugin class ListImageItems : public KListBox { Q_OBJECT + TQ_OBJECT public: - ListImageItems(QWidget *parent=0, const char *name=0); + ListImageItems(TQWidget *tqparent=0, const char *name=0); signals: - void addedDropItems(QStringList filesPath); + void addedDropItems(TQStringList filesPath); protected: - void dragEnterEvent(QDragEnterEvent *e); - void dropEvent(QDropEvent *e); + void dragEnterEvent(TQDragEnterEvent *e); + void dropEvent(TQDropEvent *e); }; class SendImagesDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - SendImagesDialog(QWidget *parent, KIPI::Interface* interface, + SendImagesDialog(TQWidget *tqparent, KIPI::Interface* interface, const KIPI::ImageCollection& images ); ~SendImagesDialog(); KIntNumInput *m_imageCompression; KIntNumInput *m_attachmentlimit; - QComboBox *m_imagesFormat; - QComboBox *m_imagesResize; - QComboBox *m_mailAgentName; + TQComboBox *m_imagesFormat; + TQComboBox *m_imagesResize; + TQComboBox *m_mailAgentName; - QCheckBox *m_addComments; - QCheckBox *m_comment2ImageName; - QCheckBox *m_changeImagesProp; + TQCheckBox *m_addComments; + TQCheckBox *m_comment2ImageName; + TQCheckBox *m_changeImagesProp; KURLRequester *m_ThunderbirdBinPath; @@ -108,7 +110,7 @@ public: public slots: - void slotAddDropItems(QStringList filesPath); + void slotAddDropItems(TQStringList filesPath); signals: @@ -118,12 +120,12 @@ private slots: void slotHelp(); void slotOk(); - void slotImageSelected( QListBoxItem * item ); - void slotGotPreview(const KFileItem* , const QPixmap &pixmap); + void slotImageSelected( TQListBoxItem * item ); + void slotGotPreview(const KFileItem* , const TQPixmap &pixmap); void slotFailedPreview(const KFileItem*); void slotImagesFilesButtonAdd(void); void slotImagesFilesButtonRem(void); - void slotThunderbirdBinPathChanged(const QString&); + void slotThunderbirdBinPathChanged(const TQString&); void slotMailAgentChanged(int); private: @@ -139,24 +141,24 @@ private: bool m_cancelled; - QLabel *m_labelImageFormat; - QLabel *m_labelImageSize; - QLabel *m_mailAgentLabel; - QLabel *m_labelThunderbirdBinPath; + TQLabel *m_labelImageFormat; + TQLabel *m_labelImageSize; + TQLabel *m_mailAgentLabel; + TQLabel *m_labelThunderbirdBinPath; - QPushButton *m_addImageButton; - QPushButton *m_remImagesButton; - QPushButton *m_helpButton; + TQPushButton *m_addImageButton; + TQPushButton *m_remImagesButton; + TQPushButton *m_helpButton; - QProgressDialog *m_progressDlg; + TQProgressDialog *m_progressDlg; - QGroupBox *m_groupBoxImageList; + TQGroupBox *m_groupBoxImageList; - QLabel *m_imageLabel; + TQLabel *m_imageLabel; - QFrame *page_setupImagesList; - QFrame *page_setupEmailOptions; - QFrame *page_about; + TQFrame *page_setupImagesList; + TQFrame *page_setupEmailOptions; + TQFrame *page_about; KSqueezedTextLabel *m_ImageComments; KSqueezedTextLabel *m_ImageAlbum; diff --git a/kipi-plugins/simpleviewerexport/firstrundlg.cpp b/kipi-plugins/simpleviewerexport/firstrundlg.cpp index c2304df..556f06d 100644 --- a/kipi-plugins/simpleviewerexport/firstrundlg.cpp +++ b/kipi-plugins/simpleviewerexport/firstrundlg.cpp @@ -23,11 +23,11 @@ // QT include files -#include <qframe.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> // KDE include files @@ -54,8 +54,8 @@ namespace KIPISimpleViewerExportPlugin { -FirstRunDlg::FirstRunDlg(QWidget *parent) - : KDialogBase(parent, 0, true, i18n("Flash Export"), +FirstRunDlg::FirstRunDlg(TQWidget *tqparent) + : KDialogBase(tqparent, 0, true, i18n("Flash Export"), Help|Ok|Cancel, Ok, true) { enableButtonOK(false); @@ -90,17 +90,17 @@ FirstRunDlg::FirstRunDlg(QWidget *parent) KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), - this, SLOT(slotHelp()), 0, -1, 0); + this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); // --------------------------------------------------------------- - QFrame *page = new QFrame(this); + TQFrame *page = new TQFrame(this); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); - QLabel *info = new QLabel( page ); + TQLabel *info = new TQLabel( page ); info->setText( i18n( "<p>SimpleViewer is a Flash component which is free to use, " "but uses a license which comes into conflict with several distributions. " "Due to the license it is not possible to ship it with this plugin.</p>" @@ -109,7 +109,7 @@ FirstRunDlg::FirstRunDlg(QWidget *parent) "so it is available for further use.</p>")); topLayout->addWidget(info); - info = new QLabel(page); + info = new TQLabel(page); info->setText(i18n( "<p>1.) Download SimpleViewer Version 1.8.x</p>")); topLayout->addWidget(info); @@ -117,17 +117,17 @@ FirstRunDlg::FirstRunDlg(QWidget *parent) link->setText("http://www.airtightinteractive.com/simpleviewer"); link->setURL("http://www.airtightinteractive.com/simpleviewer"); topLayout->addWidget(link); - connect(link, SIGNAL(leftClickedURL(const QString &)), - this, SLOT(slotDownload(const QString &))); + connect(link, TQT_SIGNAL(leftClickedURL(const TQString &)), + this, TQT_SLOT(slotDownload(const TQString &))); - info = new QLabel(page); + info = new TQLabel(page); info->setText(i18n("<p>2.) Point this tool to the downloaded archive</p>")); topLayout->addWidget( info ); m_urlRequester = new KURLRequester(page); topLayout->addWidget(m_urlRequester); - connect(m_urlRequester, SIGNAL(urlSelected(const QString&)), - this, SLOT(slotURLSelected(const QString&))); + connect(m_urlRequester, TQT_SIGNAL(urlSelected(const TQString&)), + this, TQT_SLOT(slotURLSelected(const TQString&))); topLayout->addStretch(10); } @@ -142,18 +142,18 @@ void FirstRunDlg::slotHelp() KApplication::kApplication()->invokeHelp("simpleviewerexport", "kipi-plugins"); } -void FirstRunDlg::slotDownload(const QString &url) +void FirstRunDlg::slotDownload(const TQString &url) { KApplication::kApplication()->invokeBrowser(url); } -void FirstRunDlg::slotURLSelected(const QString &url) +void FirstRunDlg::slotURLSelected(const TQString &url) { enableButtonOK(true); m_url = url; } -QString FirstRunDlg::getURL() +TQString FirstRunDlg::getURL() { return m_url; } diff --git a/kipi-plugins/simpleviewerexport/firstrundlg.h b/kipi-plugins/simpleviewerexport/firstrundlg.h index ea0b16d..9eac767 100644 --- a/kipi-plugins/simpleviewerexport/firstrundlg.h +++ b/kipi-plugins/simpleviewerexport/firstrundlg.h @@ -36,7 +36,7 @@ #include "kpaboutdata.h" -class QString; +class TQString; class KURLRequester; @@ -53,34 +53,35 @@ namespace KIPISimpleViewerExportPlugin class FirstRunDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FirstRunDlg(QWidget *parent=0); + FirstRunDlg(TQWidget *tqparent=0); ~FirstRunDlg(); /** * Returns the URL, where the SimpleViewer package is stored */ - QString getURL(); + TQString getURL(); private slots: /** * Opens the browser with the SimpleViewer download page */ - void slotDownload(const QString &url); + void slotDownload(const TQString &url); /** * Starts the installation of SimpleViewer */ - void slotURLSelected(const QString &url); + void slotURLSelected(const TQString &url); void slotHelp(); private: - QString m_url; + TQString m_url; KURLRequester *m_urlRequester; diff --git a/kipi-plugins/simpleviewerexport/plugin_simpleviewer.cpp b/kipi-plugins/simpleviewerexport/plugin_simpleviewer.cpp index 42bc873..9692c72 100644 --- a/kipi-plugins/simpleviewerexport/plugin_simpleviewer.cpp +++ b/kipi-plugins/simpleviewerexport/plugin_simpleviewer.cpp @@ -44,13 +44,13 @@ typedef KGenericFactory<Plugin_SimpleViewer> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_simpleviewer, Factory("kipiplugin_simpleviewer")) -Plugin_SimpleViewer::Plugin_SimpleViewer(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin(Factory::instance(), parent, "SimpleViewer") +Plugin_SimpleViewer::Plugin_SimpleViewer(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin(Factory::instance(), tqparent, "SimpleViewer") { kdDebug( 51001 ) << "Plugin_SimpleViewer plugin loaded" << endl; } -void Plugin_SimpleViewer::setup( QWidget* widget ) +void Plugin_SimpleViewer::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -58,13 +58,13 @@ void Plugin_SimpleViewer::setup( QWidget* widget ) "www", 0, this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "simpleviewer"); addAction( m_actionSimpleViewer ); - m_interface = dynamic_cast< KIPI::Interface* >( parent() ); + m_interface = dynamic_cast< KIPI::Interface* >( tqparent() ); if ( !m_interface ) { kdError( 51000 ) << "Kipi interface is null!" << endl; diff --git a/kipi-plugins/simpleviewerexport/plugin_simpleviewer.h b/kipi-plugins/simpleviewerexport/plugin_simpleviewer.h index 042ef00..d5f7bbc 100644 --- a/kipi-plugins/simpleviewerexport/plugin_simpleviewer.h +++ b/kipi-plugins/simpleviewerexport/plugin_simpleviewer.h @@ -33,13 +33,14 @@ class KAction; class Plugin_SimpleViewer : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_SimpleViewer(QObject *parent, const char* name, const QStringList &args); + Plugin_SimpleViewer(TQObject *tqparent, const char* name, const TQStringList &args); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* widget ); + virtual void setup( TQWidget* widget ); private slots: diff --git a/kipi-plugins/simpleviewerexport/simpleviewerexport.cpp b/kipi-plugins/simpleviewerexport/simpleviewerexport.cpp index eab94d9..1d6a975 100644 --- a/kipi-plugins/simpleviewerexport/simpleviewerexport.cpp +++ b/kipi-plugins/simpleviewerexport/simpleviewerexport.cpp @@ -23,12 +23,12 @@ // QT includes -#include <qtimer.h> -#include <qimage.h> -#include <qfile.h> -#include <qdir.h> -#include <qcstring.h> -#include <qdatastream.h> +#include <tqtimer.h> +#include <tqimage.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqcstring.h> +#include <tqdatastream.h> // KDE includes @@ -77,17 +77,17 @@ namespace KIPISimpleViewerExportPlugin // maxium size of a simpleviewer thumbnail // TODO: read from configfile const int maxThumbSize = 45; -const QString viewer("viewer.swf"); +const TQString viewer("viewer.swf"); -void SimpleViewerExport::run(KIPI::Interface* interface, QObject *parent) +void SimpleViewerExport::run(KIPI::Interface* interface, TQObject *tqparent) { - SimpleViewerExport *plugin = new SimpleViewerExport(interface, parent); + SimpleViewerExport *plugin = new SimpleViewerExport(interface, tqparent); if(!plugin->checkSimpleViewer()) { if(!plugin->installSimpleViewer()) { - KMessageBox::error(kapp->activeWindow(), i18n("SimpleViewer installation failed")); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("SimpleViewer installation failed")); return; } } @@ -98,8 +98,8 @@ void SimpleViewerExport::run(KIPI::Interface* interface, QObject *parent) delete plugin; } -SimpleViewerExport::SimpleViewerExport(KIPI::Interface* interface, QObject *parent) - : QObject(parent) +SimpleViewerExport::SimpleViewerExport(KIPI::Interface* interface, TQObject *tqparent) + : TQObject(tqparent) { m_interface = interface; m_configDlg = 0; @@ -113,7 +113,7 @@ SimpleViewerExport::SimpleViewerExport(KIPI::Interface* interface, QObject *pare m_simpleViewerFiles.append("swfobject.js"); const KAboutData *data = KApplication::kApplication()->aboutData(); - m_hostName = QString::QString( data->appName() ); + m_hostName = TQString::TQString( data->appName() ); m_hostURL = data->homepage(); if (m_hostURL.isEmpty()) @@ -134,30 +134,30 @@ bool SimpleViewerExport::configure() m_canceled = false; if(!m_configDlg) - m_configDlg = new SVEDialog(m_interface, kapp->activeWindow()); + m_configDlg = new SVEDialog(m_interface, TQT_TQWIDGET(kapp->activeWindow())); bool configured = false; while(!configured) { - if(m_configDlg->exec() == QDialog::Rejected) + if(m_configDlg->exec() == TQDialog::Rejected) return false; configured = true; - if(KIO::NetAccess::exists(m_configDlg->exportURL(), false, kapp->activeWindow())) + if(KIO::NetAccess::exists(m_configDlg->exportURL(), false, TQT_TQWIDGET(kapp->activeWindow()))) { - int ret = KMessageBox::warningYesNoCancel(kapp->activeWindow(), + int ret = KMessageBox::warningYesNoCancel(TQT_TQWIDGET(kapp->activeWindow()), i18n("Target folder %1 already exists.\n" "Do you want to overwrite it (all data in this folder will be lost)") - .arg(m_configDlg->exportURL())); + .tqarg(m_configDlg->exportURL())); switch(ret) { case KMessageBox::Yes: - if(!KIO::NetAccess::del(m_configDlg->exportURL(), kapp->activeWindow())) + if(!KIO::NetAccess::del(m_configDlg->exportURL(), TQT_TQWIDGET(kapp->activeWindow()))) { - KMessageBox::error(kapp->activeWindow(), i18n("Could not delete %1\n" - "Please choose another export folder").arg(m_configDlg->exportURL())); + KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), i18n("Could not delete %1\n" + "Please choose another export folder").tqarg(m_configDlg->exportURL())); configured = false; } break; @@ -181,10 +181,10 @@ void SimpleViewerExport::startExport() if(m_canceled) return; - m_progressDlg = new KIPI::BatchProgressDialog(kapp->activeWindow(), i18n("Flash Export")); + m_progressDlg = new KIPI::BatchProgressDialog(TQT_TQWIDGET(kapp->activeWindow()), i18n("Flash Export")); - connect(m_progressDlg, SIGNAL(cancelClicked()), - this, SLOT(slotCancel())); + connect(m_progressDlg, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotCancel())); m_progressDlg->show(); kapp->processEvents(); @@ -193,7 +193,7 @@ void SimpleViewerExport::startExport() m_progressDlg->addedAction(i18n("Estimate the number of actions to do..."), KIPI::StartingMessage); m_albumsList = m_configDlg->getSelectedAlbums(); m_totalActions = 0; - for( QValueList<KIPI::ImageCollection>::Iterator it = m_albumsList.begin() ; + for( TQValueList<KIPI::ImageCollection>::Iterator it = m_albumsList.begin() ; !m_canceled && (it != m_albumsList.end()) ; ++it ) { m_totalActions += (*it).images().count(); @@ -264,13 +264,13 @@ void SimpleViewerExport::slotProcess() if(m_canceled) { - int ret = KMessageBox::warningYesNo(kapp->activeWindow(), + int ret = KMessageBox::warningYesNo(TQT_TQWIDGET(kapp->activeWindow()), i18n("Export was canceled.\n" "Do you want to delete the yet created files in %1 ?") - .arg(m_configDlg->exportURL())); + .tqarg(m_configDlg->exportURL())); if(ret == KMessageBox::Yes) { - KIO::NetAccess::del(m_configDlg->exportURL(), kapp->activeWindow()); + KIO::NetAccess::del(m_configDlg->exportURL(), TQT_TQWIDGET(kapp->activeWindow())); } } @@ -286,27 +286,27 @@ bool SimpleViewerExport::createExportDirectories() m_progressDlg->addedAction(i18n("Creating directories..."), KIPI::StartingMessage); KURL root = m_configDlg->exportURL(); - if(!KIO::NetAccess::mkdir(root, kapp->activeWindow())) + if(!KIO::NetAccess::mkdir(root, TQT_TQWIDGET(kapp->activeWindow()))) { - m_progressDlg->addedAction(i18n("Could not create folder '%1'").arg(root.url()), + m_progressDlg->addedAction(i18n("Could not create folder '%1'").tqarg(root.url()), KIPI::ErrorMessage); return(false); } KURL thumbsDir = m_tempDir->name(); thumbsDir.addPath("/thumbs"); - if(!KIO::NetAccess::mkdir(thumbsDir, kapp->activeWindow())) + if(!KIO::NetAccess::mkdir(thumbsDir, TQT_TQWIDGET(kapp->activeWindow()))) { - m_progressDlg->addedAction(i18n("Could not create folder '%1'").arg(thumbsDir.url()), + m_progressDlg->addedAction(i18n("Could not create folder '%1'").tqarg(thumbsDir.url()), KIPI::ErrorMessage); return(false); } KURL imagesDir = m_tempDir->name(); imagesDir.addPath("/images"); - if(!KIO::NetAccess::mkdir(imagesDir, kapp->activeWindow())) + if(!KIO::NetAccess::mkdir(imagesDir, TQT_TQWIDGET(kapp->activeWindow()))) { - m_progressDlg->addedAction(i18n("Could not create folder '%1'").arg(imagesDir.url()), + m_progressDlg->addedAction(i18n("Could not create folder '%1'").tqarg(imagesDir.url()), KIPI::ErrorMessage); return(false); } @@ -332,40 +332,40 @@ bool SimpleViewerExport::exportImages() KURL xmlFile(m_tempDir->name()); xmlFile.addPath("/gallery.xml"); - QFile file(xmlFile.path()); + TQFile file(xmlFile.path()); file.open(IO_WriteOnly); - QDomDocument xmlDoc; - xmlDoc.appendChild(xmlDoc.createProcessingInstruction( QString::fromLatin1("xml"), - QString::fromLatin1("version=\"1.0\" encoding=\"UTF-8\"") ) ); - QDomElement galleryElem = xmlDoc.createElement(QString::fromLatin1("simpleviewerGallery")); + TQDomDocument xmlDoc; + xmlDoc.appendChild(xmlDoc.createProcessingInstruction( TQString::tqfromLatin1("xml"), + TQString::tqfromLatin1("version=\"1.0\" encoding=\"UTF-8\"") ) ); + TQDomElement galleryElem = xmlDoc.createElement(TQString::tqfromLatin1("simpleviewerGallery")); xmlDoc.appendChild( galleryElem ); - galleryElem.setAttribute(QString::fromLatin1("maxImageWidth"), m_configDlg->maxImageDimension()); - galleryElem.setAttribute(QString::fromLatin1("maxImageHeight"), m_configDlg->maxImageDimension()); - galleryElem.setAttribute(QString::fromLatin1("textColor"), m_configDlg->textColor().name().replace("#", "0x")); - galleryElem.setAttribute(QString::fromLatin1("frameColor"), m_configDlg->frameColor().name().replace("#", "0x")); - galleryElem.setAttribute(QString::fromLatin1("bgColor"), m_configDlg->backgroundColor().name().replace("#", "0x")); - galleryElem.setAttribute(QString::fromLatin1("frameWidth"), m_configDlg->frameWidth()); - galleryElem.setAttribute(QString::fromLatin1("stagePadding"), m_configDlg->stagePadding()); - galleryElem.setAttribute(QString::fromLatin1("thumbnailColumns"), m_configDlg->thumbnailColumns()); - galleryElem.setAttribute(QString::fromLatin1("thumbnailRows"), m_configDlg->thumbnailRows()); - galleryElem.setAttribute(QString::fromLatin1("navPosition"), m_configDlg->navPosition()); - galleryElem.setAttribute(QString::fromLatin1("navDirection"), m_configDlg->navDirection()); - galleryElem.setAttribute(QString::fromLatin1("title"), m_configDlg->title()); - galleryElem.setAttribute(QString::fromLatin1("imagePath"), QString()); - galleryElem.setAttribute(QString::fromLatin1("thumbPath"), QString()); + galleryElem.setAttribute(TQString::tqfromLatin1("maxImageWidth"), m_configDlg->maxImageDimension()); + galleryElem.setAttribute(TQString::tqfromLatin1("maxImageHeight"), m_configDlg->maxImageDimension()); + galleryElem.setAttribute(TQString::tqfromLatin1("textColor"), TQString(m_configDlg->textColor().name()).tqreplace("#", "0x")); + galleryElem.setAttribute(TQString::tqfromLatin1("frameColor"), TQString(m_configDlg->frameColor().name()).tqreplace("#", "0x")); + galleryElem.setAttribute(TQString::tqfromLatin1("bgColor"), TQString(m_configDlg->backgroundColor().name()).tqreplace("#", "0x")); + galleryElem.setAttribute(TQString::tqfromLatin1("frameWidth"), m_configDlg->frameWidth()); + galleryElem.setAttribute(TQString::tqfromLatin1("stagePadding"), m_configDlg->stagePadding()); + galleryElem.setAttribute(TQString::tqfromLatin1("thumbnailColumns"), m_configDlg->thumbnailColumns()); + galleryElem.setAttribute(TQString::tqfromLatin1("thumbnailRows"), m_configDlg->thumbnailRows()); + galleryElem.setAttribute(TQString::tqfromLatin1("navPosition"), m_configDlg->navPosition()); + galleryElem.setAttribute(TQString::tqfromLatin1("navDirection"), m_configDlg->navDirection()); + galleryElem.setAttribute(TQString::tqfromLatin1("title"), m_configDlg->title()); + galleryElem.setAttribute(TQString::tqfromLatin1("imagePath"), TQString()); + galleryElem.setAttribute(TQString::tqfromLatin1("thumbPath"), TQString()); KExiv2Iface::KExiv2 meta; - QImage image; - QImage thumbnail; - QString tmp; - QString newName; + TQImage image; + TQImage thumbnail; + TQString tmp; + TQString newName; int index = 1; int maxSize = m_configDlg->imagesExportSize(); bool resizeImages = m_configDlg->resizeExportImages(); - for( QValueList<KIPI::ImageCollection>::Iterator it = m_albumsList.begin() ; + for( TQValueList<KIPI::ImageCollection>::Iterator it = m_albumsList.begin() ; !m_canceled && (it != m_albumsList.end()) ; ++it ) { KURL::List images = (*it).images(); @@ -375,44 +375,44 @@ bool SimpleViewerExport::exportImages() { kapp->processEvents(); KURL url = *it; - QFileInfo fileInfo(url.path()); + TQFileInfo fileInfo(url.path()); - m_progressDlg->addedAction(i18n("Processing %1").arg(url.filename()), KIPI::StartingMessage); + m_progressDlg->addedAction(i18n("Processing %1").tqarg(url.filename()), KIPI::StartingMessage); // Check if RAW file. #if KDCRAW_VERSION < 0x000106 - QString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); + TQString rawFilesExt(KDcrawIface::DcrawBinary::instance()->rawFiles()); #else - QString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); + TQString rawFilesExt(KDcrawIface::KDcraw::rawFiles()); #endif - if (rawFilesExt.upper().contains( fileInfo.extension(false).upper() )) + if (rawFilesExt.upper().tqcontains( fileInfo.extension(false).upper() )) KDcrawIface::KDcraw::loadDcrawPreview(image, url.path()); else image.load(url.path()); if(image.isNull()) { - m_progressDlg->addedAction(i18n("Could not open image '%1'").arg(url.filename()), + m_progressDlg->addedAction(i18n("Could not open image '%1'").tqarg(url.filename()), KIPI::WarningMessage); continue; } if(!createThumbnail(image, thumbnail)) { - m_progressDlg->addedAction(i18n("Could not create thumbnail from '%1'").arg(url.filename()), + m_progressDlg->addedAction(i18n("Could not create thumbnail from '%1'").tqarg(url.filename()), KIPI::WarningMessage); continue; } if(resizeImages && !resizeImage(image, maxSize, image)) { - m_progressDlg->addedAction(i18n("Could not resize image '%1'").arg(url.filename()), + m_progressDlg->addedAction(i18n("Could not resize image '%1'").tqarg(url.filename()), KIPI::WarningMessage); continue; } meta.load(url.path()); - newName = QString("%1.%2").arg(tmp.sprintf("%03i", index)).arg(QString("jpg")); + newName = TQString("%1.%2").tqarg(tmp.sprintf("%03i", index)).tqarg(TQString("jpg")); KURL thumbnailPath(thumbsDir); thumbnailPath.addPath(newName); @@ -423,7 +423,7 @@ bool SimpleViewerExport::exportImages() image.save(imagePath.path(), "JPEG"); // Backup metadata from original image. - meta.setImageProgramId(QString("Kipi-plugins"), QString(kipiplugins_version)); + meta.setImageProgramId(TQString("Kipi-plugins"), TQString(kipiplugins_version)); meta.setImageDimensions(image.size()); meta.save(imagePath.path()); @@ -433,8 +433,8 @@ bool SimpleViewerExport::exportImages() } } - QCString data(xmlDoc.toCString()); - QDataStream stream( &file ); + TQCString data(xmlDoc.toCString()); + TQDataStream stream( &file ); stream.writeRawBytes(data.data(), data.size()); file.close(); @@ -443,7 +443,7 @@ bool SimpleViewerExport::exportImages() return true; } -bool SimpleViewerExport::createThumbnail(const QImage &image, QImage &thumbnail) +bool SimpleViewerExport::createThumbnail(const TQImage &image, TQImage &thumbnail) { int w = image.width(); int h = image.height(); @@ -467,7 +467,7 @@ bool SimpleViewerExport::createThumbnail(const QImage &image, QImage &thumbnail) return resizeImage(image, maxSize, thumbnail); } -bool SimpleViewerExport::resizeImage(const QImage &image, int maxSize, QImage &resizedImage) +bool SimpleViewerExport::resizeImage(const TQImage &image, int maxSize, TQImage &resizedImage) { int w = image.width(); int h = image.height(); @@ -492,13 +492,13 @@ bool SimpleViewerExport::resizeImage(const QImage &image, int maxSize, QImage &r return true; } -void SimpleViewerExport::cfgAddImage(QDomDocument &xmlDoc, QDomElement &galleryElem, - const KURL &url, const QString& newName) +void SimpleViewerExport::cfgAddImage(TQDomDocument &xmlDoc, TQDomElement &galleryElem, + const KURL &url, const TQString& newName) { if(m_canceled) return; - QString comment; + TQString comment; if(m_configDlg->showExifComments()) { @@ -507,20 +507,20 @@ void SimpleViewerExport::cfgAddImage(QDomDocument &xmlDoc, QDomElement &galleryE } else { - comment = QString(); + comment = TQString(); } - QDomElement img = xmlDoc.createElement(QString::fromLatin1("image")); + TQDomElement img = xmlDoc.createElement(TQString::tqfromLatin1("image")); galleryElem.appendChild(img); - QDomElement name = xmlDoc.createElement(QString::fromLatin1("name")); + TQDomElement name = xmlDoc.createElement(TQString::tqfromLatin1("name")); img.appendChild(name); - QDomText nametxt = xmlDoc.createTextNode(newName); + TQDomText nametxt = xmlDoc.createTextNode(newName); name.appendChild(nametxt); - QDomElement caption = xmlDoc.createElement(QString::fromLatin1("caption")); + TQDomElement caption = xmlDoc.createElement(TQString::tqfromLatin1("caption")); img.appendChild(caption); - QDomText captiontxt = xmlDoc.createTextNode(comment); + TQDomText captiontxt = xmlDoc.createTextNode(comment); caption.appendChild(captiontxt); } @@ -531,7 +531,7 @@ bool SimpleViewerExport::createIndex() m_progressDlg->addedAction(i18n("Creating index.html..."), KIPI::StartingMessage); - QString indexTemplateName = locate("data", "kipiplugin_simpleviewerexport/index.template"); + TQString indexTemplateName = locate("data", "kipiplugin_simpleviewerexport/index.template"); if(indexTemplateName.isEmpty()) { //TODO: errormsg @@ -539,21 +539,21 @@ bool SimpleViewerExport::createIndex() return false; } - QFile infile(indexTemplateName); + TQFile infile(indexTemplateName); infile.open(IO_ReadOnly); - QTextStream in(&infile); - QString indexTemplate = in.read(); + TQTextStream in(&infile); + TQString indexTemplate = in.read(); infile.close(); - indexTemplate.replace("{TITLE}", m_configDlg->title()); - indexTemplate.replace("{COLOR}", m_configDlg->textColor().name()); - indexTemplate.replace("{BGCOLOR}", m_configDlg->backgroundColor().name()); - indexTemplate.replace("{HOSTURL}", m_hostURL); - indexTemplate.replace("{HOSTNAME}", m_hostName); + indexTemplate.tqreplace("{TITLE}", m_configDlg->title()); + indexTemplate.tqreplace("{COLOR}", m_configDlg->textColor().name()); + indexTemplate.tqreplace("{BGCOLOR}", m_configDlg->backgroundColor().name()); + indexTemplate.tqreplace("{HOSTURL}", m_hostURL); + indexTemplate.tqreplace("{HOSTNAME}", m_hostName); - QFile outfile(m_tempDir->name() + "/index.html"); + TQFile outfile(m_tempDir->name() + "/index.html"); outfile.open(IO_WriteOnly); - QTextStream out(&outfile); + TQTextStream out(&outfile); out << indexTemplate; outfile.close(); @@ -570,7 +570,7 @@ bool SimpleViewerExport::copySimpleViewer() m_progressDlg->addedAction(i18n("Copying flash files..."), KIPI::StartingMessage); - QString dataDir; + TQString dataDir; // Due to its license, simpleviewer is installed in $KDEHOME dataDir = locate("data", "kipiplugin_simpleviewerexport/simpleviewer/"); @@ -579,13 +579,13 @@ bool SimpleViewerExport::copySimpleViewer() if(dataDir.isEmpty()) return false; - QStringList files; - QStringList entries; - QDir dir; + TQStringList files; + TQStringList entries; + TQDir dir; dir.setPath(dataDir); - entries = dir.entryList(QDir::Files); - for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) + entries = dir.entryList(TQDir::Files); + for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { files.append(dir.absPath() + "/" + *it); } @@ -593,8 +593,8 @@ bool SimpleViewerExport::copySimpleViewer() // files distributed with the plugin are installed in $KDEDIRS dataDir = locate("data", "kipiplugin_simpleviewerexport/simpleviewer_html/"); dir.setPath(dataDir); - entries = dir.entryList(QDir::Files); - for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) + entries = dir.entryList(TQDir::Files); + for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { files.append(dir.absPath() + "/" + *it); } @@ -628,10 +628,10 @@ bool SimpleViewerExport::checkSimpleViewer() const bool SimpleViewerExport::installSimpleViewer() { - FirstRunDlg *firstRunDlg = new FirstRunDlg(kapp->activeWindow()); - if(firstRunDlg->exec() == QDialog::Accepted) + FirstRunDlg *firstRunDlg = new FirstRunDlg(TQT_TQWIDGET(kapp->activeWindow())); + if(firstRunDlg->exec() == TQDialog::Accepted) { - QString url = firstRunDlg->getURL(); + TQString url = firstRunDlg->getURL(); delete firstRunDlg; if(unzip(url)) @@ -647,7 +647,7 @@ bool SimpleViewerExport::installSimpleViewer() return false; } -bool SimpleViewerExport::unzip(const QString &url) +bool SimpleViewerExport::unzip(const TQString &url) { KZip zip(url); @@ -672,7 +672,7 @@ bool SimpleViewerExport::openArchive(KZip &zip) bool SimpleViewerExport::extractArchive(KZip &zip) { // read root directory content - QStringList names = zip.directory()->entries(); + TQStringList names = zip.directory()->entries(); if(names.count() != 1) { kdDebug() << "Wrong SimpleViewer Version or corrupted archive" << endl; @@ -691,7 +691,7 @@ bool SimpleViewerExport::extractArchive(KZip &zip) const KArchiveDirectory *dir = dynamic_cast<const KArchiveDirectory*>(root); // extract the needed files from SimpleViewer archive - for(QStringList::Iterator it = m_simpleViewerFiles.begin(); + for(TQStringList::Iterator it = m_simpleViewerFiles.begin(); it != m_simpleViewerFiles.end(); ++it ) { const KArchiveEntry *entry = dir->entry(*it); @@ -712,9 +712,9 @@ bool SimpleViewerExport::extractFile(const KArchiveEntry *entry) return false; const KArchiveFile *entryFile = dynamic_cast<const KArchiveFile*>(entry); - QByteArray array = entryFile->data(); + TQByteArray array = entryFile->data(); - QFile file( m_dataLocal + entry->name() ); + TQFile file( m_dataLocal + entry->name() ); if(file.open( IO_WriteOnly )) { int ret = file.writeBlock(array); diff --git a/kipi-plugins/simpleviewerexport/simpleviewerexport.h b/kipi-plugins/simpleviewerexport/simpleviewerexport.h index d674b52..68b8eca 100644 --- a/kipi-plugins/simpleviewerexport/simpleviewerexport.h +++ b/kipi-plugins/simpleviewerexport/simpleviewerexport.h @@ -26,16 +26,16 @@ // QT includes -#include <qobject.h> -#include <qdom.h> +#include <tqobject.h> +#include <tqdom.h> // KIPI includes #include <libkipi/interface.h> -class QTimer; -class QString; -class QImage; +class TQTimer; +class TQString; +class TQImage; class KZip; class KURL; @@ -53,17 +53,18 @@ namespace KIPISimpleViewerExportPlugin class SVEDialog; class FirstRunDlg; -class SimpleViewerExport : public QObject +class SimpleViewerExport : public TQObject { Q_OBJECT + TQ_OBJECT public: - static void run( KIPI::Interface* interface, QObject *parent=0 ); + static void run( KIPI::Interface* interface, TQObject *tqparent=0 ); private: - SimpleViewerExport( KIPI::Interface* interface, QObject *parent=0 ); + SimpleViewerExport( KIPI::Interface* interface, TQObject *tqparent=0 ); ~SimpleViewerExport(); bool configure(); @@ -91,7 +92,7 @@ private: * * @return true=ok */ - bool createThumbnail(const QImage &image, QImage &thumbnail); + bool createThumbnail(const TQImage &image, TQImage &thumbnail); /** * Resizes the image for the gallery @@ -101,7 +102,7 @@ private: * * @return true=ok */ - bool resizeImage(const QImage &image, int maxSize, QImage &resized); + bool resizeImage(const TQImage &image, int maxSize, TQImage &resized); /** * Adds an image to the simpleviewer config file @@ -111,8 +112,8 @@ private: * @param url path to original image * @param newName new image file name used by gallery */ - void cfgAddImage(QDomDocument &xmlDoc, QDomElement &galleryElem, - const KURL &url, const QString& newName); + void cfgAddImage(TQDomDocument &xmlDoc, TQDomElement &galleryElem, + const KURL &url, const TQString& newName); /** * Creates the index.html file @@ -137,7 +138,7 @@ private: bool upload(); - bool unzip(const QString &url); + bool unzip(const TQString &url); bool openArchive(KZip &zip); @@ -156,18 +157,18 @@ private: int m_action; bool m_canceled; - QTimer *m_timer; - QString m_dataLocal; - QStringList m_simpleViewerFiles; - QString m_hostName; - QString m_hostURL; + TQTimer *m_timer; + TQString m_dataLocal; + TQStringList m_simpleViewerFiles; + TQString m_hostName; + TQString m_hostURL; KTempDir *m_tempDir; SVEDialog *m_configDlg; KIPI::Interface *m_interface; KIPI::BatchProgressDialog *m_progressDlg; - QValueList<KIPI::ImageCollection> m_albumsList; + TQValueList<KIPI::ImageCollection> m_albumsList; }; } // namespace KIPISimpleViewerExportPlugin diff --git a/kipi-plugins/simpleviewerexport/svedialog.cpp b/kipi-plugins/simpleviewerexport/svedialog.cpp index 9029b99..91ad0f5 100644 --- a/kipi-plugins/simpleviewerexport/svedialog.cpp +++ b/kipi-plugins/simpleviewerexport/svedialog.cpp @@ -23,18 +23,18 @@ // QT include files -#include <qframe.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qhgroupbox.h> -#include <qvgroupbox.h> -#include <qcombobox.h> -#include <qhbox.h> -#include <qvbox.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqhgroupbox.h> +#include <tqvgroupbox.h> +#include <tqcombobox.h> +#include <tqhbox.h> +#include <tqvbox.h> // KDE include files @@ -65,9 +65,9 @@ namespace KIPISimpleViewerExportPlugin { -SVEDialog::SVEDialog(KIPI::Interface* interface, QWidget *parent) +SVEDialog::SVEDialog(KIPI::Interface* interface, TQWidget *tqparent) : KDialogBase( IconList, i18n("Flash Export"), Help|Ok|Cancel, Ok, - parent, "SimpleViewerExportDialog", true, true ), + tqparent, "SimpleViewerExportDialog", true, true ), m_interface( interface ) { selectionPage(); @@ -106,7 +106,7 @@ SVEDialog::SVEDialog(KIPI::Interface* interface, QWidget *parent) KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); helpMenu->menu()->insertItem(i18n("Plugin Handbook"), - this, SLOT(slotHelp()), 0, -1, 0); + this, TQT_SLOT(slotHelp()), 0, -1, 0); actionButton(Help)->setPopup( helpMenu->menu() ); } @@ -128,19 +128,19 @@ void SVEDialog::readConfig() setThumbnailColumns(config.readNumEntry("thumbnailColumns", 3)); m_navPosition->setCurrentItem(config.readNumEntry("navPosition", 1)); m_navDirection->setCurrentItem(config.readNumEntry("navDirection", 1)); - setTextColor(QColor(config.readEntry("textColor", "#ffffff"))); - setBackgroundColor(QColor(config.readEntry("backgroundColor", "#181818"))); - setFrameColor(QColor(config.readEntry("frameColor", "#ffffff"))); + setTextColor(TQColor(config.readEntry("textColor", "#ffffff"))); + setBackgroundColor(TQColor(config.readEntry("backgroundColor", "#181818"))); + setFrameColor(TQColor(config.readEntry("frameColor", "#ffffff"))); setFrameWidth(config.readNumEntry("frameWidth", 1)); setStagePadding(config.readNumEntry("stagePadding", 20)); - setTitle(config.readEntry("title", QString())); + setTitle(config.readEntry("title", TQString())); m_exportURL->setURL(config.readPathEntry("exporturl", KGlobalSettings::documentPath() + "simpleviewer")); setResizeExportImages(config.readBoolEntry("resizeExportImages", true)); setImagesExportSize(config.readNumEntry("imagesExportSize", 640)); setMaxImagesDimension(config.readNumEntry("maxImageDimension", 640)); setShowExifComments(config.readBoolEntry("showExifComments", true)); - resize(configDialogSize(config, QString("SimpleViewerExport Dialog"))); + resize(configDialogSize(config, TQString("SimpleViewerExport Dialog"))); } void SVEDialog::writeConfig() @@ -150,9 +150,9 @@ void SVEDialog::writeConfig() config.writeEntry("thumbnailColumns", thumbnailColumns()); config.writeEntry("navPosition", m_navPosition->currentItem()); config.writeEntry("navDirection", m_navDirection->currentItem()); - config.writeEntry("textColor", textColor().name()); - config.writeEntry("backgroundColor", backgroundColor().name()); - config.writeEntry("frameColor", frameColor().name()); + config.writeEntry("textColor", TQString(textColor().name())); + config.writeEntry("backgroundColor", TQString(backgroundColor().name())); + config.writeEntry("frameColor", TQString(frameColor().name())); config.writeEntry("frameWidth", frameWidth()); config.writeEntry("stagePadding", stagePadding()); config.writePathEntry("exporturl", exportURL()); @@ -162,7 +162,7 @@ void SVEDialog::writeConfig() config.writeEntry("maxImageDimension", maxImageDimension()); config.writeEntry("showExifComments", showExifComments()); - saveDialogSize(config, QString("GPS Sync Dialog")); + saveDialogSize(config, TQString("GPS Sync Dialog")); config.sync(); } @@ -171,9 +171,9 @@ void SVEDialog::selectionPage() m_selectionPage = addPage(i18n("Selection"), i18n("Album Selection"), BarIcon("folder_image", KIcon::SizeMedium)); - QVBoxLayout *layout = new QVBoxLayout( m_selectionPage, 0, spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( m_selectionPage, 0, spacingHint() ); m_imageCollectionSelector = new KIPI::ImageCollectionSelector( m_selectionPage, m_interface ); - layout->addWidget(m_imageCollectionSelector); + tqlayout->addWidget(m_imageCollectionSelector); } void SVEDialog::lookPage() @@ -181,33 +181,33 @@ void SVEDialog::lookPage() m_lookPage = addPage(i18n("Look"), i18n("Page Look"), BarIcon("colors", KIcon::SizeMedium)); - QVBoxLayout *mainLayout = new QVBoxLayout(m_lookPage, 0, spacingHint()); - QVGroupBox *vgroupbox; - QHBox *hbox; - QLabel *label; + TQVBoxLayout *mainLayout = new TQVBoxLayout(m_lookPage, 0, spacingHint()); + TQVGroupBox *vgroupbox; + TQHBox *hbox; + TQLabel *label; // ------------------------------------------------------------------------ - vgroupbox = new QVGroupBox(i18n("Navigation"), m_lookPage); + vgroupbox = new TQVGroupBox(i18n("Navigation"), m_lookPage); mainLayout->addWidget(vgroupbox); m_thumbnailRows = new KIntNumInput(3, vgroupbox); m_thumbnailRows->setRange(1, 10, 1, true); m_thumbnailRows->setLabel(i18n("Thumbnail &Rows:"), AlignVCenter); - QWhatsThis::add(m_thumbnailRows, i18n("<p>Number of thumbnails rows")); + TQWhatsThis::add(m_thumbnailRows, i18n("<p>Number of thumbnails rows")); // ------------------------------------------------------------------------ m_thumbnailColumns = new KIntNumInput(3, vgroupbox); m_thumbnailColumns->setRange(1, 10, 1, true); m_thumbnailColumns->setLabel(i18n("Thumbnail &Columns:"), AlignVCenter); - QWhatsThis::add(m_thumbnailColumns, i18n("<p>Number of thumbnails columns")); + TQWhatsThis::add(m_thumbnailColumns, i18n("<p>Number of thumbnails columns")); // ------------------------------------------------------------------------ - hbox = new QHBox(vgroupbox); - label = new QLabel(i18n("Thumbnail &Position:"), hbox); - m_navPosition = new QComboBox(false, hbox); + hbox = new TQHBox(vgroupbox); + label = new TQLabel(i18n("Thumbnail &Position:"), hbox); + m_navPosition = new TQComboBox(false, hbox); m_navPosition->insertItem(i18n("Right")); m_navPosition->insertItem(i18n("Left")); m_navPosition->insertItem(i18n("Top")); @@ -217,9 +217,9 @@ void SVEDialog::lookPage() // ------------------------------------------------------------------------ - hbox = new QHBox(vgroupbox); - label = new QLabel(i18n("&Direction of Navigation:"), hbox); - m_navDirection = new QComboBox(false, hbox); + hbox = new TQHBox(vgroupbox); + label = new TQLabel(i18n("&Direction of Navigation:"), hbox); + m_navDirection = new TQComboBox(false, hbox); m_navDirection->insertItem(i18n("Left to Right")); m_navDirection->insertItem(i18n("Right to Left")); m_navDirection->setCurrentText(i18n("Left to Right")); @@ -227,44 +227,44 @@ void SVEDialog::lookPage() // ------------------------------------------------------------------------ - vgroupbox = new QVGroupBox(i18n("Colors"), m_lookPage); + vgroupbox = new TQVGroupBox(i18n("Colors"), m_lookPage); mainLayout->addWidget(vgroupbox); - hbox = new QHBox(vgroupbox); - label = new QLabel(i18n("&Text Color:"), hbox); - m_textColor = new KColorButton(QColor("#ffffff"), hbox); + hbox = new TQHBox(vgroupbox); + label = new TQLabel(i18n("&Text Color:"), hbox); + m_textColor = new KColorButton(TQColor("#ffffff"), hbox); label->setBuddy(m_textColor); // ------------------------------------------------------------------------ - hbox = new QHBox(vgroupbox); - label = new QLabel(i18n("&Background Color:"), hbox); - m_backgroundColor = new KColorButton(QColor("#181818"), hbox); + hbox = new TQHBox(vgroupbox); + label = new TQLabel(i18n("&Background Color:"), hbox); + m_backgroundColor = new KColorButton(TQColor("#181818"), hbox); label->setBuddy(m_backgroundColor); // ------------------------------------------------------------------------ - hbox = new QHBox(vgroupbox); - label = new QLabel(i18n("&Frame Color:"), hbox); - m_frameColor = new KColorButton(QColor("#ffffff"), hbox); + hbox = new TQHBox(vgroupbox); + label = new TQLabel(i18n("&Frame Color:"), hbox); + m_frameColor = new KColorButton(TQColor("#ffffff"), hbox); label->setBuddy(m_frameColor); // ------------------------------------------------------------------------ - vgroupbox = new QVGroupBox(i18n("Style"), m_lookPage); + vgroupbox = new TQVGroupBox(i18n("Style"), m_lookPage); mainLayout->addWidget(vgroupbox); m_frameWidth = new KIntNumInput(3, vgroupbox); m_frameWidth->setRange(0, 10, 1, true); m_frameWidth->setLabel(i18n("Frame &Width:"), AlignVCenter); - QWhatsThis::add(m_frameWidth, i18n("<p>Width of image frame in pixels.")); + TQWhatsThis::add(m_frameWidth, i18n("<p>Width of image frame in pixels.")); // ------------------------------------------------------------------------ m_stagePadding = new KIntNumInput(20, vgroupbox); m_stagePadding->setRange(1, 100, 1, true); m_stagePadding->setLabel(i18n("Stage &Padding:"), AlignVCenter); - QWhatsThis::add(m_stagePadding, i18n("<p>Stage Padding: Distance between image and thumbnails in pixels.")); + TQWhatsThis::add(m_stagePadding, i18n("<p>Stage Padding: Distance between image and thumbnails in pixels.")); mainLayout->addStretch(1); } @@ -274,62 +274,62 @@ void SVEDialog::generalPage() m_generalPage = addPage(i18n("General"), i18n("General Setup"), BarIcon("html", KIcon::SizeMedium)); - QVBoxLayout *mainLayout = new QVBoxLayout(m_generalPage, 0, spacingHint()); + TQVBoxLayout *mainLayout = new TQVBoxLayout(m_generalPage, 0, spacingHint()); - QHGroupBox *hgroupbox; - QVGroupBox *vgroupbox; + TQHGroupBox *hgroupbox; + TQVGroupBox *vgroupbox; // ------------------------------------------------------------------------ - hgroupbox = new QHGroupBox(i18n("Gallery &Title"), m_generalPage); + hgroupbox = new TQHGroupBox(i18n("Gallery &Title"), m_generalPage); mainLayout->addWidget(hgroupbox); m_title = new KLineEdit(hgroupbox); - QWhatsThis::add(m_title, i18n("<p>Enter here the gallery title")); + TQWhatsThis::add(m_title, i18n("<p>Enter here the gallery title")); // ------------------------------------------------------------------------ - vgroupbox = new QVGroupBox(i18n("Save Gallery To"), m_generalPage); + vgroupbox = new TQVGroupBox(i18n("Save Gallery To"), m_generalPage); mainLayout->addWidget(vgroupbox); m_exportURL = new KURLRequester(KGlobalSettings::documentPath() + "simpleviewer", vgroupbox); m_exportURL->setMode(KFile::Directory | KFile::LocalOnly); // ------------------------------------------------------------------------ - vgroupbox = new QVGroupBox(i18n("Image Size"), m_generalPage); + vgroupbox = new TQVGroupBox(i18n("Image Size"), m_generalPage); mainLayout->addWidget(vgroupbox); - m_resizeExportImages = new QCheckBox(i18n("Resize Target Images"), vgroupbox); + m_resizeExportImages = new TQCheckBox(i18n("Resize Target Images"), vgroupbox); m_resizeExportImages->setChecked(true); - QWhatsThis::add(m_resizeExportImages, i18n("<p>If you enable this option, " + TQWhatsThis::add(m_resizeExportImages, i18n("<p>If you enable this option, " "all target images can be resized.") ); m_imagesExportSize = new KIntNumInput(640, vgroupbox); m_imagesExportSize->setRange(200, 2000, 1, true ); m_imagesExportSize->setLabel(i18n("&Target Images Size:"), AlignVCenter); - QWhatsThis::add(m_imagesExportSize, i18n("<p>The new size of the exported images in pixels. " + TQWhatsThis::add(m_imagesExportSize, i18n("<p>The new size of the exported images in pixels. " "SimpleViewer resizes the images as well, but this " "resizes your images before they are uploaded to your server")); - connect(m_resizeExportImages, SIGNAL(toggled(bool)), - m_imagesExportSize, SLOT(setEnabled(bool))); + connect(m_resizeExportImages, TQT_SIGNAL(toggled(bool)), + m_imagesExportSize, TQT_SLOT(setEnabled(bool))); // ------------------------------------------------------------------------ m_maxImageDimension = new KIntNumInput(m_imagesExportSize, 640, vgroupbox); m_maxImageDimension->setRange(200, 2000, 1, true ); m_maxImageDimension->setLabel(i18n("&Displayed Images Size:"), AlignVCenter); - QWhatsThis::add(m_maxImageDimension, i18n("<p>scales the displayed images to this size. " + TQWhatsThis::add(m_maxImageDimension, i18n("<p>scales the displayed images to this size. " "Largest height or width of your largest image (in pixels). " "Images will not be scaled up above this size, to ensure best image quality.")); // ------------------------------------------------------------------------ - vgroupbox = new QVGroupBox(i18n("Misc"), m_generalPage); + vgroupbox = new TQVGroupBox(i18n("Misc"), m_generalPage); mainLayout->addWidget(vgroupbox); - m_showExifComments = new QCheckBox(i18n("Display Captions"), vgroupbox); + m_showExifComments = new TQCheckBox(i18n("Display Captions"), vgroupbox); m_showExifComments->setChecked(true); - QWhatsThis::add(m_showExifComments, i18n("<p>If you enable this option, " + TQWhatsThis::add(m_showExifComments, i18n("<p>If you enable this option, " "the images caption will be shown")); mainLayout->addStretch(1); @@ -349,17 +349,17 @@ void SVEDialog::slotOk() accept(); } -QValueList<KIPI::ImageCollection> SVEDialog::getSelectedAlbums() const +TQValueList<KIPI::ImageCollection> SVEDialog::getSelectedAlbums() const { return m_selectedAlbums; } -void SVEDialog::setTitle(const QString &title) +void SVEDialog::setTitle(const TQString &title) { m_title->setText(title); } -QString SVEDialog::title() const +TQString SVEDialog::title() const { return m_title->text(); } @@ -404,7 +404,7 @@ void SVEDialog::setShowExifComments(bool show) m_showExifComments->setChecked(show); } -QString SVEDialog::exportURL() const +TQString SVEDialog::exportURL() const { return m_exportURL->url(); } @@ -449,37 +449,37 @@ void SVEDialog::setStagePadding(int stagePadding) m_stagePadding->setValue(stagePadding); } -QColor SVEDialog::textColor() const +TQColor SVEDialog::textColor() const { return m_textColor->color(); } -void SVEDialog::setTextColor(const QColor &color) +void SVEDialog::setTextColor(const TQColor &color) { m_textColor->setColor(color); } -QColor SVEDialog::frameColor() const +TQColor SVEDialog::frameColor() const { return m_frameColor->color(); } -void SVEDialog::setFrameColor(const QColor &color) +void SVEDialog::setFrameColor(const TQColor &color) { m_frameColor->setColor(color); } -QColor SVEDialog::backgroundColor() const +TQColor SVEDialog::backgroundColor() const { return m_backgroundColor->color(); } -void SVEDialog::setBackgroundColor(const QColor &color) +void SVEDialog::setBackgroundColor(const TQColor &color) { m_backgroundColor->setColor(color); } -QString SVEDialog::navDirection() const +TQString SVEDialog::navDirection() const { if(m_navDirection->currentText() == i18n("Left to Right")) return "LTR"; @@ -487,7 +487,7 @@ QString SVEDialog::navDirection() const return "RTL"; } -void SVEDialog::setNavDirection(const QString &direction) +void SVEDialog::setNavDirection(const TQString &direction) { if(direction == "LTR") m_navDirection->setCurrentText(i18n("Left to Right")); @@ -495,9 +495,9 @@ void SVEDialog::setNavDirection(const QString &direction) m_navDirection->setCurrentText(i18n("Right to Left")); } -QString SVEDialog::navPosition() const +TQString SVEDialog::navPosition() const { - QString pos = m_navPosition->currentText(); + TQString pos = m_navPosition->currentText(); if(pos == i18n("Top")) return "top"; @@ -509,7 +509,7 @@ QString SVEDialog::navPosition() const return "right"; } -void SVEDialog::setNavPosition(const QString &pos) +void SVEDialog::setNavPosition(const TQString &pos) { m_navPosition->setCurrentText(pos); } diff --git a/kipi-plugins/simpleviewerexport/svedialog.h b/kipi-plugins/simpleviewerexport/svedialog.h index 5480d3e..1c629b3 100644 --- a/kipi-plugins/simpleviewerexport/svedialog.h +++ b/kipi-plugins/simpleviewerexport/svedialog.h @@ -36,9 +36,9 @@ #include "kpaboutdata.h" -class QFrame; -class QCheckBox; -class QComboBox; +class TQFrame; +class TQCheckBox; +class TQComboBox; class KLineEdit; class KIntNumInput; @@ -57,20 +57,21 @@ namespace KIPISimpleViewerExportPlugin class SVEDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - SVEDialog( KIPI::Interface* interface, QWidget *parent=0); + SVEDialog( KIPI::Interface* interface, TQWidget *tqparent=0); ~SVEDialog(); void readConfig(); void writeConfig(); void slotOk(); - QValueList<KIPI::ImageCollection> getSelectedAlbums() const; + TQValueList<KIPI::ImageCollection> getSelectedAlbums() const; - QString title() const; - void setTitle(const QString &title); + TQString title() const; + void setTitle(const TQString &title); bool resizeExportImages() const; void setResizeExportImages(bool resize); @@ -96,22 +97,22 @@ public: int stagePadding() const; void setStagePadding(int stagePadding); - QColor textColor() const; - void setTextColor(const QColor &color); + TQColor textColor() const; + void setTextColor(const TQColor &color); - QColor frameColor() const; - void setFrameColor(const QColor &color); + TQColor frameColor() const; + void setFrameColor(const TQColor &color); - QColor backgroundColor() const; - void setBackgroundColor(const QColor &color); + TQColor backgroundColor() const; + void setBackgroundColor(const TQColor &color); - QString navDirection() const; - void setNavDirection(const QString &direction); + TQString navDirection() const; + void setNavDirection(const TQString &direction); - QString navPosition() const; - void setNavPosition(const QString &pos); + TQString navPosition() const; + void setNavPosition(const TQString &pos); - QString exportURL() const; + TQString exportURL() const; private: @@ -125,14 +126,14 @@ private slots: private: - QFrame *m_selectionPage; - QFrame *m_generalPage; - QFrame *m_lookPage; + TQFrame *m_selectionPage; + TQFrame *m_generalPage; + TQFrame *m_lookPage; - QCheckBox *m_resizeExportImages; - QCheckBox *m_showExifComments; - QComboBox *m_navPosition; - QComboBox *m_navDirection; + TQCheckBox *m_resizeExportImages; + TQCheckBox *m_showExifComments; + TQComboBox *m_navPosition; + TQComboBox *m_navDirection; KLineEdit *m_title; KIntNumInput *m_imagesExportSize; @@ -149,7 +150,7 @@ private: KIPI::Interface *m_interface; KIPI::ImageCollectionSelector *m_imageCollectionSelector; KIPIPlugins::KPAboutData *m_about; - QValueList<KIPI::ImageCollection> m_selectedAlbums; + TQValueList<KIPI::ImageCollection> m_selectedAlbums; }; } // namespace KIPISimpleViewerExportPlugin diff --git a/kipi-plugins/slideshow/imageloadthread.cpp b/kipi-plugins/slideshow/imageloadthread.cpp index 36f40c8..12d5473 100644 --- a/kipi-plugins/slideshow/imageloadthread.cpp +++ b/kipi-plugins/slideshow/imageloadthread.cpp @@ -23,13 +23,13 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qdir.h> -#include <qvaluevector.h> -#include <qdeepcopy.h> -#include <qwmatrix.h> -#include <qobject.h> +#include <tqdir.h> +#include <tqvaluevector.h> +#include <tqdeepcopy.h> +#include <tqwmatrix.h> +#include <tqobject.h> // KDE includes. @@ -44,7 +44,7 @@ namespace KIPISlideShowPlugin { -ImageLoadThread::ImageLoadThread(QValueList<QPair<QString, int> >& fileList, +ImageLoadThread::ImageLoadThread(TQValueList<TQPair<TQString, int> >& fileList, int width, int height) { @@ -62,7 +62,7 @@ ImageLoadThread::ImageLoadThread(QValueList<QPair<QString, int> >& fileList, void ImageLoadThread::quit() { - QMutexLocker locker(&m_condLock); + TQMutexLocker locker(&m_condLock); m_quitRequested = true; m_imageRequest.wakeOne(); @@ -70,7 +70,7 @@ void ImageLoadThread::quit() { void ImageLoadThread::requestNewImage() { - QMutexLocker locker(&m_condLock); + TQMutexLocker locker(&m_condLock); if ( !m_needImage) { m_needImage = true; @@ -80,7 +80,7 @@ void ImageLoadThread::requestNewImage() { void ImageLoadThread::run() { - QMutexLocker locker(&m_condLock); + TQMutexLocker locker(&m_condLock); // we enter the loop with m_needImage==true, so we will immediatly // try to load an image @@ -106,7 +106,7 @@ void ImageLoadThread::run() { do { ok = loadImage(); if ( !ok) - invalidateCurrentImageName(); + tqinvalidateCurrentImageName(); } while ( !ok && m_fileIndex < (int)m_fileList.count()); if ( m_fileIndex == (int)m_fileList.count() ) @@ -119,8 +119,8 @@ void ImageLoadThread::run() { if ( !ok) { // generate a black dummy image - m_texture = QImage(128, 128, 32); - m_texture.fill(Qt::black.rgb()); + m_texture = TQImage(128, 128, 32); + m_texture.fill(TQt::black.rgb()); } m_condLock.lock(); @@ -141,13 +141,13 @@ void ImageLoadThread::run() { bool ImageLoadThread::loadImage() { - QPair<QString, int> fileAngle = m_fileList[m_fileIndex]; - QString path(fileAngle.first); + TQPair<TQString, int> fileAngle = m_fileList[m_fileIndex]; + TQString path(fileAngle.first); int angle(fileAngle.second); - QImage image(path); + TQImage image(path); if (angle != 0) { - QWMatrix wm; + TQWMatrix wm; wm.rotate(angle); image = image.xForm(wm); } @@ -158,21 +158,21 @@ bool ImageLoadThread::loadImage() { float aspect = (float)image.width() / (float)image.height(); - image = image.smoothScale(m_width, m_height, QImage::ScaleMin); + image = image.smoothScale(m_width, m_height, TQ_ScaleMin); m_imageLock.lock(); // this is the critical moment, when we make the new texture and // aspect available to the consumer m_textureAspect = aspect; - m_texture = QGLWidget::convertToGLFormat(image); + m_texture = TQGLWidget::convertToGLFormat(image); m_imageLock.unlock(); return true; } -void ImageLoadThread::invalidateCurrentImageName() { +void ImageLoadThread::tqinvalidateCurrentImageName() { m_fileList.remove(m_fileList[m_fileIndex]); m_fileIndex++; } diff --git a/kipi-plugins/slideshow/imageloadthread.h b/kipi-plugins/slideshow/imageloadthread.h index 41c5386..b1bfe1d 100644 --- a/kipi-plugins/slideshow/imageloadthread.h +++ b/kipi-plugins/slideshow/imageloadthread.h @@ -28,33 +28,34 @@ // QT includes. -#include <qimage.h> -#include <qthread.h> -#include <qwaitcondition.h> -#include <qmutex.h> -#include <qvaluelist.h> -#include <qpair.h> -#include <qstring.h> -#include <qobject.h> +#include <tqimage.h> +#include <tqthread.h> +#include <tqwaitcondition.h> +#include <tqmutex.h> +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqstring.h> +#include <tqobject.h> namespace KIPISlideShowPlugin { -class ImageLoadThread : public QObject, public QThread +class ImageLoadThread : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: - ImageLoadThread(QValueList<QPair<QString, int> >& fileList, int width, int height); + ImageLoadThread(TQValueList<TQPair<TQString, int> >& fileList, int width, int height); void quit(); void requestNewImage(); bool grabImage() { m_imageLock.lock(); return m_haveImages; }; void ungrabImage() { m_imageLock.unlock(); }; bool ready() { return m_initialized; }; - const QImage &image() { return m_texture; }; + const TQImage &image() { return m_texture; }; float imageAspect() { return m_textureAspect; }; signals: @@ -66,21 +67,21 @@ protected: void run(); bool loadImage(); - void invalidateCurrentImageName(); + void tqinvalidateCurrentImageName(); private: int m_fileIndex; - QValueList<QPair<QString, int> > m_fileList; + TQValueList<TQPair<TQString, int> > m_fileList; int m_width, m_height; - QWaitCondition m_imageRequest; - QMutex m_condLock, m_imageLock; + TQWaitCondition m_imageRequest; + TQMutex m_condLock, m_imageLock; bool m_initialized, m_needImage, m_haveImages, m_quitRequested, m_scanSubdirectories; float m_textureAspect; - QImage m_texture; + TQImage m_texture; }; } // NameSpace KIPISlideShowPlugin diff --git a/kipi-plugins/slideshow/kbeffect.cpp b/kipi-plugins/slideshow/kbeffect.cpp index 891a6fe..76dbc5d 100644 --- a/kipi-plugins/slideshow/kbeffect.cpp +++ b/kipi-plugins/slideshow/kbeffect.cpp @@ -27,9 +27,9 @@ #include <assert.h> -// Qt includes. +// TQt includes. -#include <qdatetime.h> +#include <tqdatetime.h> // KDE includes. @@ -48,9 +48,9 @@ int KBEffect::m_numKBEffectRepeated = 0; // ------------------------------------------------------------------------- -KBEffect::KBEffect(SlideShowKB *parent, bool needFadeIn) { +KBEffect::KBEffect(SlideShowKB *tqparent, bool needFadeIn) { - this->slideWidget = parent; + this->slideWidget = tqparent; this->m_needFadeIn = needFadeIn; } @@ -99,8 +99,8 @@ KBEffect::Type KBEffect::chooseKBEffect(KBEffect::Type oldType) { // ------------------------------------------------------------------------- -FadeKBEffect::FadeKBEffect(SlideShowKB *parent, bool needFadeIn): - KBEffect(parent, needFadeIn) +FadeKBEffect::FadeKBEffect(SlideShowKB *tqparent, bool needFadeIn): + KBEffect(tqparent, needFadeIn) { m_img[0] = image(0); } @@ -138,8 +138,8 @@ void FadeKBEffect::advanceTime(float step) { // ------------------------------------------------------------------------- -BlendKBEffect::BlendKBEffect(SlideShowKB *parent, bool needFadeIn): - KBEffect(parent, needFadeIn) +BlendKBEffect::BlendKBEffect(SlideShowKB *tqparent, bool needFadeIn): + KBEffect(tqparent, needFadeIn) { m_img[0] = image(0); m_img[1] = 0; diff --git a/kipi-plugins/slideshow/kbeffect.h b/kipi-plugins/slideshow/kbeffect.h index 029efb5..6490c1c 100644 --- a/kipi-plugins/slideshow/kbeffect.h +++ b/kipi-plugins/slideshow/kbeffect.h @@ -39,7 +39,7 @@ public: typedef enum { Fade, Blend } Type; - KBEffect(SlideShowKB *parent, bool m_needFadeIn = true); + KBEffect(SlideShowKB *tqparent, bool m_needFadeIn = true); virtual ~KBEffect(); virtual void advanceTime(float step) = 0; @@ -73,7 +73,7 @@ class FadeKBEffect: public KBEffect public: - FadeKBEffect(SlideShowKB *parent, bool m_needFadeIn = true); + FadeKBEffect(SlideShowKB *tqparent, bool m_needFadeIn = true); virtual ~FadeKBEffect(); virtual void advanceTime(float step); @@ -88,7 +88,7 @@ class BlendKBEffect: public KBEffect public: - BlendKBEffect(SlideShowKB *parent, bool m_needFadeIn = true); + BlendKBEffect(SlideShowKB *tqparent, bool m_needFadeIn = true); virtual ~BlendKBEffect(); virtual void advanceTime(float step); diff --git a/kipi-plugins/slideshow/listimageitems.cpp b/kipi-plugins/slideshow/listimageitems.cpp index 7202b8f..6599385 100644 --- a/kipi-plugins/slideshow/listimageitems.cpp +++ b/kipi-plugins/slideshow/listimageitems.cpp @@ -22,13 +22,13 @@ // QT includes -#include <qstring.h> -#include <qwidget.h> -#include <qevent.h> -#include <qstrlist.h> -#include <qdragobject.h> -#include <qfileinfo.h> -#include <qlistbox.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqevent.h> +#include <tqstrlist.h> +#include <tqdragobject.h> +#include <tqfileinfo.h> +#include <tqlistbox.h> // KDE includes @@ -43,33 +43,33 @@ namespace KIPISlideShowPlugin { -ListImageItems::ListImageItems(QWidget *parent, const char *name) - : KListBox(parent, name) +ListImageItems::ListImageItems(TQWidget *tqparent, const char *name) + : KListBox(tqparent, name) { - setSelectionMode (QListBox::Extended); + setSelectionMode (TQListBox::Extended); setAcceptDrops(true); } -void ListImageItems::dragEnterEvent(QDragEnterEvent *e) +void ListImageItems::dragEnterEvent(TQDragEnterEvent *e) { - e->accept(QUriDrag::canDecode(e)); + e->accept(TQUriDrag::canDecode(e)); } -void ListImageItems::dropEvent(QDropEvent *e) +void ListImageItems::dropEvent(TQDropEvent *e) { - QStrList strList; + TQStrList strList; KURL::List filesUrl; - if ( !QUriDrag::decode(e, strList) ) return; + if ( !TQUriDrag::decode(e, strList) ) return; - QStrList stringList; - QStrListIterator it(strList); + TQStrList stringList; + TQStrListIterator it(strList); char *str; while ( (str = it.current()) != 0 ) { - QString filePath = QUriDrag::uriToLocalFile(str); - QFileInfo fileInfo(filePath); + TQString filePath = TQUriDrag::uriToLocalFile(str); + TQFileInfo fileInfo(filePath); if (fileInfo.isFile() && fileInfo.exists()) { diff --git a/kipi-plugins/slideshow/listimageitems.h b/kipi-plugins/slideshow/listimageitems.h index 16e575d..2cf738e 100644 --- a/kipi-plugins/slideshow/listimageitems.h +++ b/kipi-plugins/slideshow/listimageitems.h @@ -25,9 +25,9 @@ // QT includes -#include <qevent.h> -#include <qwidget.h> -#include <qstring.h> +#include <tqevent.h> +#include <tqwidget.h> +#include <tqstring.h> // KDE includes @@ -37,37 +37,38 @@ namespace KIPISlideShowPlugin { -class ImageItem : public QListBoxText +class ImageItem : public TQListBoxText { public: - ImageItem(QListBox * parent, QString const & name, QString const & comments, QString const & path, - QString const & album) - : QListBoxText(parent), _name(name), _comments(comments), _path(path), _album(album) + ImageItem(TQListBox * tqparent, TQString const & name, TQString const & comments, TQString const & path, + TQString const & album) + : TQListBoxText(tqparent), _name(name), _comments(comments), _path(path), _album(album) {} - QString comments() { return _comments; } - QString name() { return _name; } - QString path() { return _path; } - QString album() { return _album; } - void setName(const QString &newName) { setText(newName); } + TQString comments() { return _comments; } + TQString name() { return _name; } + TQString path() { return _path; } + TQString album() { return _album; } + void setName(const TQString &newName) { setText(newName); } private: - QString _name; - QString _comments; - QString _path; - QString _album; + TQString _name; + TQString _comments; + TQString _path; + TQString _album; }; class ListImageItems : public KListBox { Q_OBJECT + TQ_OBJECT public: - ListImageItems(QWidget *parent=0, const char *name=0); + ListImageItems(TQWidget *tqparent=0, const char *name=0); signals: @@ -75,8 +76,8 @@ class ListImageItems : public KListBox protected: - void dragEnterEvent(QDragEnterEvent *e); - void dropEvent(QDropEvent *e); + void dragEnterEvent(TQDragEnterEvent *e); + void dropEvent(TQDropEvent *e); }; } // NameSpace KIPISlideShowPlugin diff --git a/kipi-plugins/slideshow/plugin_slideshow.cpp b/kipi-plugins/slideshow/plugin_slideshow.cpp index 3043893..17eae4e 100644 --- a/kipi-plugins/slideshow/plugin_slideshow.cpp +++ b/kipi-plugins/slideshow/plugin_slideshow.cpp @@ -33,11 +33,11 @@ extern "C" #include <ctime> #include <cstdlib> -// Qt includes. +// TQt includes. -#include <qvaluelist.h> -#include <qpair.h> -#include <qstringlist.h> +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqstringlist.h> // KDE includes. @@ -68,15 +68,15 @@ typedef KGenericFactory<Plugin_SlideShow> Factory; K_EXPORT_COMPONENT_FACTORY(kipiplugin_slideshow, Factory("kipiplugin_slideshow")); -Plugin_SlideShow::Plugin_SlideShow(QObject *parent, const char*, - const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "SlideShow") +Plugin_SlideShow::Plugin_SlideShow(TQObject *tqparent, const char*, + const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "SlideShow") { kdDebug( 51001 ) << "Plugin_SlideShow plugin loaded" << endl; } -void Plugin_SlideShow::setup( QWidget* widget ) +void Plugin_SlideShow::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -84,11 +84,11 @@ void Plugin_SlideShow::setup( QWidget* widget ) "slideshow", 0, this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "slideshow"); - m_interface = dynamic_cast< KIPI::Interface* >( parent() ); + m_interface = dynamic_cast< KIPI::Interface* >( tqparent() ); m_urlList = new KURL::List(); @@ -100,8 +100,8 @@ void Plugin_SlideShow::setup( QWidget* widget ) m_actionSlideShow->setEnabled( false ); - connect( m_interface, SIGNAL( currentAlbumChanged( bool ) ), - SLOT( slotAlbumChanged( bool ) ) ); + connect( m_interface, TQT_SIGNAL( currentAlbumChanged( bool ) ), + TQT_SLOT( slotAlbumChanged( bool ) ) ); addAction( m_actionSlideShow ); } @@ -135,8 +135,8 @@ void Plugin_SlideShow::slotActivate() i18n("Slide Show").ascii(), m_imagesHasComments, m_urlList); - connect(slideShowConfig, SIGNAL(buttonStartClicked()), - this, SLOT(slotSlideShow())); + connect(slideShowConfig, TQT_SIGNAL(buttonStartClicked()), + this, TQT_SLOT(slotSlideShow())); slideShowConfig->show(); } @@ -149,7 +149,7 @@ void Plugin_SlideShow::slotAlbumChanged(bool anyAlbum) return; } - KIPI::Interface* m_interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* m_interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !m_interface ) { kdError( 51000 ) << "Kipi m_interface is null!" << endl; @@ -185,7 +185,7 @@ void Plugin_SlideShow::slotSlideShow() config.setGroup("SlideShow Settings"); opengl = config.readBoolEntry("OpenGL"); shuffle = config.readBoolEntry("Shuffle"); - wantKB = config.readEntry("Effect Name (OpenGL)") == QString("Ken Burns"); + wantKB = config.readEntry("Effect Name (OpenGL)") == TQString("Ken Burns"); if ( m_urlList->isEmpty() ) { @@ -193,10 +193,10 @@ void Plugin_SlideShow::slotSlideShow() return; } - typedef QPair<QString, int> FileAnglePair; - typedef QValueList<FileAnglePair > FileList; + typedef TQPair<TQString, int> FileAnglePair; + typedef TQValueList<FileAnglePair > FileList; FileList fileList; - QStringList commentsList; + TQStringList commentsList; for( KURL::List::Iterator urlIt = m_urlList->begin(); urlIt != m_urlList->end(); ++urlIt ) { @@ -216,8 +216,8 @@ void Plugin_SlideShow::slotSlideShow() FileList::iterator it = fileList.begin(); FileList::iterator it1; - QStringList::iterator itcom = commentsList.begin(); - QStringList::iterator itcom1; + TQStringList::iterator itcom = commentsList.begin(); + TQStringList::iterator itcom1; for (uint i=0; i<fileList.size(); i++) { @@ -229,8 +229,8 @@ void Plugin_SlideShow::slotSlideShow() itcom1 = commentsList.begin(); itcom1 += inc; - qSwap(*(it++), *(it1)); - qSwap(*(itcom++), *(itcom1)); + tqSwap(*(it++), *(it1)); + tqSwap(*(itcom++), *(itcom1)); } } @@ -239,7 +239,7 @@ void Plugin_SlideShow::slotSlideShow() slideShow->show(); } else { - if (!QGLFormat::hasOpenGL()) + if (!TQGLFormat::hasOpenGL()) KMessageBox::error(kapp->activeWindow(), i18n("Sorry. OpenGL support not available on your system")); else { diff --git a/kipi-plugins/slideshow/plugin_slideshow.h b/kipi-plugins/slideshow/plugin_slideshow.h index 4195556..eb66060 100644 --- a/kipi-plugins/slideshow/plugin_slideshow.h +++ b/kipi-plugins/slideshow/plugin_slideshow.h @@ -38,15 +38,16 @@ class KAction; class Plugin_SlideShow : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_SlideShow(QObject *parent, const char* name, - const QStringList &args); + Plugin_SlideShow(TQObject *tqparent, const char* name, + const TQStringList &args); ~Plugin_SlideShow(); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* ); + virtual void setup( TQWidget* ); public slots: diff --git a/kipi-plugins/slideshow/screenproperties.cpp b/kipi-plugins/slideshow/screenproperties.cpp index 55f1e91..c46d4df 100644 --- a/kipi-plugins/slideshow/screenproperties.cpp +++ b/kipi-plugins/slideshow/screenproperties.cpp @@ -23,9 +23,9 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qapplication.h> +#include <tqapplication.h> // X11 includes. @@ -39,9 +39,9 @@ namespace KIPISlideShowPlugin { - ScreenProperties::ScreenProperties(QWidget *mainWidget) { + ScreenProperties::ScreenProperties(TQWidget *mainWidget) { - activeScreen = QApplication::desktop()->screenNumber(mainWidget); + activeScreen = TQApplication::desktop()->screenNumber(mainWidget); } unsigned ScreenProperties::suggestFrameRate() { @@ -80,7 +80,7 @@ namespace KIPISlideShowPlugin int smallestError = 1000, i = 0; do { int r = candidateRate[i]; - int error = QMIN(screenRate % r, (screenRate + r) % r); + int error = TQMIN(screenRate % r, (screenRate + r) % r); if (error < smallestError) { smallestError = error; diff --git a/kipi-plugins/slideshow/screenproperties.h b/kipi-plugins/slideshow/screenproperties.h index 3a94237..f3e21a7 100644 --- a/kipi-plugins/slideshow/screenproperties.h +++ b/kipi-plugins/slideshow/screenproperties.h @@ -33,7 +33,7 @@ namespace KIPISlideShowPlugin public: - ScreenProperties(QWidget *mainWidget); + ScreenProperties(TQWidget *mainWidget); virtual ~ScreenProperties() { }; virtual unsigned suggestFrameRate(); diff --git a/kipi-plugins/slideshow/slideshow.cpp b/kipi-plugins/slideshow/slideshow.cpp index 8cc87c2..b28a52a 100644 --- a/kipi-plugins/slideshow/slideshow.cpp +++ b/kipi-plugins/slideshow/slideshow.cpp @@ -28,19 +28,19 @@ #include <cmath> #include <ctime> -// Qt includes. - -#include <qtimer.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qimage.h> -#include <qapplication.h> -#include <qdesktopwidget.h> -#include <qevent.h> -#include <qcursor.h> -#include <qfont.h> -#include <qwmatrix.h> -#include <qtextcodec.h> +// TQt includes. + +#include <tqtimer.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqimage.h> +#include <tqapplication.h> +#include <tqdesktopwidget.h> +#include <tqevent.h> +#include <tqcursor.h> +#include <tqfont.h> +#include <tqwmatrix.h> +#include <tqtextcodec.h> // KDE includes. @@ -59,17 +59,17 @@ namespace KIPISlideShowPlugin { -SlideShow::SlideShow(const FileList& fileList, const QStringList& commentsList, bool ImagesHasComments) - : QWidget(0, 0, WStyle_StaysOnTop | WType_Popup | WX11BypassWM | WDestructiveClose) +SlideShow::SlideShow(const FileList& fileList, const TQStringList& commentsList, bool ImagesHasComments) + : TQWidget(0, 0, WStyle_StaysOnTop | WType_Popup | WX11BypassWM | WDestructiveClose) { #if KDE_IS_VERSION(3,2,0) - QRect deskRect = KGlobalSettings::desktopGeometry(this); + TQRect deskRect = KGlobalSettings::desktopGeometry(this); m_deskX = deskRect.x(); m_deskY = deskRect.y(); m_deskWidth = deskRect.width(); m_deskHeight = deskRect.height(); #else - QRect deskRect = QApplication::desktop()->screenGeometry(this); + TQRect deskRect = TQApplication::desktop()->screenGeometry(this); m_deskX = deskRect.x(); m_deskY = deskRect.y(); m_deskWidth = deskRect.width(); @@ -86,20 +86,20 @@ SlideShow::SlideShow(const FileList& fileList, const QStringList& commentsList, { m_toolBar->setEnabledPrev(false); } - connect(m_toolBar, SIGNAL(signalPause()), - this, SLOT(slotPause())); + connect(m_toolBar, TQT_SIGNAL(signalPause()), + this, TQT_SLOT(slotPause())); - connect(m_toolBar, SIGNAL(signalPlay()), - this, SLOT(slotPlay())); + connect(m_toolBar, TQT_SIGNAL(signalPlay()), + this, TQT_SLOT(slotPlay())); - connect(m_toolBar, SIGNAL(signalNext()), - this, SLOT(slotNext())); + connect(m_toolBar, TQT_SIGNAL(signalNext()), + this, TQT_SLOT(slotNext())); - connect(m_toolBar, SIGNAL(signalPrev()), - this, SLOT(slotPrev())); + connect(m_toolBar, TQT_SIGNAL(signalPrev()), + this, TQT_SLOT(slotPrev())); - connect(m_toolBar, SIGNAL(signalClose()), - this, SLOT(slotClose())); + connect(m_toolBar, TQT_SIGNAL(signalClose()), + this, TQT_SLOT(slotClose())); // --------------------------------------------------------------- @@ -110,9 +110,9 @@ SlideShow::SlideShow(const FileList& fileList, const QStringList& commentsList, m_intArray = 0; m_endOfShow = false; - m_timer = new QTimer(); - connect(m_timer, SIGNAL(timeout()), - this, SLOT(slotTimeOut())); + m_timer = new TQTimer(); + connect(m_timer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotTimeOut())); // -------------------------------------------------- @@ -146,9 +146,9 @@ SlideShow::SlideShow(const FileList& fileList, const QStringList& commentsList, // -- hide cursor when not moved -------------------- - m_mouseMoveTimer = new QTimer; - connect(m_mouseMoveTimer, SIGNAL(timeout()), - SLOT(slotMouseMoveTimeOut())); + m_mouseMoveTimer = new TQTimer; + connect(m_mouseMoveTimer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotMouseMoveTimeOut())); setMouseTracking(true); slotMouseMoveTimeOut(); @@ -192,7 +192,7 @@ void SlideShow::readSettings() // Comments tab settings - m_commentsFont = new QFont(); + m_commentsFont = new TQFont(); m_commentsFont->setFamily(m_config->readEntry("Comments Font Family")); m_commentsFont->setPointSize(m_config->readNumEntry("Comments Font Size", 10 )); m_commentsFont->setBold(m_config->readBoolEntry("Comments Font Bold", false)); @@ -232,9 +232,9 @@ void SlideShow::registerEffects() Effects.insert("Blobs", &SlideShow::effectBlobs); } -QStringList SlideShow::effectNames() +TQStringList SlideShow::effectNames() { - QStringList effects; + TQStringList effects; effects.append("None"); effects.append("Chess Board"); @@ -254,9 +254,9 @@ QStringList SlideShow::effectNames() return effects; } -QMap<QString,QString> SlideShow::effectNamesI18N() +TQMap<TQString,TQString> SlideShow::effectNamesI18N() { - QMap<QString,QString> effects; + TQMap<TQString,TQString> effects; effects["None"] = i18n("None"); effects["Chess Board"] = i18n("Chess Board"); @@ -343,19 +343,19 @@ void SlideShow::loadNextImage() m_toolBar->setEnabledNext(m_fileIndex < num-1); } - QPixmap* oldPixmap = m_currImage; - QPixmap* newPixmap = new QPixmap(m_imageLoader->getCurrent()); + TQPixmap* oldPixmap = m_currImage; + TQPixmap* newPixmap = new TQPixmap(m_imageLoader->getCurrent()); - QPixmap pixmap(width(),height()); - pixmap.fill(Qt::black); + TQPixmap pixmap(width(),height()); + pixmap.fill(TQt::black); - QPainter p(&pixmap); + TQPainter p(&pixmap); p.drawPixmap((width()-newPixmap->width())/2, (height()-newPixmap->height())/2, *newPixmap, 0, 0, newPixmap->width(), newPixmap->height()); delete newPixmap; - m_currImage = new QPixmap(pixmap); + m_currImage = new TQPixmap(pixmap); delete oldPixmap; if (m_printName) @@ -396,19 +396,19 @@ void SlideShow::loadPrevImage() m_toolBar->setEnabledNext(m_fileIndex < num-1); } - QPixmap* oldPixmap = m_currImage; - QPixmap* newPixmap = new QPixmap(m_imageLoader->getCurrent()); + TQPixmap* oldPixmap = m_currImage; + TQPixmap* newPixmap = new TQPixmap(m_imageLoader->getCurrent()); - QPixmap pixmap(width(),height()); - pixmap.fill(Qt::black); + TQPixmap pixmap(width(),height()); + pixmap.fill(TQt::black); - QPainter p(&pixmap); + TQPainter p(&pixmap); p.drawPixmap((width()-newPixmap->width())/2, (height()-newPixmap->height())/2, *newPixmap, 0, 0, newPixmap->width(), newPixmap->height()); delete newPixmap; - m_currImage = new QPixmap(pixmap); + m_currImage = new TQPixmap(pixmap); delete oldPixmap; if (m_printName) @@ -428,22 +428,22 @@ void SlideShow::showCurrentImage() bitBlt(this, 0, 0, m_currImage, 0, 0, m_currImage->width(), - m_currImage->height(), Qt::CopyROP, true); + m_currImage->height(), TQt::CopyROP, true); } void SlideShow::printFilename() { if (!m_currImage) return; - QPainter p; + TQPainter p; p.begin(m_currImage); - p.setPen(QColor("black")); + p.setPen(TQColor("black")); for (int x=9; x<=11; x++) for (int y=31; y>=29; y--) p.drawText(x, height()-y, m_imageLoader->currFileName()); - p.setPen(QColor("white")); + p.setPen(TQColor("white")); p.drawText(10, height()-30, m_imageLoader->currFileName()); } @@ -451,27 +451,27 @@ void SlideShow::printComments() { if (!m_currImage) return; - QString comments = m_commentsList[m_fileIndex]; + TQString comments = m_commentsList[m_fileIndex]; int yPos = 30; // Text Y coordinate if (m_printName) yPos = 50; - QStringList commentsByLines; + TQStringList commentsByLines; - uint commentsIndex = 0; // Comments QString index + uint commentsIndex = 0; // Comments TQString index while (commentsIndex < comments.length()) { - QString newLine; + TQString newLine; bool breakLine = FALSE; // End Of Line found - uint currIndex; // Comments QString current index + uint currIndex; // Comments TQString current index // Check minimal lines dimension uint commentsLinesLengthLocal = m_commentsLinesLength; for ( currIndex = commentsIndex; currIndex < comments.length() && !breakLine; currIndex++ ) - if( comments[currIndex] == QChar('\n') || comments[currIndex].isSpace() ) breakLine = TRUE; + if( comments[currIndex] == TQChar('\n') || comments[currIndex].isSpace() ) breakLine = TRUE; if (commentsLinesLengthLocal <= (currIndex - commentsIndex)) commentsLinesLengthLocal = (currIndex - commentsIndex); @@ -482,7 +482,7 @@ void SlideShow::printComments() currIndex < comments.length() && !breakLine; currIndex++ ) { - breakLine = (comments[currIndex] == QChar('\n')) ? TRUE : FALSE; + breakLine = (comments[currIndex] == TQChar('\n')) ? TRUE : FALSE; if (breakLine) newLine.append( ' ' ); @@ -502,13 +502,13 @@ void SlideShow::printComments() commentsByLines.prepend(newLine.stripWhiteSpace()); } - QPainter p; + TQPainter p; p.begin(m_currImage); p.setFont(*m_commentsFont); for ( int lineNumber = 0; lineNumber < (int)commentsByLines.count(); lineNumber++ ) { - p.setPen(QColor(m_commentsBgColor)); + p.setPen(TQColor(m_commentsBgColor)); // coefficient 1.5 is used to maintain distance between different lines @@ -517,7 +517,7 @@ void SlideShow::printComments() y >= (int)(yPos + lineNumber* 1.5 * m_commentsFont->pointSize() - 1); y--) p.drawText(x, height()-y, commentsByLines[lineNumber]); - p.setPen(QColor(m_commentsFontColor)); + p.setPen(TQColor(m_commentsFontColor)); p.drawText(10, height()-(int)(lineNumber * 1.5 * m_commentsFont->pointSize() + yPos), commentsByLines[lineNumber]); } @@ -527,47 +527,47 @@ void SlideShow::printProgress() { if (!m_currImage) return; - QPainter p; + TQPainter p; p.begin(m_currImage); - QString progress(QString::number(m_fileIndex+1) + "/" + QString::number(m_fileList.count())); + TQString progress(TQString::number(m_fileIndex+1) + "/" + TQString::number(m_fileList.count())); int stringLenght = p.fontMetrics().width(progress) * progress.length(); - p.setPen(QColor("black")); + p.setPen(TQColor("black")); for (int x=9; x<=11; x++) for (int y=21; y>=19; y--) p.drawText(x, height()-y, progress); - p.setPen(QColor("white")); + p.setPen(TQColor("white")); p.drawText(width() - stringLenght - 10, 20, progress); } EffectMethod SlideShow::getRandomEffect() { - QStringList effs = Effects.keys(); + TQStringList effs = Effects.keys(); effs.remove("None"); int count = effs.count(); int i = rand() % count; - QString key = effs[i]; + TQString key = effs[i]; return Effects[key]; } void SlideShow::showEndOfShow() { - QPainter p; + TQPainter p; p.begin(this); - p.fillRect(0, 0, width(), height(), Qt::black); + p.fillRect(0, 0, width(), height(), TQt::black); - QFont fn(font()); + TQFont fn(font()); fn.setPointSize(fn.pointSize()+10); fn.setBold(true); p.setFont(fn); - p.setPen(Qt::white); + p.setPen(TQt::white); p.drawText(100, 100, i18n("SlideShow Completed.")); p.drawText(100, 150, i18n("Click To Exit...")); p.end(); @@ -578,7 +578,7 @@ void SlideShow::showEndOfShow() m_toolBar->setEnabledPrev(false); } -void SlideShow::keyPressEvent(QKeyEvent *event) +void SlideShow::keyPressEvent(TQKeyEvent *event) { if (!event) return; @@ -586,7 +586,7 @@ void SlideShow::keyPressEvent(QKeyEvent *event) m_toolBar->keyPressEvent(event); } -void SlideShow::mousePressEvent(QMouseEvent *e) +void SlideShow::mousePressEvent(TQMouseEvent *e) { if (m_endOfShow) slotClose(); @@ -605,15 +605,15 @@ void SlideShow::mousePressEvent(QMouseEvent *e) } } -void SlideShow::mouseMoveEvent(QMouseEvent *e) +void SlideShow::mouseMoveEvent(TQMouseEvent *e) { - setCursor(QCursor(Qt::ArrowCursor)); + setCursor(TQCursor(TQt::ArrowCursor)); m_mouseMoveTimer->start(1000, true); if (!m_toolBar->canHide()) return; - QPoint pos(e->pos()); + TQPoint pos(e->pos()); if ((pos.y() > (m_deskY+20)) && (pos.y() < (m_deskY+m_deskHeight-20-1))) @@ -649,7 +649,7 @@ void SlideShow::mouseMoveEvent(QMouseEvent *e) m_toolBar->show(); } -void SlideShow::wheelEvent(QWheelEvent *e) +void SlideShow::wheelEvent(TQWheelEvent *e) { if (!m_enableMouseWheel) return; @@ -674,12 +674,12 @@ void SlideShow::wheelEvent(QWheelEvent *e) void SlideShow::slotMouseMoveTimeOut() { - QPoint pos(QCursor::pos()); + TQPoint pos(TQCursor::pos()); if ((pos.y() < (m_deskY+20)) || (pos.y() > (m_deskY+m_deskHeight-20-1))) return; - setCursor(QCursor(Qt::BlankCursor)); + setCursor(TQCursor(TQt::BlankCursor)); } int SlideShow::effectNone(bool /* aInit */) @@ -969,7 +969,7 @@ int SlideShow::effectMultiCircleOut(bool aInit) { int x, y, i; double alpha; - static QPointArray pa(4); + static TQPointArray pa(4); if (aInit) { @@ -1083,7 +1083,7 @@ int SlideShow::effectSpiralIn(bool aInit) int SlideShow::effectCircleOut(bool aInit) { int x, y; - static QPointArray pa(4); + static TQPointArray pa(4); if (aInit) { @@ -1151,9 +1151,9 @@ int SlideShow::effectBlobs(bool aInit) return 10; } -void SlideShow::startPainter(Qt::PenStyle aPen) +void SlideShow::startPainter(TQt::PenStyle aPen) { - QBrush brush; + TQBrush brush; brush.setPixmap(*(m_currImage)); if (m_painter.isActive()) diff --git a/kipi-plugins/slideshow/slideshow.h b/kipi-plugins/slideshow/slideshow.h index 4214ce9..7002e09 100644 --- a/kipi-plugins/slideshow/slideshow.h +++ b/kipi-plugins/slideshow/slideshow.h @@ -26,16 +26,16 @@ // QT includes. -#include <qvaluelist.h> -#include <qstringlist.h> -#include <qpair.h> -#include <qstring.h> -#include <qwidget.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qmap.h> -#include <qfont.h> -#include <qstring.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> +#include <tqpair.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqmap.h> +#include <tqfont.h> +#include <tqstring.h> // KDE includes. @@ -51,10 +51,10 @@ #include "slideshowloader.h" -class QTimer; +class TQTimer; -typedef QPair<QString, int> FileAnglePair; -typedef QValueList<FileAnglePair > FileList; +typedef TQPair<TQString, int> FileAnglePair; +typedef TQValueList<FileAnglePair > FileList; namespace KIPISlideShowPlugin { @@ -65,27 +65,28 @@ class SlideShow; typedef int (SlideShow::*EffectMethod)(bool); -class SlideShow : public QWidget +class SlideShow : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SlideShow(const FileList& fileList, const QStringList& commentsList, bool ImagesHasComments); + SlideShow(const FileList& fileList, const TQStringList& commentsList, bool ImagesHasComments); ~SlideShow(); void registerEffects(); - static QStringList effectNames(); - static QMap<QString,QString> effectNamesI18N(); + static TQStringList effectNames(); + static TQMap<TQString,TQString> effectNamesI18N(); protected: - void mousePressEvent(QMouseEvent *event); - void mouseMoveEvent(QMouseEvent *); - void wheelEvent(QWheelEvent *); - void keyPressEvent(QKeyEvent *event); + void mousePressEvent(TQMouseEvent *event); + void mouseMoveEvent(TQMouseEvent *); + void wheelEvent(TQWheelEvent *); + void keyPressEvent(TQKeyEvent *event); int effectNone(bool); int effectChessboard(bool doInit); @@ -101,7 +102,7 @@ protected: int effectCircleOut(bool doInit); int effectBlobs(bool doInit); - void startPainter(Qt::PenStyle penStyle=NoPen); + void startPainter(TQt::PenStyle penStyle=NoPen); private slots: @@ -137,12 +138,12 @@ private: bool m_printName; bool m_printComments; bool m_printProgress; - QString m_effectName; + TQString m_effectName; bool m_loop; bool m_ImagesHasComments; - QFont* m_commentsFont; + TQFont* m_commentsFont; uint m_commentsFontColor; uint m_commentsBgColor; int m_commentsLinesLength; @@ -152,14 +153,14 @@ private: uint m_cacheSize; // ------------------------- - QMap<QString, EffectMethod> Effects; + TQMap<TQString, EffectMethod> Effects; SlideShowLoader* m_imageLoader; - QPixmap* m_currImage; + TQPixmap* m_currImage; FileList m_fileList; - QStringList m_commentsList; - QTimer* m_timer; + TQStringList m_commentsList; + TQTimer* m_timer; int m_fileIndex; EffectMethod m_effect; @@ -172,10 +173,10 @@ private: int m_x0, m_y0, m_x1, m_y1, m_wait; double m_fx, m_fy, m_alpha, m_fd; int* m_intArray; - QPainter m_painter; + TQPainter m_painter; ToolBar* m_toolBar; - QTimer* m_mouseMoveTimer; + TQTimer* m_mouseMoveTimer; bool m_endOfShow; int m_deskX; diff --git a/kipi-plugins/slideshow/slideshowconfig.cpp b/kipi-plugins/slideshow/slideshowconfig.cpp index 033fafa..c676baf 100644 --- a/kipi-plugins/slideshow/slideshowconfig.cpp +++ b/kipi-plugins/slideshow/slideshowconfig.cpp @@ -21,23 +21,23 @@ * * ============================================================ */ -// Qt includes. - -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qlayout.h> -#include <qmap.h> -#include <qframe.h> -#include <qpushbutton.h> -#include <qtabwidget.h> -#include <qcolor.h> -#include <qnamespace.h> -#include <qlistbox.h> -#include <qfileinfo.h> +// TQt includes. + +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqlayout.h> +#include <tqmap.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqtabwidget.h> +#include <tqcolor.h> +#include <tqnamespace.h> +#include <tqlistbox.h> +#include <tqfileinfo.h> // Kde includes. @@ -75,9 +75,9 @@ namespace KIPISlideShowPlugin { SlideShowConfig::SlideShowConfig(bool allowSelectedOnly, KIPI::Interface * interface, - QWidget *parent, const char* name, bool ImagesHasComments, + TQWidget *tqparent, const char* name, bool ImagesHasComments, KURL::List *urlList) - : SlideShowConfigBase(parent, name) + : SlideShowConfigBase(tqparent, name) { // About data and help button. @@ -94,7 +94,7 @@ SlideShowConfig::SlideShowConfig(bool allowSelectedOnly, KIPI::Interface * inter KHelpMenu* helpMenu = new KHelpMenu(this, about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); // Switch to selected files only (it depends on allowSelectedOnly) @@ -113,31 +113,31 @@ SlideShowConfig::SlideShowConfig(bool allowSelectedOnly, KIPI::Interface * inter // Signal to Slot connections - connect(m_openglCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotOpenGLToggled())); - connect(m_buttonStart, SIGNAL(clicked()), this, SLOT(slotStartClicked())); - connect(m_printCommentsCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotPrintCommentsToggled())); - connect(m_commentsFontColor, SIGNAL(changed(const QColor &)), this, SLOT(slotCommentsFontColorChanged())); - connect(m_commentsBgColor, SIGNAL(changed(const QColor &)), this, SLOT(slotCommentsBgColorChanged())); - connect(m_useMillisecondsCheckBox, SIGNAL(toggled(bool)), SLOT(slotUseMillisecondsToggled())); - connect(m_delaySpinBox, SIGNAL(valueChanged(int)), this, SLOT(slotDelayChanged())); - connect(m_effectsComboBox, SIGNAL(activated(int)), this, SLOT(slotEffectChanged())); - - connect(m_fileSrcButtonGroup, SIGNAL(clicked(int)), this, SLOT(slotSelection())); - - connect( m_ImagesFilesListBox, SIGNAL( currentChanged( QListBoxItem * ) ), - this, SLOT( slotImagesFilesSelected(QListBoxItem *) ) ); - connect(m_ImagesFilesListBox, SIGNAL( addedDropItems(KURL::List) ), - this, SLOT( slotAddDropItems(KURL::List))); - connect( m_ImagesFilesButtonAdd, SIGNAL( clicked() ), - this, SLOT( slotImagesFilesButtonAdd() ) ); - connect( m_ImagesFilesButtonDelete, SIGNAL( clicked() ), - this, SLOT( slotImagesFilesButtonDelete() ) ); - connect( m_ImagesFilesButtonUp, SIGNAL( clicked() ), - this, SLOT( slotImagesFilesButtonUp() ) ); - connect( m_ImagesFilesButtonDown, SIGNAL( clicked() ), - this, SLOT( slotImagesFilesButtonDown() ) ); - - connect(m_cacheCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotCacheToggled())); + connect(m_openglCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotOpenGLToggled())); + connect(m_buttonStart, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStartClicked())); + connect(m_printCommentsCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPrintCommentsToggled())); + connect(m_commentsFontColor, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotCommentsFontColorChanged())); + connect(m_commentsBgColor, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotCommentsBgColorChanged())); + connect(m_useMillisecondsCheckBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotUseMillisecondsToggled())); + connect(m_delaySpinBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDelayChanged())); + connect(m_effectsComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotEffectChanged())); + + connect(m_fileSrcButtonGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotSelection())); + + connect( m_ImagesFilesListBox, TQT_SIGNAL( currentChanged( TQListBoxItem * ) ), + this, TQT_SLOT( slotImagesFilesSelected(TQListBoxItem *) ) ); + connect(m_ImagesFilesListBox, TQT_SIGNAL( addedDropItems(KURL::List) ), + this, TQT_SLOT( slotAddDropItems(KURL::List))); + connect( m_ImagesFilesButtonAdd, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImagesFilesButtonAdd() ) ); + connect( m_ImagesFilesButtonDelete, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImagesFilesButtonDelete() ) ); + connect( m_ImagesFilesButtonUp, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImagesFilesButtonUp() ) ); + connect( m_ImagesFilesButtonDown, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImagesFilesButtonDown() ) ); + + connect(m_cacheCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotCacheToggled())); m_thumbJob = 0L; @@ -177,10 +177,10 @@ void SlideShowConfig::loadEffectNames() { m_effectsComboBox->clear(); - QMap<QString,QString> effectNames = SlideShow::effectNamesI18N(); - QStringList effects; + TQMap<TQString,TQString> effectNames = SlideShow::effectNamesI18N(); + TQStringList effects; - QMap<QString,QString>::Iterator it; + TQMap<TQString,TQString>::Iterator it; for (it = effectNames.begin(); it != effectNames.end(); ++it) effects.append(it.data()); @@ -198,9 +198,9 @@ void SlideShowConfig::loadEffectNamesGL() { m_effectsComboBox->clear(); - QStringList effects; - QMap<QString,QString> effectNames; - QMap<QString,QString>::Iterator it; + TQStringList effects; + TQMap<TQString,TQString> effectNames; + TQMap<TQString,TQString>::Iterator it; // Load slideshowgl effects effectNames = SlideShowGL::effectNamesI18N(); @@ -260,7 +260,7 @@ void SlideShowConfig::readSettings() uint commentsBgColor; int commentsLinesLength; - QFont *savedFont = new QFont(); + TQFont *savedFont = new TQFont(); savedFont->setFamily(m_config->readEntry("Comments Font Family")); savedFont->setPointSize(m_config->readNumEntry("Comments Font Size", 10 )); savedFont->setBold(m_config->readBoolEntry("Comments Font Bold", false)); @@ -310,8 +310,8 @@ void SlideShowConfig::readSettings() m_allFilesButton->setChecked(true); m_commentsLinesLengthSpinBox->setValue(commentsLinesLength); - m_commentsFontColor->setColor(QColor(commentsFontColor)); - m_commentsBgColor->setColor(QColor(commentsBgColor)); + m_commentsFontColor->setColor(TQColor(commentsFontColor)); + m_commentsBgColor->setColor(TQColor(commentsBgColor)); m_commentsFontChooser->setFont(*savedFont); delete savedFont; @@ -347,7 +347,7 @@ void SlideShowConfig::saveSettings() m_config->writeEntry("Enable Mouse Wheel", m_enableMouseWheelCheckBox->isChecked()); // Comments tab settings - QFont* commentsFont = new QFont(m_commentsFontChooser->font()); + TQFont* commentsFont = new TQFont(m_commentsFontChooser->font()); m_config->writeEntry("Comments Font Family", commentsFont->family()); m_config->writeEntry("Comments Font Size", commentsFont->pointSize()); m_config->writeEntry("Comments Font Bold", commentsFont->bold()); @@ -358,12 +358,12 @@ void SlideShowConfig::saveSettings() m_config->writeEntry("Comments Font FixedPitch", commentsFont->fixedPitch()); delete commentsFont; - QColor* fontColor = new QColor(m_commentsFontColor->color()); + TQColor* fontColor = new TQColor(m_commentsFontColor->color()); uint commentsFontColorRGB = fontColor->rgb(); delete fontColor; m_config->writeEntry("Comments Font Color", commentsFontColorRGB); - QColor* bgColor = new QColor(m_commentsBgColor->color()); + TQColor* bgColor = new TQColor(m_commentsBgColor->color()); uint commentsBgColorRGB = bgColor->rgb(); delete bgColor; m_config->writeEntry("Comments Bg Color", commentsBgColorRGB); @@ -372,9 +372,9 @@ void SlideShowConfig::saveSettings() if (!m_openglCheckBox->isChecked()) { - QString effect; - QMap<QString,QString> effectNames = SlideShow::effectNamesI18N(); - QMap<QString,QString>::Iterator it; + TQString effect; + TQMap<TQString,TQString> effectNames = SlideShow::effectNamesI18N(); + TQMap<TQString,TQString>::Iterator it; for (it = effectNames.begin(); it != effectNames.end(); ++it) { if (it.data() == m_effectsComboBox->currentText()) { @@ -388,9 +388,9 @@ void SlideShowConfig::saveSettings() } else { - QMap<QString,QString> effects; - QMap<QString,QString> effectNames; - QMap<QString,QString>::Iterator it; + TQMap<TQString,TQString> effects; + TQMap<TQString,TQString> effectNames; + TQMap<TQString,TQString>::Iterator it; // Load slideshowgl effects effectNames = SlideShowGL::effectNamesI18N(); @@ -403,7 +403,7 @@ void SlideShowConfig::saveSettings() for (it = effectNames.begin(); it != effectNames.end(); ++it) effects.insert(it.key(),it.data()); - QString effect; + TQString effect; for (it = effects.begin(); it != effects.end(); ++it) { if ( it.data() == m_effectsComboBox->currentText()) { @@ -434,12 +434,12 @@ void SlideShowConfig::addItems(const KURL::List& fileList) { KURL currentFile = *it; - QFileInfo fi(currentFile.path()); - QString Temp = fi.dirPath(); - QString albumName = Temp.section('/', -1); + TQFileInfo fi(currentFile.path()); + TQString Temp = fi.dirPath(); + TQString albumName = Temp.section('/', -1); KIPI::ImageInfo info = m_interface->info(currentFile); - QString comments = info.description(); + TQString comments = info.description(); ImageItem *item = new ImageItem( m_ImagesFilesListBox, currentFile.path().section('/', -1 ), // File name with extension. @@ -480,7 +480,7 @@ void SlideShowConfig::slotUseMillisecondsToggled() m_delaySpinBox->setValue(0); if ( m_useMillisecondsCheckBox -> isChecked() ) { - m_delayLabel->setText(QString("Delay between images (ms):")); + m_delayLabel->setText(TQString("Delay between images (ms):")); m_delaySpinBox->setMinValue(m_delayMsMinValue); m_delaySpinBox->setMaxValue(m_delayMsMaxValue); @@ -489,7 +489,7 @@ void SlideShowConfig::slotUseMillisecondsToggled() m_delaySpinBox->setValue(delayValue*1000); } else { - m_delayLabel->setText(QString("Delay between images (s):")); + m_delayLabel->setText(TQString("Delay between images (s):")); m_delaySpinBox->setMinValue(m_delayMsMinValue/1000); m_delaySpinBox->setMaxValue(m_delayMsMaxValue/100); @@ -554,9 +554,9 @@ void SlideShowConfig::slotSelection() if (m_allFilesButton->isChecked()) { KURL currentPath = m_interface->currentAlbum().path(); - QValueList<KIPI::ImageCollection> albumList; + TQValueList<KIPI::ImageCollection> albumList; albumList = m_interface->allAlbums(); - QValueList<KIPI::ImageCollection>::iterator it; + TQValueList<KIPI::ImageCollection>::iterator it; urlList = m_interface->currentAlbum().images(); for ( it = albumList.begin(); it != albumList.end(); ++it ) @@ -586,7 +586,7 @@ void SlideShowConfig::slotSelection() } } -void SlideShowConfig::slotImagesFilesSelected( QListBoxItem *item ) +void SlideShowConfig::slotImagesFilesSelected( TQListBoxItem *item ) { if ( !item || m_ImagesFilesListBox->count() == 0 ) @@ -609,13 +609,13 @@ void SlideShowConfig::slotImagesFilesSelected( QListBoxItem *item ) m_thumbJob = KIO::filePreview( url, m_ImageLabel->width() ); - connect(m_thumbJob, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), - SLOT(slotGotPreview(const KFileItem*, const QPixmap&))); - connect(m_thumbJob, SIGNAL(failed(const KFileItem*)), - SLOT(slotFailedPreview(const KFileItem*))); + connect(m_thumbJob, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), + TQT_SLOT(slotGotPreview(const KFileItem*, const TQPixmap&))); + connect(m_thumbJob, TQT_SIGNAL(failed(const KFileItem*)), + TQT_SLOT(slotFailedPreview(const KFileItem*))); int index = m_ImagesFilesListBox->index ( item ); - m_label7->setText(i18n("Image no. %1").arg(index + 1)); + m_label7->setText(i18n("Image no. %1").tqarg(index + 1)); } void SlideShowConfig::slotAddDropItems(KURL::List filesUrl) @@ -671,10 +671,10 @@ void SlideShowConfig::slotImagesFilesButtonUp( void ) return; ImageItem *pitem = static_cast<ImageItem*>( m_ImagesFilesListBox->item(Index) ); - QString path(pitem->path()); - QString comment(pitem->comments()); - QString name(pitem->name()); - QString album(pitem->album()); + TQString path(pitem->path()); + TQString comment(pitem->comments()); + TQString name(pitem->name()); + TQString album(pitem->album()); m_ImagesFilesListBox->removeItem(Index); ImageItem *item = new ImageItem( 0, name, comment, path, album ); item->setName( name ); @@ -706,10 +706,10 @@ void SlideShowConfig::slotImagesFilesButtonDown( void ) return; ImageItem *pitem = static_cast<ImageItem*>( m_ImagesFilesListBox->item(Index) ); - QString path(pitem->path()); - QString comment(pitem->comments()); - QString name(pitem->name()); - QString album(pitem->name()); + TQString path(pitem->path()); + TQString comment(pitem->comments()); + TQString name(pitem->name()); + TQString album(pitem->name()); m_ImagesFilesListBox->removeItem(Index); ImageItem *item = new ImageItem( 0, name, comment, path, album ); item->setName( name ); @@ -720,7 +720,7 @@ void SlideShowConfig::slotImagesFilesButtonDown( void ) void SlideShowConfig::ShowNumberImages( int Number ) { - QTime TotalDuration (0, 0, 0); + TQTime TotalDuration (0, 0, 0); int TransitionDuration = 2000; @@ -735,12 +735,12 @@ void SlideShowConfig::ShowNumberImages( int Number ) TotalDuration = TotalDuration.addMSecs((Number-1)*TransitionDuration); if ( Number < 2) - m_label6->setText(i18n("%1 image [%2]").arg(Number).arg(TotalDuration.toString())); + m_label6->setText(i18n("%1 image [%2]").tqarg(Number).tqarg(TotalDuration.toString())); else - m_label6->setText(i18n("%1 images [%2]").arg(Number).arg(TotalDuration.toString())); + m_label6->setText(i18n("%1 images [%2]").tqarg(Number).tqarg(TotalDuration.toString())); } -void SlideShowConfig::slotGotPreview(const KFileItem*, const QPixmap &pixmap) +void SlideShowConfig::slotGotPreview(const KFileItem*, const TQPixmap &pixmap) { m_ImageLabel->setPixmap(pixmap); m_thumbJob = 0L; @@ -763,10 +763,10 @@ void SlideShowConfig::slotStartClicked() for (uint i=0 ; i < m_ImagesFilesListBox->count() ; ++i) { ImageItem *pitem = static_cast<ImageItem*>( m_ImagesFilesListBox->item(i) ); - if (!QFile::exists(pitem->path())) + if (!TQFile::exists(pitem->path())) { KMessageBox::error(this, - i18n("Cannot access to file %1, please check the path is right.").arg(pitem->path())); + i18n("Cannot access to file %1, please check the path is right.").tqarg(pitem->path())); return; } m_urlList->append(pitem->path()); // Input images files. diff --git a/kipi-plugins/slideshow/slideshowconfig.h b/kipi-plugins/slideshow/slideshowconfig.h index b3c2ca9..42c8bd0 100644 --- a/kipi-plugins/slideshow/slideshowconfig.h +++ b/kipi-plugins/slideshow/slideshowconfig.h @@ -24,10 +24,10 @@ #ifndef SLIDESHOWCONFIG_H #define SLIDESHOWCONFIG_H -// Qt includes. +// TQt includes. -#include <qstring.h> -#include <qlistbox.h> +#include <tqstring.h> +#include <tqlistbox.h> // KDE includes @@ -50,11 +50,12 @@ namespace KIPISlideShowPlugin class SlideShowConfig : public SlideShowConfigBase { Q_OBJECT + TQ_OBJECT public: SlideShowConfig(bool allowSelectedOnly, KIPI::Interface* interface, - QWidget *parent, const char* name, bool ImagesHasComments, + TQWidget *tqparent, const char* name, bool ImagesHasComments, KURL::List* urlList); ~SlideShowConfig(); @@ -74,13 +75,13 @@ private slots: void slotCacheToggled(); void SlotPortfolioDurationChanged ( int ); - void slotImagesFilesSelected( QListBoxItem *item ); + void slotImagesFilesSelected( TQListBoxItem *item ); void slotAddDropItems(KURL::List filesUrl); void slotImagesFilesButtonAdd( void ); void slotImagesFilesButtonDelete( void ); void slotImagesFilesButtonUp( void ); void slotImagesFilesButtonDown( void ); - void slotGotPreview(const KFileItem* , const QPixmap &pixmap); + void slotGotPreview(const KFileItem* , const TQPixmap &pixmap); void slotFailedPreview(const KFileItem*); signals: @@ -107,8 +108,8 @@ private: KConfig* m_config; - QString m_effectName; - QString m_effectNameGL; + TQString m_effectName; + TQString m_effectNameGL; KIO::PreviewJob* m_thumbJob; KURL::List* m_urlList; diff --git a/kipi-plugins/slideshow/slideshowconfigbase.ui b/kipi-plugins/slideshow/slideshowconfigbase.ui index 4c18fb1..275f146 100644 --- a/kipi-plugins/slideshow/slideshowconfigbase.ui +++ b/kipi-plugins/slideshow/slideshowconfigbase.ui @@ -7,7 +7,7 @@ <property name="enabled"> <bool>true</bool> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -23,13 +23,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -57,7 +57,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_tabWidget</cstring> </property> @@ -69,7 +69,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>mainTab</cstring> </property> @@ -80,7 +80,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_fileSrcButtonGroup</cstring> </property> @@ -99,7 +99,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_allFilesButton</cstring> </property> @@ -118,7 +118,7 @@ <string>Alt+B</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_selectedFilesButton</cstring> </property> @@ -137,7 +137,7 @@ <string>Alt+Y</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_customButton</cstring> </property> @@ -147,7 +147,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_ImagesFilesGroup</cstring> </property> @@ -161,9 +161,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <vbox> <property name="name"> @@ -187,7 +187,7 @@ The portfolio's first image is on the top; the last image is on the bottom. If you want to add some images, click on the 'Add' button or use the drag-and-drop.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_label6</cstring> </property> @@ -208,9 +208,9 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <vbox> <property name="name"> @@ -226,14 +226,14 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>5</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_ImagesFilesButtonAdd</cstring> </property> @@ -245,7 +245,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -261,7 +261,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Add some image files to the portfolio list.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_ImagesFilesButtonDelete</cstring> </property> @@ -273,7 +273,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -289,7 +289,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Remove some image files from the portfolio list.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_ImagesFilesButtonUp</cstring> </property> @@ -301,7 +301,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -317,7 +317,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Moving the current image up on the portfolio list.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_ImagesFilesButtonDown</cstring> </property> @@ -329,7 +329,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -355,7 +355,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>5</height> @@ -364,15 +364,15 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </spacer> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_ImageLabel</cstring> </property> @@ -384,7 +384,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>128</width> <height>128</height> @@ -396,14 +396,14 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="scaledContents"> <bool>false</bool> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="whatsThis" stdset="0"> <string>Preview the currently selected image.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_label7</cstring> </property> @@ -426,23 +426,23 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout50</cstring> + <cstring>tqlayout50</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout47</cstring> + <cstring>tqlayout47</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -461,7 +461,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_openglCheckBox</cstring> </property> @@ -473,7 +473,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>238</width> <height>33</height> @@ -499,7 +499,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>2</height> @@ -508,7 +508,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </spacer> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1_2</cstring> </property> @@ -533,15 +533,15 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_printNameCheckBox</cstring> </property> @@ -563,7 +563,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_printProgressCheckBox</cstring> </property> @@ -587,7 +587,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_printCommentsCheckBox</cstring> </property> @@ -619,7 +619,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>16</height> @@ -630,7 +630,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -649,7 +649,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_loopCheckBox</cstring> </property> @@ -664,7 +664,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -677,7 +677,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Alt+L</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_shuffleCheckBox</cstring> </property> @@ -689,7 +689,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -702,15 +702,15 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Alt+S</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout48</cstring> + <cstring>tqlayout48</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_delayLabel</cstring> </property> @@ -722,7 +722,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>30</height> @@ -732,7 +732,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Delay between images (s):</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_delaySpinBox</cstring> </property> @@ -744,7 +744,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -765,15 +765,15 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout49</cstring> + <cstring>tqlayout49</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>label2</cstring> </property> @@ -785,7 +785,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>30</height> @@ -795,7 +795,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Transition effect:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>m_effectsComboBox</cstring> </property> @@ -807,13 +807,13 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -841,7 +841,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>2</height> @@ -862,7 +862,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>5</height> @@ -871,7 +871,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>commentsTab</cstring> </property> @@ -895,15 +895,15 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </sizepolicy> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout57</cstring> + <cstring>tqlayout57</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox7</cstring> </property> @@ -914,15 +914,15 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout52</cstring> + <cstring>tqlayout52</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -940,7 +940,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>15</width> <height>21</height> @@ -964,15 +964,15 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout51</cstring> + <cstring>tqlayout51</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -990,7 +990,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>15</width> <height>21</height> @@ -1025,22 +1025,22 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>81</width> <height>31</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout55</cstring> + <cstring>tqlayout55</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -1058,14 +1058,14 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>15</width> <height>21</height> </size> </property> </spacer> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_commentsLinesLengthSpinBox</cstring> </property> @@ -1096,7 +1096,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>5</height> @@ -1105,7 +1105,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -1116,7 +1116,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox5</cstring> </property> @@ -1135,7 +1135,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_useMillisecondsCheckBox</cstring> </property> @@ -1153,7 +1153,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox8</cstring> </property> @@ -1164,7 +1164,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_enableMouseWheelCheckBox</cstring> </property> @@ -1182,7 +1182,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup3</cstring> </property> @@ -1193,7 +1193,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_kbDisableFadeCheckBox</cstring> </property> @@ -1201,7 +1201,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <string>Disable fade-in / fade-out</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_kbDisableCrossfadeCheckBox</cstring> </property> @@ -1211,7 +1211,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_cacheButtonGroup</cstring> </property> @@ -1225,7 +1225,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_cacheCheckBox</cstring> </property> @@ -1236,15 +1236,15 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_cacheSizeLabel1</cstring> </property> @@ -1262,14 +1262,14 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>21</height> </size> </property> </spacer> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_cacheSizeSpinBox</cstring> </property> @@ -1280,7 +1280,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr <number>5</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_cacheSizeLabel2</cstring> </property> @@ -1290,7 +1290,7 @@ If you want to add some images, click on the 'Add' button or use the drag-and-dr </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_KBCacheLabel</cstring> </property> @@ -1314,7 +1314,7 @@ Ken Burns effect doesn't use this cache mechanism.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>90</height> @@ -1324,9 +1324,9 @@ Ken Burns effect doesn't use this cache mechanism.</string> </vbox> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <property name="sizePolicy"> <sizepolicy> @@ -1350,14 +1350,14 @@ Ken Burns effect doesn't use this cache mechanism.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton" row="0" column="3"> + <widget class="TQPushButton" row="0" column="3"> <property name="name"> <cstring>m_buttonExit</cstring> </property> @@ -1379,7 +1379,7 @@ Ken Burns effect doesn't use this cache mechanism.</string> <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>m_buttonStart</cstring> </property> @@ -1404,7 +1404,7 @@ Ken Burns effect doesn't use this cache mechanism.</string> <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>m_helpButton</cstring> </property> @@ -1489,7 +1489,7 @@ Ken Burns effect doesn't use this cache mechanism.</string> <include location="global" impldecl="in implementation">kio/previewjob.h</include> <include location="global" impldecl="in implementation">klistbox.h</include> </includes> -<slots> +<Q_SLOTS> <slot access="protected">slotOpenGLToggled()</slot> <slot access="protected">slotStartClicked()</slot> <slot access="protected">slotHelp()</slot> @@ -1504,14 +1504,14 @@ Ken Burns effect doesn't use this cache mechanism.</string> <slot specifier="non virtual">slotFailedPreview( const KFileItem * )</slot> <slot specifier="non virtual">slotAddDropItems( KURL::List filesUrl )</slot> <slot access="protected">slotCacheToggled()</slot> -</slots> +</Q_SLOTS> <functions> <function access="protected">loadEffectNames()</function> <function access="protected">loadEffectNamesGL()</function> <function access="protected">readSettings()</function> <function access="protected">saveSettings()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdialog.h</includehint> <includehint>listimageitems.h</includehint> diff --git a/kipi-plugins/slideshow/slideshowgl.cpp b/kipi-plugins/slideshow/slideshowgl.cpp index ba49931..037b086 100644 --- a/kipi-plugins/slideshow/slideshowgl.cpp +++ b/kipi-plugins/slideshow/slideshowgl.cpp @@ -27,16 +27,16 @@ #include <kglobalsettings.h> #include <kimageeffect.h> -#include <qtimer.h> -#include <qpixmap.h> -#include <qapplication.h> -#include <qevent.h> -#include <qcursor.h> -#include <qimage.h> -#include <qpainter.h> -#include <qfileinfo.h> -#include <qfontmetrics.h> -#include <qwmatrix.h> +#include <tqtimer.h> +#include <tqpixmap.h> +#include <tqapplication.h> +#include <tqevent.h> +#include <tqcursor.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqfileinfo.h> +#include <tqfontmetrics.h> +#include <tqwmatrix.h> #include <math.h> #include <cstdlib> @@ -47,19 +47,19 @@ namespace KIPISlideShowPlugin { -SlideShowGL::SlideShowGL(const QValueList<QPair<QString, int> >& fileList, - const QStringList& commentsList, bool ImagesHasComments) - : QGLWidget(0, 0, 0, WStyle_StaysOnTop | WType_Popup | +SlideShowGL::SlideShowGL(const TQValueList<TQPair<TQString, int> >& fileList, + const TQStringList& commentsList, bool ImagesHasComments) + : TQGLWidget(0, 0, 0, WStyle_StaysOnTop | WType_Popup | WX11BypassWM | WDestructiveClose) { #if KDE_IS_VERSION(3,2,0) - QRect deskRect = KGlobalSettings::desktopGeometry(this); + TQRect deskRect = KGlobalSettings::desktopGeometry(this); m_deskX = deskRect.x(); m_deskY = deskRect.y(); m_deskWidth = deskRect.width(); m_deskHeight = deskRect.height(); #else - QRect deskRect = QApplication::desktop()->screenGeometry(this); + TQRect deskRect = TQApplication::desktop()->screenGeometry(this); m_deskX = deskRect.x(); m_deskY = deskRect.y(); m_deskWidth = deskRect.width(); @@ -75,16 +75,16 @@ SlideShowGL::SlideShowGL(const QValueList<QPair<QString, int> >& fileList, { m_toolBar->setEnabledPrev(false); } - connect(m_toolBar, SIGNAL(signalPause()), - SLOT(slotPause())); - connect(m_toolBar, SIGNAL(signalPlay()), - SLOT(slotPlay())); - connect(m_toolBar, SIGNAL(signalNext()), - SLOT(slotNext())); - connect(m_toolBar, SIGNAL(signalPrev()), - SLOT(slotPrev())); - connect(m_toolBar, SIGNAL(signalClose()), - SLOT(slotClose())); + connect(m_toolBar, TQT_SIGNAL(signalPause()), + TQT_SLOT(slotPause())); + connect(m_toolBar, TQT_SIGNAL(signalPlay()), + TQT_SLOT(slotPlay())); + connect(m_toolBar, TQT_SIGNAL(signalNext()), + TQT_SLOT(slotNext())); + connect(m_toolBar, TQT_SIGNAL(signalPrev()), + TQT_SLOT(slotPrev())); + connect(m_toolBar, TQT_SIGNAL(signalClose()), + TQT_SLOT(slotClose())); // -- Minimal texture size (opengl specs) -------------- @@ -134,16 +134,16 @@ SlideShowGL::SlideShowGL(const QValueList<QPair<QString, int> >& fileList, // -------------------------------------------------- - m_timer = new QTimer(); - connect(m_timer, SIGNAL(timeout()), - SLOT(slotTimeOut())); + m_timer = new TQTimer(); + connect(m_timer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotTimeOut())); m_timer->start(m_timeout, true); // -- hide cursor when not moved -------------------- - m_mouseMoveTimer = new QTimer; - connect(m_mouseMoveTimer, SIGNAL(timeout()), - SLOT(slotMouseMoveTimeOut())); + m_mouseMoveTimer = new TQTimer; + connect(m_mouseMoveTimer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotMouseMoveTimeOut())); setMouseTracking(true); slotMouseMoveTimeOut(); @@ -180,7 +180,7 @@ void SlideShowGL::readSettings() // Comments tab settings - m_commentsFont = new QFont(); + m_commentsFont = new TQFont(); m_commentsFont->setFamily(m_config->readEntry("Comments Font Family")); m_commentsFont->setPointSize(m_config->readNumEntry("Comments Font Size", 10 )); m_commentsFont->setBold(m_config->readBoolEntry("Comments Font Bold", false)); @@ -223,16 +223,16 @@ void SlideShowGL::initializeGL() glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTexVal); // allow only maximum texture value of 1024. anything bigger and things slow down - maxTexVal = QMIN(1024, maxTexVal); + maxTexVal = TQMIN(1024, maxTexVal); - m_width = QApplication::desktop()->width(); - m_height = QApplication::desktop()->height(); + m_width = TQApplication::desktop()->width(); + m_height = TQApplication::desktop()->height(); m_width = 1 << (int)ceil(log((float)m_width)/log((float)2)) ; m_height = 1 << (int)ceil(log((float)m_height)/log((float)2)); - m_width = QMIN( maxTexVal, m_width ); - m_height = QMIN( maxTexVal, m_height ); + m_width = TQMIN( maxTexVal, m_width ); + m_height = TQMIN( maxTexVal, m_height ); // load the first image @@ -271,7 +271,7 @@ void SlideShowGL::resizeGL(int w, int h) glLoadIdentity(); } -void SlideShowGL::keyPressEvent(QKeyEvent *event) +void SlideShowGL::keyPressEvent(TQKeyEvent *event) { if(!event) return; @@ -279,7 +279,7 @@ void SlideShowGL::keyPressEvent(QKeyEvent *event) m_toolBar->keyPressEvent(event); } -void SlideShowGL::mousePressEvent(QMouseEvent *e) +void SlideShowGL::mousePressEvent(TQMouseEvent *e) { if (m_endOfShow) slotClose(); @@ -298,15 +298,15 @@ void SlideShowGL::mousePressEvent(QMouseEvent *e) } } -void SlideShowGL::mouseMoveEvent(QMouseEvent *e) +void SlideShowGL::mouseMoveEvent(TQMouseEvent *e) { - setCursor(QCursor(Qt::ArrowCursor)); + setCursor(TQCursor(TQt::ArrowCursor)); m_mouseMoveTimer->start(1000, true); if (!m_toolBar->canHide()) return; - QPoint pos(e->pos()); + TQPoint pos(e->pos()); if ((pos.y() > (m_deskY+20)) && (pos.y() < (m_deskY+m_deskHeight-20-1))) @@ -342,7 +342,7 @@ void SlideShowGL::mouseMoveEvent(QMouseEvent *e) m_toolBar->show(); } -void SlideShowGL::wheelEvent(QWheelEvent *e) +void SlideShowGL::wheelEvent(TQWheelEvent *e) { if (!m_enableMouseWheel) return; @@ -378,9 +378,9 @@ void SlideShowGL::registerEffects() m_effects.insert("Cube", &SlideShowGL::effectCube); } -QStringList SlideShowGL::effectNames() +TQStringList SlideShowGL::effectNames() { - QStringList effects; + TQStringList effects; effects.append("None"); effects.append("Bend"); @@ -396,9 +396,9 @@ QStringList SlideShowGL::effectNames() return effects; } -QMap<QString,QString> SlideShowGL::effectNamesI18N() +TQMap<TQString,TQString> SlideShowGL::effectNamesI18N() { - QMap<QString,QString> effects; + TQMap<TQString,TQString> effects; effects["None"] = i18n("None"); effects["Bend"] = i18n("Bend"); @@ -416,15 +416,15 @@ QMap<QString,QString> SlideShowGL::effectNamesI18N() SlideShowGL::EffectMethod SlideShowGL::getRandomEffect() { - QMap<QString,EffectMethod> tmpMap(m_effects); + TQMap<TQString,EffectMethod> tmpMap(m_effects); tmpMap.remove("None"); - QStringList t = tmpMap.keys(); + TQStringList t = tmpMap.keys(); int count = t.count(); int i = (int)((float)(count)*rand()/(RAND_MAX+1.0)); - QString key = t[i]; + TQString key = t[i]; return tmpMap[key]; } @@ -492,7 +492,7 @@ void SlideShowGL::previousFrame() void SlideShowGL::loadImage() { - QImage image = m_imageLoader->getCurrent(); + TQImage image = m_imageLoader->getCurrent(); if (!image.isNull()) { @@ -502,11 +502,11 @@ void SlideShowGL::loadImage() if (tex) glDeleteTextures(1, &tex); - QImage black(width(), height(), 32); - black.fill(Qt::black.rgb()); + TQImage black(width(), height(), 32); + black.fill(TQt::black.rgb()); /* image = image.smoothScale(width(), height(), - QImage::ScaleMin);*/ + TQ_ScaleMin);*/ montage(image, black); black = black.smoothScale(m_width, m_height); @@ -520,7 +520,7 @@ void SlideShowGL::loadImage() if (m_printComments && m_imagesHasComments) printComments(black); - QImage t = convertToGLFormat(black); + TQImage t = convertToGLFormat(black); /* create the texture */ glGenTextures(1, &tex); @@ -538,7 +538,7 @@ void SlideShowGL::loadImage() } -void SlideShowGL::montage(QImage& top, QImage& bot) +void SlideShowGL::montage(TQImage& top, TQImage& bot) { int tw = top.width(); int th = top.height(); int bw = bot.width(); int bh = bot.height(); @@ -566,84 +566,84 @@ void SlideShowGL::montage(QImage& top, QImage& bot) } } -void SlideShowGL::printFilename(QImage& layer) +void SlideShowGL::printFilename(TQImage& layer) { - QFileInfo fileinfo(m_fileList[m_fileIndex].first); - QString filename = fileinfo.fileName(); + TQFileInfo fileinfo(m_fileList[m_fileIndex].first); + TQString filename = fileinfo.fileName(); - QFont fn(font()); + TQFont fn(font()); fn.setPointSize(fn.pointSize()); fn.setBold(true); - QFontMetrics fm(fn); - QRect rect=fm.boundingRect(filename); + TQFontMetrics fm(fn); + TQRect rect=fm.boundingRect(filename); rect.addCoords( 0, 0, 2, 2 ); - QPixmap pix(rect.width(),rect.height()); - pix.fill(Qt::black); + TQPixmap pix(rect.width(),rect.height()); + pix.fill(TQt::black); - QPainter p(&pix); - p.setPen(Qt::white); + TQPainter p(&pix); + p.setPen(TQt::white); p.setFont(fn); p.drawText(1,fn.pointSize()+1 , filename); p.end(); - QImage textimage(pix.convertToImage()); + TQImage textimage(pix.convertToImage()); KImageEffect::blendOnLower(0,m_height-rect.height(),textimage,layer); } -void SlideShowGL::printProgress(QImage& layer) +void SlideShowGL::printProgress(TQImage& layer) { - QString progress(QString::number(m_fileIndex + 1) + "/" + QString::number(m_fileList.count())); + TQString progress(TQString::number(m_fileIndex + 1) + "/" + TQString::number(m_fileList.count())); - QFont fn(font()); + TQFont fn(font()); fn.setPointSize(fn.pointSize()); fn.setBold(true); - QFontMetrics fm(fn); - QRect rect=fm.boundingRect(progress); + TQFontMetrics fm(fn); + TQRect rect=fm.boundingRect(progress); rect.addCoords( 0, 0, 2, 2 ); - QPixmap pix(rect.width(),rect.height()); - pix.fill(Qt::black); + TQPixmap pix(rect.width(),rect.height()); + pix.fill(TQt::black); - QPainter p(&pix); + TQPainter p(&pix); int stringLenght = p.fontMetrics().width(progress) * progress.length(); - p.setPen(Qt::white); + p.setPen(TQt::white); p.setFont(fn); p.drawText(1,fn.pointSize()+1 , progress); p.end(); - QImage textimage(pix.convertToImage()); + TQImage textimage(pix.convertToImage()); KImageEffect::blendOnLower(m_width - stringLenght - 10, 20,textimage,layer); } -void SlideShowGL::printComments(QImage& layer) +void SlideShowGL::printComments(TQImage& layer) { - QString comments = m_commentsList[m_fileIndex]; + TQString comments = m_commentsList[m_fileIndex]; int yPos = 5; // Text Y coordinate if (m_printName) yPos += 20; - QStringList commentsByLines; + TQStringList commentsByLines; - uint commentsIndex = 0; // Comments QString index + uint commentsIndex = 0; // Comments TQString index while (commentsIndex < comments.length()) { - QString newLine; + TQString newLine; bool breakLine = FALSE; // End Of Line found - uint currIndex; // Comments QString current index + uint currIndex; // Comments TQString current index // Check miminal lines dimension int commentsLinesLengthLocal = m_commentsLinesLength; for ( currIndex = commentsIndex; currIndex < comments.length() && !breakLine; currIndex++ ) - if( comments[currIndex] == QChar('\n') || comments[currIndex].isSpace() ) breakLine = TRUE; + if( comments[currIndex] == TQChar('\n') || comments[currIndex].isSpace() ) breakLine = TRUE; if (commentsLinesLengthLocal <= (int)((currIndex - commentsIndex))) commentsLinesLengthLocal = (currIndex - commentsIndex); @@ -654,7 +654,7 @@ void SlideShowGL::printComments(QImage& layer) currIndex < comments.length() && !breakLine; currIndex++ ) { - breakLine = (comments[currIndex] == QChar('\n')) ? TRUE : FALSE; + breakLine = (comments[currIndex] == TQChar('\n')) ? TRUE : FALSE; if (breakLine) newLine.append( ' ' ); @@ -674,47 +674,47 @@ void SlideShowGL::printComments(QImage& layer) commentsByLines.prepend(newLine.stripWhiteSpace()); } - QFontMetrics fm(*m_commentsFont); + TQFontMetrics fm(*m_commentsFont); for ( int lineNumber = 0; lineNumber < (int)commentsByLines.count(); lineNumber++ ) { yPos += int(1.5 * m_commentsFont->pointSize()); - QRect rect=fm.boundingRect(commentsByLines[lineNumber]); + TQRect rect=fm.boundingRect(commentsByLines[lineNumber]); rect.addCoords( 0, 0, 2, 2 ); - QPixmap pix(rect.width(),rect.height()); - pix.fill(QColor(m_commentsBgColor)); + TQPixmap pix(rect.width(),rect.height()); + pix.fill(TQColor(m_commentsBgColor)); - QPainter p(&pix); - p.setPen(QColor(m_commentsFontColor)); + TQPainter p(&pix); + p.setPen(TQColor(m_commentsFontColor)); p.setFont(*m_commentsFont); p.drawText(1,m_commentsFont->pointSize()+0 , commentsByLines[lineNumber]); p.end(); - QImage textimage(pix.convertToImage()); + TQImage textimage(pix.convertToImage()); KImageEffect::blendOnLower(0,m_height-rect.height()-yPos,textimage,layer); } } void SlideShowGL::showEndOfShow() { - QPixmap pix(512,512); - pix.fill(Qt::black); + TQPixmap pix(512,512); + pix.fill(TQt::black); - QFont fn(font()); + TQFont fn(font()); fn.setPointSize(fn.pointSize()+10); fn.setBold(true); - QPainter p(&pix); - p.setPen(Qt::white); + TQPainter p(&pix); + p.setPen(TQt::white); p.setFont(fn); p.drawText(20, 50, i18n("SlideShow Completed.")); p.drawText(20, 100, i18n("Click To Exit...")); p.end(); - QImage image(pix.convertToImage()); - QImage t = convertToGLFormat(image); + TQImage image(pix.convertToImage()); + TQImage t = convertToGLFormat(image); GLuint tex; @@ -799,12 +799,12 @@ void SlideShowGL::slotTimeOut() void SlideShowGL::slotMouseMoveTimeOut() { - QPoint pos(QCursor::pos()); + TQPoint pos(TQCursor::pos()); if ((pos.y() < (m_deskY+20)) || (pos.y() > (m_deskY+m_deskHeight-20-1))) return; - setCursor(QCursor(Qt::BlankCursor)); + setCursor(TQCursor(TQt::BlankCursor)); } void SlideShowGL::paintTexture() diff --git a/kipi-plugins/slideshow/slideshowgl.h b/kipi-plugins/slideshow/slideshowgl.h index bb1bc8e..2d1d1f0 100644 --- a/kipi-plugins/slideshow/slideshowgl.h +++ b/kipi-plugins/slideshow/slideshowgl.h @@ -27,37 +27,38 @@ #include <kconfig.h> // QT includes -#include <qvaluelist.h> -#include <qstringlist.h> -#include <qpair.h> -#include <qstring.h> -#include <qmap.h> -#include <qgl.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> +#include <tqpair.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqgl.h> // Local includes #include "slideshowloader.h" -class QTimer; +class TQTimer; namespace KIPISlideShowPlugin { class SlideShowGL; class ToolBar; - class SlideShowGL : public QGLWidget + class SlideShowGL : public TQGLWidget { Q_OBJECT + TQ_OBJECT public: - SlideShowGL(const QValueList<QPair<QString, int> >& fileList, - const QStringList& commentsList, bool ImagesHasComments); + SlideShowGL(const TQValueList<TQPair<TQString, int> >& fileList, + const TQStringList& commentsList, bool ImagesHasComments); ~SlideShowGL(); void registerEffects(); - static QStringList effectNames(); - static QMap<QString,QString> effectNamesI18N(); + static TQStringList effectNames(); + static TQMap<TQString,TQString> effectNamesI18N(); protected: @@ -65,10 +66,10 @@ namespace KIPISlideShowPlugin void paintGL(); void resizeGL(int w, int h); - void mousePressEvent(QMouseEvent *event); - void mouseMoveEvent(QMouseEvent *); - void wheelEvent(QWheelEvent *e); - void keyPressEvent(QKeyEvent *event); + void mousePressEvent(TQMouseEvent *event); + void mouseMoveEvent(TQMouseEvent *); + void wheelEvent(TQWheelEvent *e); + void keyPressEvent(TQKeyEvent *event); private: @@ -77,7 +78,7 @@ namespace KIPISlideShowPlugin KConfig* m_config; int m_delay; - QString m_effectName; + TQString m_effectName; bool m_loop; bool m_printName; bool m_printProgress; @@ -85,7 +86,7 @@ namespace KIPISlideShowPlugin bool m_imagesHasComments; - QFont* m_commentsFont; + TQFont* m_commentsFont; uint m_commentsFontColor; uint m_commentsBgColor; int m_commentsLinesLength; @@ -96,11 +97,11 @@ namespace KIPISlideShowPlugin // ------------------------- typedef void (SlideShowGL::*EffectMethod)(); - QMap<QString, EffectMethod> m_effects; + TQMap<TQString, EffectMethod> m_effects; - QValueList<QPair<QString, int> > m_fileList; - QStringList m_commentsList; - QTimer* m_timer; + TQValueList<TQPair<TQString, int> > m_fileList; + TQStringList m_commentsList; + TQTimer* m_timer; int m_fileIndex; SlideShowLoader* m_imageLoader; @@ -122,7 +123,7 @@ namespace KIPISlideShowPlugin float m_points[40][40][3]; ToolBar* m_toolBar; - QTimer* m_mouseMoveTimer; + TQTimer* m_mouseMoveTimer; int m_deskX; int m_deskY; @@ -135,12 +136,12 @@ namespace KIPISlideShowPlugin void advanceFrame(); void previousFrame(); void loadImage(); - void montage(QImage& top, QImage& bot); + void montage(TQImage& top, TQImage& bot); EffectMethod getRandomEffect(); void showEndOfShow(); - void printFilename(QImage& layer); - void printProgress(QImage& layer); - void printComments(QImage& layer); + void printFilename(TQImage& layer); + void printProgress(TQImage& layer); + void printComments(TQImage& layer); void readSettings(); diff --git a/kipi-plugins/slideshow/slideshowkb.cpp b/kipi-plugins/slideshow/slideshowkb.cpp index 2f08205..42878f8 100644 --- a/kipi-plugins/slideshow/slideshowkb.cpp +++ b/kipi-plugins/slideshow/slideshowkb.cpp @@ -29,15 +29,15 @@ #include <cassert> #include <cmath> -// Qt includes. +// TQt includes. -#include <qapplication.h> -#include <qimage.h> -#include <qdatetime.h> -#include <qpainter.h> -#include <qobject.h> -#include <qfont.h> -#include <qcursor.h> +#include <tqapplication.h> +#include <tqimage.h> +#include <tqdatetime.h> +#include <tqpainter.h> +#include <tqobject.h> +#include <tqfont.h> +#include <tqcursor.h> // KDE includes. @@ -137,19 +137,19 @@ namespace KIPISlideShowPlugin } // ------------------------------------------------------------------------- - SlideShowKB::SlideShowKB(const QValueList<QPair<QString, int> >& fileList, - const QStringList& commentsList, bool ImagesHasComments) - : QGLWidget(0, 0, 0, WStyle_StaysOnTop | WType_Popup | + SlideShowKB::SlideShowKB(const TQValueList<TQPair<TQString, int> >& fileList, + const TQStringList& commentsList, bool ImagesHasComments) + : TQGLWidget(0, 0, 0, WStyle_StaysOnTop | WType_Popup | WX11BypassWM | WDestructiveClose) { #if KDE_IS_VERSION(3,2,0) - QRect deskRect = KGlobalSettings::desktopGeometry(this); + TQRect deskRect = KGlobalSettings::desktopGeometry(this); m_deskX = deskRect.x(); m_deskY = deskRect.y(); m_deskWidth = deskRect.width(); m_deskHeight = deskRect.height(); #else - QRect deskRect = QApplication::desktop()->screenGeometry(this); + TQRect deskRect = TQApplication::desktop()->screenGeometry(this); m_deskX = deskRect.x(); m_deskY = deskRect.y(); m_deskWidth = deskRect.width(); @@ -166,7 +166,7 @@ namespace KIPISlideShowPlugin m_imagesHasComments = ImagesHasComments; // ======================================================= - srand(QTime::currentTime().msec()); + srand(TQTime::currentTime().msec()); m_config = new KConfig("kipirc"); m_config->setGroup("SlideShow Settings"); @@ -189,22 +189,22 @@ namespace KIPISlideShowPlugin m_initialized = false; m_haveImages = true; - QValueList<QPair<QString, int> > m_fileList = fileList; + TQValueList<TQPair<TQString, int> > m_fileList = fileList; m_imageLoadThread = new ImageLoadThread(m_fileList, width(), height()); - m_timer = new QTimer(this); + m_timer = new TQTimer(this); m_endOfShow = false; m_showingEnd = false; - connect(m_timer, SIGNAL(timeout(void)), this, SLOT(moveSlot())); - connect(m_imageLoadThread, SIGNAL(endOfShow(void)), this, SLOT(slotEndOfShow())); + connect(m_timer, TQT_SIGNAL(timeout(void)), this, TQT_SLOT(moveSlot())); + connect(m_imageLoadThread, TQT_SIGNAL(endOfShow(void)), this, TQT_SLOT(slotEndOfShow())); // -- hide cursor when not moved -------------------- - m_mouseMoveTimer = new QTimer; - connect(m_mouseMoveTimer, SIGNAL(timeout()), - SLOT(slotMouseMoveTimeOut())); + m_mouseMoveTimer = new TQTimer; + connect(m_mouseMoveTimer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotMouseMoveTimeOut())); setMouseTracking(true); slotMouseMoveTimeOut(); @@ -398,7 +398,7 @@ namespace KIPISlideShowPlugin - void SlideShowKB::applyTexture(Image *img, const QImage &texture) { + void SlideShowKB::applyTexture(Image *img, const TQImage &texture) { /* create the texture */ glGenTextures(1, &img->m_texture); @@ -462,22 +462,22 @@ namespace KIPISlideShowPlugin void SlideShowKB::endOfShow() { - QPixmap pix(512,512); - pix.fill(Qt::black); + TQPixmap pix(512,512); + pix.fill(TQt::black); - QFont fn(font()); + TQFont fn(font()); fn.setPointSize(fn.pointSize()+10); fn.setBold(true); - QPainter p(&pix); - p.setPen(Qt::white); + TQPainter p(&pix); + p.setPen(TQt::white); p.setFont(fn); p.drawText(20, 50, i18n("SlideShow Completed.")); p.drawText(20, 100, i18n("Click To Exit...")); p.end(); - QImage image(pix.convertToImage()); - QImage t = convertToGLFormat(image); + TQImage image(pix.convertToImage()); + TQImage t = convertToGLFormat(image); GLuint tex; @@ -518,24 +518,24 @@ namespace KIPISlideShowPlugin m_showingEnd = true; } - QStringList SlideShowKB::effectNames() + TQStringList SlideShowKB::effectNames() { - QStringList effects; + TQStringList effects; effects.append("Ken Burns"); return effects; } - QMap<QString,QString> SlideShowKB::effectNamesI18N() + TQMap<TQString,TQString> SlideShowKB::effectNamesI18N() { - QMap<QString,QString> effects; + TQMap<TQString,TQString> effects; effects["Ken Burns"] = i18n("Ken Burns"); return effects; } - void SlideShowKB::mousePressEvent(QMouseEvent *e) + void SlideShowKB::mousePressEvent(TQMouseEvent *e) { // ======================================================= // Avoid boring compile time "unused parameter" warning :P @@ -547,12 +547,12 @@ namespace KIPISlideShowPlugin slotClose(); } - void SlideShowKB::mouseMoveEvent(QMouseEvent *e) + void SlideShowKB::mouseMoveEvent(TQMouseEvent *e) { - setCursor(QCursor(Qt::ArrowCursor)); + setCursor(TQCursor(TQt::ArrowCursor)); m_mouseMoveTimer->start(1000, true); - QPoint pos(e->pos()); + TQPoint pos(e->pos()); } void SlideShowKB::slotEndOfShow() @@ -562,12 +562,12 @@ namespace KIPISlideShowPlugin void SlideShowKB::slotMouseMoveTimeOut() { - QPoint pos(QCursor::pos()); + TQPoint pos(TQCursor::pos()); if ((pos.y() < (m_deskY+20)) || (pos.y() > (m_deskY+m_deskHeight-20-1))) return; - setCursor(QCursor(Qt::BlankCursor)); + setCursor(TQCursor(TQt::BlankCursor)); } void SlideShowKB::slotClose() diff --git a/kipi-plugins/slideshow/slideshowkb.h b/kipi-plugins/slideshow/slideshowkb.h index 58c2ce8..b31daca 100644 --- a/kipi-plugins/slideshow/slideshowkb.h +++ b/kipi-plugins/slideshow/slideshowkb.h @@ -31,16 +31,16 @@ #include <cstdlib> -// Qt includes. +// TQt includes. -#include <qgl.h> -#include <qtimer.h> -#include <qvaluelist.h> -#include <qpair.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qevent.h> -#include <qmap.h> +#include <tqgl.h> +#include <tqtimer.h> +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqevent.h> +#include <tqmap.h> // KDE includes. @@ -104,20 +104,21 @@ namespace KIPISlideShowPlugin // ------------------------------------------------------------------------- - class SlideShowKB : public QGLWidget + class SlideShowKB : public TQGLWidget { Q_OBJECT + TQ_OBJECT public: - SlideShowKB(const QValueList<QPair<QString, int> >& fileList, - const QStringList& commentsList, bool ImagesHasComments); + SlideShowKB(const TQValueList<TQPair<TQString, int> >& fileList, + const TQStringList& commentsList, bool ImagesHasComments); ~SlideShowKB(); - static QStringList effectNames(); - static QMap<QString,QString> effectNamesI18N(); + static TQStringList effectNames(); + static TQMap<TQString,TQString> effectNamesI18N(); private: @@ -131,7 +132,7 @@ namespace KIPISlideShowPlugin void initializeGL(); void paintGL(); void resizeGL(int w, int h); - void applyTexture(Image *img, const QImage &image); + void applyTexture(Image *img, const TQImage &image); void paintTexture(Image *img); unsigned suggestFrameRate(unsigned forceRate); @@ -139,8 +140,8 @@ namespace KIPISlideShowPlugin protected: - void mousePressEvent(QMouseEvent *event); - void mouseMoveEvent(QMouseEvent *); + void mousePressEvent(TQMouseEvent *event); + void mouseMoveEvent(TQMouseEvent *); private slots: @@ -159,11 +160,11 @@ namespace KIPISlideShowPlugin KConfig* m_config; bool m_imagesHasComments; - QStringList m_commentsList; + TQStringList m_commentsList; ScreenProperties* m_screen; - QTimer *m_timer; - QTimer *m_mouseMoveTimer; + TQTimer *m_timer; + TQTimer *m_mouseMoveTimer; ImageLoadThread *m_imageLoadThread; bool m_haveImages; diff --git a/kipi-plugins/slideshow/slideshowloader.cpp b/kipi-plugins/slideshow/slideshowloader.cpp index b208783..4b27b36 100644 --- a/kipi-plugins/slideshow/slideshowloader.cpp +++ b/kipi-plugins/slideshow/slideshowloader.cpp @@ -22,10 +22,10 @@ // QT includes -#include <qimage.h> -#include <qwmatrix.h> -#include <qpainter.h> -#include <qvaluelist.h> +#include <tqimage.h> +#include <tqwmatrix.h> +#include <tqpainter.h> +#include <tqvaluelist.h> // KDE includes @@ -38,7 +38,7 @@ namespace KIPISlideShowPlugin { - LoadThread::LoadThread(LoadedImages* loadedImages, QMutex* imageLock, const KURL path, + LoadThread::LoadThread(LoadedImages* loadedImages, TQMutex* imageLock, const KURL path, const int angle, int width, int height) { m_path = path; @@ -54,17 +54,17 @@ namespace KIPISlideShowPlugin void LoadThread::run() { - QImage newImage(m_path.path()); + TQImage newImage(m_path.path()); // Rotate according to angle if ( m_angle != 0 ) { - QWMatrix matrix; + TQWMatrix matrix; matrix.rotate((double)m_angle); newImage.xForm( matrix ); } - newImage = QImage(newImage.smoothScale(m_swidth, m_sheight, QImage::ScaleMin)); + newImage = TQImage(newImage.smoothScale(m_swidth, m_sheight, TQ_ScaleMin)); m_imageLock->lock(); m_loadedImages->insert(m_path, newImage); @@ -82,8 +82,8 @@ namespace KIPISlideShowPlugin m_sheight = height; m_loadingThreads = new LoadingThreads(); m_loadedImages = new LoadedImages(); - m_imageLock = new QMutex(); - m_threadLock = new QMutex(); + m_imageLock = new TQMutex(); + m_threadLock = new TQMutex(); for ( uint i = 0; i < uint(m_cacheSize/2) && i < uint(m_pathList.count()); i++ ) { LoadThread* newThread = new LoadThread(m_loadedImages, m_imageLock, KURL(m_pathList[i].first), @@ -174,18 +174,18 @@ namespace KIPISlideShowPlugin } - QImage SlideShowLoader::getCurrent() { + TQImage SlideShowLoader::getCurrent() { checkIsIn(m_currIndex); m_imageLock->lock(); - QImage returned = (*m_loadedImages)[m_pathList[m_currIndex].first]; + TQImage returned = (*m_loadedImages)[m_pathList[m_currIndex].first]; m_imageLock->unlock(); return returned; } - QString SlideShowLoader::currFileName() + TQString SlideShowLoader::currFileName() { return KURL(m_pathList[m_currIndex].first).fileName(); } @@ -198,7 +198,7 @@ namespace KIPISlideShowPlugin void SlideShowLoader::checkIsIn(int index) { m_threadLock->lock(); - if (m_loadingThreads->contains(m_pathList[index].first)) + if (m_loadingThreads->tqcontains(m_pathList[index].first)) { if ( (*m_loadingThreads)[m_pathList[index].first]->running() ) (*m_loadingThreads)[m_pathList[index].first]->wait(); diff --git a/kipi-plugins/slideshow/slideshowloader.h b/kipi-plugins/slideshow/slideshowloader.h index 165fe60..2ec2516 100644 --- a/kipi-plugins/slideshow/slideshowloader.h +++ b/kipi-plugins/slideshow/slideshowloader.h @@ -25,32 +25,32 @@ // QT includes -#include <qmap.h> -#include <qmutex.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qthread.h> -#include <qvaluelist.h> -#include <qpair.h> +#include <tqmap.h> +#include <tqmutex.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqthread.h> +#include <tqvaluelist.h> +#include <tqpair.h> // KDE includes #include <kurl.h> -typedef QPair<QString, int> FileAnglePair; -typedef QValueList<FileAnglePair> FileList; +typedef TQPair<TQString, int> FileAnglePair; +typedef TQValueList<FileAnglePair> FileList; namespace KIPISlideShowPlugin { - typedef QMap<KURL, QImage> LoadedImages; + typedef TQMap<KURL, TQImage> LoadedImages; - class LoadThread : public QThread + class LoadThread : public TQThread { public: - LoadThread(LoadedImages* loadedImages, QMutex* imageLock, const KURL path, + LoadThread(LoadedImages* loadedImages, TQMutex* imageLock, const KURL path, const int angle, int width, int height); ~LoadThread(); @@ -60,17 +60,17 @@ namespace KIPISlideShowPlugin private: - QMutex* m_imageLock; + TQMutex* m_imageLock; LoadedImages* m_loadedImages; KURL m_path; - QString m_filename; + TQString m_filename; int m_angle; int m_swidth; int m_sheight; }; - typedef QMap<KURL, LoadThread*> LoadingThreads; + typedef TQMap<KURL, LoadThread*> LoadingThreads; class SlideShowLoader { @@ -83,8 +83,8 @@ namespace KIPISlideShowPlugin void next(); void prev(); - QImage getCurrent(); - QString currFileName(); + TQImage getCurrent(); + TQString currFileName(); KURL currPath(); private: @@ -95,8 +95,8 @@ namespace KIPISlideShowPlugin LoadedImages* m_loadedImages; FileList m_pathList; - QMutex* m_imageLock; - QMutex* m_threadLock; + TQMutex* m_imageLock; + TQMutex* m_threadLock; uint m_cacheSize; int m_currIndex; diff --git a/kipi-plugins/slideshow/toolbar.cpp b/kipi-plugins/slideshow/toolbar.cpp index 35d0896..8a4d3ce 100644 --- a/kipi-plugins/slideshow/toolbar.cpp +++ b/kipi-plugins/slideshow/toolbar.cpp @@ -21,11 +21,11 @@ * * ============================================================ */ -// Qt includes. +// TQt includes. -#include <qtoolbutton.h> -#include <qlayout.h> -#include <qpixmap.h> +#include <tqtoolbutton.h> +#include <tqlayout.h> +#include <tqpixmap.h> // KDE includes. @@ -41,14 +41,14 @@ namespace KIPISlideShowPlugin { -ToolBar::ToolBar(QWidget* parent) - : QWidget(parent) +ToolBar::ToolBar(TQWidget* tqparent) + : TQWidget(tqparent) { - QHBoxLayout* lay = new QHBoxLayout(this); - m_playBtn = new QToolButton(this); - m_prevBtn = new QToolButton(this); - m_nextBtn = new QToolButton(this); - m_stopBtn = new QToolButton(this); + TQHBoxLayout* lay = new TQHBoxLayout(this); + m_playBtn = new TQToolButton(this); + m_prevBtn = new TQToolButton(this); + m_nextBtn = new TQToolButton(this); + m_stopBtn = new TQToolButton(this); m_playBtn->setToggleButton(true); KIconLoader* loader = kapp->iconLoader(); @@ -63,27 +63,27 @@ ToolBar::ToolBar(QWidget* parent) lay->addWidget(m_stopBtn); adjustSize(); - setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); m_canHide = true; - connect(m_playBtn, SIGNAL(toggled(bool)), - this, SLOT(slotPlayBtnToggled())); + connect(m_playBtn, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotPlayBtnToggled())); - connect(m_nextBtn, SIGNAL(clicked()), - this, SLOT(slotNexPrevClicked())); + connect(m_nextBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotNexPrevClicked())); - connect(m_prevBtn, SIGNAL(clicked()), - this, SLOT(slotNexPrevClicked())); + connect(m_prevBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotNexPrevClicked())); - connect(m_nextBtn, SIGNAL(clicked()), - this, SIGNAL(signalNext())); + connect(m_nextBtn, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalNext())); - connect(m_prevBtn, SIGNAL(clicked()), - this, SIGNAL(signalPrev())); + connect(m_prevBtn, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalPrev())); - connect(m_stopBtn, SIGNAL(clicked()), - this, SIGNAL(signalClose())); + connect(m_stopBtn, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalClose())); } ToolBar::~ToolBar() @@ -154,29 +154,29 @@ void ToolBar::slotNexPrevClicked() } } -void ToolBar::keyPressEvent(QKeyEvent *event) +void ToolBar::keyPressEvent(TQKeyEvent *event) { switch(event->key()) { - case(Qt::Key_Space): + case(TQt::Key_Space): { if (m_playBtn->isEnabled()) m_playBtn->animateClick(); break; } - case(Qt::Key_Prior): + case(TQt::Key_Prior): { if (m_prevBtn->isEnabled()) m_prevBtn->animateClick(); break; } - case(Qt::Key_Next): + case(TQt::Key_Next): { if (m_nextBtn->isEnabled()) m_nextBtn->animateClick(); break; } - case(Qt::Key_Escape): + case(TQt::Key_Escape): { if (m_stopBtn->isEnabled()) m_stopBtn->animateClick(); diff --git a/kipi-plugins/slideshow/toolbar.h b/kipi-plugins/slideshow/toolbar.h index 776a249..8712006 100644 --- a/kipi-plugins/slideshow/toolbar.h +++ b/kipi-plugins/slideshow/toolbar.h @@ -24,22 +24,23 @@ #ifndef TOOLBAR_H #define TOOLBAR_H -// Qt includes. +// TQt includes. -#include <qwidget.h> +#include <tqwidget.h> -class QToolButton; +class TQToolButton; namespace KIPISlideShowPlugin { -class ToolBar : public QWidget +class ToolBar : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ToolBar(QWidget* parent); + ToolBar(TQWidget* tqparent); ~ToolBar(); bool canHide() const; @@ -60,7 +61,7 @@ signals: protected: - void keyPressEvent(QKeyEvent *event); + void keyPressEvent(TQKeyEvent *event); private slots: @@ -69,10 +70,10 @@ private slots: private: - QToolButton* m_playBtn; - QToolButton* m_stopBtn; - QToolButton* m_nextBtn; - QToolButton* m_prevBtn; + TQToolButton* m_playBtn; + TQToolButton* m_stopBtn; + TQToolButton* m_nextBtn; + TQToolButton* m_prevBtn; bool m_canHide; friend class SlideShow; diff --git a/kipi-plugins/sync/TODO b/kipi-plugins/sync/TODO index fcff8e0..7a3d8b6 100644 --- a/kipi-plugins/sync/TODO +++ b/kipi-plugins/sync/TODO @@ -10,4 +10,4 @@ Somewhat immediate implementation needed: For the lazy times: * Polish the html code used to render the thumbnails, better - fonts sizes and layout + fonts sizes and tqlayout diff --git a/kipi-plugins/sync/galleryalbumdialog.ui b/kipi-plugins/sync/galleryalbumdialog.ui index 2dfbf6a..0ec158a 100644 --- a/kipi-plugins/sync/galleryalbumdialog.ui +++ b/kipi-plugins/sync/galleryalbumdialog.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>KIPIGalleryExportPlugin::GalleryAlbumDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>GalleryAlbumDialog</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -28,7 +28,7 @@ <property name="spacing"> <number>5</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>header</cstring> </property> @@ -50,15 +50,15 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>titleLabel</cstring> </property> @@ -66,7 +66,7 @@ <string>Title (optional):</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>nameLabel</cstring> </property> @@ -74,7 +74,7 @@ <string>Name (optional):</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>captionLabel</cstring> </property> @@ -82,17 +82,17 @@ <string>Caption (optional):</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>titleEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>nameEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>captionEdit</cstring> </property> @@ -113,7 +113,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -137,14 +137,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -161,7 +161,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -193,5 +193,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kipi-plugins/sync/galleryconfig.cpp b/kipi-plugins/sync/galleryconfig.cpp index 65fd7f4..9fc79f4 100644 --- a/kipi-plugins/sync/galleryconfig.cpp +++ b/kipi-plugins/sync/galleryconfig.cpp @@ -17,18 +17,18 @@ * * ============================================================ */ -// Include files for Qt - -#include <qlistview.h> -#include <qpushbutton.h> -#include <qtimer.h> -#include <qpixmap.h> -#include <qcursor.h> -#include <qlineedit.h> -#include <qprogressdialog.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qlayout.h> +// Include files for TQt + +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqtimer.h> +#include <tqpixmap.h> +#include <tqcursor.h> +#include <tqlineedit.h> +#include <tqprogressdialog.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqlayout.h> // Include files for KDE @@ -56,75 +56,75 @@ namespace KIPIGalleryExportPlugin { -GalleryEdit::GalleryEdit(QWidget* pParent, +GalleryEdit::GalleryEdit(TQWidget* pParent, Gallery* pGallery, - QString title) + TQString title) : KDialogBase(pParent, 0, true, title, Ok|Cancel, Ok, false), mpGallery(pGallery) { setButtonGuiItem( Ok, KStdGuiItem::save() ); - QFrame *page = new QFrame (this); - QHBoxLayout *tll = new QHBoxLayout(page); + TQFrame *page = new TQFrame (this); + TQHBoxLayout *tll = new TQHBoxLayout(page); page->setMinimumSize (500, 200); setMainWidget(page); - QVBoxLayout* vbox = new QVBoxLayout(); + TQVBoxLayout* vbox = new TQVBoxLayout(); vbox->setSpacing (KDialog::spacingHint()); tll->addItem(vbox); - mpHeaderLabel = new QLabel(page); - mpHeaderLabel->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, - QSizePolicy::Fixed)); + mpHeaderLabel = new TQLabel(page); + mpHeaderLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, + TQSizePolicy::Fixed)); mpHeaderLabel->setText(title); vbox->addWidget(mpHeaderLabel); - QFrame* hline = new QFrame(page, "hline"); - hline->setFrameShape(QFrame::HLine); - hline->setFrameShadow(QFrame::Sunken); - hline->setFrameShape(QFrame::HLine); + TQFrame* hline = new TQFrame(page, "hline"); + hline->setFrameShape(TQFrame::HLine); + hline->setFrameShadow(TQFrame::Sunken); + hline->setFrameShape(TQFrame::HLine); vbox->addWidget(hline); - QGridLayout* centerLayout = new QGridLayout(0, 1, 1, 5, 5); + TQGridLayout* centerLayout = new TQGridLayout(0, 1, 1, 5, 5); - mpNameEdit = new QLineEdit( this ); + mpNameEdit = new TQLineEdit( this ); centerLayout->addWidget(mpNameEdit, 0, 1); - mpUrlEdit = new QLineEdit( this ); + mpUrlEdit = new TQLineEdit( this ); centerLayout->addWidget(mpUrlEdit, 1, 1); - mpUsernameEdit = new QLineEdit( this ); + mpUsernameEdit = new TQLineEdit( this ); centerLayout->addWidget(mpUsernameEdit, 2, 1); - mpPasswordEdit = new QLineEdit( this ); - mpPasswordEdit->setEchoMode(QLineEdit::Password); + mpPasswordEdit = new TQLineEdit( this ); + mpPasswordEdit->setEchoMode(TQLineEdit::Password); centerLayout->addWidget(mpPasswordEdit, 3, 1); - QLabel* name_label = new QLabel(this); + TQLabel* name_label = new TQLabel(this); name_label->setText(i18n( "Name:" )); centerLayout->addWidget(name_label, 0, 0); - QLabel* urlLabel = new QLabel(this); + TQLabel* urlLabel = new TQLabel(this); urlLabel->setText(i18n( "URL:" )); centerLayout->addWidget(urlLabel, 1, 0); - QLabel* nameLabel = new QLabel(this); + TQLabel* nameLabel = new TQLabel(this); nameLabel->setText(i18n( "Username:" )); centerLayout->addWidget(nameLabel, 2, 0); - QLabel* passwdLabel = new QLabel(this); + TQLabel* passwdLabel = new TQLabel(this); passwdLabel->setText(i18n( "Password:" )); centerLayout->addWidget(passwdLabel, 3, 0); //--------------------------------------------- - mpGalleryVersion = new QCheckBox( i18n("Use &Gallery 2"), this); + mpGalleryVersion = new TQCheckBox( i18n("Use &Gallery 2"), this); mpGalleryVersion->setChecked( 2 == pGallery->version() ); centerLayout->addWidget( mpGalleryVersion, 4, 1 ); //--------------------------------------------- vbox->addLayout( centerLayout ); - resize( QSize(300, 150).expandedTo(minimumSizeHint()) ); + resize( TQSize(300, 150).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); mpNameEdit->setText(pGallery->name()); diff --git a/kipi-plugins/sync/galleryconfig.h b/kipi-plugins/sync/galleryconfig.h index 0aaedcc..a5945ac 100644 --- a/kipi-plugins/sync/galleryconfig.h +++ b/kipi-plugins/sync/galleryconfig.h @@ -20,9 +20,9 @@ #define GALLERYCONFIG_H #include <kdialogbase.h> -#include <qvaluelist.h> -#include <qpair.h> -#include <qintdict.h> +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqintdict.h> namespace KIPIGalleryExportPlugin { @@ -32,23 +32,24 @@ class Gallery; class GalleryEdit : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GalleryEdit(QWidget* pParent, + GalleryEdit(TQWidget* pParent, Gallery* pGallery, - QString title); + TQString title); ~GalleryEdit(); private: Gallery* mpGallery; - QLabel* mpHeaderLabel; - QLineEdit* mpNameEdit; - QLineEdit* mpUrlEdit; - QLineEdit* mpUsernameEdit; - QLineEdit* mpPasswordEdit; - QCheckBox* mpGalleryVersion; + TQLabel* mpHeaderLabel; + TQLineEdit* mpNameEdit; + TQLineEdit* mpUrlEdit; + TQLineEdit* mpUsernameEdit; + TQLineEdit* mpPasswordEdit; + TQCheckBox* mpGalleryVersion; private slots: void slotOk(void); diff --git a/kipi-plugins/sync/galleryitem.h b/kipi-plugins/sync/galleryitem.h index 89661ec..a752698 100644 --- a/kipi-plugins/sync/galleryitem.h +++ b/kipi-plugins/sync/galleryitem.h @@ -22,7 +22,7 @@ #ifndef GALLERYITEM_H #define GALLERYITEM_H -#include <qstring.h> +#include <tqstring.h> namespace KIPIGalleryExportPlugin { @@ -38,10 +38,10 @@ public: int ref_num; int album_num; - QString name; - QString caption; - QString thumbName; - QString albumURL; + TQString name; + TQString caption; + TQString thumbName; + TQString albumURL; }; class GAlbum @@ -51,7 +51,7 @@ public: GAlbum() { ref_num = -1; - parent_ref_num = -1; + tqparent_ref_num = -1; add = false; write = false; @@ -62,19 +62,19 @@ public: bool operator<(const GAlbum& rhs) const { - if (parent_ref_num == rhs.parent_ref_num) + if (tqparent_ref_num == rhs.tqparent_ref_num) return ref_num < rhs.ref_num; - return parent_ref_num < rhs.parent_ref_num; + return tqparent_ref_num < rhs.tqparent_ref_num; } int ref_num; - int parent_ref_num; - QString name; - QString parentName; - QString title; - QString summary; - QString baseurl; + int tqparent_ref_num; + TQString name; + TQString tqparentName; + TQString title; + TQString summary; + TQString baseurl; bool add; bool write; diff --git a/kipi-plugins/sync/galleryviewitem.cpp b/kipi-plugins/sync/galleryviewitem.cpp index 4a847ca..35ab07f 100644 --- a/kipi-plugins/sync/galleryviewitem.cpp +++ b/kipi-plugins/sync/galleryviewitem.cpp @@ -19,8 +19,8 @@ * * ============================================================ */ -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include "galleryviewitem.h" #include "gallerytalker.h" @@ -28,23 +28,23 @@ namespace KIPIGalleryExportPlugin { -void GAlbumViewItem::paintCell(QPainter * p, const QColorGroup & cg, +void GAlbumViewItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int ) { if (!p) return; - QListView *lv = listView(); + TQListView *lv = listView(); if (!lv) return; - QFontMetrics fm(p->fontMetrics()); + TQFontMetrics fm(p->fontMetrics()); if (isSelected()) p->fillRect(0, 0, width, height(), cg.highlight()); else p->fillRect(0, 0, width, height(), cg.base()); - const QPixmap * icon = pixmap( column ); + const TQPixmap * icon = pixmap( column ); int iconWidth = 0; if (icon) @@ -68,18 +68,18 @@ void GAlbumViewItem::paintCell(QPainter * p, const QColorGroup & cg, // We display things slightly differently depending on version. if (GalleryTalker::isGallery2()) { - p->drawText(r, h/2, width-r, h, Qt::AlignVCenter, album.title); + p->drawText(r, h/2, width-r, h, TQt::AlignVCenter, album.title); } else { - p->drawText(r, 0, width-r, h, Qt::AlignVCenter, album.title); + p->drawText(r, 0, width-r, h, TQt::AlignVCenter, album.title); - QFont fn(lv->font()); + TQFont fn(lv->font()); fn.setPointSize(fn.pointSize()-2); fn.setItalic(true); p->setFont(fn); - p->setPen(isSelected() ? cg.highlightedText() : Qt::gray); - p->drawText(r, h, width-r, h, Qt::AlignVCenter, album.name); + p->setPen(isSelected() ? cg.highlightedText() : TQt::gray); + p->drawText(r, h, width-r, h, TQt::AlignVCenter, album.name); } } @@ -87,7 +87,7 @@ void GAlbumViewItem::setup() { int h = listView()->fontMetrics().height(); int margin = 4; - setHeight( QMAX(2*h + margin, 32) ); + setHeight( TQMAX(2*h + margin, 32) ); } } diff --git a/kipi-plugins/sync/galleryviewitem.h b/kipi-plugins/sync/galleryviewitem.h index 6c5077a..6a40c69 100644 --- a/kipi-plugins/sync/galleryviewitem.h +++ b/kipi-plugins/sync/galleryviewitem.h @@ -19,30 +19,30 @@ #ifndef GALLERYVIEWITEM_H #define GALLERYVIEWITEM_H -#include <qlistview.h> +#include <tqlistview.h> #include "galleryitem.h" namespace KIPIGalleryExportPlugin { -class GAlbumViewItem : public QListViewItem +class GAlbumViewItem : public TQListViewItem { public: - GAlbumViewItem(QListView* parent, const QString& name, + GAlbumViewItem(TQListView* tqparent, const TQString& name, const GAlbum& _album) - : QListViewItem(parent, name), album(_album) {} - GAlbumViewItem(QListViewItem* parent, const QString& name, + : TQListViewItem(tqparent, name), album(_album) {} + GAlbumViewItem(TQListViewItem* tqparent, const TQString& name, const GAlbum& _album) - : QListViewItem(parent, name), album(_album) {} + : TQListViewItem(tqparent, name), album(_album) {} GAlbum album; - void paintCell(QPainter * p, const QColorGroup & cg, + void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int ); - void paintFocus (QPainter*, const QColorGroup&, - const QRect&) {} + void paintFocus (TQPainter*, const TQColorGroup&, + const TQRect&) {} protected: diff --git a/kipi-plugins/sync/gallerywidget.cpp b/kipi-plugins/sync/gallerywidget.cpp index ed6e6fb..97e6818 100644 --- a/kipi-plugins/sync/gallerywidget.cpp +++ b/kipi-plugins/sync/gallerywidget.cpp @@ -23,53 +23,53 @@ #include <khtml_part.h> #include <khtmlview.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qframe.h> -#include <qheader.h> -#include <qlistview.h> -#include <qbuttongroup.h> -#include <qgroupbox.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qsplitter.h> -#include <qwhatsthis.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqheader.h> +#include <tqlistview.h> +#include <tqbuttongroup.h> +#include <tqgroupbox.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqsplitter.h> +#include <tqwhatsthis.h> #include "gallerywidget.h" namespace KIPIGalleryExportPlugin { -GalleryWidget::GalleryWidget( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) +GalleryWidget::GalleryWidget( TQWidget* tqparent, const char* name, WFlags fl ) + : TQWidget( tqparent, name, fl ) { if ( !name ) setName( "GalleryWidget" ); - QVBoxLayout* galleryWidgetLayout - = new QVBoxLayout( this, 5, 5, "GalleryWidgetLayout"); + TQVBoxLayout* galleryWidgetLayout + = new TQVBoxLayout( this, 5, 5, "GalleryWidgetLayout"); // ------------------------------------------------------------------------ - QLabel* headerLabel; - QFrame* headerLine; + TQLabel* headerLabel; + TQFrame* headerLine; - headerLabel = new QLabel( this, "headerLabel" ); + headerLabel = new TQLabel( this, "headerLabel" ); galleryWidgetLayout->addWidget( headerLabel, 0 ); - headerLine = new QFrame( this, "headerLine" ); - headerLine->setFrameShape( QFrame::HLine ); - headerLine->setFrameShadow( QFrame::Sunken ); + headerLine = new TQFrame( this, "headerLine" ); + headerLine->setFrameShape( TQFrame::HLine ); + headerLine->setFrameShadow( TQFrame::Sunken ); galleryWidgetLayout->addWidget( headerLine, 0 ); // ------------------------------------------------------------------------ - QSplitter* splitter = new QSplitter(this); + TQSplitter* splitter = new TQSplitter(this); galleryWidgetLayout->addWidget( splitter, 5 ); - m_albumView = new QListView( splitter, "m_albumView" ); + m_albumView = new TQListView( splitter, "m_albumView" ); m_albumView->addColumn( i18n( "Albums" ) ); - m_albumView->setResizeMode( QListView::AllColumns ); + m_albumView->setResizeMode( TQListView::AllColumns ); // ------------------------------------------------------------------------ @@ -77,49 +77,49 @@ GalleryWidget::GalleryWidget( QWidget* parent, const char* name, WFlags fl ) // ------------------------------------------------------------------------ - QVBoxLayout* rightButtonGroupLayout; - QSpacerItem* spacer; - QButtonGroup* rightButtonGroup; + TQVBoxLayout* rightButtonGroupLayout; + TQSpacerItem* spacer; + TQButtonGroup* rightButtonGroup; - rightButtonGroup = new QButtonGroup( splitter, "rightButtonGroup" ); - rightButtonGroupLayout = new QVBoxLayout( rightButtonGroup ); + rightButtonGroup = new TQButtonGroup( splitter, "rightButtonGroup" ); + rightButtonGroupLayout = new TQVBoxLayout( rightButtonGroup ); rightButtonGroupLayout->setSpacing( 5 ); rightButtonGroupLayout->setMargin( 5 ); - m_newAlbumBtn = new QPushButton( rightButtonGroup, "m_newAlbumBtn" ); - m_newAlbumBtn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - rightButtonGroupLayout->addWidget( m_newAlbumBtn, 0, Qt::AlignHCenter ); + m_newAlbumBtn = new TQPushButton( rightButtonGroup, "m_newAlbumBtn" ); + m_newAlbumBtn->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + rightButtonGroupLayout->addWidget( m_newAlbumBtn, 0, TQt::AlignHCenter ); - m_addPhotoBtn = new QPushButton( rightButtonGroup, "m_addPhotoBtn" ); - m_addPhotoBtn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - rightButtonGroupLayout->addWidget( m_addPhotoBtn, 0, Qt::AlignHCenter ); + m_addPhotoBtn = new TQPushButton( rightButtonGroup, "m_addPhotoBtn" ); + m_addPhotoBtn->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + rightButtonGroupLayout->addWidget( m_addPhotoBtn, 0, TQt::AlignHCenter ); // ------------------------------------------------------------------------ - QGroupBox* optionsBox = new QGroupBox(i18n("Override Default Options"), + TQGroupBox* optionsBox = new TQGroupBox(i18n("Override Default Options"), rightButtonGroup); optionsBox->setColumnLayout(0, Qt::Vertical); - optionsBox->layout()->setSpacing(5); - optionsBox->layout()->setMargin(5); - QGridLayout* optionsBoxLayout = new QGridLayout(optionsBox->layout()); + optionsBox->tqlayout()->setSpacing(5); + optionsBox->tqlayout()->setMargin(5); + TQGridLayout* optionsBoxLayout = new TQGridLayout(optionsBox->tqlayout()); // ------------------------------------------------------------------------ - m_resizeCheckBox = new QCheckBox(optionsBox); + m_resizeCheckBox = new TQCheckBox(optionsBox); m_resizeCheckBox->setText(i18n("Resize photos before uploading")); optionsBoxLayout->addMultiCellWidget(m_resizeCheckBox, 0, 0, 0, 1); - m_dimensionSpinBox = new QSpinBox(0, 5000, 10, optionsBox); + m_dimensionSpinBox = new TQSpinBox(0, 5000, 10, optionsBox); m_dimensionSpinBox->setValue(600); - m_dimensionSpinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + m_dimensionSpinBox->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); optionsBoxLayout->addWidget(m_dimensionSpinBox, 1, 1); - QLabel* resizeLabel = new QLabel(i18n("Maximum dimension:"), optionsBox); + TQLabel* resizeLabel = new TQLabel(i18n("Maximum dimension:"), optionsBox); optionsBoxLayout->addWidget(resizeLabel, 1, 0); m_resizeCheckBox->setChecked(false); m_dimensionSpinBox->setEnabled(false); - connect(m_resizeCheckBox, SIGNAL(clicked()), SLOT(slotResizeChecked())); + connect(m_resizeCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotResizeChecked())); // ------------------------------------------------------------------------ @@ -127,7 +127,7 @@ GalleryWidget::GalleryWidget( QWidget* parent, const char* name, WFlags fl ) // ------------------------------------------------------------------------ - spacer = new QSpacerItem( 20, 100, QSizePolicy::Minimum, QSizePolicy::Expanding ); + spacer = new TQSpacerItem( 20, 100, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); rightButtonGroupLayout->addItem( spacer ); // ------------------------------------------------------------------------ @@ -139,7 +139,7 @@ GalleryWidget::GalleryWidget( QWidget* parent, const char* name, WFlags fl ) // ------------------------------------------------------------------------ - resize( QSize(600, 400).expandedTo(minimumSizeHint()) ); + resize( TQSize(600, 400).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); } diff --git a/kipi-plugins/sync/gallerywidget.h b/kipi-plugins/sync/gallerywidget.h index 9389ce1..4f1f081 100644 --- a/kipi-plugins/sync/gallerywidget.h +++ b/kipi-plugins/sync/gallerywidget.h @@ -19,24 +19,25 @@ #ifndef GALLERYWIDGET_H #define GALLERYWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> -class QListView; -class QPushButton; -class QSpinBox; -class QCheckBox; +class TQListView; +class TQPushButton; +class TQSpinBox; +class TQCheckBox; class KHTMLPart; namespace KIPIGalleryExportPlugin { -class GalleryWidget : public QWidget +class GalleryWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - GalleryWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + GalleryWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~GalleryWidget(); private slots: @@ -45,12 +46,12 @@ private slots: private: - QListView* m_albumView; + TQListView* m_albumView; KHTMLPart* m_photoView; - QPushButton* m_newAlbumBtn; - QPushButton* m_addPhotoBtn; - QCheckBox* m_resizeCheckBox; - QSpinBox* m_dimensionSpinBox; + TQPushButton* m_newAlbumBtn; + TQPushButton* m_addPhotoBtn; + TQCheckBox* m_resizeCheckBox; + TQSpinBox* m_dimensionSpinBox; friend class GalleryWindow; }; diff --git a/kipi-plugins/sync/gallerywindow.cpp b/kipi-plugins/sync/gallerywindow.cpp index 0b5960f..96121be 100644 --- a/kipi-plugins/sync/gallerywindow.cpp +++ b/kipi-plugins/sync/gallerywindow.cpp @@ -19,17 +19,17 @@ * * ============================================================ */ -// Include files for Qt - -#include <qlistview.h> -#include <qpushbutton.h> -#include <qtimer.h> -#include <qpixmap.h> -#include <qcursor.h> -#include <qlineedit.h> -#include <qprogressdialog.h> -#include <qspinbox.h> -#include <qcheckbox.h> +// Include files for TQt + +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqtimer.h> +#include <tqpixmap.h> +#include <tqcursor.h> +#include <tqlineedit.h> +#include <tqprogressdialog.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> // Include files for KDE @@ -68,8 +68,8 @@ namespace KIPIGalleryExportPlugin { -GalleryWindow::GalleryWindow(KIPI::Interface* interface, QWidget *parent, Galleries* pGalleries) - : KDialogBase(parent, 0, true, i18n("Gallery Export"), Help|Close, Close, false), +GalleryWindow::GalleryWindow(KIPI::Interface* interface, TQWidget *tqparent, Galleries* pGalleries) + : KDialogBase(tqparent, 0, true, i18n("Gallery Export"), Help|Close, Close, false), m_interface(interface), mpGalleries(pGalleries) { @@ -93,7 +93,7 @@ GalleryWindow::GalleryWindow(KIPI::Interface* interface, QWidget *parent, Galler m_helpButton = actionButton( Help ); KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); m_helpButton->setPopup( helpMenu->menu() ); GalleryWidget* widget = new GalleryWidget(this); @@ -112,40 +112,40 @@ GalleryWindow::GalleryWindow(KIPI::Interface* interface, QWidget *parent, Galler m_newAlbumBtn->setEnabled( false ); m_addPhotoBtn->setEnabled( false ); - m_progressDlg = new QProgressDialog( this, 0, true ); + m_progressDlg = new TQProgressDialog( this, 0, true ); m_progressDlg->setAutoReset( true ); m_progressDlg->setAutoClose( true ); - connect(m_progressDlg, SIGNAL(canceled()), SLOT(slotAddPhotoCancel())); + connect(m_progressDlg, TQT_SIGNAL(canceled()), TQT_SLOT(slotAddPhotoCancel())); - connect(m_albumView, SIGNAL(selectionChanged()), SLOT(slotAlbumSelected())); + connect(m_albumView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotAlbumSelected())); connect(m_photoView->browserExtension(), - SIGNAL(openURLRequest(const KURL&, + TQT_SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)), - SLOT(slotOpenPhoto(const KURL&))); + TQT_SLOT(slotOpenPhoto(const KURL&))); - connect(m_newAlbumBtn, SIGNAL(clicked()), SLOT(slotNewAlbum())); - connect(m_addPhotoBtn, SIGNAL(clicked()), SLOT( slotAddPhotos())); + connect(m_newAlbumBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotNewAlbum())); + connect(m_addPhotoBtn, TQT_SIGNAL(clicked()), TQT_SLOT( slotAddPhotos())); // read config KConfig config("kipirc"); config.setGroup("GallerySync Settings"); m_talker = new GalleryTalker( this ); - connect( m_talker, SIGNAL( signalError( const QString& ) ), - SLOT( slotError( const QString& ) ) ); - connect( m_talker, SIGNAL( signalBusy( bool ) ), - SLOT( slotBusy( bool ) ) ); - connect( m_talker, SIGNAL( signalLoginFailed( const QString& ) ), - SLOT( slotLoginFailed( const QString& ) ) ); - connect( m_talker, SIGNAL( signalAlbums( const QValueList<GAlbum>& ) ), - SLOT( slotAlbums( const QValueList<GAlbum>& ) ) ); - connect( m_talker, SIGNAL( signalPhotos( const QValueList<GPhoto>& ) ), - SLOT( slotPhotos( const QValueList<GPhoto>& ) ) ); - connect( m_talker, SIGNAL( signalAddPhotoSucceeded() ), - SLOT( slotAddPhotoSucceeded() ) ); - connect( m_talker, SIGNAL( signalAddPhotoFailed( const QString& ) ), - SLOT( slotAddPhotoFailed( const QString& ) ) ); + connect( m_talker, TQT_SIGNAL( signalError( const TQString& ) ), + TQT_SLOT( slotError( const TQString& ) ) ); + connect( m_talker, TQT_SIGNAL( signalBusy( bool ) ), + TQT_SLOT( slotBusy( bool ) ) ); + connect( m_talker, TQT_SIGNAL( signalLoginFailed( const TQString& ) ), + TQT_SLOT( slotLoginFailed( const TQString& ) ) ); + connect( m_talker, TQT_SIGNAL( signalAlbums( const TQValueList<GAlbum>& ) ), + TQT_SLOT( slotAlbums( const TQValueList<GAlbum>& ) ) ); + connect( m_talker, TQT_SIGNAL( signalPhotos( const TQValueList<GPhoto>& ) ), + TQT_SLOT( slotPhotos( const TQValueList<GPhoto>& ) ) ); + connect( m_talker, TQT_SIGNAL( signalAddPhotoSucceeded() ), + TQT_SLOT( slotAddPhotoSucceeded() ) ); + connect( m_talker, TQT_SIGNAL( signalAddPhotoFailed( const TQString& ) ), + TQT_SLOT( slotAddPhotoFailed( const TQString& ) ) ); if (config.readBoolEntry("Resize", false)) { @@ -159,7 +159,7 @@ GalleryWindow::GalleryWindow(KIPI::Interface* interface, QWidget *parent, Galler } m_dimensionSpinBox->setValue(config.readNumEntry("Maximum Width", 1600)); - QTimer::singleShot( 0, this, SLOT( slotDoLogin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoLogin() ) ); } GalleryWindow::~GalleryWindow() @@ -184,7 +184,7 @@ void GalleryWindow::slotDoLogin() { GalleryList dlg(this, mpGalleries); - if (QDialog::Accepted != dlg.exec()) + if (TQDialog::Accepted != dlg.exec()) { close(); return; @@ -222,7 +222,7 @@ void GalleryWindow::slotDoLogin() m_talker->login(url.url(), p_gallery->username(), p_gallery->password()); } -void GalleryWindow::slotLoginFailed( const QString& msg ) +void GalleryWindow::slotLoginFailed( const TQString& msg ) { if ( KMessageBox::warningYesNo( this, i18n( "Failed to login into remote gallery. " ) @@ -241,25 +241,25 @@ void GalleryWindow::slotBusy( bool val ) { if ( val ) { - setCursor(QCursor::WaitCursor); + setCursor(TQCursor::WaitCursor); m_newAlbumBtn->setEnabled( false ); m_addPhotoBtn->setEnabled( false ); } else { - setCursor(QCursor::ArrowCursor); + setCursor(TQCursor::ArrowCursor); bool loggedIn = m_talker->loggedIn(); m_newAlbumBtn->setEnabled( loggedIn ); m_addPhotoBtn->setEnabled( loggedIn && m_albumView->selectedItem() ); } } -void GalleryWindow::slotError( const QString& msg ) +void GalleryWindow::slotError( const TQString& msg ) { KMessageBox::error( this, msg ); } -void GalleryWindow::slotAlbums( const QValueList<GAlbum>& albumList ) +void GalleryWindow::slotAlbums( const TQValueList<GAlbum>& albumList ) { m_albumDict.clear(); m_albumView->clear(); @@ -268,15 +268,15 @@ void GalleryWindow::slotAlbums( const QValueList<GAlbum>& albumList ) m_photoView->end(); KIconLoader* iconLoader = KApplication::kApplication()->iconLoader(); - QPixmap pix = iconLoader->loadIcon( "folder", KIcon::NoGroup, 32 ); + TQPixmap pix = iconLoader->loadIcon( "folder", KIcon::NoGroup, 32 ); - typedef QValueList<GAlbum> GAlbumList; + typedef TQValueList<GAlbum> GAlbumList; GAlbumList::const_iterator iter; for ( iter = albumList.begin(); iter != albumList.end(); ++iter ) { const GAlbum& album = *iter; - if ( album.parent_ref_num == 0 ) + if ( album.tqparent_ref_num == 0 ) { GAlbumViewItem* item = new GAlbumViewItem( m_albumView, album.title, album ); @@ -285,17 +285,17 @@ void GalleryWindow::slotAlbums( const QValueList<GAlbum>& albumList ) } else { - QListViewItem* parent = m_albumDict.find( album.parent_ref_num ); - if ( parent ) + TQListViewItem* tqparent = m_albumDict.tqfind( album.tqparent_ref_num ); + if ( tqparent ) { - GAlbumViewItem* item = new GAlbumViewItem( parent, album.title, + GAlbumViewItem* item = new GAlbumViewItem( tqparent, album.title, album); item->setPixmap( 0, pix ); m_albumDict.insert( album.ref_num, item ); } else { - kdWarning() << "Failed to find parent for album " + kdWarning() << "Failed to find tqparent for album " << album.name << " with id " << album.ref_num << "\n"; } @@ -316,7 +316,7 @@ void GalleryWindow::slotAlbums( const QValueList<GAlbum>& albumList ) if (lastSelectedID > 0) { - GAlbumViewItem* lastSelectedItem = m_albumDict.find( lastSelectedID ); + GAlbumViewItem* lastSelectedItem = m_albumDict.tqfind( lastSelectedID ); if (lastSelectedItem) { m_albumView->setSelected( lastSelectedItem, true ); @@ -325,24 +325,24 @@ void GalleryWindow::slotAlbums( const QValueList<GAlbum>& albumList ) } } -void GalleryWindow::slotPhotos( const QValueList<GPhoto>& photoList) +void GalleryWindow::slotPhotos( const TQValueList<GPhoto>& photoList) { int pxSize = fontMetrics().height() - 2; - QString styleSheet = - QString( "body { margin: 8px; font-size: %1px; " + TQString styleSheet = + TQString( "body { margin: 8px; font-size: %1px; " " color: %2; background-color: %3;}" ) - .arg( pxSize ) - .arg( colorGroup().text().name() ) - .arg( colorGroup().base().name() ); + .tqarg( pxSize ) + .tqarg( tqcolorGroup().text().name() ) + .tqarg( tqcolorGroup().base().name() ); - styleSheet += QString( "a { font-size: %1px; color: %2; " + styleSheet += TQString( "a { font-size: %1px; color: %2; " "text-decoration: none;}" ) - .arg( pxSize ) - .arg( colorGroup().text().name() ); - styleSheet += QString( "i { font-size: %1px; color: %2; " + .tqarg( pxSize ) + .tqarg( tqcolorGroup().text().name() ); + styleSheet += TQString( "i { font-size: %1px; color: %2; " "text-decoration: none;}" ) - .arg( pxSize-2 ) - .arg( QColor("steelblue").name() ); + .tqarg( pxSize-2 ) + .tqarg( TQColor("steelblue").name() ); m_photoView->begin(); m_photoView->setUserStyleSheet( styleSheet ); @@ -353,7 +353,7 @@ void GalleryWindow::slotPhotos( const QValueList<GPhoto>& photoList) "border='0' cellspacing='1' cellpadding='1'>" ); - typedef QValueList<GPhoto> GPhotoList; + typedef TQValueList<GPhoto> GPhotoList; GPhotoList::const_iterator iter; for ( iter = photoList.begin(); iter != photoList.end(); ++iter ) { @@ -362,14 +362,14 @@ void GalleryWindow::slotPhotos( const QValueList<GPhoto>& photoList) KURL thumburl(photo.albumURL + photo.thumbName); m_photoView->write( "<tr><td class='photo'>" - + QString("<a href='%1'>") - .arg(imageurl.url()) - + QString("<img border=1 src=\"%1\"><br>") - .arg(thumburl.url()) + + TQString("<a href='%1'>") + .tqarg(imageurl.url()) + + TQString("<img border=1 src=\"%1\"><br>") + .tqarg(thumburl.url()) + photo.name - + ( photo.caption.isEmpty() ? QString() : - QString("<br><i>%1</i>") - .arg(photo.caption) ) + + ( photo.caption.isEmpty() ? TQString() : + TQString("<br><i>%1</i>") + .tqarg(photo.caption) ) + "</a></td></tr>" ); } @@ -381,7 +381,7 @@ void GalleryWindow::slotPhotos( const QValueList<GPhoto>& photoList) void GalleryWindow::slotAlbumSelected() { - QListViewItem* item = m_albumView->selectedItem(); + TQListViewItem* item = m_albumView->selectedItem(); if ( !item ) { m_addPhotoBtn->setEnabled( false ); @@ -412,19 +412,19 @@ void GalleryWindow::slotNewAlbum() { GalleryAlbumDialog dlg; dlg.titleEdit->setFocus( ); - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) { return; } - QString name = dlg.nameEdit->text(); - QString title = dlg.titleEdit->text(); - QString caption = dlg.captionEdit->text(); + TQString name = dlg.nameEdit->text(); + TQString title = dlg.titleEdit->text(); + TQString caption = dlg.captionEdit->text(); // check for prohibited chars in the album name // \ / * ? " ' & < > | . + # ( ) or spaces - // Todo: Change this to a QRegExp check. - QChar ch; + // Todo: Change this to a TQRegExp check. + TQChar ch; bool clean = true; for (uint i=0; i<name.length(); i++) { @@ -514,29 +514,29 @@ void GalleryWindow::slotNewAlbum() if (!clean) { KMessageBox::error( this, i18n("Sorry, these characters are not allowed in album name: %1") - .arg("\\ / * ? \" \' & < > | . + # ( ) or spaces") ); + .tqarg("\\ / * ? \" \' & < > | . + # ( ) or spaces") ); return; } - QString parentAlbumName; + TQString tqparentAlbumName; - QListViewItem* item = m_albumView->selectedItem(); + TQListViewItem* item = m_albumView->selectedItem(); if (item) { GAlbumViewItem* viewItem = static_cast<GAlbumViewItem*>(item); - parentAlbumName = viewItem->album.name; + tqparentAlbumName = viewItem->album.name; } else { - parentAlbumName = "0"; + tqparentAlbumName = "0"; } - m_talker->createAlbum(parentAlbumName, name, title, caption); + m_talker->createAlbum(tqparentAlbumName, name, title, caption); } void GalleryWindow::slotAddPhotos() { - QListViewItem* item = m_albumView->selectedItem(); + TQListViewItem* item = m_albumView->selectedItem(); if (!item) return; @@ -544,7 +544,7 @@ void GalleryWindow::slotAddPhotos() if (urls.isEmpty()) return; - typedef QPair<QString,QString> Pair; + typedef TQPair<TQString,TQString> Pair; m_uploadQueue.clear(); for (KURL::List::iterator it = urls.begin(); it != urls.end(); ++it) @@ -569,7 +569,7 @@ void GalleryWindow::slotAddPhotoNext() return; } - typedef QPair<QString,QString> Pair; + typedef TQPair<TQString,TQString> Pair; Pair pathComments = m_uploadQueue.first(); m_uploadQueue.pop_front(); @@ -584,7 +584,7 @@ void GalleryWindow::slotAddPhotoNext() } m_progressDlg->setLabelText( i18n("Uploading file %1 ") - .arg( KURL(pathComments.first).filename() ) ); + .tqarg( KURL(pathComments.first).filename() ) ); if (m_progressDlg->isHidden()) m_progressDlg->show(); @@ -597,7 +597,7 @@ void GalleryWindow::slotAddPhotoSucceeded() slotAddPhotoNext(); } -void GalleryWindow::slotAddPhotoFailed( const QString& msg ) +void GalleryWindow::slotAddPhotoFailed( const TQString& msg ) { if ( KMessageBox::warningContinueCancel( this, i18n( "Failed to upload photo into " diff --git a/kipi-plugins/sync/gallerywindow.h b/kipi-plugins/sync/gallerywindow.h index 7e4aa0e..bf8d378 100644 --- a/kipi-plugins/sync/gallerywindow.h +++ b/kipi-plugins/sync/gallerywindow.h @@ -20,15 +20,15 @@ #define GALLERYWINDOW_H #include <kdialogbase.h> -#include <qvaluelist.h> -#include <qpair.h> -#include <qintdict.h> - -class QListView; -class QPushButton; -class QSpinBox; -class QCheckBox; -class QProgressDialog; +#include <tqvaluelist.h> +#include <tqpair.h> +#include <tqintdict.h> + +class TQListView; +class TQPushButton; +class TQSpinBox; +class TQCheckBox; +class TQProgressDialog; class KHTMLPart; class KURL; @@ -53,31 +53,32 @@ class GAlbumViewItem; class GalleryWindow : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GalleryWindow(KIPI::Interface *interface, QWidget *parent, Galleries* pGalleries); + GalleryWindow(KIPI::Interface *interface, TQWidget *tqparent, Galleries* pGalleries); ~GalleryWindow(); private: - QListView *m_albumView; + TQListView *m_albumView; KHTMLPart *m_photoView; - QPushButton *m_newAlbumBtn; - QPushButton *m_addPhotoBtn; - QPushButton *m_helpButton; - QCheckBox *m_resizeCheckBox; - QSpinBox *m_dimensionSpinBox; + TQPushButton *m_newAlbumBtn; + TQPushButton *m_addPhotoBtn; + TQPushButton *m_helpButton; + TQCheckBox *m_resizeCheckBox; + TQSpinBox *m_dimensionSpinBox; GalleryTalker *m_talker; - QIntDict<GAlbumViewItem> m_albumDict; - QString m_lastSelectedAlbum; + TQIntDict<GAlbumViewItem> m_albumDict; + TQString m_lastSelectedAlbum; KIPI::Interface *m_interface; KIPIPlugins::KPAboutData *m_about; - QProgressDialog *m_progressDlg; + TQProgressDialog *m_progressDlg; unsigned int m_uploadCount; unsigned int m_uploadTotal; - QValueList< QPair<QString,QString> > m_uploadQueue; + TQValueList< TQPair<TQString,TQString> > m_uploadQueue; Galleries* mpGalleries; Gallery* mpGallery; @@ -85,18 +86,18 @@ private: private slots: void slotDoLogin(); - void slotLoginFailed( const QString& msg ); + void slotLoginFailed( const TQString& msg ); void slotBusy( bool val ); - void slotError( const QString& msg ); - void slotAlbums( const QValueList<GAlbum>& albumList ); - void slotPhotos( const QValueList<GPhoto>& photoList ); + void slotError( const TQString& msg ); + void slotAlbums( const TQValueList<GAlbum>& albumList ); + void slotPhotos( const TQValueList<GPhoto>& photoList ); void slotAlbumSelected(); void slotOpenPhoto( const KURL& url ); void slotNewAlbum(); void slotAddPhotos(); void slotAddPhotoNext(); void slotAddPhotoSucceeded(); - void slotAddPhotoFailed( const QString& msg ); + void slotAddPhotoFailed( const TQString& msg ); void slotAddPhotoCancel(); void slotHelp(); }; diff --git a/kipi-plugins/sync/libkipi2/collection.h b/kipi-plugins/sync/libkipi2/collection.h index f7953aa..931fa7c 100644 --- a/kipi-plugins/sync/libkipi2/collection.h +++ b/kipi-plugins/sync/libkipi2/collection.h @@ -19,7 +19,7 @@ #ifndef KIPI2_COLLECTION_H #define KIPI2_COLLECTION_H -#include <qvaluelist.h> +#include <tqvaluelist.h> namespace KIPI2 { @@ -38,8 +38,8 @@ namespace KIPI2 class Item; // Some list definitions - typedef QValueList<Collection*> CollectionList; - typedef QValueList<Item*> ItemList; + typedef TQValueList<Collection*> CollectionList; + typedef TQValueList<Item*> ItemList; // And some templated functions for cleaning up in Collection derived destructors template <class T> void DestroyCollectionList(CollectionList& collections); @@ -68,7 +68,7 @@ namespace KIPI2 virtual const Item* addItem() = 0; private: - // Store for parent + // Store for tqparent Collection* mpParent; // Store the features that this collection supports diff --git a/kipi-plugins/sync/libkipi2/interface.h b/kipi-plugins/sync/libkipi2/interface.h index e4d0e31..e77a4c6 100644 --- a/kipi-plugins/sync/libkipi2/interface.h +++ b/kipi-plugins/sync/libkipi2/interface.h @@ -19,14 +19,15 @@ #ifndef KIPI2_INTERFACE_H #define KIPI2_INTERFACE_H -#include <qobject.h> +#include <tqobject.h> #include "collection.h" namespace KIPI2 { -class Interface : public QObject +class Interface : public TQObject { Q_OBJECT + TQ_OBJECT public: virtual const CollectionList* getCollections() = 0; diff --git a/kipi-plugins/sync/libkipi2/item.h b/kipi-plugins/sync/libkipi2/item.h index 6b42830..0b3eda3 100644 --- a/kipi-plugins/sync/libkipi2/item.h +++ b/kipi-plugins/sync/libkipi2/item.h @@ -19,7 +19,7 @@ #ifndef KIPI2_ITEM_H #define KIPI2_ITEM_H -#include <qvaluelist.h> +#include <tqvaluelist.h> namespace KIPI2 { diff --git a/kipi-plugins/sync/plugin_sync.cpp b/kipi-plugins/sync/plugin_sync.cpp index c29f587..69a0c06 100644 --- a/kipi-plugins/sync/plugin_sync.cpp +++ b/kipi-plugins/sync/plugin_sync.cpp @@ -44,10 +44,10 @@ K_EXPORT_COMPONENT_FACTORY(kipiplugin_sync, Factory("kipiplugin_sync")) -Plugin_Sync::Plugin_Sync(QObject *parent, +Plugin_Sync::Plugin_Sync(TQObject *tqparent, const char*, - const QStringList&) - : KIPI::Plugin(Factory::instance(), parent, "Sync"), + const TQStringList&) + : KIPI::Plugin(Factory::instance(), tqparent, "Sync"), mpSinks(NULL) { kdDebug(51001) << "Plugin_Sync plugin loaded" @@ -55,7 +55,7 @@ Plugin_Sync::Plugin_Sync(QObject *parent, } -void Plugin_Sync::setup(QWidget* widget) +void Plugin_Sync::setup(TQWidget* widget) { // Create a collection to store the various Sinks a user can // define. @@ -63,7 +63,7 @@ void Plugin_Sync::setup(QWidget* widget) // Standard initialisation for Kipi Plugins KIPI::Plugin::setup(widget); - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { @@ -77,7 +77,7 @@ void Plugin_Sync::setup(QWidget* widget) mpActionSync = new KAction(i18n("Synchronize..."), 0, this, - SLOT(slotSync()), + TQT_SLOT(slotSync()), actionCollection(), "sync"); mpActionSync->setEnabled(true); @@ -86,7 +86,7 @@ void Plugin_Sync::setup(QWidget* widget) mpActionConfigure = new KAction(i18n("Configure Synchronization..."), 0, this, - SLOT(slotConfigure()), + TQT_SLOT(slotConfigure()), actionCollection(), "sync"); mpActionConfigure->setEnabled(true); @@ -95,7 +95,7 @@ void Plugin_Sync::setup(QWidget* widget) mpActionSettingsCollection = new KAction(i18n("Synchronization Settings..."), 0, this, - SLOT(slotSettingsCollection()), + TQT_SLOT(slotSettingsCollection()), actionCollection(), "sync"); mpActionSettingsCollection->setEnabled(true); @@ -104,7 +104,7 @@ void Plugin_Sync::setup(QWidget* widget) mpActionSettingsImage = new KAction(i18n("Synchronization Settings..."), 0, this, - SLOT(slotSettingsImage()), + TQT_SLOT(slotSettingsImage()), actionCollection(), "sync"); mpActionSettingsImage->setEnabled(true); @@ -122,7 +122,7 @@ Plugin_Sync::~Plugin_Sync() void Plugin_Sync::slotSync() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { kdError( 51000 ) << "Kipi interface is null!" << endl; @@ -137,7 +137,7 @@ void Plugin_Sync::slotSync() void Plugin_Sync::slotConfigure() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { kdError(51000) << "Kipi interface is null!" << endl; @@ -152,7 +152,7 @@ void Plugin_Sync::slotConfigure() void Plugin_Sync::slotSettingsCollection() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { kdError(51000) << "Kipi interface is null!" << endl; @@ -165,7 +165,7 @@ void Plugin_Sync::slotSettingsCollection() void Plugin_Sync::slotSettingsImage() { - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent()); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(tqparent()); if (!interface) { kdError(51000) << "Kipi interface is null!" << endl; diff --git a/kipi-plugins/sync/plugin_sync.h b/kipi-plugins/sync/plugin_sync.h index 2d04997..4e98274 100644 --- a/kipi-plugins/sync/plugin_sync.h +++ b/kipi-plugins/sync/plugin_sync.h @@ -35,16 +35,17 @@ class Sinks; class Plugin_Sync : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_Sync(QObject* pParent, + Plugin_Sync(TQObject* pParent, const char* pName, - const QStringList &rArgs); + const TQStringList &rArgs); ~Plugin_Sync(); virtual KIPI::Category category(KAction* pAction) const; - virtual void setup(QWidget* pWidget); + virtual void setup(TQWidget* pWidget); public slots: diff --git a/kipi-plugins/sync/sink.cpp b/kipi-plugins/sync/sink.cpp index 7d27f91..2c2dfec 100644 --- a/kipi-plugins/sync/sink.cpp +++ b/kipi-plugins/sync/sink.cpp @@ -23,7 +23,7 @@ namespace KIPISyncPlugin { -Sink::Sink(unsigned int sinkId, QString name, KConfig*, KWallet::Wallet*) +Sink::Sink(unsigned int sinkId, TQString name, KConfig*, KWallet::Wallet*) : mSinkId(sinkId), mName(name) { @@ -34,13 +34,13 @@ unsigned int Sink::SinkId() return mSinkId; } -QString Sink::Name() +TQString Sink::Name() { return mName; } /* -Sink::Sink(const QString& name, const QString& url, - const QString& username, const QString& password, +Sink::Sink(const TQString& name, const TQString& url, + const TQString& username, const TQString& password, const unsigned int version, const unsigned int sinkId) : mName(name), @@ -58,36 +58,36 @@ Sink::~Sink() } -QString Sink::name() const { return mName; } -QString Sink::url() const { return mUrl; } -QString Sink::username() const { return mUsername; } -QString Sink::password() const { return mPassword; } +TQString Sink::name() const { return mName; } +TQString Sink::url() const { return mUrl; } +TQString Sink::username() const { return mUsername; } +TQString Sink::password() const { return mPassword; } unsigned int Sink::version() const { return mVersion; } unsigned int Sink::sinkId() const { return mSinkId; } -void Sink::setName(QString name) { mName = name; } -void Sink::setUrl(QString url) { mUrl = url; } -void Sink::setUsername(QString username) { mUsername = username; } -void Sink::setPassword(QString password) { mPassword = password; } +void Sink::setName(TQString name) { mName = name; } +void Sink::setUrl(TQString url) { mUrl = url; } +void Sink::setUsername(TQString username) { mUsername = username; } +void Sink::setPassword(TQString password) { mPassword = password; } void Sink::setVersion(unsigned int version) { mVersion = version; } void Sink::setSinkId(unsigned int sinkId) { mSinkId = sinkId; } -void Sink::asQListViewItem(QListView* pParent) +void Sink::asTQListViewItem(TQListView* pParent) { - new SinkQListViewItem(this, pParent); + new SinkTQListViewItem(this, pParent); } */ // Pretend sink (just for testin the structure - will be removed!) -Sink2::Sink2(unsigned int sinkId, QString name, KConfig* pConfig, KWallet::Wallet* pWallet) +Sink2::Sink2(unsigned int sinkId, TQString name, KConfig* pConfig, KWallet::Wallet* pWallet) : Sink(sinkId, name, pConfig, pWallet) { mName = "Sink2"; } -QString Sink2::Type() { return "Sink2"; } -QString Sink2::TypeDescription() { return "Sink2"; } +TQString Sink2::Type() { return "Sink2"; } +TQString Sink2::TypeDescription() { return "Sink2"; } KIPI2::CollectionList* Sink2::getCollections() { diff --git a/kipi-plugins/sync/sink.h b/kipi-plugins/sync/sink.h index feabf3d..3ef8cfc 100644 --- a/kipi-plugins/sync/sink.h +++ b/kipi-plugins/sync/sink.h @@ -19,7 +19,7 @@ #ifndef SINK_H #define SINK_H -#include <qstring.h> +#include <tqstring.h> #include "libkipi2/interface.h" #include <kconfig.h> @@ -41,18 +41,18 @@ namespace KIPISyncPlugin class Sink : public KIPI2::Interface { public: - Sink(unsigned int sinkId, QString name, KConfig* pConfig, KWallet::Wallet* pWallet); + Sink(unsigned int sinkId, TQString name, KConfig* pConfig, KWallet::Wallet* pWallet); unsigned int SinkId(); /// The Name of the Sink as chosen by the user. - QString Name(); + TQString Name(); /// An internal, unique type as specified by the sink. - virtual QString Type() = 0; + virtual TQString Type() = 0; /// Some information about the sink type for the benefit of the user. - virtual QString TypeDescription() = 0; + virtual TQString TypeDescription() = 0; virtual const KIPI2::CollectionList* getCollections() = 0; @@ -63,12 +63,12 @@ public: virtual void Disconnect() { }; - //virtual void asQListViewItem(QListView* pParent) = 0; + //virtual void asTQListViewItem(TQListView* pParent) = 0; protected: unsigned int mSinkId; - QString mName; + TQString mName; }; @@ -77,9 +77,9 @@ protected: class Sink2 : Sink { public: - Sink2(unsigned int sinkId, QString name, KConfig* pConfig, KWallet::Wallet* pWallet); - QString Type(); - QString TypeDescription(); + Sink2(unsigned int sinkId, TQString name, KConfig* pConfig, KWallet::Wallet* pWallet); + TQString Type(); + TQString TypeDescription(); KIPI2::CollectionList* getCollections(); void Save(KConfig* pConfig, KWallet::Wallet* pWallet); }; diff --git a/kipi-plugins/sync/sinkfactory.cpp b/kipi-plugins/sync/sinkfactory.cpp index bd34bcc..f3ebe28 100644 --- a/kipi-plugins/sync/sinkfactory.cpp +++ b/kipi-plugins/sync/sinkfactory.cpp @@ -25,9 +25,9 @@ namespace KIPISyncPlugin SinkMap SinkFactory::mSinkProxies; // Define the register method -bool SinkFactory::Register(QString type, SinkProxy* pSinkProxy) +bool SinkFactory::Register(TQString type, SinkProxy* pSinkProxy) { - if (mSinkProxies.contains(type)) + if (mSinkProxies.tqcontains(type)) return false; mSinkProxies[type] = pSinkProxy; @@ -35,9 +35,9 @@ bool SinkFactory::Register(QString type, SinkProxy* pSinkProxy) } // The main creation method -Sink* SinkFactory::Create(QString type, unsigned int sinkId, QString name, KConfig* pConfig, KWallet::Wallet* pWallet) +Sink* SinkFactory::Create(TQString type, unsigned int sinkId, TQString name, KConfig* pConfig, KWallet::Wallet* pWallet) { - if (!mSinkProxies.contains(type)) + if (!mSinkProxies.tqcontains(type)) return NULL; return (*(mSinkProxies[type]))(sinkId, name, pConfig, pWallet); diff --git a/kipi-plugins/sync/sinkfactory.h b/kipi-plugins/sync/sinkfactory.h index 19f9cd9..dd0bd0d 100644 --- a/kipi-plugins/sync/sinkfactory.h +++ b/kipi-plugins/sync/sinkfactory.h @@ -19,8 +19,8 @@ #ifndef SINKFACTORY_H #define SINKFACTORY_H -#include <qmap.h> -class QListView; +#include <tqmap.h> +class TQListView; class KConfig; namespace KWallet { @@ -35,23 +35,23 @@ class Sink; // Create a templated creator function to allow our "sinks" to // register themselves with the factory. template <class T> -Sink* SinkCreator(unsigned int sinkId, QString name, KConfig* pConfig, KWallet::Wallet* pWallet) +Sink* SinkCreator(unsigned int sinkId, TQString name, KConfig* pConfig, KWallet::Wallet* pWallet) { return (Sink*) new T(sinkId, name, pConfig, pWallet); } // Define a type that is a pointer to the templated function above. -typedef Sink* SinkProxy(unsigned int sinkId, QString name, KConfig* pConfig, KWallet::Wallet* pWallet); +typedef Sink* SinkProxy(unsigned int sinkId, TQString name, KConfig* pConfig, KWallet::Wallet* pWallet); // And define a type that is a Map of names to creator functions. -typedef QMap<QString, SinkProxy*> SinkMap; +typedef TQMap<TQString, SinkProxy*> SinkMap; // The factory to register and create the sinks class SinkFactory { public: - static bool Register(QString name, SinkProxy* pSinkProxy); - static Sink* Create(QString name, unsigned int sinkId, QString name, KConfig* pConfig, KWallet::Wallet* pWallet); + static bool Register(TQString name, SinkProxy* pSinkProxy); + static Sink* Create(TQString name, unsigned int sinkId, TQString name, KConfig* pConfig, KWallet::Wallet* pWallet); private: static SinkMap mSinkProxies; diff --git a/kipi-plugins/sync/sinklist.cpp b/kipi-plugins/sync/sinklist.cpp index 5e290ad..77c12ff 100644 --- a/kipi-plugins/sync/sinklist.cpp +++ b/kipi-plugins/sync/sinklist.cpp @@ -34,7 +34,7 @@ namespace KIPISyncPlugin { -SinkList::SinkList(QWidget *pParent, Sinks* pSinks, bool blnShowOpen) +SinkList::SinkList(TQWidget *pParent, Sinks* pSinks, bool blnShowOpen) : SinkListBase(pParent), mpSinks(pSinks), mpCurrentSink(0) @@ -45,7 +45,7 @@ SinkList::SinkList(QWidget *pParent, Sinks* pSinks, bool blnShowOpen) listSinks->addColumn(i18n("Name")); listSinks->addColumn(i18n("Type")); - mpSinks->asQListView(listSinks); + mpSinks->asTQListView(listSinks); } SinkList::~SinkList() @@ -60,7 +60,7 @@ Sink* SinkList::GetSink() void SinkList::selectionChanged() { - QListViewItem* p_lvi = listSinks->selectedItem(); + TQListViewItem* p_lvi = listSinks->selectedItem(); bool bln_selected = (p_lvi ? true : false); buttonRemove->setEnabled(bln_selected); buttonConfigure->setEnabled(bln_selected); @@ -68,7 +68,7 @@ void SinkList::selectionChanged() if (bln_selected) { - SinkQListViewItem* p_glvi = dynamic_cast<SinkQListViewItem*>(p_lvi); + SinkTQListViewItem* p_glvi = dynamic_cast<SinkTQListViewItem*>(p_lvi); mpCurrentSink = p_glvi->GetSink(); } else @@ -77,7 +77,7 @@ void SinkList::selectionChanged() } } -void SinkList::doubleClicked(QListViewItem* pCurrent, const QPoint&, int) +void SinkList::doubleClicked(TQListViewItem* pCurrent, const TQPoint&, int) { if (!pCurrent) return; @@ -98,11 +98,11 @@ void SinkList::buttonAdd_clicked(void) /* Sink* p_sink = new Sink(); SinkEdit dlg(this, p_sink, i18n("New Sink")); - if (QDialog::Accepted == dlg.exec()) + if (TQDialog::Accepted == dlg.exec()) { mpSinks->Add(p_sink); mpSinks->Save(); - p_sink->asQListViewItem(mpSinkList); + p_sink->asTQListViewItem(mpSinkList); } else { @@ -115,7 +115,7 @@ void SinkList::buttonAdd_clicked(void) //================== Edit ====== void SinkList::buttonConfigure_clicked(void) { - QListViewItem* p_lvi = listSinks->selectedItem(); + TQListViewItem* p_lvi = listSinks->selectedItem(); if (!p_lvi) { KMessageBox::error(kapp->activeWindow(), i18n("No sink selected!")); @@ -123,9 +123,9 @@ void SinkList::buttonConfigure_clicked(void) else { /* - SinkQListViewItem* p_glvi = dynamic_cast<SinkQListViewItem*>(p_lvi); + SinkTQListViewItem* p_glvi = dynamic_cast<SinkTQListViewItem*>(p_lvi); SinkEdit dlg(this, p_glvi->GetSink(), i18n("Edit Sink")); - if (QDialog::Accepted == dlg.exec()) + if (TQDialog::Accepted == dlg.exec()) { p_glvi->Refresh(); mpSinks->Save(); @@ -138,7 +138,7 @@ void SinkList::buttonConfigure_clicked(void) //================== Remove ====== void SinkList::buttonRemove_clicked(void) { - QListViewItem* p_lvi = listSinks->selectedItem(); + TQListViewItem* p_lvi = listSinks->selectedItem(); if (!p_lvi) { KMessageBox::error(kapp->activeWindow(), i18n("No sink selected!")); @@ -152,9 +152,9 @@ void SinkList::buttonRemove_clicked(void) "You cannot undo this action."), i18n("Remove Sink?"), KStdGuiItem::yes(), KStdGuiItem::no(), - QString::null, KMessageBox::Dangerous)) + TQString(), KMessageBox::Dangerous)) { - SinkQListViewItem* p_glvi = dynamic_cast<SinkQListViewItem*>(p_lvi); + SinkTQListViewItem* p_glvi = dynamic_cast<SinkTQListViewItem*>(p_lvi); Sink* p_sink = p_glvi->GetSink(); delete p_glvi; mpSinks->Remove(p_sink); diff --git a/kipi-plugins/sync/sinklist.h b/kipi-plugins/sync/sinklist.h index 850b3f4..c7171fd 100644 --- a/kipi-plugins/sync/sinklist.h +++ b/kipi-plugins/sync/sinklist.h @@ -20,7 +20,7 @@ #include "sinklistbase.h" -class QWidget; +class TQWidget; namespace KIPISyncPlugin { @@ -31,10 +31,11 @@ class Sinks; class SinkList : public SinkListBase { Q_OBJECT + TQ_OBJECT public: - SinkList(QWidget* pParent, Sinks* pSinks, bool blnShowOpen = true); + SinkList(TQWidget* pParent, Sinks* pSinks, bool blnShowOpen = true); ~SinkList(); Sink* GetSink(void); @@ -43,7 +44,7 @@ private: Sinks* mpSinks; Sink* mpCurrentSink; - QListView* mpSinkList; + TQListView* mpSinkList; private slots: @@ -52,7 +53,7 @@ private slots: void buttonAdd_clicked(); void selectionChanged(); - void doubleClicked(QListViewItem*, const QPoint&, int); + void doubleClicked(TQListViewItem*, const TQPoint&, int); }; } diff --git a/kipi-plugins/sync/sinklistbase.ui b/kipi-plugins/sync/sinklistbase.ui index 804ab72..85e73ad 100644 --- a/kipi-plugins/sync/sinklistbase.ui +++ b/kipi-plugins/sync/sinklistbase.ui @@ -4,7 +4,7 @@ <property name="name"> <cstring>SinkListBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -18,11 +18,11 @@ <property name="sizeGripEnabled"> <bool>true</bool> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pixmapEyeCandy</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>10</y> @@ -37,11 +37,11 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QListView"> + <widget class="TQListView"> <property name="name"> <cstring>listSinks</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>120</x> <y>10</y> @@ -56,11 +56,11 @@ <enum>AllColumns</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layoutButtons</cstring> + <cstring>tqlayoutButtons</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>10</x> <y>270</y> @@ -167,12 +167,12 @@ <slot>accept()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">buttonRemove_clicked()</slot> <slot access="protected">buttonConfigure_clicked()</slot> <slot access="protected">buttonAdd_clicked()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdialog.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kipi-plugins/sync/sinks.cpp b/kipi-plugins/sync/sinks.cpp index 9dc9f14..b4363b8 100644 --- a/kipi-plugins/sync/sinks.cpp +++ b/kipi-plugins/sync/sinks.cpp @@ -16,9 +16,9 @@ * GNU General Public License for more details. * ============================================================ */ -#include <qstring.h> +#include <tqstring.h> -#include <qwidget.h> +#include <tqwidget.h> #include <kapplication.h> #include <kdebug.h> #include <kconfig.h> @@ -35,18 +35,18 @@ namespace KIPISyncPlugin { -SinkQListViewItem::SinkQListViewItem(Sink* pSink, QListView* pParent) - : QListViewItem(pParent, pSink->Name(), pSink->Type()), +SinkTQListViewItem::SinkTQListViewItem(Sink* pSink, TQListView* pParent) + : TQListViewItem(pParent, pSink->Name(), pSink->Type()), mpSink(pSink) { } -Sink* SinkQListViewItem::GetSink() +Sink* SinkTQListViewItem::GetSink() { return mpSink; } -void SinkQListViewItem::Refresh() +void SinkTQListViewItem::Refresh() { setText(0, mpSink->Name()); setText(1, mpSink->Type()); @@ -85,19 +85,19 @@ Sinks::Sinks() // Read config KConfig config("kipirc"); config.setGroup("Sync Settings"); - QValueList<int> sink_ids = config.readIntListEntry("Sinks"); + TQValueList<int> sink_ids = config.readIntListEntry("Sinks"); config.setGroup("Sync Sinks"); - QString name, type; - for (QValueList<int>::Iterator it = sink_ids.begin(); it != sink_ids.end(); ++it) + TQString name, type; + for (TQValueList<int>::Iterator it = sink_ids.begin(); it != sink_ids.end(); ++it) { unsigned int sink_id = (*it); if (sink_id > mMaxSinkId) mMaxSinkId = sink_id; - type = config.readEntry(QString("Type%1").arg(sink_id)); - name = config.readEntry(QString("Name%1").arg(sink_id)); + type = config.readEntry(TQString("Type%1").tqarg(sink_id)); + name = config.readEntry(TQString("Name%1").tqarg(sink_id)); Sink* p_sink = SinkFactory::Create(type, sink_id, name, &config, p_wallet); if (p_sink) mSinks.append(p_sink); @@ -123,7 +123,7 @@ void Sinks::Load() } -Sink* Sinks::Add(QString type, QString name) +Sink* Sinks::Add(TQString type, TQString name) { Sink* p_sink = SinkFactory::Create(type, ++mMaxSinkId, name, NULL, NULL); // This actually needs to be a call to sync factory creation... pass in the new SinkId @@ -144,7 +144,7 @@ void Sinks::Remove(Sink* pSink) /// @todo Abstract this to per-sink-type save void Sinks::Save() { - QValueList<int> sink_ids; + TQValueList<int> sink_ids; KConfig config("kipirc"); config.deleteGroup("Sync Sinks"); config.setGroup("Sync Sinks"); @@ -177,14 +177,14 @@ void Sinks::Save() config.writeEntry("Sinks", sink_ids); } -void Sinks::asQListView(QListView* pListView) +void Sinks::asTQListView(TQListView* pListView) { Load(); pListView->clear(); for (SinkPtrList::iterator it = mSinks.begin(); it != mSinks.end(); ++it) { - //(*it)->asQListViewItem(pListView); + //(*it)->asTQListViewItem(pListView); } } diff --git a/kipi-plugins/sync/sinks.h b/kipi-plugins/sync/sinks.h index 21d70fa..3636c97 100644 --- a/kipi-plugins/sync/sinks.h +++ b/kipi-plugins/sync/sinks.h @@ -19,8 +19,8 @@ #ifndef SINKS_H #define SINKS_H -#include <qptrlist.h> -#include <qlistview.h> +#include <tqptrlist.h> +#include <tqlistview.h> // Some sinks may wish to make use of the Wallet to store sensitive // information so we manage it here. @@ -36,11 +36,11 @@ namespace KIPISyncPlugin class Sink; /* Simple Stub Class to allow easy access to Sinks from GUI elements */ -class SinkQListViewItem : public QListViewItem +class SinkTQListViewItem : public TQListViewItem { public: - SinkQListViewItem(Sink* pSink, QListView* pParent); + SinkTQListViewItem(Sink* pSink, TQListView* pParent); Sink* GetSink(); void Refresh(); @@ -51,7 +51,7 @@ private: }; -typedef QPtrList<Sink> SinkPtrList; +typedef TQPtrList<Sink> SinkPtrList; /* Container class for all Sinks */ class Sinks @@ -61,10 +61,10 @@ public: Sinks(); ~Sinks(); - Sink* Add(QString type, QString name); + Sink* Add(TQString type, TQString name); void Remove(Sink* pSink); void Save(); - void asQListView(QListView* pListView); + void asTQListView(TQListView* pListView); private: void Load(); diff --git a/kipi-plugins/sync/sinks/gallery/galleryform.cpp b/kipi-plugins/sync/sinks/gallery/galleryform.cpp index 44a15ce..9c90dfa 100644 --- a/kipi-plugins/sync/sinks/gallery/galleryform.cpp +++ b/kipi-plugins/sync/sinks/gallery/galleryform.cpp @@ -23,9 +23,9 @@ #include <kmimetype.h> #include <kurl.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> //#include <cstring> //#include <cstdio> @@ -35,7 +35,7 @@ namespace KIPISyncPlugin { -GalleryForm::GalleryForm(GalleryVersion version, QString authToken) +GalleryForm::GalleryForm(GalleryVersion version, TQString authToken) : mVersion(version) { mBoundary = "----------"; @@ -55,33 +55,33 @@ GalleryForm::~GalleryForm() } -void GalleryForm::addPair(const QString& name, const QString& value) +void GalleryForm::addPair(const TQString& name, const TQString& value) { if (Gallery2 == mVersion) - return addPairRaw(QString("g2_form[%1]").arg(name), value); + return addPairRaw(TQString("g2_form[%1]").tqarg(name), value); return addPairRaw(name, value); } -void GalleryForm::addPairRaw(const QString& name, const QString& value) +void GalleryForm::addPairRaw(const TQString& name, const TQString& value) { - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << "--" << mBoundary << "\r\n"; ts << "Content-Disposition: form-data; name=\"" << name.ascii() << "\"\r\n\r\n"; ts << value.ascii() << "\r\n"; } -bool GalleryForm::addFile(const QString& path, const QString& displayFilename) +bool GalleryForm::addFile(const TQString& path, const TQString& displayFilename) { - QString filename = "userfile_name"; + TQString filename = "userfile_name"; if (Gallery2 == mVersion) filename = "g2_userfile_name"; addPairRaw(filename, displayFilename); KMimeType::Ptr ptr = KMimeType::findByURL(path); - QString mime = ptr->name(); + TQString mime = ptr->name(); if (mime.isEmpty()) { // if we ourselves can't determine the mime of the local file, @@ -89,21 +89,21 @@ bool GalleryForm::addFile(const QString& path, const QString& displayFilename) return false; } - QFile imageFile(path); + TQFile imageFile(path); if ( !imageFile.open( IO_ReadOnly ) ) return false; - QByteArray imageData = imageFile.readAll(); + TQByteArray imageData = imageFile.readAll(); imageFile.close(); - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << "--" << mBoundary << "\r\n"; ts << "Content-Disposition: form-data; name=\""; if (Gallery2 == mVersion) ts << "g2_userfile"; else ts << "userfile"; - ts << "\"; filename=\"" << QFile::encodeName(KURL(path).filename()) << "\"\r\n"; + ts << "\"; filename=\"" << TQFile::encodeName(KURL(path).filename()) << "\"\r\n"; ts << "Content-Type: " << mime.ascii() << "\r\n\r\n"; int oldSize = m_buffer.size(); @@ -117,16 +117,16 @@ bool GalleryForm::addFile(const QString& path, const QString& displayFilename) } -QString GalleryForm::contentType() const +TQString GalleryForm::contentType() const { - return QString("Content-Type: multipart/form-data; boundary=" + mBoundary); + return TQString("Content-Type: multipart/form-data; boundary=" + mBoundary); } -QByteArray GalleryForm::formData() +TQByteArray GalleryForm::formData() { - QTextStream ts(m_buffer, IO_Append|IO_WriteOnly); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(m_buffer, IO_Append|IO_WriteOnly); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << "--" << mBoundary << "--" << "\r\n"; return m_buffer; diff --git a/kipi-plugins/sync/sinks/gallery/galleryform.h b/kipi-plugins/sync/sinks/gallery/galleryform.h index e8f39a2..9318efc 100644 --- a/kipi-plugins/sync/sinks/gallery/galleryform.h +++ b/kipi-plugins/sync/sinks/gallery/galleryform.h @@ -19,8 +19,8 @@ #ifndef GALLERYFORM_H #define GALLERYFORM_H -#include <qcstring.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqstring.h> class KURL; @@ -38,22 +38,22 @@ class GalleryForm { public: - GalleryForm(GalleryVersion version, QString authToken = ""); + GalleryForm(GalleryVersion version, TQString authToken = ""); ~GalleryForm(); - void addPair(const QString& name, const QString& value); - bool addFile(const QString& path, const QString& displayFilename); + void addPair(const TQString& name, const TQString& value); + bool addFile(const TQString& path, const TQString& displayFilename); - QString contentType() const; - QByteArray formData(); + TQString contentType() const; + TQByteArray formData(); private: - void addPairRaw(const QString& name, const QString& value); + void addPairRaw(const TQString& name, const TQString& value); GalleryVersion mVersion; - QByteArray m_buffer; - QCString mBoundary; + TQByteArray m_buffer; + TQCString mBoundary; }; } diff --git a/kipi-plugins/sync/sinks/gallery/gallerysink.cpp b/kipi-plugins/sync/sinks/gallery/gallerysink.cpp index 8578b9c..d19c73e 100644 --- a/kipi-plugins/sync/sinks/gallery/gallerysink.cpp +++ b/kipi-plugins/sync/sinks/gallery/gallerysink.cpp @@ -18,11 +18,11 @@ * * ============================================================ */ -#include <qcstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qimage.h> -#include <qregexp.h> +#include <tqcstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqregexp.h> #include <klocale.h> #include <kio/job.h> @@ -44,18 +44,18 @@ namespace KIPISyncPlugin { -GallerySink::GallerySink(unsigned int sinkId, QString name, KConfig* pConfig, KWallet::Wallet* pWallet, GalleryVersion version) +GallerySink::GallerySink(unsigned int sinkId, TQString name, KConfig* pConfig, KWallet::Wallet* pWallet, GalleryVersion version) : Sink(sinkId, name, pConfig, pWallet), mVersion(version), mAuthToken(""), mpJob(0), m_loggedIn(false) { - QString tmp = pConfig->readEntry(QString("URL%1").arg(sinkId)); + TQString tmp = pConfig->readEntry(TQString("URL%1").tqarg(sinkId)); mURL = KURL(tmp); - mUsername = pConfig->readEntry(QString("Username%1").arg(sinkId)); + mUsername = pConfig->readEntry(TQString("Username%1").tqarg(sinkId)); if (pWallet) - pWallet->readPassword(QString("Password%1").arg(sinkId), mPassword); + pWallet->readPassword(TQString("Password%1").tqarg(sinkId), mPassword); } GallerySink::~GallerySink() @@ -72,12 +72,12 @@ const KIPI2::CollectionList* GallerySink::getCollections() void GallerySink::Save(KConfig* pConfig, KWallet::Wallet* pWallet) { - pConfig->writeEntry(QString("Name%1").arg(mSinkId), mName); - pConfig->writeEntry(QString("Type%1").arg(mSinkId), Type()); - pConfig->writeEntry(QString("URL%1").arg(mSinkId), QString(mURL.url())); - pConfig->writeEntry(QString("Username%1").arg(mSinkId), mUsername); + pConfig->writeEntry(TQString("Name%1").tqarg(mSinkId), mName); + pConfig->writeEntry(TQString("Type%1").tqarg(mSinkId), Type()); + pConfig->writeEntry(TQString("URL%1").tqarg(mSinkId), TQString(mURL.url())); + pConfig->writeEntry(TQString("Username%1").tqarg(mSinkId), mUsername); if (pWallet) - pWallet->writePassword(QString("Password%1").arg(mSinkId), mPassword); + pWallet->writePassword(TQString("Password%1").tqarg(mSinkId), mPassword); } @@ -100,10 +100,10 @@ bool GallerySink::Connect() KIO::TransferJob* job = KIO::http_post(mURL, form.formData(), false); job->addMetaData("content-type", form.contentType() ); job->addMetaData("cookies", "manual"); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *))); mState = GE_LOGIN; mpJob = job; @@ -115,7 +115,7 @@ void GallerySink::listAlbums() { GalleryForm form(mVersion, mAuthToken); - QString task = "fetch-albums"; + TQString task = "fetch-albums"; if (Gallery2 == mVersion) task = "fetch-albums-prune"; @@ -126,10 +126,10 @@ void GallerySink::listAlbums() job->addMetaData("content-type", form.contentType() ); job->addMetaData("cookies", "manual"); job->addMetaData("setcookies", m_cookie); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *))); mState = GE_LISTALBUMS; mpJob = job; @@ -137,7 +137,7 @@ void GallerySink::listAlbums() emit signalBusy( true ); } -void GallerySink::listPhotos( const QString& albumName ) +void GallerySink::listPhotos( const TQString& albumName ) { if (mpJob) { @@ -155,10 +155,10 @@ void GallerySink::listPhotos( const QString& albumName ) job->addMetaData("content-type", form.contentType() ); job->addMetaData("cookies", "manual"); job->addMetaData("setcookies", m_cookie); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *))); mState = GE_LISTPHOTOS; mpJob = job; @@ -166,10 +166,10 @@ void GallerySink::listPhotos( const QString& albumName ) emit signalBusy( true ); } -void GallerySink::createAlbum( const QString& parentAlbumName, - const QString& albumName, - const QString& albumTitle, - const QString& albumCaption ) +void GallerySink::createAlbum( const TQString& tqparentAlbumName, + const TQString& albumName, + const TQString& albumTitle, + const TQString& albumCaption ) { if (mpJob) { @@ -181,7 +181,7 @@ void GallerySink::createAlbum( const QString& parentAlbumName, form.addPair("cmd", "new-album"); form.addPair("protocol_version", "2.3"); - form.addPair("set_albumName", parentAlbumName); + form.addPair("set_albumName", tqparentAlbumName); if (!albumName.isEmpty()) form.addPair("newAlbumName", albumName); if (!albumTitle.isEmpty()) @@ -193,10 +193,10 @@ void GallerySink::createAlbum( const QString& parentAlbumName, job->addMetaData("content-type", form.contentType() ); job->addMetaData("cookies", "manual"); job->addMetaData("setcookies", m_cookie); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *))); mState = GE_CREATEALBUM; mpJob = job; @@ -204,9 +204,9 @@ void GallerySink::createAlbum( const QString& parentAlbumName, emit signalBusy( true ); } -bool GallerySink::addPhoto( const QString& albumName, - const QString& photoPath, - const QString& caption, +bool GallerySink::addPhoto( const TQString& albumName, + const TQString& photoPath, + const TQString& caption, bool rescale, int maxDim ) { if (mpJob) @@ -215,8 +215,8 @@ bool GallerySink::addPhoto( const QString& albumName, mpJob = 0; } - QString path = photoPath; - QString display_filename = QFile::encodeName(KURL(path).filename()); + TQString path = photoPath; + TQString display_filename = TQFile::encodeName(KURL(path).filename()); GalleryForm form(mVersion, mAuthToken); @@ -226,18 +226,18 @@ bool GallerySink::addPhoto( const QString& albumName, if (!caption.isEmpty()) form.addPair("caption", caption); - QImage image(photoPath); + TQImage image(photoPath); if (!image.isNull()) { // image file - see if we need to rescale it if (rescale && (image.width() > maxDim || image.height() > maxDim)) { - image = image.smoothScale(maxDim, maxDim, QImage::ScaleMin); + image = image.smoothScale(maxDim, maxDim, TQ_ScaleMin); path = locateLocal("tmp", KURL(photoPath).filename()); - image.save(path, QImageIO::imageFormat(photoPath)); + image.save(path, TQImageIO::imageFormat(photoPath)); - if ("JPEG" == QString(QImageIO::imageFormat(photoPath)).upper()) + if ("JPEG" == TQString(TQImageIO::imageFormat(photoPath)).upper()) { KExiv2Library::LibKExiv2 exiv2; if (exiv2.load(photoPath)) @@ -260,10 +260,10 @@ bool GallerySink::addPhoto( const QString& albumName, job->addMetaData("content-type", form.contentType()); job->addMetaData("cookies", "manual"); job->addMetaData("setcookies", m_cookie); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *))); mState = GE_ADDPHOTO; mpJob = job; @@ -282,7 +282,7 @@ void GallerySink::cancel() } } -void GallerySink::data(KIO::Job*, const QByteArray& data) +void GallerySink::data(KIO::Job*, const TQByteArray& data) { if (data.isEmpty()) return; @@ -329,11 +329,11 @@ void GallerySink::slotResult(KIO::Job *job) if (mState == GE_LOGIN && m_loggedIn) { - QStringList cookielist = QStringList::split("\n", job->queryMetaData("setcookies")); + TQStringList cookielist = TQStringList::split("\n", job->queryMetaData("setcookies")); m_cookie = "Cookie:"; - for (QStringList::Iterator it = cookielist.begin(); it != cookielist.end(); ++it) + for (TQStringList::Iterator it = cookielist.begin(); it != cookielist.end(); ++it) { - QRegExp rx("^Set-Cookie: ([^;]+)"); + TQRegExp rx("^Set-Cookie: ([^;]+)"); if (rx.search(*it) > -1) m_cookie += " " + rx.cap(1) + ";"; } @@ -341,11 +341,11 @@ void GallerySink::slotResult(KIO::Job *job) } } -void GallerySink::parseResponseLogin(const QByteArray &data) +void GallerySink::parseResponseLogin(const TQByteArray &data) { - QTextStream ts(data, IO_ReadOnly ); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream ts(data, IO_ReadOnly ); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; bool foundResponse = false; m_loggedIn = false; @@ -360,7 +360,7 @@ void GallerySink::parseResponseLogin(const QByteArray &data) } else { - QStringList strlist = QStringList::split("=", line); + TQStringList strlist = TQStringList::split("=", line); if (strlist.count() == 2) { if (("status" == strlist[0]) && ("0" == strlist[1])) @@ -387,15 +387,15 @@ void GallerySink::parseResponseLogin(const QByteArray &data) } } -void GallerySink::parseResponseListAlbums(const QByteArray &data) +void GallerySink::parseResponseListAlbums(const TQByteArray &data) { - QTextStream ts(data, IO_ReadOnly ); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream ts(data, IO_ReadOnly ); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; bool foundResponse = false; bool success = false; - typedef QValueList<GAlbum> GAlbumList; + typedef TQValueList<GAlbum> GAlbumList; GAlbumList albumList; GAlbumList::iterator iter = albumList.begin(); @@ -408,11 +408,11 @@ void GallerySink::parseResponseListAlbums(const QByteArray &data) } else { - QStringList strlist = QStringList::split("=", line); + TQStringList strlist = TQStringList::split("=", line); if (strlist.count() == 2) { - QString key = strlist[0]; - QString value = strlist[1]; + TQString key = strlist[0]; + TQString value = strlist[1]; if (key == "status") { @@ -438,10 +438,10 @@ void GallerySink::parseResponseListAlbums(const QByteArray &data) if (iter != albumList.end()) (*iter).summary = value; } - else if (key.startsWith("album.parent")) + else if (key.startsWith("album.tqparent")) { if (iter != albumList.end()) - (*iter).parent_ref_num = value.toInt(); + (*iter).tqparent_ref_num = value.toInt(); } else if (key.startsWith("album.perms.add")) { @@ -484,25 +484,25 @@ void GallerySink::parseResponseListAlbums(const QByteArray &data) return; } - // We need parent albums to come first for rest of the code to work + // We need tqparent albums to come first for rest of the code to work qHeapSort(albumList); emit signalAlbums( albumList ); } -void GallerySink::parseResponseListPhotos(const QByteArray &data) +void GallerySink::parseResponseListPhotos(const TQByteArray &data) { - QTextStream ts(data, IO_ReadOnly ); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream ts(data, IO_ReadOnly ); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; bool foundResponse = false; bool success = false; - typedef QValueList<GPhoto> GPhotoList; + typedef TQValueList<GPhoto> GPhotoList; GPhotoList photoList; GPhotoList::iterator iter = photoList.begin(); - QString albumURL; + TQString albumURL; while (!ts.atEnd()) { @@ -514,13 +514,13 @@ void GallerySink::parseResponseListPhotos(const QByteArray &data) } else { - // Boris the Gallery default URL contains "=" char. So we will split the string only from the first "=" char - QStringList strlist = QStringList(); - strlist << line.left(line.find('=')) << line.mid(line.find('=')+1); + // Boris the Gallery default URL tqcontains "=" char. So we will split the string only from the first "=" char + TQStringList strlist = TQStringList(); + strlist << line.left(line.tqfind('=')) << line.mid(line.tqfind('=')+1); if (strlist.count() >= 2) { - QString key = strlist[0]; - QString value = strlist[1]; + TQString key = strlist[0]; + TQString value = strlist[1]; if (key == "status") { @@ -545,7 +545,7 @@ void GallerySink::parseResponseListPhotos(const QByteArray &data) } else if (key.startsWith("baseurl")) { - albumURL = value.replace("\\",""); + albumURL = value.tqreplace("\\",""); } } } @@ -571,11 +571,11 @@ void GallerySink::parseResponseListPhotos(const QByteArray &data) emit signalPhotos( photoList ); } -void GallerySink::parseResponseCreateAlbum(const QByteArray &data) +void GallerySink::parseResponseCreateAlbum(const TQByteArray &data) { - QTextStream ts(data, IO_ReadOnly ); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream ts(data, IO_ReadOnly ); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; bool foundResponse = false; bool success = false; @@ -589,11 +589,11 @@ void GallerySink::parseResponseCreateAlbum(const QByteArray &data) } else { - QStringList strlist = QStringList::split("=", line); + TQStringList strlist = TQStringList::split("=", line); if (strlist.count() == 2) { - QString key = strlist[0]; - QString value = strlist[1]; + TQString key = strlist[0]; + TQString value = strlist[1]; if (key == "status") { @@ -623,11 +623,11 @@ void GallerySink::parseResponseCreateAlbum(const QByteArray &data) listAlbums(); } -void GallerySink::parseResponseAddPhoto(const QByteArray &data) +void GallerySink::parseResponseAddPhoto(const TQByteArray &data) { - QTextStream ts(data, IO_ReadOnly ); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream ts(data, IO_ReadOnly ); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; bool foundResponse = false; bool success = false; @@ -645,11 +645,11 @@ void GallerySink::parseResponseAddPhoto(const QByteArray &data) } else { - QStringList strlist = QStringList::split("=", line); + TQStringList strlist = TQStringList::split("=", line); if (strlist.count() == 2) { - QString key = strlist[0]; - QString value = strlist[1]; + TQString key = strlist[0]; + TQString value = strlist[1]; if (key == "status") { diff --git a/kipi-plugins/sync/sinks/gallery/gallerysink.h b/kipi-plugins/sync/sinks/gallery/gallerysink.h index 1e76968..27d5b48 100644 --- a/kipi-plugins/sync/sinks/gallery/gallerysink.h +++ b/kipi-plugins/sync/sinks/gallery/gallerysink.h @@ -20,7 +20,7 @@ #ifndef GALLERYSINK_H #define GALLERYSINK_H -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> #include "../../sink.h" @@ -32,7 +32,7 @@ namespace KIO } class KURL; -template <class T> class QValueList; +template <class T> class TQValueList; namespace KIPISyncPlugin { @@ -51,7 +51,7 @@ public: GE_ADDPHOTO }; - GallerySink(unsigned int sinkId, QString name, KConfig* pConfig, KWallet::Wallet* pWallet, GalleryVersion version); + GallerySink(unsigned int sinkId, TQString name, KConfig* pConfig, KWallet::Wallet* pWallet, GalleryVersion version); ~GallerySink(); const KIPI2::CollectionList* getCollections(); @@ -63,54 +63,54 @@ public: /* bool loggedIn() const; - void login( const KURL& url, const QString& name, - const QString& passwd ); + void login( const KURL& url, const TQString& name, + const TQString& passwd ); void listAlbums(); - void listPhotos( const QString& albumName ); - void createAlbum( const QString& parentAlbumName, - const QString& albumName, - const QString& albumTitle, - const QString& albumCaption ); - bool addPhoto( const QString& albumName, - const QString& photoPath, - const QString& caption=QString(), + void listPhotos( const TQString& albumName ); + void createAlbum( const TQString& tqparentAlbumName, + const TQString& albumName, + const TQString& albumTitle, + const TQString& albumCaption ); + bool addPhoto( const TQString& albumName, + const TQString& photoPath, + const TQString& caption=TQString(), bool rescale=false, int maxDim=600); void cancel(); */ private: GalleryVersion mVersion; - QString mAuthToken; + TQString mAuthToken; - QString mName; + TQString mName; KURL mURL; - QString mUsername; - QString mPassword; + TQString mUsername; + TQString mPassword; State mState; - QString m_cookie; + TQString m_cookie; KURL m_url; KIO::Job* mpJob; bool m_loggedIn; - QByteArray mBuffer; + TQByteArray mBuffer; /* - void parseResponseLogin(const QByteArray &data); - void parseResponseListAlbums(const QByteArray &data); - void parseResponseListPhotos(const QByteArray &data); - void parseResponseCreateAlbum(const QByteArray &data); - void parseResponseAddPhoto(const QByteArray &data); + void parseResponseLogin(const TQByteArray &data); + void parseResponseListAlbums(const TQByteArray &data); + void parseResponseListPhotos(const TQByteArray &data); + void parseResponseCreateAlbum(const TQByteArray &data); + void parseResponseAddPhoto(const TQByteArray &data); signals: - void signalError( const QString& msg ); - void signalLoginFailed( const QString& msg ); + void signalError( const TQString& msg ); + void signalLoginFailed( const TQString& msg ); void signalBusy( bool val ); - void signalAlbums( const QValueList<GAlbum>& albumList ); - void signalPhotos( const QValueList<GPhoto>& photoList ); + void signalAlbums( const TQValueList<GAlbum>& albumList ); + void signalPhotos( const TQValueList<GPhoto>& photoList ); void signalAddPhotoSucceeded( ); - void signalAddPhotoFailed( const QString& msg ); + void signalAddPhotoFailed( const TQString& msg ); private slots: - void data(KIO::Job *job, const QByteArray &data); + void data(KIO::Job *job, const TQByteArray &data); void slotResult (KIO::Job *job); */ }; diff --git a/kipi-plugins/timeadjust/plugin_timeadjust.cpp b/kipi-plugins/timeadjust/plugin_timeadjust.cpp index de4f5f6..1bb2986 100644 --- a/kipi-plugins/timeadjust/plugin_timeadjust.cpp +++ b/kipi-plugins/timeadjust/plugin_timeadjust.cpp @@ -46,13 +46,13 @@ typedef KGenericFactory<Plugin_TimeAdjust> Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_timeadjust, Factory("kipiplugin_timeadjust")) -Plugin_TimeAdjust::Plugin_TimeAdjust(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "TimeAdjust") +Plugin_TimeAdjust::Plugin_TimeAdjust(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "TimeAdjust") { kdDebug( 51001 ) << "Plugin_TimeAdjust plugin loaded" << endl; } -void Plugin_TimeAdjust::setup(QWidget* widget) +void Plugin_TimeAdjust::setup(TQWidget* widget) { KIPI::Plugin::setup(widget); @@ -62,13 +62,13 @@ void Plugin_TimeAdjust::setup(QWidget* widget) "clock", 0, this, - SLOT(slotActivate()), + TQT_SLOT(slotActivate()), actionCollection(), "timeadjust"); addAction(m_actionTimeAjust); - m_interface = dynamic_cast< KIPI::Interface* >(parent()); + m_interface = dynamic_cast< KIPI::Interface* >(tqparent()); if (!m_interface) { @@ -80,8 +80,8 @@ void Plugin_TimeAdjust::setup(QWidget* widget) m_actionTimeAjust->setEnabled(selection.isValid() && !selection.images().isEmpty()); - connect(m_interface, SIGNAL(selectionChanged(bool)), - m_actionTimeAjust, SLOT(setEnabled(bool))); + connect(m_interface, TQT_SIGNAL(selectionChanged(bool)), + m_actionTimeAjust, TQT_SLOT(setEnabled(bool))); } void Plugin_TimeAdjust::slotActivate() @@ -91,7 +91,7 @@ void Plugin_TimeAdjust::slotActivate() if (!images.isValid() || images.images().isEmpty()) return; - KIPITimeAdjustPlugin::TimeAdjustDialog dlg(m_interface, kapp->activeWindow()); + KIPITimeAdjustPlugin::TimeAdjustDialog dlg(m_interface, TQT_TQWIDGET(kapp->activeWindow())); dlg.setImages(images.images()); dlg.exec(); } diff --git a/kipi-plugins/timeadjust/plugin_timeadjust.h b/kipi-plugins/timeadjust/plugin_timeadjust.h index 366472f..81b8077 100644 --- a/kipi-plugins/timeadjust/plugin_timeadjust.h +++ b/kipi-plugins/timeadjust/plugin_timeadjust.h @@ -33,13 +33,14 @@ class KAction; class Plugin_TimeAdjust : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_TimeAdjust(QObject *parent, const char* name, const QStringList &args); + Plugin_TimeAdjust(TQObject *tqparent, const char* name, const TQStringList &args); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* ); + virtual void setup( TQWidget* ); protected slots: diff --git a/kipi-plugins/timeadjust/timeadjustdialog.cpp b/kipi-plugins/timeadjust/timeadjustdialog.cpp index 394c110..bae8864 100644 --- a/kipi-plugins/timeadjust/timeadjustdialog.cpp +++ b/kipi-plugins/timeadjust/timeadjustdialog.cpp @@ -29,23 +29,23 @@ extern "C" #include <utime.h> } -// Qt includes. - -#include <qtooltip.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qvbuttongroup.h> -#include <qvgroupbox.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qfile.h> -#include <qspinbox.h> -#include <qgrid.h> -#include <qpushbutton.h> -#include <qframe.h> -#include <qtoolbutton.h> +// TQt includes. + +#include <tqtooltip.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqvbuttongroup.h> +#include <tqvgroupbox.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqfile.h> +#include <tqspinbox.h> +#include <tqgrid.h> +#include <tqpushbutton.h> +#include <tqframe.h> +#include <tqtoolbutton.h> // KDE includes. @@ -111,31 +111,31 @@ public: todayBtn = 0; } - QRadioButton *add; - QRadioButton *subtract; - QRadioButton *exif; - QRadioButton *custom; + TQRadioButton *add; + TQRadioButton *subtract; + TQRadioButton *exif; + TQRadioButton *custom; - QToolButton *todayBtn; + TQToolButton *todayBtn; - QCheckBox *syncEXIFDateCheck; - QCheckBox *syncIPTCDateCheck; + TQCheckBox *syncEXIFDateCheck; + TQCheckBox *syncIPTCDateCheck; - QVGroupBox *exampleBox; - QVButtonGroup *adjustValGrp; - QButtonGroup *adjustTypeGrp; + TQVGroupBox *exampleBox; + TQVButtonGroup *adjustValGrp; + TQButtonGroup *adjustTypeGrp; - QLabel *infoLabel; - QLabel *exampleAdj; + TQLabel *infoLabel; + TQLabel *exampleAdj; - QSpinBox *secs; - QSpinBox *minutes; - QSpinBox *hours; - QSpinBox *days; - QSpinBox *months; - QSpinBox *years; + TQSpinBox *secs; + TQSpinBox *minutes; + TQSpinBox *hours; + TQSpinBox *days; + TQSpinBox *months; + TQSpinBox *years; - QDateTime exampleDate; + TQDateTime exampleDate; KDateTimeWidget *dateCreatedSel; @@ -146,14 +146,14 @@ public: KIPIPlugins::KPAboutData *about; }; -TimeAdjustDialog::TimeAdjustDialog(KIPI::Interface* interface, QWidget* parent) +TimeAdjustDialog::TimeAdjustDialog(KIPI::Interface* interface, TQWidget* tqparent) : KDialogBase(Plain, i18n("Adjust Time & Date"), Help|Ok|Cancel, - Ok, parent, 0, true, true) + Ok, tqparent, 0, true, true) { d = new TimeAdjustDialogPrivate; d->interface = interface; - QVBoxLayout *vlay = new QVBoxLayout(plainPage()); + TQVBoxLayout *vlay = new TQVBoxLayout(plainPage()); // -- About data and help button ---------------------------------------- @@ -170,117 +170,117 @@ TimeAdjustDialog::TimeAdjustDialog(KIPI::Interface* interface, QWidget* parent) d->about->addAuthor("Gilles Caulier", I18N_NOOP("Developper and maintainer"), "caulier dot gilles at gmail dot com"); - QPushButton *helpButton = actionButton(Help); + TQPushButton *helpButton = actionButton(Help); KHelpMenu* helpMenu = new KHelpMenu(this, d->about, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(slotHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(slotHelp()), 0, -1, 0); helpButton->setPopup(helpMenu->menu()); // -- Adjustment type ------------------------------------------------------------ - QVGroupBox *adjGB = new QVGroupBox(i18n("Adjustment Type"), plainPage()); - d->adjustTypeGrp = new QButtonGroup(1, Qt::Horizontal, adjGB); - d->add = new QRadioButton(i18n("Add"), d->adjustTypeGrp); - d->subtract = new QRadioButton(i18n("Subtract"), d->adjustTypeGrp); - d->exif = new QRadioButton(i18n("Set file date to EXIF/IPTC creation date"), d->adjustTypeGrp); - d->custom = new QRadioButton(i18n("Custom date"), d->adjustTypeGrp); + TQVGroupBox *adjGB = new TQVGroupBox(i18n("Adjustment Type"), plainPage()); + d->adjustTypeGrp = new TQButtonGroup(1, Qt::Horizontal, adjGB); + d->add = new TQRadioButton(i18n("Add"), d->adjustTypeGrp); + d->subtract = new TQRadioButton(i18n("Subtract"), d->adjustTypeGrp); + d->exif = new TQRadioButton(i18n("Set file date to EXIF/IPTC creation date"), d->adjustTypeGrp); + d->custom = new TQRadioButton(i18n("Custom date"), d->adjustTypeGrp); - d->adjustTypeGrp->setFrameStyle(QFrame::NoFrame); + d->adjustTypeGrp->setFrameStyle(TQFrame::NoFrame); d->adjustTypeGrp->setInsideMargin(0); d->adjustTypeGrp->setRadioButtonExclusive(true); - QHBox *hbox = new QHBox(d->adjustTypeGrp); - QLabel *space1 = new QLabel(hbox); + TQHBox *hbox = new TQHBox(d->adjustTypeGrp); + TQLabel *space1 = new TQLabel(hbox); space1->setFixedWidth(15); d->dateCreatedSel = new KDateTimeWidget(hbox); - QLabel *space2 = new QLabel(hbox); + TQLabel *space2 = new TQLabel(hbox); space2->setFixedWidth(15); - d->todayBtn = new QToolButton(hbox); + d->todayBtn = new TQToolButton(hbox); d->todayBtn->setIconSet(SmallIcon("today")); - QToolTip::add(d->todayBtn, i18n("Reset to current date")); - new QLabel(hbox); + TQToolTip::add(d->todayBtn, i18n("Reset to current date")); + new TQLabel(hbox); - d->syncEXIFDateCheck = new QCheckBox(i18n("Update EXIF creation date"), d->adjustTypeGrp); - d->syncIPTCDateCheck = new QCheckBox(i18n("Update IPTC creation date"), d->adjustTypeGrp); + d->syncEXIFDateCheck = new TQCheckBox(i18n("Update EXIF creation date"), d->adjustTypeGrp); + d->syncIPTCDateCheck = new TQCheckBox(i18n("Update IPTC creation date"), d->adjustTypeGrp); vlay->addWidget(adjGB); // -- Adjustments ------------------------------------------------------------ - d->adjustValGrp = new QVButtonGroup(i18n("Adjustments"), plainPage()); + d->adjustValGrp = new TQVButtonGroup(i18n("Adjustments"), plainPage()); vlay->addWidget(d->adjustValGrp); - QWidget* grid = new QWidget(d->adjustValGrp); - QGridLayout* gridLay = new QGridLayout(grid, 1, 7, spacingHint()); + TQWidget* grid = new TQWidget(d->adjustValGrp); + TQGridLayout* gridLay = new TQGridLayout(grid, 1, 7, spacingHint()); gridLay->setColStretch( 2, 1 ); gridLay->setColStretch( 5, 1 ); - QLabel* label = new QLabel( i18n("Hours:"), grid ); - d->hours = new QSpinBox( 0, 1000, 1, grid ); + TQLabel* label = new TQLabel( i18n("Hours:"), grid ); + d->hours = new TQSpinBox( 0, 1000, 1, grid ); gridLay->addWidget( label, 0, 0 ); gridLay->addWidget( d->hours, 0, 1 ); - label = new QLabel( i18n("Minutes:"), grid ); - d->minutes = new QSpinBox( 0, 1000, 1, grid ); + label = new TQLabel( i18n("Minutes:"), grid ); + d->minutes = new TQSpinBox( 0, 1000, 1, grid ); gridLay->addWidget( label, 0, 3 ); gridLay->addWidget( d->minutes, 0, 4 ); - label = new QLabel( i18n("Seconds:"), grid ); - d->secs = new QSpinBox( 0, 1000, 1, grid ); + label = new TQLabel( i18n("Seconds:"), grid ); + d->secs = new TQSpinBox( 0, 1000, 1, grid ); gridLay->addWidget( label, 0, 6 ); gridLay->addWidget( d->secs, 0, 7 ); - label = new QLabel( i18n("Days:"), grid ); - d->days = new QSpinBox( 0, 1000, 1, grid ); + label = new TQLabel( i18n("Days:"), grid ); + d->days = new TQSpinBox( 0, 1000, 1, grid ); gridLay->addWidget( label, 1, 0 ); gridLay->addWidget( d->days, 1, 1 ); - label = new QLabel( i18n("Months:"), grid ); - d->months = new QSpinBox( 0, 1000, 1, grid ); + label = new TQLabel( i18n("Months:"), grid ); + d->months = new TQSpinBox( 0, 1000, 1, grid ); gridLay->addWidget( label, 1, 3 ); gridLay->addWidget( d->months, 1, 4 ); - label = new QLabel( i18n("Years:"), grid ); - d->years = new QSpinBox( 0, 1000, 1, grid ); + label = new TQLabel( i18n("Years:"), grid ); + d->years = new TQSpinBox( 0, 1000, 1, grid ); gridLay->addWidget( label, 1, 6 ); gridLay->addWidget( d->years, 1, 7 ); // -- Example ------------------------------------------------------------ - d->exampleBox = new QVGroupBox(i18n("Example"), plainPage()); + d->exampleBox = new TQVGroupBox(i18n("Example"), plainPage()); vlay->addWidget(d->exampleBox); - d->infoLabel = new QLabel(d->exampleBox); - d->exampleAdj = new QLabel(d->exampleBox); - d->exampleAdj->setAlignment(Qt::AlignCenter); + d->infoLabel = new TQLabel(d->exampleBox); + d->exampleAdj = new TQLabel(d->exampleBox); + d->exampleAdj->tqsetAlignment(TQt::AlignCenter); vlay->addStretch(); // -- Slots/Signals ------------------------------------------------------ - connect(d->adjustTypeGrp, SIGNAL( clicked(int) ), - this, SLOT( slotAdjustmentTypeChanged() )); + connect(d->adjustTypeGrp, TQT_SIGNAL( clicked(int) ), + this, TQT_SLOT( slotAdjustmentTypeChanged() )); - connect(d->secs, SIGNAL( valueChanged( int ) ), - this, SLOT( slotUpdateExample() )); + connect(d->secs, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotUpdateExample() )); - connect(d->minutes, SIGNAL( valueChanged( int ) ), - this, SLOT( slotUpdateExample() )); + connect(d->minutes, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotUpdateExample() )); - connect(d->hours, SIGNAL( valueChanged( int ) ), - this, SLOT( slotUpdateExample() )); + connect(d->hours, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotUpdateExample() )); - connect(d->days, SIGNAL( valueChanged( int ) ), - this, SLOT( slotUpdateExample() )); + connect(d->days, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotUpdateExample() )); - connect(d->months, SIGNAL( valueChanged( int ) ), - this, SLOT( slotUpdateExample() )); + connect(d->months, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotUpdateExample() )); - connect(d->years, SIGNAL( valueChanged( int ) ), - this, SLOT( slotUpdateExample() )); + connect(d->years, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotUpdateExample() )); - connect(d->todayBtn, SIGNAL(clicked()), - this, SLOT(slotResetDateToCurrent())); + connect(d->todayBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotResetDateToCurrent())); // ----------------------------------------------------------------------- @@ -301,10 +301,10 @@ void TimeAdjustDialog::slotHelp() void TimeAdjustDialog::slotResetDateToCurrent() { - d->dateCreatedSel->setDateTime(QDateTime::currentDateTime()); + d->dateCreatedSel->setDateTime(TQDateTime::tqcurrentDateTime()); } -void TimeAdjustDialog::closeEvent(QCloseEvent *e) +void TimeAdjustDialog::closeEvent(TQCloseEvent *e) { if (!e) return; saveSettings(); @@ -328,12 +328,12 @@ void TimeAdjustDialog::readSettings() if (adjType == 2) d->exif->setChecked(true); if (adjType == 3) d->custom->setChecked(true); - QDateTime current = QDateTime::currentDateTime(); + TQDateTime current = TQDateTime::tqcurrentDateTime(); d->dateCreatedSel->setDateTime(config.readDateTimeEntry("Custom Date", ¤t)); d->syncEXIFDateCheck->setChecked(config.readBoolEntry("Sync EXIF Date", true)); d->syncIPTCDateCheck->setChecked(config.readBoolEntry("Sync IPTC Date", true)); - resize(configDialogSize(config, QString("Time Adjust Dialog"))); + resize(configDialogSize(config, TQString("Time Adjust Dialog"))); } void TimeAdjustDialog::saveSettings() @@ -351,7 +351,7 @@ void TimeAdjustDialog::saveSettings() config.writeEntry("Sync EXIF Date", d->syncEXIFDateCheck->isChecked()); config.writeEntry("Sync IPTC Date", d->syncIPTCDateCheck->isChecked()); - saveDialogSize(config, QString("Time Adjust Dialog")); + saveDialogSize(config, TQString("Time Adjust Dialog")); config.sync(); } @@ -376,7 +376,7 @@ void TimeAdjustDialog::setImages(const KURL::List& images) if ( inexactCount > 0 ) { - QString tmpLabel = i18n("1 image will be changed; ", + TQString tmpLabel = i18n("1 image will be changed; ", "%n images will be changed; ", exactCount) + i18n("1 image will be skipped due to an inexact date.", @@ -398,12 +398,12 @@ void TimeAdjustDialog::setImages(const KURL::List& images) void TimeAdjustDialog::slotUpdateExample() { - QString oldDate = d->exampleDate.toString(Qt::LocalDate); - QDateTime date = updateTime(KURL(), d->exampleDate); - QString newDate = date.toString(Qt::LocalDate); + TQString oldDate = d->exampleDate.toString(Qt::LocalDate); + TQDateTime date = updateTime(KURL(), d->exampleDate); + TQString newDate = date.toString(Qt::LocalDate); d->exampleAdj->setText(i18n("<b>%1</b><br>would, for example, " "change into<br><b>%2</b>") - .arg(oldDate).arg(newDate)); + .tqarg(oldDate).tqarg(newDate)); } void TimeAdjustDialog::slotAdjustmentTypeChanged() @@ -434,13 +434,13 @@ void TimeAdjustDialog::slotAdjustmentTypeChanged() void TimeAdjustDialog::slotOk() { KURL::List updatedURLs; - QStringList errorFiles; + TQStringList errorFiles; for( KURL::List::ConstIterator it = d->images.begin(); it != d->images.end(); ++it ) { KURL url = *it; KIPI::ImageInfo info = d->interface->info(url); - QDateTime dateTime = info.time(); + TQDateTime dateTime = info.time(); dateTime = updateTime(info.path(), info.time()); info.setTime(dateTime); @@ -457,9 +457,9 @@ void TimeAdjustDialog::slotOk() if (d->syncEXIFDateCheck->isChecked()) { ret &= exiv2Iface.setExifTagString("Exif.Image.DateTime", - dateTime.toString(QString("yyyy:MM:dd hh:mm:ss")).ascii()); + dateTime.toString(TQString("yyyy:MM:dd hh:mm:ss")).ascii()); ret &= exiv2Iface.setExifTagString("Exif.Photo.DateTimeOriginal", - dateTime.toString(QString("yyyy:MM:dd hh:mm:ss")).ascii()); + dateTime.toString(TQString("yyyy:MM:dd hh:mm:ss")).ascii()); } if (d->syncIPTCDateCheck->isChecked()) @@ -493,7 +493,7 @@ void TimeAdjustDialog::slotOk() struct utimbuf ut; ut.modtime = dateTime.toTime_t(); ut.actime = dateTime.toTime_t(); - ::utime(QFile::encodeName(url.path()), &ut); + ::utime(TQFile::encodeName(url.path()), &ut); } // We use kipi interface refreshImages() method to tell to host than @@ -503,7 +503,7 @@ void TimeAdjustDialog::slotOk() if (!errorFiles.isEmpty() && (d->syncEXIFDateCheck->isChecked() || d->syncIPTCDateCheck->isChecked())) { KMessageBox::informationList( - kapp->activeWindow(), + TQT_TQWIDGET(kapp->activeWindow()), i18n("Unable to set date and time like picture metadata from:"), errorFiles, i18n("Adjust Time & Date")); @@ -513,7 +513,7 @@ void TimeAdjustDialog::slotOk() accept(); } -QDateTime TimeAdjustDialog::updateTime(const KURL& url, const QDateTime& time) const +TQDateTime TimeAdjustDialog::updateTime(const KURL& url, const TQDateTime& time) const { if (d->custom->isChecked()) { @@ -525,7 +525,7 @@ QDateTime TimeAdjustDialog::updateTime(const KURL& url, const QDateTime& time) c if ( !exiv2Iface.load(url.path()) ) return time; - QDateTime newTime = exiv2Iface.getImageDateTime(); + TQDateTime newTime = exiv2Iface.getImageDateTime(); if (newTime.isValid()) return newTime; else @@ -537,7 +537,7 @@ QDateTime TimeAdjustDialog::updateTime(const KURL& url, const QDateTime& time) c if (d->add->isChecked()) sign = 1; - QDateTime newTime = time.addSecs( sign * ( d->secs->value() + TQDateTime newTime = time.addSecs( sign * ( d->secs->value() + 60*d->minutes->value() + 60*60*d->hours->value() + 24*60*60*d->days->value() ) ); diff --git a/kipi-plugins/timeadjust/timeadjustdialog.h b/kipi-plugins/timeadjust/timeadjustdialog.h index d8d8196..e932fed 100644 --- a/kipi-plugins/timeadjust/timeadjustdialog.h +++ b/kipi-plugins/timeadjust/timeadjustdialog.h @@ -24,9 +24,9 @@ #ifndef TIMEADJUSTDIALOG_H #define TIMEADJUSTDIALOG_H -// Qt includes. +// TQt includes. -#include <qdatetime.h> +#include <tqdatetime.h> // KDE includes. @@ -46,17 +46,18 @@ class TimeAdjustDialogPrivate; class TimeAdjustDialog :public KDialogBase { Q_OBJECT + TQ_OBJECT public: - TimeAdjustDialog(KIPI::Interface* interface, QWidget* parent); + TimeAdjustDialog(KIPI::Interface* interface, TQWidget* tqparent); ~TimeAdjustDialog(); void setImages(const KURL::List& images); protected: - void closeEvent(QCloseEvent *); + void closeEvent(TQCloseEvent *); private slots: @@ -71,7 +72,7 @@ private: void readSettings(); void saveSettings(); - QDateTime updateTime(const KURL& url, const QDateTime& time) const; + TQDateTime updateTime(const KURL& url, const TQDateTime& time) const; private: diff --git a/kipi-plugins/wallpaper/plugin_wallpaper.cpp b/kipi-plugins/wallpaper/plugin_wallpaper.cpp index e4e5074..1a4da77 100644 --- a/kipi-plugins/wallpaper/plugin_wallpaper.cpp +++ b/kipi-plugins/wallpaper/plugin_wallpaper.cpp @@ -56,13 +56,13 @@ K_EXPORT_COMPONENT_FACTORY( kipiplugin_wallpaper, ///////////////////////////////////////////////////////////////////////////////////////////////////// - Plugin_WallPaper::Plugin_WallPaper(QObject *parent, const char*, const QStringList&) - : KIPI::Plugin( Factory::instance(), parent, "WallPaper") + Plugin_WallPaper::Plugin_WallPaper(TQObject *tqparent, const char*, const TQStringList&) + : KIPI::Plugin( Factory::instance(), tqparent, "WallPaper") { kdDebug( 51001 ) << "Plugin_WallPaper plugin loaded" << endl; } -void Plugin_WallPaper::setup( QWidget* widget ) +void Plugin_WallPaper::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); @@ -73,49 +73,49 @@ void Plugin_WallPaper::setup( QWidget* widget ) m_action_Background->insert(new KAction (i18n("Centered"), 0, this, - SLOT(slotSetCenter()), + TQT_SLOT(slotSetCenter()), actionCollection(), "images2desktop_center")); m_action_Background->insert(new KAction (i18n("Tiled"), 0, this, - SLOT(slotSetTiled()), + TQT_SLOT(slotSetTiled()), actionCollection(), "images2desktop_tiled")); m_action_Background->insert(new KAction (i18n("Centered Tiled"), 0, this, - SLOT(slotSetCenterTiled()), + TQT_SLOT(slotSetCenterTiled()), actionCollection(), "images2desktop_center_tiled")); m_action_Background->insert(new KAction (i18n("Centered Max-Aspect"), 0, this, - SLOT(slotSetCenteredMaxpect()), + TQT_SLOT(slotSetCenteredMaxpect()), actionCollection(), "images2desktop_center_maxpect")); m_action_Background->insert(new KAction (i18n("Tiled Max-Aspect"), 0, this, - SLOT(slotSetTiledMaxpect()), + TQT_SLOT(slotSetTiledMaxpect()), actionCollection(), "images2desktop_tiled_maxpect")); m_action_Background->insert(new KAction (i18n("Scaled"), 0, this, - SLOT(slotSetScaled()), + TQT_SLOT(slotSetScaled()), actionCollection(), "images2desktop_scaled")); m_action_Background->insert(new KAction (i18n("Centered Auto Fit"), 0, this, - SLOT(slotSetCenteredAutoFit()), + TQT_SLOT(slotSetCenteredAutoFit()), actionCollection(), "images2desktop_centered_auto_fit")); @@ -124,7 +124,7 @@ void Plugin_WallPaper::setup( QWidget* widget ) m_action_Background->insert(new KAction (i18n("Scale && Crop"), 0, this, - SLOT(slotSetScaleAndCrop()), + TQT_SLOT(slotSetScaleAndCrop()), actionCollection(), "images2desktop_scale_and_crop")); @@ -132,7 +132,7 @@ void Plugin_WallPaper::setup( QWidget* widget ) addAction( m_action_Background ); - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -143,8 +143,8 @@ void Plugin_WallPaper::setup( QWidget* widget ) KIPI::ImageCollection selection = interface->currentSelection(); m_action_Background->setEnabled( selection.isValid() ); - connect( interface, SIGNAL(selectionChanged(bool)), - m_action_Background, SLOT(setEnabled(bool))); + connect( interface, TQT_SIGNAL(selectionChanged(bool)), + m_action_Background, TQT_SLOT(setEnabled(bool))); } @@ -212,12 +212,12 @@ void Plugin_WallPaper::slotSetScaleAndCrop() ///////////////////////////////////////////////////////////////////////////////////////////////////// -void Plugin_WallPaper::setWallpaper(int layout) +void Plugin_WallPaper::setWallpaper(int tqlayout) { - if (layout>SCALE_AND_CROP || layout < CENTER) + if (tqlayout>SCALE_AND_CROP || tqlayout < CENTER) return; - KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( parent() ); + KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>( tqparent() ); if ( !interface ) { @@ -230,20 +230,20 @@ void Plugin_WallPaper::setWallpaper(int layout) if (!images.isValid() ) return; KURL url=images.images()[0]; - QString path; + TQString path; if (url.isLocalFile()) { path=url.path(); } else { - // PENDING We need a way to get a parent widget + // PENDING We need a way to get a tqparent widget // Sun, 06 Jun 2004 - Aur�ien - KMessageBox::information( kapp->activeWindow(), i18n( + KMessageBox::information( TQT_TQWIDGET(kapp->activeWindow()), i18n( "<qt><p>You selected a remote image. It needs to be saved to your local disk to be used as a wallpaper." "</p><p>You will now be asked where to save the image.</p></qt>")); - path = KFileDialog::getSaveFileName(url.fileName(), QString::null, kapp->activeWindow()); + path = KFileDialog::getSaveFileName(url.fileName(), TQString(), TQT_TQWIDGET(kapp->activeWindow())); if (path.isNull()) return; #if KDE_VERSION > 0x30200 @@ -253,8 +253,8 @@ void Plugin_WallPaper::setWallpaper(int layout) #endif } - QString cmd = QString("dcop kdesktop KBackgroundIface setWallpaper '%1' %2") - .arg(path).arg(layout); + TQString cmd = TQString("dcop kdesktop KBackgroundIface setWallpaper '%1' %2") + .tqarg(path).tqarg(tqlayout); KRun::runCommand(cmd); } diff --git a/kipi-plugins/wallpaper/plugin_wallpaper.h b/kipi-plugins/wallpaper/plugin_wallpaper.h index 9953ad7..6be59b3 100644 --- a/kipi-plugins/wallpaper/plugin_wallpaper.h +++ b/kipi-plugins/wallpaper/plugin_wallpaper.h @@ -41,14 +41,15 @@ class Plugin_WallPaper : public KIPI::Plugin { Q_OBJECT + TQ_OBJECT public: - Plugin_WallPaper(QObject *parent, + Plugin_WallPaper(TQObject *tqparent, const char* name, - const QStringList &args); + const TQStringList &args); virtual KIPI::Category category( KAction* action ) const; - virtual void setup( QWidget* ); + virtual void setup( TQWidget* ); private slots: @@ -75,7 +76,7 @@ }; KActionMenu *m_action_Background; - void setWallpaper( int layout ); + void setWallpaper( int tqlayout ); }; #endif // PLUGIN_IMAGES2DESKTOP_H |