summaryrefslogtreecommitdiffstats
path: root/karbon/widgets/vcolorslider.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /karbon/widgets/vcolorslider.cc
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karbon/widgets/vcolorslider.cc')
-rw-r--r--karbon/widgets/vcolorslider.cc52
1 files changed, 26 insertions, 26 deletions
diff --git a/karbon/widgets/vcolorslider.cc b/karbon/widgets/vcolorslider.cc
index cd11951b..e0c20555 100644
--- a/karbon/widgets/vcolorslider.cc
+++ b/karbon/widgets/vcolorslider.cc
@@ -20,23 +20,23 @@
/* vcolorslider.cc */
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <knuminput.h>
#include <kselect.h>
#include "vcolorslider.h"
-VColorSlider::VColorSlider( QWidget* parent, const char* name )
- : QWidget( parent, name )
+VColorSlider::VColorSlider( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
init();
}
// Label, left color, right color, min, max, value ...
-VColorSlider::VColorSlider( const QString& label, const QColor& col1,
- const QColor& col2, int min, int max, int value, QWidget* parent, const char* name )
- : QWidget( parent, name )
+VColorSlider::VColorSlider( const TQString& label, const TQColor& col1,
+ const TQColor& col2, int min, int max, int value, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
init();
setLabel( label );
@@ -53,34 +53,34 @@ VColorSlider::~VColorSlider()
void VColorSlider::init()
{
m_isDragging = false;
- QHBoxLayout *layout = new QHBoxLayout( this, 3 );
+ TQHBoxLayout *tqlayout = new TQHBoxLayout( this, 3 );
- m_label = new QLabel( this );
- m_gradientSelect = new KGradientSelector( KSelector::Horizontal, this );
+ m_label = new TQLabel( this );
+ m_gradientSelect = new KGradientSelector( Qt::Horizontal, this );
m_spinBox = new KIntSpinBox( this );
- layout->addWidget( m_label );
- layout->addWidget( m_gradientSelect, 2 );
- layout->addWidget( m_spinBox );
+ tqlayout->addWidget( m_label );
+ tqlayout->addWidget( m_gradientSelect, 2 );
+ tqlayout->addWidget( m_spinBox );
setValue( 0 );
setMinValue( 0 );
setMaxValue( 255 );
- connect( m_spinBox, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_spinBox( int ) ) );
- connect( m_gradientSelect, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_gradientSelect( int ) ) );
+ connect( m_spinBox, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_spinBox( int ) ) );
+ connect( m_gradientSelect, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_gradientSelect( int ) ) );
m_gradientSelect->installEventFilter( this );
- layout->activate();
+ tqlayout->activate();
}
-void VColorSlider::setLabel( const QString& label )
+void VColorSlider::setLabel( const TQString& label )
{
m_label->setText( label );
}
-void VColorSlider::setColors( const QColor& color1, const QColor& color2 )
+void VColorSlider::setColors( const TQColor& color1, const TQColor& color2 )
{
m_gradientSelect->setColors( color1, color2 );
}
@@ -114,9 +114,9 @@ void VColorSlider::updateFrom_spinBox( int value )
{
if ( value != m_gradientSelect->value() )
{
- disconnect( m_gradientSelect, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_gradientSelect( int ) ) );
+ disconnect( m_gradientSelect, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_gradientSelect( int ) ) );
m_gradientSelect->setValue( (m_maxValue - value) + m_minValue );
- connect( m_gradientSelect, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_gradientSelect( int ) ) );
+ connect( m_gradientSelect, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_gradientSelect( int ) ) );
emit valueChanged( value );
}
}
@@ -126,20 +126,20 @@ void VColorSlider::updateFrom_gradientSelect( int value )
value = (m_maxValue - value) + m_minValue;
if ( value != m_spinBox->value() )
{
- disconnect( m_spinBox, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_spinBox( int ) ) );
+ disconnect( m_spinBox, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_spinBox( int ) ) );
m_spinBox->setValue( value );
- connect( m_spinBox, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_spinBox( int ) ) );
+ connect( m_spinBox, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_spinBox( int ) ) );
emit valueChanged( value );
}
}
-bool VColorSlider::eventFilter( QObject *obj, QEvent *ev )
+bool VColorSlider::eventFilter( TQObject *obj, TQEvent *ev )
{
- if( obj == m_gradientSelect )
+ if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_gradientSelect) )
{
- if ( ev->type() == QEvent::MouseButtonPress )
+ if ( ev->type() == TQEvent::MouseButtonPress )
m_isDragging = true;
- else if( ev->type() == QEvent::MouseButtonRelease )
+ else if( ev->type() == TQEvent::MouseButtonRelease )
m_isDragging = false;
}
return FALSE;