summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_toolbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/kspread_toolbox.cc')
-rw-r--r--kspread/kspread_toolbox.cc78
1 files changed, 40 insertions, 38 deletions
diff --git a/kspread/kspread_toolbox.cc b/kspread/kspread_toolbox.cc
index e7ddd632..a22be5bb 100644
--- a/kspread/kspread_toolbox.cc
+++ b/kspread/kspread_toolbox.cc
@@ -22,21 +22,21 @@
#include <kwin.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qobjectlist.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqobjectlist.h>
using namespace KSpread;
-ToolBox::ToolBox( QWidget* parent, const char* name )
- : QFrame( parent, name, WType_TopLevel | WStyle_Tool )
+ToolBox::ToolBox( TQWidget* tqparent, const char* name )
+ : TQFrame( tqparent, name, WType_TopLevel | WStyle_Tool )
{
KWin::setType( winId(), NET::Tool );
setFrameShape( Panel );
setFrameShadow( Raised );
- m_layout = new QVBoxLayout( this, 2, 2 );
+ m_layout = new TQVBoxLayout( this, 2, 2 );
// m_layout->addSpacing( 12 );
}
@@ -44,11 +44,12 @@ void ToolBox::setEnabled( bool enable )
{
if ( enable )
{
- if ( children() )
+ TQObjectList clo = childrenListObject();
+ if ( !clo.isEmpty() )
{
- QObjectListIt it( *children() );
- QWidget *w;
- while( (w=(QWidget *)it.current()) != 0 )
+ TQObjectListIt it( clo );
+ TQWidget *w;
+ while( (w=(TQWidget *)it.current()) != 0 )
{
++it;
if ( w->isWidgetType() )
@@ -58,13 +59,14 @@ void ToolBox::setEnabled( bool enable )
}
else
{
- if ( focusWidget() == this )
+ if ( tqfocusWidget() == this )
focusNextPrevChild( TRUE );
- if ( children() )
+ TQObjectList clo = childrenListObject();
+ if ( !clo.isEmpty() )
{
- QObjectListIt it( *children() );
- QWidget *w;
- while( (w=(QWidget *)it.current()) != 0 )
+ TQObjectListIt it( clo );
+ TQWidget *w;
+ while( (w=(TQWidget *)it.current()) != 0 )
{
++it;
if ( w->isWidgetType() )
@@ -78,33 +80,33 @@ void ToolBox::setEnabled( bool enable )
}
/*
-void ToolBox::paintEvent( QPaintEvent* ev )
+void ToolBox::paintEvent( TQPaintEvent* ev )
{
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
painter.fillRect( 0, 0, width(), 12, darkBlue );
painter.end();
- QFrame::paintEvent( ev );
+ TQFrame::paintEvent( ev );
}
*/
-void ToolBox::childEvent( QChildEvent* ev )
+void ToolBox::childEvent( TQChildEvent* ev )
{
if ( ev->inserted() && ev->child()->isWidgetType() )
- m_layout->addWidget( (QWidget*)ev->child() );
- resize( sizeHint() );
+ m_layout->addWidget( (TQWidget*)ev->child() );
+ resize( tqsizeHint() );
}
-void ToolBox::mousePressEvent( QMouseEvent* ev )
+void ToolBox::mousePressEvent( TQMouseEvent* ev )
{
- m_startPos = geometry().topLeft();
+ m_startPos = tqgeometry().topLeft();
m_mousePos = ev->globalPos();
}
-void ToolBox::mouseMoveEvent( QMouseEvent* ev )
+void ToolBox::mouseMoveEvent( TQMouseEvent* ev )
{
setGeometry( m_startPos.x() - m_mousePos.x() + ev->globalPos().x(),
m_startPos.y() - m_mousePos.y() + ev->globalPos().y(),
@@ -113,30 +115,30 @@ void ToolBox::mouseMoveEvent( QMouseEvent* ev )
// ---------------------------------------------
-KoTransformToolBox::KoTransformToolBox( KoDocumentChild* ch, QWidget* parent, const char* name )
- : ToolBox( parent, name )
+KoTransformToolBox::KoTransformToolBox( KoDocumentChild* ch, TQWidget* tqparent, const char* name )
+ : ToolBox( tqparent, name )
{
m_child = 0;
- m_rotation = new QSpinBox( 0, 360, 5, this );
+ m_rotation = new TQSpinBox( 0, 360, 5, this );
m_rotation->setSuffix( " deg" );
- m_scale = new QSpinBox( 10, 400, 10, this );
+ m_scale = new TQSpinBox( 10, 400, 10, this );
m_scale->setSuffix( "%" );
- m_shearX = new QSpinBox( -100, 100, 1, this );
+ m_shearX = new TQSpinBox( -100, 100, 1, this );
m_shearX->setSuffix( " px" );
- m_shearY = new QSpinBox( -100, 100, 1, this );
+ m_shearY = new TQSpinBox( -100, 100, 1, this );
m_shearY->setSuffix( " px" );
setDocumentChild( ch );
- connect( m_rotation, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotRotationChanged( int ) ) );
- connect( m_scale, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotScalingChanged( int ) ) );
- connect( m_shearX, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotXShearingChanged( int ) ) );
- connect( m_shearY, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotYShearingChanged( int ) ) );
+ connect( m_rotation, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotRotationChanged( int ) ) );
+ connect( m_scale, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotScalingChanged( int ) ) );
+ connect( m_shearX, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotXShearingChanged( int ) ) );
+ connect( m_shearY, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotYShearingChanged( int ) ) );
}
void KoTransformToolBox::setDocumentChild( KoDocumentChild* ch )