summaryrefslogtreecommitdiffstats
path: root/src/translators/onixexporter.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-16 09:57:51 -0600
committerTimothy Pearson <[email protected]>2011-12-16 09:57:51 -0600
commit2781e27b871150395a5a82e221684108641002b2 (patch)
tree57f4d7c01a48faef1a840fbe0de8f4ec1e5f606f /src/translators/onixexporter.cpp
parent031454e56009d576589c28757f6c6fcf4884095e (diff)
downloadtellico-2781e27b871150395a5a82e221684108641002b2.tar.gz
tellico-2781e27b871150395a5a82e221684108641002b2.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 031454e56009d576589c28757f6c6fcf4884095e.
Diffstat (limited to 'src/translators/onixexporter.cpp')
-rw-r--r--src/translators/onixexporter.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/translators/onixexporter.cpp b/src/translators/onixexporter.cpp
index bca59fd..65b85ee 100644
--- a/src/translators/onixexporter.cpp
+++ b/src/translators/onixexporter.cpp
@@ -33,7 +33,7 @@
#include <tqfile.h>
#include <tqdatetime.h>
#include <tqbuffer.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqwhatsthis.h>
#include <tqcheckbox.h>
#include <tqgroupbox.h>
@@ -42,14 +42,14 @@ using Tellico::Export::ONIXExporter;
ONIXExporter::ONIXExporter() : Tellico::Export::Exporter(),
m_handler(0),
- m_xsltFile(TQString::fromLatin1("tellico2onix.xsl")),
+ m_xsltFile(TQString::tqfromLatin1("tellico2onix.xsl")),
m_includeImages(true),
m_widget(0) {
}
ONIXExporter::ONIXExporter(Data::CollPtr coll_) : Tellico::Export::Exporter(coll_),
m_handler(0),
- m_xsltFile(TQString::fromLatin1("tellico2onix.xsl")),
+ m_xsltFile(TQString::tqfromLatin1("tellico2onix.xsl")),
m_includeImages(true),
m_widget(0) {
}
@@ -80,18 +80,18 @@ bool ONIXExporter::exec() {
KZip zip(TQT_TQIODEVICE(&buf));
zip.open(IO_WriteOnly);
- zip.writeFile(TQString::fromLatin1("onix.xml"), TQString(), TQString(), xml.length(), xml);
+ zip.writeFile(TQString::tqfromLatin1("onix.xml"), TQString(), TQString(), xml.length(), xml);
// use a dict for fast random access to keep track of which images were written to the file
if(m_includeImages) { // for now, we're ignoring (options() & Export::ExportImages)
- const TQString cover = TQString::fromLatin1("cover");
+ const TQString cover = TQString::tqfromLatin1("cover");
StringSet imageSet;
for(Data::EntryVec::ConstIterator it = entries().begin(); it != entries().end(); ++it) {
const Data::Image& img = ImageFactory::imageById(it->field(cover));
if(!img.isNull() && !imageSet.has(img.id())
&& (img.format() == "JPEG" || img.format() == "JPG" || img.format() == "GIF")) { /// onix only understands jpeg and gif
TQByteArray ba = img.byteArray();
- zip.writeFile(TQString::fromLatin1("images/") + it->field(cover),
+ zip.writeFile(TQString::tqfromLatin1("images/") + it->field(cover),
TQString(), TQString(), ba.size(), ba);
imageSet.add(img.id());
}
@@ -140,8 +140,8 @@ TQString ONIXExporter::text() {
delete m_handler;
m_handler = new XSLTHandler(dom, TQFile::encodeName(xsltfile));
- TQDateTime now = TQDateTime::currentDateTime();
- m_handler->addStringParam("sentDate", now.toString(TQString::fromLatin1("yyyyMMddhhmm")).utf8());
+ TQDateTime now = TQDateTime::tqcurrentDateTime();
+ m_handler->addStringParam("sentDate", now.toString(TQString::tqfromLatin1("yyyyMMddhhmm")).utf8());
m_handler->addStringParam("version", VERSION);
@@ -155,7 +155,7 @@ TQString ONIXExporter::text() {
exporter.setOptions(options() | Export::ExportUTF8);
TQDomDocument output = exporter.exportXML();
#if 0
- TQFile f(TQString::fromLatin1("/tmp/test.xml"));
+ TQFile f(TQString::tqfromLatin1("/tmp/test.xml"));
if(f.open(IO_WriteOnly)) {
TQTextStream t(&f);
t << output.toString();
@@ -185,14 +185,14 @@ TQWidget* ONIXExporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
}
void ONIXExporter::readOptions(KConfig* config_) {
- KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
+ KConfigGroup group(config_, TQString::tqfromLatin1("ExportOptions - %1").tqarg(formatString()));
m_includeImages = group.readBoolEntry("Include Images", m_includeImages);
}
void ONIXExporter::saveOptions(KConfig* config_) {
m_includeImages = m_checkIncludeImages->isChecked();
- KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
+ KConfigGroup group(config_, TQString::tqfromLatin1("ExportOptions - %1").tqarg(formatString()));
group.writeEntry("Include Images", m_includeImages);
}