summaryrefslogtreecommitdiffstats
path: root/kview/modules/scale
diff options
context:
space:
mode:
Diffstat (limited to 'kview/modules/scale')
-rw-r--r--kview/modules/scale/kfloatspinbox.cpp8
-rw-r--r--kview/modules/scale/kfloatspinbox.h5
-rw-r--r--kview/modules/scale/kview_scale.cpp42
-rw-r--r--kview/modules/scale/kview_scale.h3
-rw-r--r--kview/modules/scale/scaledlg.cpp42
-rw-r--r--kview/modules/scale/scaledlg.h5
6 files changed, 54 insertions, 51 deletions
diff --git a/kview/modules/scale/kfloatspinbox.cpp b/kview/modules/scale/kfloatspinbox.cpp
index 936713f6..428dc2ee 100644
--- a/kview/modules/scale/kfloatspinbox.cpp
+++ b/kview/modules/scale/kfloatspinbox.cpp
@@ -20,7 +20,7 @@
#include "kfloatspinbox.h"
-#if defined(QT_ACCESSIBILITY_SUPPORT)
+#if defined(TQT_ACCESSIBILITY_SUPPORT)
#include <tqaccessible.h>
#endif
@@ -37,8 +37,8 @@ int pow( int a, int b )
return ret;
}
-KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * parent, const char * name )
- : TQSpinBox( parent, name )
+KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * tqparent, const char * name )
+ : TQSpinBox( tqparent, name )
, m_doselection( true )
{
setRange( minValue, maxValue, step, precision );
@@ -102,7 +102,7 @@ void KFloatSpinBox::valueChange()
{
updateDisplay();
emit valueChanged( value() );
-#if defined(QT_ACCESSIBILITY_SUPPORT)
+#if defined(TQT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::ValueChanged );
#endif
}
diff --git a/kview/modules/scale/kfloatspinbox.h b/kview/modules/scale/kfloatspinbox.h
index 6424df38..572fc952 100644
--- a/kview/modules/scale/kfloatspinbox.h
+++ b/kview/modules/scale/kfloatspinbox.h
@@ -23,11 +23,12 @@
#include <tqspinbox.h>
-class KFloatSpinBox : public QSpinBox
+class KFloatSpinBox : public TQSpinBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * parent = 0, const char * name = 0 );
+ KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * tqparent = 0, const char * name = 0 );
virtual ~KFloatSpinBox();
void setRange( float minValue, float maxValue, float step, unsigned int precision );
diff --git a/kview/modules/scale/kview_scale.cpp b/kview/modules/scale/kview_scale.cpp
index 29e71b13..39cf9e37 100644
--- a/kview/modules/scale/kview_scale.cpp
+++ b/kview/modules/scale/kview_scale.cpp
@@ -35,12 +35,12 @@
typedef KGenericFactory<KViewScale> KViewScaleFactory;
K_EXPORT_COMPONENT_FACTORY( kview_scale, KViewScaleFactory( "kview_scale" ) )
-KViewScale::KViewScale( TQObject* parent, const char* name, const TQStringList & )
- : Plugin( parent, name )
+KViewScale::KViewScale( TQObject* tqparent, const char* name, const TQStringList & )
+ : Plugin( tqparent, name )
, m_pViewer( 0 )
, m_pCanvas( 0 )
{
- m_pViewer = static_cast<KImageViewer::Viewer *>( parent );
+ m_pViewer = static_cast<KImageViewer::Viewer *>( tqparent );
if( m_pViewer )
{
kdDebug( 4630 ) << "m_pViewer->canvas() = " << m_pViewer->canvas() << endl;
@@ -64,9 +64,9 @@ void KViewScale::slotScaleDlg()
KDialogBase dlg( m_pViewer->widget(), "KView scale dialog", true, i18n( "Scale Image" ), KDialogBase::Ok|KDialogBase::Cancel );
ScaleDlg widget( m_pCanvas->imageSize(), dlg.makeVBoxMainWidget() );
#if 0
- TQVBox * layout = dlg.makeVBoxMainWidget();
+ TQVBox * tqlayout = dlg.makeVBoxMainWidget();
- TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), layout );
+ TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), tqlayout );
TQGridLayout * pixelgroupgrid = new TQGridLayout( pixelgroup, 1, 1, 0, KDialog::spacingHint() );
pixelgroupgrid->setSpacing( KDialog::spacingHint() );
pixelgroupgrid->setMargin( KDialog::marginHint() );
@@ -75,21 +75,21 @@ void KViewScale::slotScaleDlg()
// show original width
label = new TQLabel( i18n( "Original width:" ), pixelgroup );
- label->setAlignment( TQLabel::AlignRight );
+ label->tqsetAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 0, 0 );
pixelgroupgrid->addWidget( new TQLabel( TQString::number( imagesize.width() ), pixelgroup ), 0, 1 );
label = new TQLabel( i18n( "Height:" ), pixelgroup );
- label->setAlignment( TQLabel::AlignRight );
+ label->tqsetAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 1, 0 );
pixelgroupgrid->addWidget( new TQLabel( TQString::number( imagesize.height() ), pixelgroup ), 1, 1 );
pixelgroupgrid->addRowSpacing( 2, KDialog::spacingHint() );
label = new TQLabel( i18n( "New width:" ), pixelgroup );
- label->setAlignment( TQLabel::AlignRight );
+ label->tqsetAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 3, 0 );
label = new TQLabel( i18n( "Height:" ), pixelgroup );
- label->setAlignment( TQLabel::AlignRight );
+ label->tqsetAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 4, 0 );
TQSpinBox * newwidth = new TQSpinBox( 1, 100000, 1, pixelgroup );
pixelgroupgrid->addWidget( newwidth, 3, 1 );
@@ -98,15 +98,15 @@ void KViewScale::slotScaleDlg()
KComboBox * newsizeunit = new KComboBox( pixelgroup );
newsizeunit->insertItem( i18n( "px" ) );
newsizeunit->insertItem( i18n( "%" ) );
- pixelgroupgrid->addMultiCellWidget( newsizeunit, 3, 4, 2, 2, Qt::AlignVCenter );
+ pixelgroupgrid->addMultiCellWidget( newsizeunit, 3, 4, 2, 2, TQt::AlignVCenter );
pixelgroupgrid->addRowSpacing( 5, KDialog::spacingHint() );
label = new TQLabel( i18n( "Ratio X:" ), pixelgroup );
- label->setAlignment( TQLabel::AlignRight );
+ label->tqsetAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 6, 0 );
label = new TQLabel( i18n( "Y:" ), pixelgroup );
- label->setAlignment( TQLabel::AlignRight );
+ label->tqsetAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 7, 0 );
TQSpinBox * ratiox = new TQSpinBox( pixelgroup );
ratiox->setValidator( new TQDoubleValidator( 0.0001, 10000, 4, ratiox ) );
@@ -114,18 +114,18 @@ void KViewScale::slotScaleDlg()
TQSpinBox * ratioy = new TQSpinBox( pixelgroup );
ratioy->setValidator( new TQDoubleValidator( 0.0001, 10000, 4, ratioy ) );
pixelgroupgrid->addWidget( ratioy, 7, 1 );
- pixelgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), pixelgroup ), 6, 7, 2, 2, Qt::AlignVCenter );
+ pixelgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), pixelgroup ), 6, 7, 2, 2, TQt::AlignVCenter );
- TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), layout );
+ TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), tqlayout );
TQGridLayout * printgroupgrid = new TQGridLayout( printgroup, 1, 1, 0, KDialog::spacingHint() );
printgroupgrid->setSpacing( KDialog::spacingHint() );
printgroupgrid->setMargin( KDialog::marginHint() );
label = new TQLabel( i18n( "New width:" ), printgroup );
- label->setAlignment( TQLabel::AlignRight );
+ label->tqsetAlignment( TQLabel::AlignRight );
printgroupgrid->addWidget( label, 0, 0 );
label = new TQLabel( i18n( "Height:" ), printgroup );
- label->setAlignment( TQLabel::AlignRight );
+ label->tqsetAlignment( TQLabel::AlignRight );
printgroupgrid->addWidget( label, 1, 0 );
TQSpinBox * newwidth2 = new TQSpinBox( printgroup );
printgroupgrid->addWidget( newwidth2, 0, 1 );
@@ -134,25 +134,25 @@ void KViewScale::slotScaleDlg()
KComboBox * newsizeunit2 = new KComboBox( printgroup );
newsizeunit2->insertItem( i18n( "in" ) );
newsizeunit2->insertItem( i18n( "mm" ) );
- printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, Qt::AlignVCenter );
+ printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, TQt::AlignVCenter );
printgroupgrid->addRowSpacing( 2, KDialog::spacingHint() );
label = new TQLabel( i18n( "Resolution X:" ), printgroup );
- label->setAlignment( TQLabel::AlignRight );
+ label->tqsetAlignment( TQLabel::AlignRight );
printgroupgrid->addWidget( label, 3, 0 );
label = new TQLabel( i18n( "Y:" ), printgroup );
- label->setAlignment( TQLabel::AlignRight );
+ label->tqsetAlignment( TQLabel::AlignRight );
printgroupgrid->addWidget( label, 4, 0 );
TQSpinBox * resx = new TQSpinBox( printgroup );
printgroupgrid->addWidget( resx, 3, 1 );
TQSpinBox * resy = new TQSpinBox( printgroup );
printgroupgrid->addWidget( resy, 4, 1 );
- printgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), printgroup ), 3, 4, 2, 2, Qt::AlignVCenter );
+ printgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), printgroup ), 3, 4, 2, 2, TQt::AlignVCenter );
//KComboBox * newsizeunit2 = new KComboBox( printgroup );
//newsizeunit2->insertItem( i18n( "in" ) );
//newsizeunit2->insertItem( i18n( "mm" ) );
- //printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, Qt::AlignVCenter );
+ //printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, TQt::AlignVCenter );
#endif
dlg.exec();
diff --git a/kview/modules/scale/kview_scale.h b/kview/modules/scale/kview_scale.h
index 3ac45257..99417425 100644
--- a/kview/modules/scale/kview_scale.h
+++ b/kview/modules/scale/kview_scale.h
@@ -31,8 +31,9 @@ namespace KImageViewer {
class KViewScale : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- KViewScale( TQObject* parent, const char* name, const TQStringList & );
+ KViewScale( TQObject* tqparent, const char* name, const TQStringList & );
virtual ~KViewScale();
private slots:
diff --git a/kview/modules/scale/scaledlg.cpp b/kview/modules/scale/scaledlg.cpp
index 929aafcd..8483f763 100644
--- a/kview/modules/scale/scaledlg.cpp
+++ b/kview/modules/scale/scaledlg.cpp
@@ -37,8 +37,8 @@
#define ONEINCHINMM 2.54
-ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name )
- : TQObject( parent, name )
+ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * tqparent, const char * name )
+ : TQObject( tqparent, name )
, m_origsize( origsize )
, m_newsizeunit( 0 )
, m_newsizeunit2( 0 )
@@ -48,8 +48,8 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name
, m_resx( 72 )
, m_resy( 72 )
{
- TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), parent );
- TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), parent );
+ TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), tqparent );
+ TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), tqparent );
TQGridLayout * pixelgroupgrid = new TQGridLayout( pixelgroup, 1, 1,
KDialog::marginHint(), KDialog::spacingHint() );
@@ -61,53 +61,53 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name
pixelgroupgrid->addRowSpacing( 0, KDialog::spacingHint() );
label = new TQLabel( i18n( "Original width:" ), pixelgroup );
- label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 1, 0 );
label = new TQLabel( i18n( "Height:" ), pixelgroup );
- label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 2, 0 );
pixelgroupgrid->addRowSpacing( 3, KDialog::spacingHint() );
label = new TQLabel( i18n( "New width:" ), pixelgroup );
- label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 4, 0 );
label = new TQLabel( i18n( "Height:" ), pixelgroup );
- label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 5, 0 );
pixelgroupgrid->addRowSpacing( 6, KDialog::spacingHint() );
label = new TQLabel( i18n( "Ratio X:" ), pixelgroup );
- label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 7, 0 );
label = new TQLabel( i18n( "Y:" ), pixelgroup );
- label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 8, 0 );
printgroupgrid->addRowSpacing( 0, KDialog::spacingHint() );
label = new TQLabel( i18n( "New width:" ), printgroup );
- label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
printgroupgrid->addWidget( label, 1, 0 );
label = new TQLabel( i18n( "Height:" ), printgroup );
- label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
printgroupgrid->addWidget( label, 2, 0 );
printgroupgrid->addRowSpacing( 3, KDialog::spacingHint() );
label = new TQLabel( i18n( "Resolution X:" ), printgroup );
- label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
printgroupgrid->addWidget( label, 4, 0 );
label = new TQLabel( i18n( "Y:" ), printgroup );
- label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
printgroupgrid->addWidget( label, 5, 0 );
m_pOldWidth = new TQLabel( TQString::number( origsize.width() ), pixelgroup );
- m_pOldWidth->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ m_pOldWidth->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( m_pOldWidth, 1, 1 );
m_pOldHeight = new TQLabel( TQString::number( origsize.height() ), pixelgroup );
- m_pOldHeight->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
+ m_pOldHeight->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( m_pOldHeight, 2, 1 );
m_pNewWidth = new KFloatSpinBox( 1.0, 100000.0, 10.0, 0, pixelgroup );
@@ -118,7 +118,7 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name
m_pNewSizeUnit = new KComboBox( pixelgroup );
m_pNewSizeUnit->insertItem( i18n( "px" ) );
m_pNewSizeUnit->insertItem( i18n( "%" ) );
- pixelgroupgrid->addMultiCellWidget( m_pNewSizeUnit, 4, 5, 2, 2, Qt::AlignVCenter );
+ pixelgroupgrid->addMultiCellWidget( m_pNewSizeUnit, 4, 5, 2, 2, TQt::AlignVCenter );
m_pRatioX = new KFloatSpinBox( 0.0001, 10000.0, 0.1, 4, pixelgroup );
pixelgroupgrid->addWidget( m_pRatioX, 7, 1 );
@@ -126,7 +126,7 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name
pixelgroupgrid->addWidget( m_pRatioY, 8, 1 );
m_pLinkRatio = new TQCheckBox( i18n( "Link" ), pixelgroup );
- pixelgroupgrid->addMultiCellWidget( m_pLinkRatio, 7, 8, 2, 2, Qt::AlignVCenter );
+ pixelgroupgrid->addMultiCellWidget( m_pLinkRatio, 7, 8, 2, 2, TQt::AlignVCenter );
m_pNewWidth2 = new KFloatSpinBox( 0.0001, 10000.0, 0.1, 4, printgroup );
printgroupgrid->addWidget( m_pNewWidth2, 1, 1 );
@@ -136,7 +136,7 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name
m_pNewSizeUnit2 = new KComboBox( printgroup );
m_pNewSizeUnit2->insertItem( i18n( "in" ) );
m_pNewSizeUnit2->insertItem( i18n( "mm" ) );
- printgroupgrid->addMultiCellWidget( m_pNewSizeUnit2, 1, 2, 2, 2, Qt::AlignVCenter );
+ printgroupgrid->addMultiCellWidget( m_pNewSizeUnit2, 1, 2, 2, 2, TQt::AlignVCenter );
m_pResolutionX = new KFloatSpinBox( 0.0001, 6000.0, 1.0, 4, printgroup );
printgroupgrid->addWidget( m_pResolutionX, 4, 1 );
@@ -144,11 +144,11 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name
printgroupgrid->addWidget( m_pResolutionY, 5, 1 );
m_pLinkResolution = new TQCheckBox( i18n( "Link" ), printgroup );
- printgroupgrid->addMultiCellWidget( m_pLinkResolution, 4, 5, 2, 2, Qt::AlignVCenter );
+ printgroupgrid->addMultiCellWidget( m_pLinkResolution, 4, 5, 2, 2, TQt::AlignVCenter );
m_pResolutionUnit = new KComboBox( printgroup );
m_pResolutionUnit->insertItem( i18n( "pixels/in" ) );
m_pResolutionUnit->insertItem( i18n( "pixels/mm" ) );
- printgroupgrid->addMultiCellWidget( m_pResolutionUnit, 6, 6, 1, 2, Qt::AlignLeft );
+ printgroupgrid->addMultiCellWidget( m_pResolutionUnit, 6, 6, 1, 2, TQt::AlignLeft );
m_pNewWidth->setValue( m_origsize.width() );
m_pNewHeight->setValue( m_origsize.height() );
diff --git a/kview/modules/scale/scaledlg.h b/kview/modules/scale/scaledlg.h
index 71fa23d5..9c039d8c 100644
--- a/kview/modules/scale/scaledlg.h
+++ b/kview/modules/scale/scaledlg.h
@@ -30,11 +30,12 @@ class TQCheckBox;
class TQVBox;
class TQSize;
-class ScaleDlg : public QObject
+class ScaleDlg : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ScaleDlg( const TQSize & originalsize, TQVBox * parent, const char * name = 0 );
+ ScaleDlg( const TQSize & originalsize, TQVBox * tqparent, const char * name = 0 );
~ScaleDlg();
private slots: