summaryrefslogtreecommitdiffstats
path: root/kdeprint/kprintpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdeprint/kprintpreview.cpp')
-rw-r--r--kdeprint/kprintpreview.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kdeprint/kprintpreview.cpp b/kdeprint/kprintpreview.cpp
index 6118f19b8..ab669ea6e 100644
--- a/kdeprint/kprintpreview.cpp
+++ b/kdeprint/kprintpreview.cpp
@@ -21,9 +21,9 @@
#include "kprintpreview.h"
#include "kmfactory.h"
-#include <qfile.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kparts/part.h>
#include <kaccel.h>
@@ -45,7 +45,7 @@ KPreviewProc::KPreviewProc()
: KProcess()
{
m_bOk = false;
- connect(this, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
+ connect(this, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
}
KPreviewProc::~KPreviewProc()
@@ -80,7 +80,7 @@ class KPrintPreview::KPrintPreviewPrivate
public:
KPrintPreviewPrivate(KPrintPreview *dlg) : gvpart_(0)
{
- mainwidget_ = new QWidget(dlg, "MainWidget");
+ mainwidget_ = new TQWidget(dlg, "MainWidget");
toolbar_ = new KToolBar(mainwidget_, "PreviewToolBar", true);
actions_ = new KActionCollection(dlg);
accel_ = new KAccel(dlg);
@@ -108,11 +108,11 @@ static KLibFactory* componentFactory()
{
kdDebug(500) << "kdeprint: querying trader for 'application/postscript' service" << endl;
KLibFactory *factory(0);
- KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("application/postscript"), QString::fromLatin1("KParts/ReadOnlyPart"), QString::null, QString::null);
+ KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("application/postscript"), TQString::fromLatin1("KParts/ReadOnlyPart"), TQString::null, TQString::null);
for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
{
KService::Ptr service = *it;
- factory = KLibLoader::self()->factory(QFile::encodeName(service->library()));
+ factory = KLibLoader::self()->factory(TQFile::encodeName(service->library()));
if (factory)
break;
}
@@ -124,7 +124,7 @@ static KLibFactory* componentFactory()
return factory;
}
-static bool continuePrint(const QString& msg_, QWidget *parent, bool previewOnly)
+static bool continuePrint(const TQString& msg_, TQWidget *parent, bool previewOnly)
{
QString msg(msg_);
if (previewOnly)
@@ -135,13 +135,13 @@ static bool continuePrint(const QString& msg_, QWidget *parent, bool previewOnly
else
{
msg.append(" ").append(i18n("Do you want to continue printing anyway?"));
- return (KMessageBox::warningContinueCancel(parent, msg, QString::null, KGuiItem(i18n("Print"),"fileprint")) == KMessageBox::Continue);
+ return (KMessageBox::warningContinueCancel(parent, msg, TQString::null, KGuiItem(i18n("Print"),"fileprint")) == KMessageBox::Continue);
}
}
//*******************************************************************************************
-KPrintPreview::KPrintPreview(QWidget *parent, bool previewOnly)
+KPrintPreview::KPrintPreview(TQWidget *parent, bool previewOnly)
: KDialogBase(parent, "PreviewDlg", true, i18n("Print Preview"), 0)
{
kdDebug(500) << "kdeprint: creating preview dialog" << endl;
@@ -151,11 +151,11 @@ KPrintPreview::KPrintPreview(QWidget *parent, bool previewOnly)
// create main view and actions
setMainWidget(d->mainwidget_);
if (previewOnly)
- KStdAction::close(this, SLOT(reject()), d->actions_, "close_print");
+ KStdAction::close(this, TQT_SLOT(reject()), d->actions_, "close_print");
else
{
- new KAction(i18n("Print"), "fileprint", Qt::Key_Return, this, SLOT(accept()), d->actions_, "continue_print");
- new KAction(i18n("Cancel"), "stop", Qt::Key_Escape, this, SLOT(reject()), d->actions_, "stop_print");
+ new KAction(i18n("Print"), "fileprint", Qt::Key_Return, this, TQT_SLOT(accept()), d->actions_, "continue_print");
+ new KAction(i18n("Cancel"), "stop", Qt::Key_Escape, this, TQT_SLOT(reject()), d->actions_, "stop_print");
}
}
@@ -180,14 +180,14 @@ void KPrintPreview::initView(KLibFactory *factory)
}
if (d->gvpart_)
{
- QDomNodeList l = d->gvpart_->domDocument().elementsByTagName( "ToolBar" );
+ TQDomNodeList l = d->gvpart_->domDocument().elementsByTagName( "ToolBar" );
if ( l.length() > 0 )
{
d->toolbar_->insertLineSeparator();
- QDomNodeList acts = l.item( 0 ).toElement().elementsByTagName( "Action" );
+ TQDomNodeList acts = l.item( 0 ).toElement().elementsByTagName( "Action" );
for ( uint i=0; i<acts.length(); i++ )
{
- QDomElement a = acts.item( i ).toElement();
+ TQDomElement a = acts.item( i ).toElement();
if ( a.attribute( "name" ) == "goToPage" )
continue;
KAction *act = d->gvpart_->action( a );
@@ -215,7 +215,7 @@ void KPrintPreview::initView(KLibFactory *factory)
//d->adjustSize();
// construct the layout
- QVBoxLayout *l0 = new QVBoxLayout(d->mainwidget_, 0, 0);
+ QVBoxLayout *l0 = new TQVBoxLayout(d->mainwidget_, 0, 0);
l0->addWidget(d->toolbar_, AlignTop);
if (d->gvpart_)
l0->addWidget(d->gvpart_->widget());
@@ -224,7 +224,7 @@ void KPrintPreview::initView(KLibFactory *factory)
setCaption(i18n("Print Preview"));
}
-void KPrintPreview::openFile(const QString& file)
+void KPrintPreview::openFile(const TQString& file)
{
d->gvpart_->openURL(KURL(file));
}
@@ -234,7 +234,7 @@ bool KPrintPreview::isValid() const
return (d->gvpart_ != 0);
}
-bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
+bool KPrintPreview::preview(const TQString& file, bool previewOnly, WId parentId)
{
KMimeType::Ptr mime = KMimeType::findByPath( file );
bool isPS = ( mime->name() == "application/postscript" );
@@ -245,7 +245,7 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
conf->setGroup("General");
KLibFactory *factory(0);
bool externalPreview = conf->readBoolEntry("ExternalPreview", false);
- QWidget *parentW = QWidget::find(parentId);
+ QWidget *parentW = TQWidget::find(parentId);
QString exe;
if (!externalPreview && isPS && (factory = componentFactory()) != 0)
{
@@ -282,12 +282,12 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
}
else
{
- KService::Ptr serv = KServiceTypeProfile::preferredService( mime->name(), QString::null );
+ KService::Ptr serv = KServiceTypeProfile::preferredService( mime->name(), TQString::null );
if ( serv )
{
KURL url;
url.setPath( file );
- QStringList args = KRun::processDesktopExec( *serv, url, false );
+ TQStringList args = KRun::processDesktopExec( *serv, url, false );
proc << args;
exe = serv->name();
}
@@ -295,7 +295,7 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
{
// in that case, the PS viewer component could not be loaded and no service
// could be found to view PS
- QString msg;
+ TQString msg;
if ( isPS )
msg = i18n("Preview failed: neither the internal KDE PostScript "
"viewer (KGhostView) nor any other external PostScript "
@@ -316,7 +316,7 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
}
else if (!previewOnly)
{
- return (KMessageBox::questionYesNo(parentW, i18n("Do you want to continue printing?"), QString::null, KGuiItem(i18n("Print"),"fileprint"), KStdGuiItem::cancel(), "continuePrinting") == KMessageBox::Yes);
+ return (KMessageBox::questionYesNo(parentW, i18n("Do you want to continue printing?"), TQString::null, KGuiItem(i18n("Print"),"fileprint"), KStdGuiItem::cancel(), "continuePrinting") == KMessageBox::Yes);
}
else
return false;