summaryrefslogtreecommitdiffstats
path: root/kdeprint/cups/kcupsprinterimpl.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kdeprint/cups/kcupsprinterimpl.cpp
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/cups/kcupsprinterimpl.cpp')
-rw-r--r--kdeprint/cups/kcupsprinterimpl.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/kdeprint/cups/kcupsprinterimpl.cpp b/kdeprint/cups/kcupsprinterimpl.cpp
index 665183063..1bf6d55bf 100644
--- a/kdeprint/cups/kcupsprinterimpl.cpp
+++ b/kdeprint/cups/kcupsprinterimpl.cpp
@@ -24,14 +24,14 @@
#include "kmmanager.h"
#include "cupsinfos.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <cups/cups.h>
#include <stdlib.h>
#include <kprocess.h>
-static void mapToCupsOptions(const QMap<QString,QString>& opts, QString& cmd);
+static void mapToCupsOptions(const TQMap<TQString,TQString>& opts, TQString& cmd);
-QSize rangeToSize(const QString& s)
+TQSize rangeToSize(const TQString& s)
{
QString range = s;
int p(-1);
@@ -49,11 +49,11 @@ QSize rangeToSize(const QString& s)
else
from = to = 0;
- return QSize(from,to);
+ return TQSize(from,to);
}
//******************************************************************************************************
-KCupsPrinterImpl::KCupsPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KCupsPrinterImpl::KCupsPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -62,13 +62,13 @@ KCupsPrinterImpl::~KCupsPrinterImpl()
{
}
-bool KCupsPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KCupsPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
// check printer object
if (!printer) return false;
- QString hoststr = QString::fromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port());
- cmd = QString::fromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName()));
+ QString hoststr = TQString::fromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port());
+ cmd = TQString::fromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName()));
if (!CupsInfos::self()->login().isEmpty())
{
QString userstr(CupsInfos::self()->login());
@@ -107,12 +107,12 @@ void KCupsPrinterImpl::preparePrinting(KPrinter *printer)
}
else
{ // No translation needed (but range => (from,to))
- QString range = printer->option("kde-range");
+ TQString range = printer->option("kde-range");
if (!range.isEmpty())
{
QSize s = rangeToSize(range);
- printer->setOption("kde-from",QString::number(s.width()));
- printer->setOption("kde-to",QString::number(s.height()));
+ printer->setOption("kde-from",TQString::number(s.width()));
+ printer->setOption("kde-to",TQString::number(s.height()));
}
}
@@ -120,14 +120,14 @@ void KCupsPrinterImpl::preparePrinting(KPrinter *printer)
KPrinterImpl::preparePrinting(printer);
}
-void KCupsPrinterImpl::broadcastOption(const QString& key, const QString& value)
+void KCupsPrinterImpl::broadcastOption(const TQString& key, const TQString& value)
{
KPrinterImpl::broadcastOption(key,value);
if (key == "kde-orientation")
KPrinterImpl::broadcastOption("orientation-requested",(value == "Landscape" ? "4" : "3"));
else if (key == "kde-pagesize")
{
- QString pagename = QString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt()));
+ QString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt()));
KPrinterImpl::broadcastOption("PageSize",pagename);
// simple hack for classes
KPrinterImpl::broadcastOption("media",pagename);
@@ -136,15 +136,15 @@ void KCupsPrinterImpl::broadcastOption(const QString& key, const QString& value)
//******************************************************************************************************
-static void mapToCupsOptions(const QMap<QString,QString>& opts, QString& cmd)
+static void mapToCupsOptions(const TQMap<TQString,TQString>& opts, TQString& cmd)
{
QString optstr;
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
// only encode those options that doesn't start with "kde-" or "app-".
if (!it.key().startsWith("kde-") && !it.key().startsWith("app-") && !it.key().startsWith("_kde"))
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith("KDEPrint-"))
/* Those are keys added by the "Additional Tags" page. *
* Strip the prefix to build valid a CUPS option. */