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/KoPageLayoutSize.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/KoPageLayoutSize.cpp')
-rw-r--r-- | lib/kofficeui/KoPageLayoutSize.cpp | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/lib/kofficeui/KoPageLayoutSize.cpp b/lib/kofficeui/KoPageLayoutSize.cpp index 6fdb23e6..c5868574 100644 --- a/lib/kofficeui/KoPageLayoutSize.cpp +++ b/lib/kofficeui/KoPageLayoutSize.cpp @@ -27,143 +27,143 @@ #include <kmessagebox.h> #include <kdebug.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qhbox.h> -#include <qvgroupbox.h> -#include <qhbuttongroup.h> - -KoPageLayoutSize::KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders) - : QWidget(parent), m_blockSignals(false) { - m_layout = layout; +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqhbox.h> +#include <tqvgroupbox.h> +#include <tqhbuttongroup.h> + +KoPageLayoutSize::KoPageLayoutSize(TQWidget *tqparent, const KoPageLayout& tqlayout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders) + : TQWidget(tqparent), m_blockSignals(false) { + m_layout = tqlayout; m_unit = unit; - QGridLayout *grid1 = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint() ); + TQGridLayout *grid1 = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() ); if ( unitChooser ) { // ------------- unit _______________ - QWidget* unitFrame = new QWidget( this ); - grid1->addWidget( unitFrame, 0, 0, Qt::AlignLeft ); - QBoxLayout* unitLayout = new QHBoxLayout( unitFrame, 0, KDialog::spacingHint() ); + TQWidget* unitFrame = new TQWidget( this ); + grid1->addWidget( unitFrame, 0, 0, TQt::AlignLeft ); + TQBoxLayout* unitLayout = new TQHBoxLayout( unitFrame, 0, KDialog::spacingHint() ); // label unit - QLabel *lpgUnit = new QLabel( i18n( "Unit:" ), unitFrame ); - unitLayout->addWidget( lpgUnit, 0, Qt::AlignRight | Qt::AlignVCenter ); + TQLabel *lpgUnit = new TQLabel( i18n( "Unit:" ), unitFrame ); + unitLayout->addWidget( lpgUnit, 0, TQt::AlignRight | TQt::AlignVCenter ); // combo unit - QComboBox *cpgUnit = new QComboBox( false, unitFrame, "cpgUnit" ); + TQComboBox *cpgUnit = new TQComboBox( false, unitFrame, "cpgUnit" ); lpgUnit->setBuddy( cpgUnit ); cpgUnit->insertStringList( KoUnit::listOfUnitName() ); cpgUnit->setCurrentItem( unit ); - unitLayout->addWidget( cpgUnit, 0, Qt::AlignLeft | Qt::AlignVCenter ); - connect( cpgUnit, SIGNAL( activated( int ) ), this, SLOT( setUnitInt( int ) ) ); + unitLayout->addWidget( cpgUnit, 0, TQt::AlignLeft | TQt::AlignVCenter ); + connect( cpgUnit, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( setUnitInt( int ) ) ); } else { - QString str=KoUnit::unitDescription(unit); + TQString str=KoUnit::unitDescription(unit); - QLabel *lpgUnit = new QLabel( i18n("All values are given in %1.").arg(str), this ); - grid1->addWidget( lpgUnit, 0, 0, Qt::AlignLeft ); + TQLabel *lpgUnit = new TQLabel( i18n("All values are given in %1.").tqarg(str), this ); + grid1->addWidget( lpgUnit, 0, 0, TQt::AlignLeft ); } // -------------- page size ----------------- - QVGroupBox *formatFrame = new QVGroupBox( i18n( "Page Size" ), this ); + TQVGroupBox *formatFrame = new TQVGroupBox( i18n( "Page Size" ), this ); grid1->addWidget( formatFrame, 1, 0 ); - QHBox *formatPageSize = new QHBox( formatFrame ); + TQHBox *formatPageSize = new TQHBox( formatFrame ); formatPageSize->setSpacing( KDialog::spacingHint() ); // label page size - QLabel *lpgFormat = new QLabel( i18n( "&Size:" ), formatPageSize ); + TQLabel *lpgFormat = new TQLabel( i18n( "&Size:" ), formatPageSize ); // combo size - cpgFormat = new QComboBox( false, formatPageSize, "cpgFormat" ); + cpgFormat = new TQComboBox( false, formatPageSize, "cpgFormat" ); cpgFormat->insertStringList( KoPageFormat::allFormats() ); lpgFormat->setBuddy( cpgFormat ); - connect( cpgFormat, SIGNAL( activated( int ) ), this, SLOT( formatChanged( int ) ) ); + connect( cpgFormat, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( formatChanged( int ) ) ); // spacer - formatPageSize->setStretchFactor( new QWidget( formatPageSize ), 10 ); + formatPageSize->setStretchFactor( new TQWidget( formatPageSize ), 10 ); - QHBox *formatCustomSize = new QHBox( formatFrame ); + TQHBox *formatCustomSize = new TQHBox( formatFrame ); formatCustomSize->setSpacing( KDialog::spacingHint() ); // label width - QLabel *lpgWidth = new QLabel( i18n( "&Width:" ), formatCustomSize ); + TQLabel *lpgWidth = new TQLabel( i18n( "&Width:" ), formatCustomSize ); // linedit width epgWidth = new KoUnitDoubleSpinBox( formatCustomSize, "Width" ); lpgWidth->setBuddy( epgWidth ); if ( m_layout.format != PG_CUSTOM ) epgWidth->setEnabled( false ); - connect( epgWidth, SIGNAL( valueChangedPt(double) ), this, SLOT( widthChanged(double) ) ); + connect( epgWidth, TQT_SIGNAL( valueChangedPt(double) ), this, TQT_SLOT( widthChanged(double) ) ); // label height - QLabel *lpgHeight = new QLabel( i18n( "&Height:" ), formatCustomSize ); + TQLabel *lpgHeight = new TQLabel( i18n( "&Height:" ), formatCustomSize ); // linedit height epgHeight = new KoUnitDoubleSpinBox( formatCustomSize, "Height" ); lpgHeight->setBuddy( epgHeight ); if ( m_layout.format != PG_CUSTOM ) epgHeight->setEnabled( false ); - connect( epgHeight, SIGNAL( valueChangedPt(double ) ), this, SLOT( heightChanged(double) ) ); + connect( epgHeight, TQT_SIGNAL( valueChangedPt(double ) ), this, TQT_SLOT( heightChanged(double) ) ); // --------------- orientation --------------- - m_orientGroup = new QHButtonGroup( i18n( "Orientation" ), this ); + m_orientGroup = new TQHButtonGroup( i18n( "Qt::Orientation" ), this ); m_orientGroup->setInsideSpacing( KDialog::spacingHint() ); grid1->addWidget( m_orientGroup, 2, 0 ); - QLabel* lbPortrait = new QLabel( m_orientGroup ); - lbPortrait->setPixmap( QPixmap( UserIcon( "koPortrait" ) ) ); + TQLabel* lbPortrait = new TQLabel( m_orientGroup ); + lbPortrait->setPixmap( TQPixmap( UserIcon( "koPortrait" ) ) ); lbPortrait->setMaximumWidth( lbPortrait->pixmap()->width() ); - new QRadioButton( i18n("&Portrait"), m_orientGroup ); + new TQRadioButton( i18n("&Portrait"), m_orientGroup ); - QLabel* lbLandscape = new QLabel( m_orientGroup ); - lbLandscape->setPixmap( QPixmap( UserIcon( "koLandscape" ) ) ); + TQLabel* lbLandscape = new TQLabel( m_orientGroup ); + lbLandscape->setPixmap( TQPixmap( UserIcon( "koLandscape" ) ) ); lbLandscape->setMaximumWidth( lbLandscape->pixmap()->width() ); - new QRadioButton( i18n("La&ndscape"), m_orientGroup ); + new TQRadioButton( i18n("La&ndscape"), m_orientGroup ); - connect( m_orientGroup, SIGNAL (clicked (int)), this, SLOT( orientationChanged(int) )); + connect( m_orientGroup, TQT_SIGNAL (clicked (int)), this, TQT_SLOT( orientationChanged(int) )); // --------------- page margins --------------- - QVGroupBox *marginsFrame = new QVGroupBox( i18n( "Margins" ), this ); + TQVGroupBox *marginsFrame = new TQVGroupBox( i18n( "Margins" ), this ); marginsFrame->setColumnLayout( 0, Qt::Vertical ); marginsFrame->setMargin( KDialog::marginHint() ); grid1->addWidget( marginsFrame, 3, 0 ); - QGridLayout *marginsLayout = new QGridLayout( marginsFrame->layout(), 3, 3, + TQGridLayout *marginsLayout = new TQGridLayout( marginsFrame->tqlayout(), 3, 3, KDialog::spacingHint() ); // left margin ebrLeft = new KoUnitDoubleSpinBox( marginsFrame, "Left" ); marginsLayout->addWidget( ebrLeft, 1, 0 ); - connect( ebrLeft, SIGNAL( valueChangedPt( double ) ), this, SLOT( leftChanged( double ) ) ); + connect( ebrLeft, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( leftChanged( double ) ) ); // right margin ebrRight = new KoUnitDoubleSpinBox( marginsFrame, "Right" ); marginsLayout->addWidget( ebrRight, 1, 2 ); - connect( ebrRight, SIGNAL( valueChangedPt( double ) ), this, SLOT( rightChanged( double ) ) ); + connect( ebrRight, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( rightChanged( double ) ) ); // top margin ebrTop = new KoUnitDoubleSpinBox( marginsFrame, "Top" ); - marginsLayout->addWidget( ebrTop, 0, 1 , Qt::AlignCenter ); - connect( ebrTop, SIGNAL( valueChangedPt( double ) ), this, SLOT( topChanged( double ) ) ); + marginsLayout->addWidget( ebrTop, 0, 1 , TQt::AlignCenter ); + connect( ebrTop, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( topChanged( double ) ) ); // bottom margin ebrBottom = new KoUnitDoubleSpinBox( marginsFrame, "Bottom" ); - marginsLayout->addWidget( ebrBottom, 2, 1, Qt::AlignCenter ); - connect( ebrBottom, SIGNAL( valueChangedPt( double ) ), this, SLOT( bottomChanged( double ) ) ); + marginsLayout->addWidget( ebrBottom, 2, 1, TQt::AlignCenter ); + connect( ebrBottom, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( bottomChanged( double ) ) ); // ------------- preview ----------- pgPreview = new KoPagePreview( this, "Preview", m_layout ); grid1->addMultiCellWidget( pgPreview, 1, 3, 1, 1 ); // ------------- spacers ----------- - QWidget* spacer1 = new QWidget( this ); - QWidget* spacer2 = new QWidget( this ); - spacer1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, - QSizePolicy::Expanding ) ); - spacer2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, - QSizePolicy::Expanding ) ); + TQWidget* spacer1 = new TQWidget( this ); + TQWidget* spacer2 = new TQWidget( this ); + spacer1->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, + TQSizePolicy::Expanding ) ); + spacer2->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, + TQSizePolicy::Expanding ) ); grid1->addWidget( spacer1, 4, 0 ); grid1->addWidget( spacer2, 4, 1 ); |