summaryrefslogtreecommitdiffstats
path: root/libkscan/previewer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /libkscan/previewer.cpp
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkscan/previewer.cpp')
-rw-r--r--libkscan/previewer.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/libkscan/previewer.cpp b/libkscan/previewer.cpp
index ec1f9065..5fde3f06 100644
--- a/libkscan/previewer.cpp
+++ b/libkscan/previewer.cpp
@@ -106,8 +106,8 @@ public:
TQMemArray<long> m_widthSum;
};
-Previewer::Previewer(TQWidget *parent, const char *name )
- : TQWidget(parent,name)
+Previewer::Previewer(TQWidget *tqparent, const char *name )
+ : TQWidget(tqparent,name)
{
d = new PreviewerPrivate();
@@ -119,10 +119,10 @@ Previewer::Previewer(TQWidget *parent, const char *name )
htop->addWidget( frame );
TQVBoxLayout *top = new TQVBoxLayout( frame, KDialog::marginHint(), KDialog::spacingHint() );
- layout = new TQHBoxLayout( KDialog::spacingHint() );
- top->addLayout( layout, 9 );
+ tqlayout = new TQHBoxLayout( KDialog::spacingHint() );
+ top->addLayout( tqlayout, 9 );
TQVBoxLayout *left = new TQVBoxLayout( KDialog::spacingHint() );
- layout->addLayout( left, 2 );
+ tqlayout->addLayout( left, 2 );
/* Load autoselection values from Config file */
KConfig *cfg = KGlobal::config();
@@ -141,17 +141,17 @@ Previewer::Previewer(TQWidget *parent, const char *name )
img_canvas->setDefaultScaleKind( ImageCanvas::DYNAMIC );
img_canvas->enableContextMenu(true);
- img_canvas->repaint();
- layout->addWidget( img_canvas, 6 );
+ img_canvas->tqrepaint();
+ tqlayout->addWidget( img_canvas, 6 );
/* Actions for the previewer zoom */
KAction *act;
act = new KAction(i18n("Scale to W&idth"), "scaletowidth", CTRL+Key_I,
- this, TQT_SLOT( slScaleToWidth()), this, "preview_scaletowidth" );
+ TQT_TQOBJECT(this), TQT_SLOT( slScaleToWidth()), TQT_TQOBJECT(this), "preview_scaletowidth" );
act->plug( img_canvas->contextMenu());
act = new KAction(i18n("Scale to &Height"), "scaletoheight", CTRL+Key_H,
- this, TQT_SLOT( slScaleToHeight()), this, "preview_scaletoheight" );
+ TQT_TQOBJECT(this), TQT_SLOT( slScaleToHeight()), TQT_TQOBJECT(this), "preview_scaletoheight" );
act->plug( img_canvas->contextMenu());
/*Signals: Control the custom-field and show size of selection */
@@ -200,7 +200,7 @@ Previewer::Previewer(TQWidget *parent, const char *name )
/** Autoselection Box **/
- d->m_autoSelGroup = new TQGroupBox( 1, Horizontal, i18n("Auto-Selection"), frame);
+ d->m_autoSelGroup = new TQGroupBox( 1,Qt::Horizontal, i18n("Auto-Selection"), frame);
TQHBox *hbox = new TQHBox(d->m_autoSelGroup);
d->m_cbAutoSel = new TQCheckBox( i18n("Active on"), hbox );
@@ -246,7 +246,7 @@ Previewer::Previewer(TQWidget *parent, const char *name )
left->addWidget(d->m_autoSelGroup);
/* Labels for the dimension */
- TQGroupBox *gbox = new TQGroupBox( 1, Horizontal, i18n("Selection"), frame, "GROUPBOX" );
+ TQGroupBox *gbox = new TQGroupBox( 1,Qt::Horizontal, i18n("Selection"), frame, "GROUPBOX" );
TQLabel *l2 = new TQLabel( i18n("width - mm" ), gbox );
TQLabel *l3 = new TQLabel( i18n("height - mm" ), gbox );
@@ -477,11 +477,11 @@ void Previewer::slNewDimen(TQRect r)
selectionHeightMm = (overallHeight / 1000 * r.height());
TQString s;
- s = i18n("width %1 mm").arg( int(selectionWidthMm));
+ s = i18n("width %1 mm").tqarg( int(selectionWidthMm));
emit(setScanWidth(s));
kdDebug(29000) << "Setting new Dimension " << s << endl;
- s = i18n("height %1 mm").arg(int(selectionHeightMm));
+ s = i18n("height %1 mm").tqarg(int(selectionHeightMm));
emit(setScanHeight(s));
recalcFileSize( );
@@ -727,7 +727,7 @@ void Previewer::findSelection( )
for( x = 0; x < iWidth; x++ )
{
- int gray = qGray( img->pixel( x, line ));
+ int gray = tqGray( img->pixel( x, line ));
// kdDebug(29000) << "Gray-Value at line " << gray << endl;
Q_ASSERT( line < iHeight );
Q_ASSERT( x < iWidth );