summaryrefslogtreecommitdiffstats
path: root/kipi-plugins/flickrexport
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-18 06:46:40 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-18 06:46:40 +0000
commit7c19562ad065b6729bac8eb9b40dfe0452a72272 (patch)
tree33325d1e02ecc9ca614c7209296f8f796a1c3478 /kipi-plugins/flickrexport
parenta65baa328fac0a1ce12971fef8d998ce7bfbe237 (diff)
downloadkipi-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/flickrexport')
-rw-r--r--kipi-plugins/flickrexport/flickralbumdialog.ui32
-rw-r--r--kipi-plugins/flickrexport/flickritem.h50
-rw-r--r--kipi-plugins/flickrexport/flickrtalker.cpp296
-rw-r--r--kipi-plugins/flickrexport/flickrtalker.h97
-rw-r--r--kipi-plugins/flickrexport/flickrviewitem.cpp34
-rw-r--r--kipi-plugins/flickrexport/flickrviewitem.h14
-rw-r--r--kipi-plugins/flickrexport/flickrwidget.cpp106
-rw-r--r--kipi-plugins/flickrexport/flickrwidget.h39
-rw-r--r--kipi-plugins/flickrexport/flickrwindow.cpp150
-rw-r--r--kipi-plugins/flickrexport/flickrwindow.h73
-rw-r--r--kipi-plugins/flickrexport/imageslist.cpp120
-rw-r--r--kipi-plugins/flickrexport/imageslist.h30
-rw-r--r--kipi-plugins/flickrexport/login.cpp64
-rw-r--r--kipi-plugins/flickrexport/login.h27
-rw-r--r--kipi-plugins/flickrexport/mpform.cpp48
-rw-r--r--kipi-plugins/flickrexport/mpform.h20
-rw-r--r--kipi-plugins/flickrexport/plugin_flickrexport.cpp16
-rw-r--r--kipi-plugins/flickrexport/plugin_flickrexport.h5
18 files changed, 614 insertions, 607 deletions
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: