summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_generalProperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/kspread_generalProperty.cpp')
-rw-r--r--kspread/kspread_generalProperty.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kspread/kspread_generalProperty.cpp b/kspread/kspread_generalProperty.cpp
index 574fd196..2e470e32 100644
--- a/kspread/kspread_generalProperty.cpp
+++ b/kspread/kspread_generalProperty.cpp
@@ -19,11 +19,11 @@
*/
#include "kspread_generalProperty.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>
@@ -32,17 +32,17 @@
using namespace KSpread;
-GeneralProperty::GeneralProperty( QWidget *parent, const char *name, GeneralValue &generalValue, KoUnit::Unit unit )
-: QWidget( parent, name )
+GeneralProperty::GeneralProperty( 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() )
{
@@ -56,8 +56,8 @@ GeneralProperty::GeneralProperty( QWidget *parent, const char *name, GeneralValu
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 );
@@ -69,11 +69,11 @@ GeneralProperty::GeneralProperty( QWidget *parent, const char *name, GeneralValu
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();
}
@@ -90,7 +90,7 @@ int GeneralProperty::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;
@@ -103,14 +103,14 @@ int GeneralProperty::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;
@@ -123,7 +123,7 @@ int GeneralProperty::getGeneralPropertyChange() const
GeneralProperty::GeneralValue GeneralProperty::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();
@@ -151,10 +151,10 @@ void GeneralProperty::apply()
KoRect GeneralProperty::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;
@@ -163,10 +163,10 @@ KoRect GeneralProperty::getRect() const
void GeneralProperty::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() ) );
}