summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrGeneralProperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpresenter/KPrGeneralProperty.cpp')
-rw-r--r--kpresenter/KPrGeneralProperty.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kpresenter/KPrGeneralProperty.cpp b/kpresenter/KPrGeneralProperty.cpp
index e07bf84c1..16378ef46 100644
--- a/kpresenter/KPrGeneralProperty.cpp
+++ b/kpresenter/KPrGeneralProperty.cpp
@@ -19,11 +19,11 @@
*/
#include "KPrGeneralProperty.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <knuminput.h>
#include <klocale.h>
@@ -31,17 +31,17 @@
#include <KoGeneralPropertyUi.h>
-KPrGeneralProperty::KPrGeneralProperty( QWidget *parent, const char *name, GeneralValue &generalValue, KoUnit::Unit unit )
-: QWidget( parent, name )
+KPrGeneralProperty::KPrGeneralProperty( TQWidget *tqparent, const char *name, GeneralValue &generalValue, KoUnit::Unit unit )
+: TQWidget( tqparent, name )
, m_ratio( 1.0 )
, m_generalValue( generalValue )
, m_unit( unit )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
- layout->addWidget( m_ui = new KoGeneralPropertyUI( this ) );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
+ tqlayout->addWidget( m_ui = new KoGeneralPropertyUI( this ) );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
- layout->addItem( spacer );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
+ tqlayout->addItem( spacer );
if ( m_generalValue.m_name.isNull() )
{
@@ -55,8 +55,8 @@ KPrGeneralProperty::KPrGeneralProperty( QWidget *parent, const char *name, Gener
m_ui->positionGroup->setTitle( i18n( "Position" ) );
- connect( m_ui->protect, SIGNAL( toggled( bool ) ), this, SLOT( slotProtectToggled( bool ) ) );
- connect( m_ui->keepRatio, SIGNAL( toggled( bool ) ), this, SLOT( slotKeepRatioToggled( bool ) ) );
+ connect( m_ui->protect, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotProtectToggled( bool ) ) );
+ connect( m_ui->keepRatio, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotKeepRatioToggled( bool ) ) );
double dStep = KoUnit::fromUserValue( 0.5, m_unit );
double dMax = KoUnit::fromUserValue( 9999, m_unit );
@@ -68,11 +68,11 @@ KPrGeneralProperty::KPrGeneralProperty( QWidget *parent, const char *name, Gener
m_ui->widthInput->setUnit( m_unit );
m_ui->widthInput->setMinMaxStep( 0, dMax, dStep );
- connect( m_ui->widthInput, SIGNAL( valueChanged( double ) ), this, SLOT( slotWidthChanged( double ) ) );
+ connect( m_ui->widthInput, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotWidthChanged( double ) ) );
m_ui->heightInput->setUnit( m_unit );
m_ui->heightInput->setMinMaxStep( 0, dMax, dStep );
- connect( m_ui->heightInput, SIGNAL( valueChanged( double ) ), this, SLOT( slotHeightChanged( double ) ) );
+ connect( m_ui->heightInput, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotHeightChanged( double ) ) );
slotReset();
}
@@ -89,7 +89,7 @@ int KPrGeneralProperty::getGeneralPropertyChange() const
if ( !m_generalValue.m_name.isNull() && m_generalValue.m_name != m_ui->nameInput->text() )
flags |= Name;
- if ( m_ui->protect->state() != QButton::NoChange )
+ if ( m_ui->protect->state() != TQButton::NoChange )
{
if ( ( m_ui->protect->isOn() ? STATE_ON : STATE_OFF ) != m_generalValue.m_protect )
flags |= Protect;
@@ -102,14 +102,14 @@ int KPrGeneralProperty::getGeneralPropertyChange() const
if ( m_generalValue.m_rect.top() != rect.top() )
flags |= Top;
// this has to be done as the rect cahnges width/hight if left or top is changed
- if ( QABS( m_generalValue.m_rect.width() - rect.width() ) > 1e-6 )
+ if ( TQABS( m_generalValue.m_rect.width() - rect.width() ) > 1e-6 )
flags |= Width;
- if ( QABS( m_generalValue.m_rect.height() - rect.height() ) > 1e-6 )
+ if ( TQABS( m_generalValue.m_rect.height() - rect.height() ) > 1e-6 )
flags |= Height;
}
}
- if ( m_ui->keepRatio->state() != QButton::NoChange
+ if ( m_ui->keepRatio->state() != TQButton::NoChange
&& ( m_ui->keepRatio->isOn() ? STATE_ON : STATE_OFF ) != m_generalValue.m_keepRatio )
{
flags |= KeepRatio;
@@ -122,7 +122,7 @@ int KPrGeneralProperty::getGeneralPropertyChange() const
KPrGeneralProperty::GeneralValue KPrGeneralProperty::getGeneralValue() const
{
GeneralValue generalValue;
- generalValue.m_name = m_ui->nameInput->isEnabled() ? m_ui->nameInput->text() : QString();
+ generalValue.m_name = m_ui->nameInput->isEnabled() ? m_ui->nameInput->text() : TQString();
generalValue.m_protect = m_ui->protect->isOn() ? STATE_ON : STATE_OFF;
generalValue.m_keepRatio = m_ui->keepRatio->isOn() ? STATE_ON : STATE_OFF;
generalValue.m_rect = getRect();
@@ -150,10 +150,10 @@ void KPrGeneralProperty::apply()
KoRect KPrGeneralProperty::getRect() const
{
- double x = QMAX( 0, m_ui->xInput->value() );
- double y = QMAX( 0, m_ui->yInput->value() );
- double w = QMAX( 0, m_ui->widthInput->value() );
- double h = QMAX( 0, m_ui->heightInput->value() );
+ double x = TQMAX( 0, m_ui->xInput->value() );
+ double y = TQMAX( 0, m_ui->yInput->value() );
+ double w = TQMAX( 0, m_ui->widthInput->value() );
+ double h = TQMAX( 0, m_ui->heightInput->value() );
KoRect rect( x, y, w, h );
return rect;
@@ -162,10 +162,10 @@ KoRect KPrGeneralProperty::getRect() const
void KPrGeneralProperty::setRect( KoRect &rect )
{
- m_ui->xInput->changeValue( QMAX( 0.00, rect.left() ) );
- m_ui->yInput->changeValue( QMAX( 0.00, rect.top() ) );
- m_ui->widthInput->changeValue( QMAX( 0.00, rect.width() ) );
- m_ui->heightInput->changeValue( QMAX( 0.00, rect.height() ) );
+ m_ui->xInput->changeValue( TQMAX( 0.00, rect.left() ) );
+ m_ui->yInput->changeValue( TQMAX( 0.00, rect.top() ) );
+ m_ui->widthInput->changeValue( TQMAX( 0.00, rect.width() ) );
+ m_ui->heightInput->changeValue( TQMAX( 0.00, rect.height() ) );
}