summaryrefslogtreecommitdiffstats
path: root/konq-plugins/kimgalleryplugin
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-15 15:45:00 -0600
committerTimothy Pearson <[email protected]>2011-12-15 15:45:00 -0600
commitca82971624269719d487c6f7980d7237f9420036 (patch)
treecac461d765c50b2709a9ef6324940e70fe056ba2 /konq-plugins/kimgalleryplugin
parent0e4ea21f450acbb4ea3c5a1293341668494d7dd4 (diff)
downloadtdeaddons-ca82971624269719d487c6f7980d7237f9420036.tar.gz
tdeaddons-ca82971624269719d487c6f7980d7237f9420036.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'konq-plugins/kimgalleryplugin')
-rw-r--r--konq-plugins/kimgalleryplugin/imgallerydialog.cpp6
-rw-r--r--konq-plugins/kimgalleryplugin/imgalleryplugin.cpp38
2 files changed, 22 insertions, 22 deletions
diff --git a/konq-plugins/kimgalleryplugin/imgallerydialog.cpp b/konq-plugins/kimgalleryplugin/imgallerydialog.cpp
index 671b90e..d3bbba6 100644
--- a/konq-plugins/kimgalleryplugin/imgallerydialog.cpp
+++ b/konq-plugins/kimgalleryplugin/imgallerydialog.cpp
@@ -21,7 +21,7 @@ Boston, MA 02110-1301, USA.
#include <tqlabel.h>
#include <tqvbox.h>
#include <tqgroupbox.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqcombobox.h>
#include <tqwhatsthis.h>
#include <tqcheckbox.h>
@@ -60,7 +60,7 @@ KIGPDialog::KIGPDialog(TQWidget *parent, const TQString& path, const char *name
void KIGPDialog::slotDefault()
{
- m_title->setText(i18n("Image Gallery for %1").tqarg(m_path));
+ m_title->setText(i18n("Image Gallery for %1").arg(m_path));
m_imagesPerRow->setValue(4);
m_imageName->setChecked(true);
m_imageSize->setChecked(false);
@@ -96,7 +96,7 @@ void KIGPDialog::setupLookPage(const TQString& path) {
label = new TQLabel( i18n("&Page title:"), page);
vlay->addWidget(label);
- m_title = new TQLineEdit(i18n("Image Gallery for %1").tqarg(path), page);
+ m_title = new TQLineEdit(i18n("Image Gallery for %1").arg(path), page);
vlay->addWidget( m_title );
label->setBuddy(m_title);
diff --git a/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp b/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp
index 981eeb8..cd5337f 100644
--- a/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp
+++ b/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp
@@ -19,15 +19,15 @@ Boston, MA 02110-1301, USA.
*/
#include <tqdir.h>
-#include <tqtextstream.h>
+#include <textstream.h>
#include <tqfile.h>
#include <tqfont.h>
#include <tqdatetime.h>
#include <tqpixmap.h>
#include <tqimage.h>
#include <tqprogressdialog.h>
-#include <tqtextcodec.h>
-#include <tqstylesheet.h>
+#include <textcodec.h>
+#include <stylesheet.h>
#include <kaction.h>
#include <kglobal.h>
@@ -105,7 +105,7 @@ bool KImGalleryPlugin::createDirectory(TQDir thumb_dir, TQString imgGalleryDir,
if (!thumb_dir.exists()) {
thumb_dir.setPath( imgGalleryDir);
if (!(thumb_dir.mkdir(dirName, false))) {
- KMessageBox::sorry(m_part->widget(), i18n("Couldn't create folder: %1").tqarg(thumb_dir.path()));
+ KMessageBox::sorry(m_part->widget(), i18n("Couldn't create folder: %1").arg(thumb_dir.path()));
return false;
} else {
thumb_dir.setPath( imgGalleryDir + "/" + dirName + "/" );
@@ -163,11 +163,11 @@ void KImGalleryPlugin::createBody(TQTextStream& stream, const TQString& sourceDi
{
int numOfImages = imageDir.count();
const TQString imgGalleryDir = url.directory();
- const TQString today(KGlobal::locale()->formatDate(TQDate::tqcurrentDate()));
+ const TQString today(KGlobal::locale()->formatDate(TQDate::currentDate()));
stream << "<body>\n<h1>" << TQStyleSheet::escape(m_configDlg->getTitle()) << "</h1><p>" << endl;
- stream << i18n("<i>Number of images</i>: %1").tqarg(numOfImages) << "<br/>" << endl;
- stream << i18n("<i>Created on</i>: %1").tqarg(today) << "</p>" << endl;
+ stream << i18n("<i>Number of images</i>: %1").arg(numOfImages) << "<br/>" << endl;
+ stream << i18n("<i>Created on</i>: %1").arg(today) << "</p>" << endl;
stream << "<hr/>" << endl;
@@ -205,10 +205,10 @@ void KImGalleryPlugin::createBody(TQTextStream& stream, const TQString& sourceDi
const TQString imgPath("thumbs/" + imgName + extension(imageFormat));
stream << "<img src=\"" << imgPath << "\" width=\"" << m_imgWidth << "\" ";
stream << "height=\"" << m_imgHeight << "\" alt=\"" << imgPath << "\"/>";
- m_progressDlg->setLabelText( i18n("Created thumbnail for: \n%1").tqarg(imgName) );
+ m_progressDlg->setLabelText( i18n("Created thumbnail for: \n%1").arg(imgName) );
} else {
kdDebug(90170) << "Creating thumbnail for " << imgName << " failed" << endl;
- m_progressDlg->setLabelText( i18n("Creating thumbnail for: \n%1\n failed").tqarg(imgName) );
+ m_progressDlg->setLabelText( i18n("Creating thumbnail for: \n%1\n failed").arg(imgName) );
}
stream << "</a>" << endl;
@@ -266,7 +266,7 @@ bool KImGalleryPlugin::createHtml(const KURL& url, const TQString& sourceDirName
if (!subDir.exists()) {
subDir.setPath( url.directory() );
if (!(subDir.mkdir(currentDir, false))) {
- KMessageBox::sorry(part->widget(), i18n("Couldn't create folder: %1").tqarg(subDir.path()));
+ KMessageBox::sorry(part->widget(), i18n("Couldn't create folder: %1").arg(subDir.path()));
continue;
} else {
subDir.setPath( url.directory() + "/" + currentDir );
@@ -293,12 +293,12 @@ bool KImGalleryPlugin::createHtml(const KURL& url, const TQString& sourceDirName
kdDebug(90170) << "imgGalleryDir: " << imgGalleryDir << endl;
// Create the "thumbs" subdirectory if necessary
- TQDir thumb_dir( imgGalleryDir + TQString::tqfromLatin1("/thumbs/"));
+ TQDir thumb_dir( imgGalleryDir + TQString::fromLatin1("/thumbs/"));
if (createDirectory(thumb_dir, imgGalleryDir, "thumbs") == false)
return false;
// Create the "images" subdirectory if necessary
- TQDir images_dir( imgGalleryDir + TQString::tqfromLatin1("/images/"));
+ TQDir images_dir( imgGalleryDir + TQString::fromLatin1("/images/"));
if (m_copyFiles) {
if (createDirectory(images_dir, imgGalleryDir, "images") == false)
return false;
@@ -320,7 +320,7 @@ bool KImGalleryPlugin::createHtml(const KURL& url, const TQString& sourceDirName
return !m_cancelled;
} else {
- KMessageBox::sorry(m_part->widget(),i18n("Couldn't open file: %1").tqarg(url.path(+1)));
+ KMessageBox::sorry(m_part->widget(),i18n("Couldn't open file: %1").arg(url.path(+1)));
return false;
}
}
@@ -344,8 +344,8 @@ void KImGalleryPlugin::deleteCancelledGallery(const KURL& url, const TQString& s
}
const TQString imgGalleryDir = url.directory();
- TQDir thumb_dir( imgGalleryDir + TQString::tqfromLatin1("/thumbs/"));
- TQDir images_dir( imgGalleryDir + TQString::tqfromLatin1("/images/"));
+ TQDir thumb_dir( imgGalleryDir + TQString::fromLatin1("/thumbs/"));
+ TQDir images_dir( imgGalleryDir + TQString::fromLatin1("/images/"));
TQDir imageDir( sourceDirName, "*.png *.PNG *.gif *.GIF *.jpg *.JPG *.jpeg *.JPEG *.bmp *.BMP",
TQDir::Name|TQDir::IgnoreCase, TQDir::Files|TQDir::Readable);
TQFile file( url.path() );
@@ -415,7 +415,7 @@ void KImGalleryPlugin::loadCommentFile()
kdDebug(90170) << "File closed." << endl;
delete m_textStream;
} else {
- KMessageBox::sorry(m_part->widget(), i18n("Couldn't open file: %1").tqarg(m_configDlg->getCommentFile()));
+ KMessageBox::sorry(m_part->widget(), i18n("Couldn't open file: %1").arg(m_configDlg->getCommentFile()));
m_useCommentFile = false;
}
}
@@ -424,18 +424,18 @@ bool KImGalleryPlugin::createThumb( const TQString& imgName, const TQString& sou
const TQString& imgGalleryDir, const TQString& imageFormat)
{
TQImage img;
- const TQString pixPath = sourceDirName + TQString::tqfromLatin1("/") + imgName;
+ const TQString pixPath = sourceDirName + TQString::fromLatin1("/") + imgName;
if (m_copyFiles) {
KURL srcURL = KURL::fromPathOrURL(pixPath);
//kdDebug(90170) << "srcURL: " << srcURL << endl;
- KURL destURL = KURL::fromPathOrURL(imgGalleryDir + TQString::tqfromLatin1("/images/") + imgName);
+ KURL destURL = KURL::fromPathOrURL(imgGalleryDir + TQString::fromLatin1("/images/") + imgName);
//kdDebug(90170) << "destURL: " << destURL << endl;
KIO::NetAccess::copy(srcURL, destURL, static_cast<KParts::Part *>(parent())->widget());
}
const TQString imgNameFormat = imgName + extension(imageFormat);
- const TQString thumbDir = imgGalleryDir + TQString::tqfromLatin1("/thumbs/");
+ const TQString thumbDir = imgGalleryDir + TQString::fromLatin1("/thumbs/");
int extent = m_configDlg->getThumbnailSize();
// this code is stolen from tdebase/kioslave/thumbnail/imagecreator.cpp