diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kofficeui/KoGuideLineDia.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-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 'lib/kofficeui/KoGuideLineDia.cpp')
-rw-r--r-- | lib/kofficeui/KoGuideLineDia.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/lib/kofficeui/KoGuideLineDia.cpp b/lib/kofficeui/KoGuideLineDia.cpp index db58ed28..d3fb50b1 100644 --- a/lib/kofficeui/KoGuideLineDia.cpp +++ b/lib/kofficeui/KoGuideLineDia.cpp @@ -21,34 +21,34 @@ #include "KoGuideLineDia.h" -#include <qbuttongroup.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> #include <klocale.h> #include <KoUnitWidgets.h> -KoGuideLineDia::KoGuideLineDia( QWidget *parent, double pos, double minPos, double maxPos, +KoGuideLineDia::KoGuideLineDia( TQWidget *tqparent, double pos, double minPos, double maxPos, KoUnit::Unit unit, const char *name ) -: KDialogBase( parent, name , true, "", Ok | Cancel, Ok, true ) +: KDialogBase( tqparent, name , true, "", Ok | Cancel, Ok, true ) , m_hButton( 0 ) , m_vButton( 0 ) { setCaption( i18n("Set Guide Line Position") ); - QHBox *page = makeHBoxMainWidget(); - new QLabel( i18n( "Position:" ), page ); - m_position= new KoUnitDoubleSpinBox( page, QMAX( 0.00, minPos ), QMAX( 0.00, maxPos ), 1, QMAX( 0.00, pos ), unit ); + TQHBox *page = makeHBoxMainWidget(); + new TQLabel( i18n( "Position:" ), page ); + m_position= new KoUnitDoubleSpinBox( page, TQMAX( 0.00, minPos ), TQMAX( 0.00, maxPos ), 1, TQMAX( 0.00, pos ), unit ); m_position->setFocus(); } -KoGuideLineDia::KoGuideLineDia( QWidget *parent, KoPoint &pos, KoRect &rect, +KoGuideLineDia::KoGuideLineDia( TQWidget *tqparent, KoPoint &pos, KoRect &rect, KoUnit::Unit unit, const char *name ) -: KDialogBase( parent, name , true, "", Ok | Cancel, Ok, true ) +: KDialogBase( tqparent, name , true, "", Ok | Cancel, Ok, true ) , m_rect( rect ) , m_pos( pos ) , m_positionChanged( false ) @@ -56,25 +56,25 @@ KoGuideLineDia::KoGuideLineDia( QWidget *parent, KoPoint &pos, KoRect &rect, , m_vButton( 0 ) { setCaption( i18n("Add Guide Line") ); - QVBox * vbox = makeVBoxMainWidget(); + TQVBox * vbox = makeVBoxMainWidget(); - QButtonGroup *group = new QButtonGroup( 1, QGroupBox::Horizontal, i18n( "Orientation" ), vbox ); + TQButtonGroup *group = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Qt::Orientation" ), vbox ); group->setRadioButtonExclusive( true ); - //group->layout(); - m_hButton = new QRadioButton( i18n( "Horizontal" ), group ); - m_vButton = new QRadioButton( i18n( "Vertical" ), group ); + //group->tqlayout(); + m_hButton = new TQRadioButton( i18n( "Horizontal" ), group ); + m_vButton = new TQRadioButton( i18n( "Vertical" ), group ); - connect( group, SIGNAL( clicked( int ) ), this, SLOT( slotOrientationChanged() ) ); + connect( group, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotOrientationChanged() ) ); m_vButton->setChecked( true );; - QHBox *hbox = new QHBox( vbox ); - QLabel *label = new QLabel( i18n( "&Position:" ), hbox ); - m_position= new KoUnitDoubleSpinBox( hbox, QMAX( 0.0, m_rect.left() ), QMAX( 0.0, m_rect.right() ), 1, QMAX( 0.0, pos.x() ), unit ); + TQHBox *hbox = new TQHBox( vbox ); + TQLabel *label = new TQLabel( i18n( "&Position:" ), hbox ); + m_position= new KoUnitDoubleSpinBox( hbox, TQMAX( 0.0, m_rect.left() ), TQMAX( 0.0, m_rect.right() ), 1, TQMAX( 0.0, pos.x() ), unit ); m_position->setFocus(); label->setBuddy( m_position ); - connect( m_position, SIGNAL( valueChanged( double ) ), this, SLOT( slotPositionChanged() ) ); + connect( m_position, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotPositionChanged() ) ); } @@ -101,24 +101,24 @@ void KoGuideLineDia::slotOrientationChanged() { if ( m_hButton->isChecked() ) { - m_position->setMinValue( QMAX( 0.0, m_rect.top() ) ); - m_position->setMaxValue( QMAX( 0.0, m_rect.bottom() ) ); + m_position->setMinValue( TQMAX( 0.0, m_rect.top() ) ); + m_position->setMaxValue( TQMAX( 0.0, m_rect.bottom() ) ); if ( ! m_positionChanged ) { - disconnect( m_position, SIGNAL( valueChanged( double ) ), this, SLOT( slotPositionChanged() ) ); + disconnect( m_position, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotPositionChanged() ) ); m_position->changeValue( m_pos.y() ); - connect( m_position, SIGNAL( valueChanged( double ) ), this, SLOT( slotPositionChanged() ) ); + connect( m_position, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotPositionChanged() ) ); } } else if ( m_vButton->isChecked() ) { - m_position->setMinValue( QMAX( 0.0, m_rect.left() ) ); - m_position->setMaxValue( QMAX( 0.0, m_rect.right() ) ); + m_position->setMinValue( TQMAX( 0.0, m_rect.left() ) ); + m_position->setMaxValue( TQMAX( 0.0, m_rect.right() ) ); if ( ! m_positionChanged ) { - disconnect( m_position, SIGNAL( valueChanged( double ) ), this, SLOT( slotPositionChanged() ) ); + disconnect( m_position, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotPositionChanged() ) ); m_position->changeValue( m_pos.x() ); - connect( m_position, SIGNAL( valueChanged( double ) ), this, SLOT( slotPositionChanged() ) ); + connect( m_position, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotPositionChanged() ) ); } } } |