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 /kipi-plugins/picasawebexport/picasawebwindow.cpp | |
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
Diffstat (limited to 'kipi-plugins/picasawebexport/picasawebwindow.cpp')
-rw-r--r-- | kipi-plugins/picasawebexport/picasawebwindow.cpp | 178 |
1 files changed, 89 insertions, 89 deletions
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 } |