summaryrefslogtreecommitdiffstats
path: root/kipi-plugins/cdarchiving/cdarchiving.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kipi-plugins/cdarchiving/cdarchiving.cpp')
-rw-r--r--kipi-plugins/cdarchiving/cdarchiving.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kipi-plugins/cdarchiving/cdarchiving.cpp b/kipi-plugins/cdarchiving/cdarchiving.cpp
index 0a17245..6019187 100644
--- a/kipi-plugins/cdarchiving/cdarchiving.cpp
+++ b/kipi-plugins/cdarchiving/cdarchiving.cpp
@@ -36,8 +36,8 @@ extern "C"
#include <tqfont.h>
#include <tqimage.h>
#include <tqregexp.h>
-#include <textcodec.h>
-#include <textstream.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
#include <tqtimer.h>
// Include files for KDE
@@ -464,7 +464,7 @@ void CDArchiving::slotK3bDone(KProcess*)
d->action = KIPICDArchivingPlugin::Error;
d->starting = false;
d->success = false;
- d->message = i18n("Cannot remove temporary folder '%1'.").arg(m_tmpFolder);
+ d->message = i18n("Cannot remove temporary folder '%1'.").tqarg(m_tmpFolder);
TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d));
usleep(1000);
}
@@ -494,7 +494,7 @@ bool CDArchiving::buildHTMLInterface (void)
d->action = KIPICDArchivingPlugin::Error;
d->starting = false;
d->success = false;
- d->message = i18n("Cannot remove folder '%1'.").arg(MainTPath);
+ d->message = i18n("Cannot remove folder '%1'.").tqarg(MainTPath);
TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d));
usleep(1000);
return false;
@@ -507,7 +507,7 @@ bool CDArchiving::buildHTMLInterface (void)
d->action = KIPICDArchivingPlugin::Error;
d->starting = false;
d->success = false;
- d->message = i18n("Could not create folder '%1'.").arg(MainTPath);
+ d->message = i18n("Could not create folder '%1'.").tqarg(MainTPath);
TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d));
usleep(1000);
return false;
@@ -528,7 +528,7 @@ bool CDArchiving::buildHTMLInterface (void)
dir = KGlobal::dirs()->findResourceDir("kipi_data", "up.png");
dir = dir + "up.png";
srcURL = dir;
- destURL = MainTPath + TQString::fromLatin1("/up.png");
+ destURL = MainTPath + TQString::tqfromLatin1("/up.png");
KIO::file_copy(srcURL, destURL, -1, true, false, false);
//clear the temporary list for unique names
@@ -556,7 +556,7 @@ bool CDArchiving::buildHTMLInterface (void)
d->action = KIPICDArchivingPlugin::Error;
d->starting = false;
d->success = false;
- d->message = i18n("Could not create folder '%1'.").arg(SubTPath);
+ d->message = i18n("Could not create folder '%1'.").tqarg(SubTPath);
TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d));
usleep(1000);
return false;
@@ -586,7 +586,7 @@ bool CDArchiving::buildHTMLInterface (void)
d->action = KIPICDArchivingPlugin::Error;
d->starting = false;
d->success = false;
- d->message = i18n("Cannot remove folder '%1'.").arg(MainTPath);
+ d->message = i18n("Cannot remove folder '%1'.").tqarg(MainTPath);
TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d));
usleep(1000);
return false;
@@ -623,7 +623,7 @@ bool CDArchiving::buildHTMLInterface (void)
d->action = KIPICDArchivingPlugin::Error;
d->starting = false;
d->success = false;
- d->message = i18n("Could not open file '%1'.").arg(MainUrl.path(+1));
+ d->message = i18n("Could not open file '%1'.").tqarg(MainUrl.path(+1));
TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d));
usleep(1000);
return false;
@@ -649,7 +649,7 @@ bool CDArchiving::createDirectory(TQDir thumb_dir, TQString imgGalleryDir, TQStr
d->starting = false;
d->success = false;
d->message = i18n("Could not create folder '%1' in '%2'.")
- .arg(dirName).arg(imgGalleryDir);
+ .tqarg(dirName).tqarg(imgGalleryDir);
TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d));
usleep(1000);
return false;
@@ -678,7 +678,7 @@ void CDArchiving::createHead(TQTextStream& stream)
stream << "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">" << endl;
stream << "<meta name=\"Generator\" content=\"Albums HTML interface for CD archiving generated by "
<< m_hostName << " [" << m_hostURL << "]\">" << endl;
- stream << "<meta name=\"date\" content=\"" + KGlobal::locale()->formatDate(TQDate::currentDate())
+ stream << "<meta name=\"date\" content=\"" + KGlobal::locale()->formatDate(TQDate::tqcurrentDate())
+ "\">" << endl;
stream << "<title>" << m_mainTitle << "</title>" << endl;
createCSSSection(stream);
@@ -736,7 +736,7 @@ void CDArchiving::createBody(TQTextStream& stream,
int numOfImages = images.count();
const TQString imgGalleryDir = targetURL.directory();
- const TQString today(KGlobal::locale()->formatDate(TQDate::currentDate()));
+ const TQString today(KGlobal::locale()->formatDate(TQDate::tqcurrentDate()));
stream << "<body>\n" << endl;
@@ -952,7 +952,7 @@ void CDArchiving::createBody(TQTextStream& stream,
dir = dir + "valid-html401.png";
KURL srcURL(dir);
- KURL destURL(imgGalleryDir + TQString::fromLatin1("/thumbs/valid-html401.png"));
+ KURL destURL(imgGalleryDir + TQString::tqfromLatin1("/thumbs/valid-html401.png"));
KIO::file_copy(srcURL, destURL, -1, true, false, false);
stream << "<p>" << endl;
@@ -961,7 +961,7 @@ void CDArchiving::createBody(TQTextStream& stream,
<< "\" height=\"31\" width=\"88\" title=\"" << Temp << "\" />" << endl;
Temp = i18n("Album archive created with "
- "<a href=\"%1\">%2</a> on %3").arg(m_hostURL).arg(m_hostName).arg(today);
+ "<a href=\"%1\">%2</a> on %3").tqarg(m_hostURL).tqarg(m_hostName).tqarg(today);
stream << Temp << endl;
stream << "</p>" << endl;
@@ -974,7 +974,7 @@ void CDArchiving::createBody(TQTextStream& stream,
void CDArchiving::createBodyMainPage(TQTextStream& stream, KURL& url)
{
TQString Temp;
- const TQString today(KGlobal::locale()->formatDate(TQDate::currentDate()));
+ const TQString today(KGlobal::locale()->formatDate(TQDate::tqcurrentDate()));
Temp = m_mainTitle;
stream << "<body>\n<h1>" << Temp << "</h1><p>\n" << endl;
@@ -992,7 +992,7 @@ void CDArchiving::createBodyMainPage(TQTextStream& stream, KURL& url)
dir = dir + "valid-html401.png";
KURL srcURL(dir);
- KURL destURL(url.directory() + TQString::fromLatin1("/valid-html401.png"));
+ KURL destURL(url.directory() + TQString::tqfromLatin1("/valid-html401.png"));
KIO::file_copy(srcURL, destURL, -1, true, false, false);
stream << "<p>" << endl;
@@ -1001,7 +1001,7 @@ void CDArchiving::createBodyMainPage(TQTextStream& stream, KURL& url)
<< Temp << "\" />" << endl;
Temp = i18n("Album archive created with "
- "<a href=\"%1\">%2</a> on %3").arg(m_hostURL).arg(m_hostName).arg(today);
+ "<a href=\"%1\">%2</a> on %3").tqarg(m_hostURL).tqarg(m_hostName).tqarg(today);
stream << Temp << endl;
stream << "</p>" << endl;
stream << "</body>\n</html>\n" << endl;
@@ -1023,12 +1023,12 @@ bool CDArchiving::createHtml( const KIPI::ImageCollection& album,
// Create the "thumbs" subdirectory
- TQDir thumb_dir( imgGalleryDir + TQString::fromLatin1("/thumbs/"));
+ TQDir thumb_dir( imgGalleryDir + TQString::tqfromLatin1("/thumbs/"));
if (createDirectory(thumb_dir, imgGalleryDir, "thumbs") == false)
return false;
- TQDir pages_dir( imgGalleryDir + TQString::fromLatin1("/pages/"));
+ TQDir pages_dir( imgGalleryDir + TQString::tqfromLatin1("/pages/"));
if (createDirectory(pages_dir, imgGalleryDir, "pages") == false)
return false;
@@ -1053,7 +1053,7 @@ bool CDArchiving::createHtml( const KIPI::ImageCollection& album,
d->action = KIPICDArchivingPlugin::Error;
d->starting = false;
d->success = false;
- d->message = i18n("Could not open file '%1'.").arg(targetURL.path(+1));
+ d->message = i18n("Could not open file '%1'.").tqarg(targetURL.path(+1));
TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d));
usleep(1000);
return false;
@@ -1073,8 +1073,8 @@ bool CDArchiving::createPage(const TQString& imgGalleryDir,
const TQString& comment)
{
- const TQDir pagesDir(imgGalleryDir + TQString::fromLatin1("/pages/"));
- const TQDir thumbsDir(imgGalleryDir + TQString::fromLatin1("/thumbs/"));
+ const TQDir pagesDir(imgGalleryDir + TQString::tqfromLatin1("/pages/"));
+ const TQDir thumbsDir(imgGalleryDir + TQString::tqfromLatin1("/thumbs/"));
const TQFileInfo fi (imgURL.fileName());
const TQString imgName = uniqueImgName + "." + fi.extension(FALSE);
kdDebug( 51000 ) << "CreatePage: FileName: " << imgURL.fileName() << endl;
@@ -1086,21 +1086,21 @@ bool CDArchiving::createPage(const TQString& imgGalleryDir,
// Html pages filenames
const TQString pageFilename = pagesDir.path() +
- TQString::fromLatin1("/") +
+ TQString::tqfromLatin1("/") +
webifyFileName(uniqueImgName)+
- TQString::fromLatin1(".htm");
+ TQString::tqfromLatin1(".htm");
const TQString nextPageFilename = webifyFileName(nextUniqueImgName) +
- TQString::fromLatin1(".htm");
+ TQString::tqfromLatin1(".htm");
const TQString prevPageFilename = webifyFileName(prevUniqueImgName) +
- TQString::fromLatin1(".htm");
+ TQString::tqfromLatin1(".htm");
// Thumbs filenames
- const TQString prevThumb = TQString::fromLatin1("../thumbs/") +
+ const TQString prevThumb = TQString::tqfromLatin1("../thumbs/") +
webifyFileName(prevUniqueImgName) +
extension(m_imageFormat);
- const TQString nextThumb = TQString::fromLatin1("../thumbs/") +
+ const TQString nextThumb = TQString::tqfromLatin1("../thumbs/") +
webifyFileName(nextUniqueImgName) +
extension(m_imageFormat);
@@ -1122,7 +1122,7 @@ bool CDArchiving::createPage(const TQString& imgGalleryDir,
<< m_hostName << " [" << m_hostURL << "]\">" << endl;
stream << "<meta name=\"date\" content=\""
- << KGlobal::locale()->formatDate(TQDate::currentDate())
+ << KGlobal::locale()->formatDate(TQDate::tqcurrentDate())
<< "\">" << endl;
stream << "<title>" << m_mainTitle << " : "<< imgName/*imgURL.fileName()*/ <<"</title>" << endl;
@@ -1239,13 +1239,13 @@ bool CDArchiving::createPage(const TQString& imgGalleryDir,
// Footer
TQString valid = i18n("Valid HTML 4.01.");
- const TQString today(KGlobal::locale()->formatDate(TQDate::currentDate()));
+ const TQString today(KGlobal::locale()->formatDate(TQDate::tqcurrentDate()));
stream << "<div align=\"center\"><hr><img src=\"../thumbs/valid-html401.png\" alt=\""
<< valid << "\" height=\"31\" width=\"88\" title=\"" << valid << "\" />" << endl;
valid = i18n("Image gallery created with "
- "<a href=\"%1\">%2</a> on %3").arg(m_hostURL).arg(m_hostName).arg(today);
+ "<a href=\"%1\">%2</a> on %3").tqarg(m_hostURL).tqarg(m_hostName).tqarg(today);
stream << valid << "</div>" << endl;
@@ -1270,7 +1270,7 @@ int CDArchiving::createThumb( const TQString& imgName, const TQString& sourceDir
// Create the thumbnails for the HTML interface.
const TQString ImageNameFormat = webifyFileName(uniqueFileName) + extension(imageFormat);
- const TQString thumbDir = imgGalleryDir + TQString::fromLatin1("/thumbs/");
+ const TQString thumbDir = imgGalleryDir + TQString::tqfromLatin1("/thumbs/");
int extent = m_thumbnailsSize;
m_imgWidth = 120; // Setting the size of the images is
@@ -1580,7 +1580,7 @@ bool CDArchiving::BuildK3bXMLprojectfile (TQString HTMLinterfaceFolder, TQString
d->action = KIPICDArchivingPlugin::Progress;
d->starting = true;
d->success = false;
- d->message = i18n("Adding Album '%1' into project...").arg( (*it).name() );
+ d->message = i18n("Adding Album '%1' into project...").tqarg( (*it).name() );
TQApplication::sendEvent(m_parent, new TQCustomEvent(TQEvent::User, d));
usleep(1000);
addCollectionToK3bXMLProjectFile( *it, &stream);
@@ -1847,7 +1847,7 @@ TQString CDArchiving::EscapeSgmlText(const TQTextCodec* codec,
for (uint i = 0 ; i < strIn.length() ; ++i)
{
ch=strIn[i];
- switch (ch.unicode())
+ switch (ch.tqunicode())
{
case 38: // &
{
@@ -1889,7 +1889,7 @@ TQString CDArchiving::EscapeSgmlText(const TQTextCodec* codec,
{
if (!codec->canEncode(ch))
{
- strReturn += TQString("&#%1;").arg(ch.unicode());
+ strReturn += TQString("&#%1;").tqarg(ch.tqunicode());
break;
}
}