diff options
Diffstat (limited to 'src/translators/tellicozipexporter.cpp')
-rw-r--r-- | src/translators/tellicozipexporter.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/translators/tellicozipexporter.cpp b/src/translators/tellicozipexporter.cpp index 42e0e70..582003f 100644 --- a/src/translators/tellicozipexporter.cpp +++ b/src/translators/tellicozipexporter.cpp @@ -26,17 +26,17 @@ #include <kzip.h> #include <kapplication.h> -#include <qdom.h> -#include <qbuffer.h> +#include <tqdom.h> +#include <tqbuffer.h> using Tellico::Export::TellicoZipExporter; -QString TellicoZipExporter::formatString() const { +TQString TellicoZipExporter::formatString() const { return i18n("Tellico Zip File"); } -QString TellicoZipExporter::fileFilter() const { - return i18n("*.tc *.bc|Tellico Files (*.tc)") + QChar('\n') + i18n("*|All Files"); +TQString TellicoZipExporter::fileFilter() const { + return i18n("*.tc *.bc|Tellico Files (*.tc)") + TQChar('\n') + i18n("*|All Files"); } bool TellicoZipExporter::exec() { @@ -47,9 +47,9 @@ bool TellicoZipExporter::exec() { } // TODO: maybe need label? - ProgressItem& item = ProgressManager::self()->newProgressItem(this, QString::null, true); + ProgressItem& item = ProgressManager::self()->newProgressItem(this, TQString(), true); item.setTotalSteps(100); - connect(&item, SIGNAL(signalCancelled(ProgressItem*)), SLOT(slotCancel())); + connect(&item, TQT_SIGNAL(signalCancelled(ProgressItem*)), TQT_SLOT(slotCancel())); ProgressItem::Done done(this); TellicoXMLExporter exp; @@ -61,33 +61,33 @@ bool TellicoZipExporter::exec() { opt &= ~Export::ExportProgress; // don't show progress for xml export exp.setOptions(opt); exp.setIncludeImages(false); // do not include the images themselves in XML - QCString xml = exp.exportXML().toCString(); // encoded in utf-8 + TQCString xml = exp.exportXML().toCString(); // encoded in utf-8 ProgressManager::self()->setProgress(this, 5); - QByteArray data; - QBuffer buf(data); + TQByteArray data; + TQBuffer buf(data); if(m_cancelled) { return true; // intentionally cancelled } - KZip zip(&buf); + KZip zip(TQT_TQIODEVICE(&buf)); zip.open(IO_WriteOnly); - zip.writeFile(QString::fromLatin1("tellico.xml"), QString::null, QString::null, xml.length(), xml); + zip.writeFile(TQString::tqfromLatin1("tellico.xml"), TQString(), TQString(), xml.length(), xml); if(m_includeImages) { ProgressManager::self()->setProgress(this, 10); // gonna be lazy and just increment progress every 3 images // it might be less, might be more uint j = 0; - const QString imagesDir = QString::fromLatin1("images/"); + const TQString imagesDir = TQString::tqfromLatin1("images/"); StringSet imageSet; Data::FieldVec imageFields = coll->imageFields(); // already took 10%, only 90% left - const uint stepSize = QMAX(1, (coll->entryCount() * imageFields.count()) / 90); + const uint stepSize = TQMAX(1, (coll->entryCount() * imageFields.count()) / 90); for(Data::EntryVec::ConstIterator it = entries().begin(); it != entries().end() && !m_cancelled; ++it) { for(Data::FieldVec::Iterator fIt = imageFields.begin(); fIt != imageFields.end(); ++fIt, ++j) { - const QString id = it->field(fIt); + const TQString id = it->field(fIt); if(id.isEmpty() || imageSet.has(id)) { continue; } @@ -103,12 +103,12 @@ bool TellicoZipExporter::exec() { kdWarning() << "...for the entry titled " << it->title() << endl; continue; } - QByteArray ba = img.byteArray(); + TQByteArray ba = img.byteArray(); // myDebug() << "TellicoZipExporter::data() - adding image id = " << it->field(fIt) << endl; - zip.writeFile(imagesDir + id, QString::null, QString::null, ba.size(), ba); + zip.writeFile(imagesDir + id, TQString(), TQString(), ba.size(), ba); imageSet.add(id); if(j%stepSize == 0) { - ProgressManager::self()->setProgress(this, QMIN(10+j/stepSize, 99)); + ProgressManager::self()->setProgress(this, TQMIN(10+j/stepSize, 99)); kapp->processEvents(); } } |