summaryrefslogtreecommitdiffstats
path: root/kipi-plugins/flickrexport/flickrwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kipi-plugins/flickrexport/flickrwindow.cpp')
-rw-r--r--kipi-plugins/flickrexport/flickrwindow.cpp150
1 files changed, 75 insertions, 75 deletions
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();