summaryrefslogtreecommitdiffstats
path: root/kuickshow/src/printing.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:00 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:00 -0600
commitec1fddcd0d6663ad273af85357f04abbc5689468 (patch)
tree6cb946ab8b4771868c6eee8d1aa5213d6ec246e2 /kuickshow/src/printing.cpp
parentc2637a0da6d9a1c8626ca39f8451ab3b7cda487a (diff)
downloadtdegraphics-ec1fddcd0d6663ad273af85357f04abbc5689468.tar.gz
tdegraphics-ec1fddcd0d6663ad273af85357f04abbc5689468.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit c2637a0da6d9a1c8626ca39f8451ab3b7cda487a.
Diffstat (limited to 'kuickshow/src/printing.cpp')
-rw-r--r--kuickshow/src/printing.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kuickshow/src/printing.cpp b/kuickshow/src/printing.cpp
index 2983f60b..2c78a925 100644
--- a/kuickshow/src/printing.cpp
+++ b/kuickshow/src/printing.cpp
@@ -21,7 +21,7 @@
#include <tqfontmetrics.h>
#include <tqgrid.h>
#include <tqhbox.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqimage.h>
#include <kimageeffect.h>
#include <tqpaintdevicemetrics.h>
@@ -52,7 +52,7 @@ bool Printing::printImage( ImageWindow& imageWin, TQWidget *parent )
KPrinter::addDialogPage( new KuickPrintDialogPage( parent, "kuick page"));
- if ( printer.setup( parent, i18n("Print %1").arg(printer.docName().section('/', -1)) ) )
+ if ( printer.setup( parent, i18n("Print %1").tqarg(printer.docName().section('/', -1)) ) )
{
KTempFile tmpFile( TQString(), ".png" );
if ( tmpFile.status() == 0 )
@@ -109,7 +109,7 @@ bool Printing::printImageWithTQt( const TQString& filename, KPrinter& printer,
bool shrinkToFit = (printer.option( "app-kuickshow-shrinkToFit" ) != f);
TQSize imagesize = image.size();
if ( shrinkToFit && (image.width() > w || image.height() > h) ) {
- imagesize.scale( w, h, TQSize::ScaleMin );
+ imagesize.tqscale( w, h, TQSize::ScaleMin );
}
@@ -117,28 +117,28 @@ bool Printing::printImageWithTQt( const TQString& filename, KPrinter& printer,
// align image
//
bool ok = false;
- int alignment = printer.option("app-kuickshow-alignment").toInt( &ok );
+ int tqalignment = printer.option("app-kuickshow-tqalignment").toInt( &ok );
if ( !ok )
- alignment = TQt::AlignCenter; // default
+ tqalignment = TQt::AlignCenter; // default
int x = 0;
int y = 0;
// ### need a GUI for this in KuickPrintDialogPage!
- // x - alignment
- if ( alignment & TQt::AlignHCenter )
+ // x - tqalignment
+ if ( tqalignment & TQt::AlignHCenter )
x = (w - imagesize.width())/2;
- else if ( alignment & TQt::AlignLeft )
+ else if ( tqalignment & TQt::AlignLeft )
x = 0;
- else if ( alignment & TQt::AlignRight )
+ else if ( tqalignment & TQt::AlignRight )
x = w - imagesize.width();
- // y - alignment
- if ( alignment & TQt::AlignVCenter )
+ // y - tqalignment
+ if ( tqalignment & TQt::AlignVCenter )
y = (h - imagesize.height())/2;
- else if ( alignment & TQt::AlignTop )
+ else if ( tqalignment & TQt::AlignTop )
y = 0;
- else if ( alignment & TQt::AlignBottom )
+ else if ( tqalignment & TQt::AlignBottom )
y = h - imagesize.height();
//
@@ -199,21 +199,21 @@ KuickPrintDialogPage::KuickPrintDialogPage( TQWidget *parent, const char *name )
{
setTitle( i18n("Image Settings") );
- TQVBoxLayout *layout = new TQVBoxLayout( this );
- layout->setMargin( KDialog::marginHint() );
- layout->setSpacing( KDialog::spacingHint() );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
+ tqlayout->setMargin( KDialog::marginHint() );
+ tqlayout->setSpacing( KDialog::spacingHint() );
m_addFileName = new TQCheckBox( i18n("Print fi&lename below image"), this);
m_addFileName->setChecked( true );
- layout->addWidget( m_addFileName );
+ tqlayout->addWidget( m_addFileName );
m_blackwhite = new TQCheckBox ( i18n("Print image in &black and white"), this);
m_blackwhite->setChecked( false );
- layout->addWidget (m_blackwhite );
+ tqlayout->addWidget (m_blackwhite );
TQVButtonGroup *group = new TQVButtonGroup( i18n("Scaling"), this );
group->setRadioButtonExclusive( true );
- layout->addWidget( group );
+ tqlayout->addWidget( group );
// m_shrinkToFit = new TQRadioButton( i18n("Shrink image to &fit, if necessary"), group );
m_shrinkToFit = new TQCheckBox( i18n("Shrink image to &fit, if necessary"), group );
m_shrinkToFit->setChecked( true );
@@ -258,7 +258,7 @@ void KuickPrintDialogPage::getOptions( TQMap<TQString,TQString>& opts,
TQString t = "true";
TQString f = "false";
-// ### opts["app-kuickshow-alignment"] = ;
+// ### opts["app-kuickshow-tqalignment"] = ;
opts["app-kuickshow-printFilename"] = m_addFileName->isChecked() ? t : f;
opts["app-kuickshow-blackwhite"] = m_blackwhite->isChecked() ? t : f;
opts["app-kuickshow-shrinkToFit"] = m_shrinkToFit->isChecked() ? t : f;