From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp | 24 +-- kexi/3rdparty/kolibs/KoPageLayoutColumns.h | 19 +-- kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui | 16 +- kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp | 14 +- kexi/3rdparty/kolibs/KoPageLayoutHeader.h | 9 +- kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui | 44 +++--- kexi/3rdparty/kolibs/KoPageLayoutSize.cpp | 116 +++++++------- kexi/3rdparty/kolibs/KoPageLayoutSize.h | 27 ++-- kexi/3rdparty/kolibs/koGlobal.cc | 68 ++++----- kexi/3rdparty/kolibs/koGlobal.h | 26 ++-- kexi/3rdparty/kolibs/koPageLayout.cpp | 60 ++++---- kexi/3rdparty/kolibs/koPageLayout.h | 46 +++--- kexi/3rdparty/kolibs/koPageLayoutDia.cc | 194 ++++++++++++------------ kexi/3rdparty/kolibs/koPageLayoutDia.h | 70 ++++----- kexi/3rdparty/kolibs/koUnit.cc | 58 +++---- kexi/3rdparty/kolibs/koUnit.h | 20 +-- kexi/3rdparty/kolibs/koUnitWidgets.cc | 142 ++++++++--------- kexi/3rdparty/kolibs/koUnitWidgets.h | 36 +++-- 18 files changed, 499 insertions(+), 490 deletions(-) (limited to 'kexi/3rdparty/kolibs') diff --git a/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp b/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp index db5e3e25..60057c88 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp +++ b/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp @@ -22,28 +22,28 @@ #include #include -#include -#include +#include +#include -KoPageLayoutColumns::KoPageLayoutColumns(QWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout) - : KoPageLayoutColumnsBase(parent) { +KoPageLayoutColumns::KoPageLayoutColumns(TQWidget *tqparent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout) + : KoPageLayoutColumnsBase(tqparent) { m_columns = columns; - QHBoxLayout *lay = new QHBoxLayout(previewPane); - m_preview = new KoPagePreview( previewPane, "Preview", layout ); + TQHBoxLayout *lay = new TQHBoxLayout(previewPane); + m_preview = new KoPagePreview( previewPane, "Preview", tqlayout ); lay->addWidget(m_preview); - lay = new QHBoxLayout(columnSpacingPane); + lay = new TQHBoxLayout(columnSpacingPane); m_spacing = new KoUnitDoubleSpinBox( columnSpacingPane ); m_spacing->setValue( m_columns.ptColumnSpacing ); m_spacing->setUnit( unit ); double dStep = KoUnit::fromUserValue( 0.2, unit ); - m_spacing->setMinMaxStep( 0, layout.ptWidth/2, dStep ); + m_spacing->setMinMaxStep( 0, tqlayout.ptWidth/2, dStep ); lay->addWidget(m_spacing); labelSpacing->setBuddy( m_spacing ); nColumns->setValue( m_columns.columns ); m_preview->setPageColumns( m_columns ); - connect( nColumns, SIGNAL( valueChanged( int ) ), this, SLOT( nColChanged( int ) ) ); - connect( m_spacing, SIGNAL( valueChangedPt(double) ), this, SLOT( nSpaceChanged( double ) ) ); + connect( nColumns, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( nColChanged( int ) ) ); + connect( m_spacing, TQT_SIGNAL( valueChangedPt(double) ), this, TQT_SLOT( nSpaceChanged( double ) ) ); } void KoPageLayoutColumns::setEnableColumns(bool on) { @@ -63,8 +63,8 @@ void KoPageLayoutColumns::nSpaceChanged( double spacing ) { emit propertyChange(m_columns); } -void KoPageLayoutColumns::setLayout(KoPageLayout &layout) { - m_preview->setPageLayout( layout ); +void KoPageLayoutColumns::setLayout(KoPageLayout &tqlayout) { + m_preview->setPageLayout( tqlayout ); } #include diff --git a/kexi/3rdparty/kolibs/KoPageLayoutColumns.h b/kexi/3rdparty/kolibs/KoPageLayoutColumns.h index be0a4a49..016eb767 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutColumns.h +++ b/kexi/3rdparty/kolibs/KoPageLayoutColumns.h @@ -19,14 +19,14 @@ // Description: Page Layout Dialog (sources) -#ifndef kopagelayoutcolumns_h -#define kopagelayoutcolumns_h +#ifndef kopagetqlayoutcolumns_h +#define kopagetqlayoutcolumns_h #include #include #include -class QWidget; +class TQWidget; class KoUnitDoubleSpinBox; class KoPagePreview; @@ -35,22 +35,23 @@ class KoPagePreview; */ class KoPageLayoutColumns : public KoPageLayoutColumnsBase { Q_OBJECT + TQ_OBJECT public: /** * Contructor - * @param parent the parent widget + * @param tqparent the tqparent widget * @param columns the KoColumns data structure that this dialog should be initialzed with * @param unit the unit-type (mm/cm/inch) that the dialog should show - * @param layout the page layout that the preview should be initialzed with. + * @param tqlayout the page tqlayout that the preview should be initialzed with. */ - KoPageLayoutColumns(QWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout); + KoPageLayoutColumns(TQWidget *tqparent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout); /** - * Update the page preview widget with the param layout. - * @param layout the new layout + * Update the page preview widget with the param tqlayout. + * @param tqlayout the new tqlayout */ - void setLayout(KoPageLayout &layout); + void setLayout(KoPageLayout &tqlayout); public slots: /** diff --git a/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui b/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui index 1ffe032d..780bc792 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui +++ b/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui @@ -1,6 +1,6 @@ KoPageLayoutColumnsBase - + KoPageLayoutColumnsBase @@ -16,7 +16,7 @@ unnamed - + columnSpacingPane @@ -27,7 +27,7 @@ Raised - + textLabel1 @@ -38,7 +38,7 @@ nColumns - + labelSpacing @@ -56,14 +56,14 @@ Expanding - + 20 20 - + previewPane @@ -82,7 +82,7 @@ Raised - + nColumns @@ -95,5 +95,5 @@ - + diff --git a/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp b/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp index ad5e018c..b436447b 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp +++ b/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp @@ -20,21 +20,21 @@ #include #include -#include -#include +#include +#include -KoPageLayoutHeader::KoPageLayoutHeader(QWidget *parent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf) - : KoPageLayoutHeaderBase(parent) { +KoPageLayoutHeader::KoPageLayoutHeader(TQWidget *tqparent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf) + : KoPageLayoutHeaderBase(tqparent) { m_headerFooters = kwhf; - QHBoxLayout *lay = new QHBoxLayout(headerSpacingPane); + TQHBoxLayout *lay = new TQHBoxLayout(headerSpacingPane); m_headerSpacing = new KoUnitDoubleSpinBox( headerSpacingPane, 0.0, 999.0, 0.5, kwhf.ptHeaderBodySpacing, unit ); lay->addWidget(m_headerSpacing); - lay = new QHBoxLayout(footerSpacingPane); + lay = new TQHBoxLayout(footerSpacingPane); m_footerSpacing = new KoUnitDoubleSpinBox( footerSpacingPane, 0.0, 999.0, 0.5, kwhf.ptFooterBodySpacing, unit ); lay->addWidget(m_footerSpacing); - lay = new QHBoxLayout(footnotePane); + lay = new TQHBoxLayout(footnotePane); m_footnoteSpacing = new KoUnitDoubleSpinBox( footnotePane, 0.0, 999.0, 0.5, kwhf.ptFootNoteBodySpacing, unit ); lay->addWidget(m_footnoteSpacing); diff --git a/kexi/3rdparty/kolibs/KoPageLayoutHeader.h b/kexi/3rdparty/kolibs/KoPageLayoutHeader.h index 65449dc0..4e3a00a4 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutHeader.h +++ b/kexi/3rdparty/kolibs/KoPageLayoutHeader.h @@ -16,22 +16,23 @@ * Boston, MA 02110-1301, USA. */ -#ifndef kopagelayoutheader_h -#define kopagelayoutheader_h +#ifndef kopagetqlayoutheader_h +#define kopagetqlayoutheader_h #include #include #include -class QWidget; +class TQWidget; class KoUnitDoubleSpinBox; class KoPagePreview; class KoPageLayoutHeader : public KoPageLayoutHeaderBase { Q_OBJECT + TQ_OBJECT public: - KoPageLayoutHeader(QWidget *parent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf); + KoPageLayoutHeader(TQWidget *tqparent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf); const KoKWHeaderFooter& headerFooter(); private: diff --git a/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui b/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui index d46ca98e..4488c6f4 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui +++ b/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui @@ -1,6 +1,6 @@ KoPageLayoutHeaderBase - + KoPageLayoutHeaderBase @@ -16,7 +16,7 @@ unnamed - + groupBox1 @@ -27,7 +27,7 @@ unnamed - + rhFirst @@ -35,7 +35,7 @@ Different header for the first page - + rhEvenOdd @@ -43,9 +43,9 @@ Different header for even and odd pages - + - layout1 + tqlayout1 @@ -61,14 +61,14 @@ Expanding - + 21 20 - + textLabel3 @@ -76,7 +76,7 @@ Spacing between header and body: - + headerSpacingPane @@ -91,7 +91,7 @@ - + groupBox2 @@ -102,7 +102,7 @@ unnamed - + rfFirst @@ -110,7 +110,7 @@ Different footer for the first page - + rfEvenOdd @@ -118,9 +118,9 @@ Different footer for even and odd pages - + - layout2 + tqlayout2 @@ -136,14 +136,14 @@ Expanding - + 41 20 - + textLabel4 @@ -151,7 +151,7 @@ Spacing between footer and body: - + footerSpacingPane @@ -166,7 +166,7 @@ - + groupBox3 @@ -187,14 +187,14 @@ Expanding - + 40 20 - + textLabel5 @@ -202,7 +202,7 @@ Spacing between footnote and body: - + footnotePane @@ -217,5 +217,5 @@ - + diff --git a/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp b/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp index cb22fe9c..a8eb447f 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp +++ b/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp @@ -26,143 +26,143 @@ #include #include -#include -#include -#include -#include -#include -#include - -KoPageLayoutSize::KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders) - : QWidget(parent) { - m_layout = layout; +#include +#include +#include +#include +#include +#include + +KoPageLayoutSize::KoPageLayoutSize(TQWidget *tqparent, const KoPageLayout& tqlayout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders) + : TQWidget(tqparent) { + 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, KDialog::marginHint(), KDialog::spacingHint() ); + TQWidget* unitFrame = new TQWidget( this ); + grid1->addWidget( unitFrame, 0, 0, TQt::AlignLeft ); + TQBoxLayout* unitLayout = new TQHBoxLayout( unitFrame, KDialog::marginHint(), 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 - cpgUnit = new QComboBox( false, unitFrame, "cpgUnit" ); + 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 ); @@ -262,12 +262,12 @@ void KoPageLayoutSize::formatChanged( int format ) { } void KoPageLayoutSize::orientationChanged(int which) { - KoOrientation oldOrientation = m_layout.orientation; + KoOrientation oldQt::Orientation = m_layout.orientation; m_layout.orientation = which == 0 ? PG_PORTRAIT : PG_LANDSCAPE; // without this check, width & height would be swapped around (below) // even though the orientation has not changed - if (m_layout.orientation == oldOrientation) return; + if (m_layout.orientation == oldQt::Orientation) return; m_layout.ptWidth = epgWidth->value(); m_layout.ptHeight = epgHeight->value(); @@ -277,7 +277,7 @@ void KoPageLayoutSize::orientationChanged(int which) { m_layout.ptBottom = ebrBottom->value(); // swap dimension and adjust margins - qSwap( m_layout.ptWidth, m_layout.ptHeight ); + tqSwap( m_layout.ptWidth, m_layout.ptHeight ); double tmp = m_layout.ptTop; m_layout.ptTop = m_layout.ptRight; m_layout.ptRight = m_layout.ptBottom; diff --git a/kexi/3rdparty/kolibs/KoPageLayoutSize.h b/kexi/3rdparty/kolibs/KoPageLayoutSize.h index e32f9670..3f46def2 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutSize.h +++ b/kexi/3rdparty/kolibs/KoPageLayoutSize.h @@ -17,37 +17,38 @@ * Boston, MA 02110-1301, USA. */ -#ifndef kopagelayoutsize_h -#define kopagelayoutsize_h +#ifndef kopagetqlayoutsize_h +#define kopagetqlayoutsize_h -#include +#include #include #include #include #include #include -class QComboBox; +class TQComboBox; class KoUnitDoubleSpinBox; class KoPageLayoutColumns; /** * This class is a widget that shows the KoPageLayout data structure and allows the user to change it. */ -class KoPageLayoutSize : public QWidget { +class KoPageLayoutSize : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Contructor - * @param parent the parent widget - * @param layout the page layout that this widget should be initialzed with. + * @param tqparent the tqparent widget + * @param tqlayout the page tqlayout that this widget should be initialzed with. * @param unit the unit-type (mm/cm/inch) that the dialog should show * @param columns the KoColumns (amout of columns) that the preview should be initialized with * @param unitChooser if true a combobox with the unit-type is shown for the user to change * @param enableBorders if true enable the user to change the margins (aka borders) of the page */ - KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit, + KoPageLayoutSize(TQWidget *tqparent, const KoPageLayout& tqlayout, KoUnit::Unit unit, const KoColumns& columns, bool unitChooser, bool enableBorders); /** @@ -75,15 +76,15 @@ public slots: signals: /** * Emitted whenever the user changed something in the dialog. - * @param layout the update layout structure with currently displayed info. + * @param tqlayout the update tqlayout structure with currently displayed info. * Note that the info may not be fully correct and physically possible (in which * case queryClose will return false) */ - void propertyChange(KoPageLayout &layout); + void propertyChange(KoPageLayout &tqlayout); protected: - QComboBox *cpgUnit; - QComboBox *cpgFormat; + TQComboBox *cpgUnit; + TQComboBox *cpgFormat; KoUnitDoubleSpinBox *epgWidth; KoUnitDoubleSpinBox *epgHeight; KoUnitDoubleSpinBox *ebrLeft; @@ -91,7 +92,7 @@ protected: KoUnitDoubleSpinBox *ebrTop; KoUnitDoubleSpinBox *ebrBottom; KoPagePreview *pgPreview; - QButtonGroup *m_orientGroup; + TQButtonGroup *m_orientGroup; protected slots: void formatChanged( int ); diff --git a/kexi/3rdparty/kolibs/koGlobal.cc b/kexi/3rdparty/kolibs/koGlobal.cc index 09c74eab..58c90445 100644 --- a/kexi/3rdparty/kolibs/koGlobal.cc +++ b/kexi/3rdparty/kolibs/koGlobal.cc @@ -21,8 +21,8 @@ #include "config.h" #include #include -#include -#include +#include +#include #include #include #include @@ -58,12 +58,12 @@ KoGlobal::KoGlobal() // Tell the iconloader about share/apps/koffice/icons KGlobal::iconLoader()->addAppDir("koffice"); - // Another way to get the DPI of the display would be QPaintDeviceMetrics, + // Another way to get the DPI of the display would be TQPaintDeviceMetrics, // but we have no widget here (and moving this to KoView wouldn't allow // using this from the document easily). -#ifdef Q_WS_X11 - m_dpiX = QPaintDevice::x11AppDpiX(); - m_dpiY = QPaintDevice::x11AppDpiY(); +#ifdef TQ_WS_X11 + m_dpiX = TQPaintDevice::x11AppDpiX(); + m_dpiY = TQPaintDevice::x11AppDpiY(); #else m_dpiX = 75; m_dpiY = 75; @@ -75,31 +75,31 @@ KoGlobal::~KoGlobal() delete m_kofficeConfig; } -QFont KoGlobal::_defaultFont() +TQFont KoGlobal::_defaultFont() { - QFont font = KGlobalSettings::generalFont(); - // we have to use QFontInfo, in case the font was specified with a pixel size + TQFont font = KGlobalSettings::generalFont(); + // we have to use TQFontInfo, in case the font was specified with a pixel size if ( font.pointSize() == -1 ) { - // cache size into m_pointSize, since QFontInfo loads the font -> slow + // cache size into m_pointSize, since TQFontInfo loads the font -> slow if ( m_pointSize == -1 ) - m_pointSize = QFontInfo(font).pointSize(); + m_pointSize = TQFontInfo(font).pointSize(); Q_ASSERT( m_pointSize != -1 ); font.setPointSize( m_pointSize ); } - //kdDebug()< seenLanguages; - const QStringList langlist = config.groupList(); - for ( QStringList::ConstIterator itall = langlist.begin(); + TQMap seenLanguages; + const TQStringList langlist = config.groupList(); + for ( TQStringList::ConstIterator itall = langlist.begin(); itall != langlist.end(); ++itall ) { - const QString tag = *itall; + const TQString tag = *itall; config.setGroup( tag ); - const QString name = config.readEntry("Name", tag); + const TQString name = config.readEntry("Name", tag); // e.g. name is "French" and tag is "fr" - // The QMap does the sorting on the display-name, so that + // The TQMap does the sorting on the display-name, so that // comboboxes are sorted. m_langMap.insert( name, tag ); @@ -132,23 +132,23 @@ void KoGlobal::createListOfLanguages() // Many of them are already in all_languages but all_languages doesn't // currently have en_GB or en_US etc. - const QStringList translationList = KGlobal::dirs()->findAllResources("locale", - QString::fromLatin1("*/entry.desktop")); - for ( QStringList::ConstIterator it = translationList.begin(); + const TQStringList translationList = KGlobal::dirs()->findAllResources("locale", + TQString::tqfromLatin1("*/entry.desktop")); + for ( TQStringList::ConstIterator it = translationList.begin(); it != translationList.end(); ++it ) { // Extract the language tag from the directory name - QString tag = *it; - int index = tag.findRev('/'); + TQString tag = *it; + int index = tag.tqfindRev('/'); tag = tag.left(index); - index = tag.findRev('/'); + index = tag.tqfindRev('/'); tag = tag.mid(index+1); - if ( seenLanguages.find( tag ) == seenLanguages.end() ) { + if ( seenLanguages.tqfind( tag ) == seenLanguages.end() ) { KSimpleConfig entry(*it); entry.setGroup("KCM Locale"); - const QString name = entry.readEntry("Name", tag); + const TQString name = entry.readEntry("Name", tag); // e.g. name is "US English" and tag is "en_US" m_langMap.insert( name, tag ); @@ -163,20 +163,20 @@ void KoGlobal::createListOfLanguages() // How to add them? } -QString KoGlobal::tagOfLanguage( const QString & _lang) +TQString KoGlobal::tagOfLanguage( const TQString & _lang) { const LanguageMap& map = self()->m_langMap; - QMap::ConstIterator it = map.find( _lang ); + TQMap::ConstIterator it = map.tqfind( _lang ); if ( it != map.end() ) return *it; - return QString::null; + return TQString(); } -QString KoGlobal::languageFromTag( const QString &langTag ) +TQString KoGlobal::languageFromTag( const TQString &langTag ) { const LanguageMap& map = self()->m_langMap; - QMap::ConstIterator it = map.begin(); - const QMap::ConstIterator end = map.end(); + TQMap::ConstIterator it = map.begin(); + const TQMap::ConstIterator end = map.end(); for ( ; it != end; ++it ) if ( it.data() == langTag ) return it.key(); diff --git a/kexi/3rdparty/kolibs/koGlobal.h b/kexi/3rdparty/kolibs/koGlobal.h index bab9c261..367a150b 100644 --- a/kexi/3rdparty/kolibs/koGlobal.h +++ b/kexi/3rdparty/kolibs/koGlobal.h @@ -22,9 +22,9 @@ #ifndef koGlobal_h #define koGlobal_h -#include -#include -#include +#include +#include +#include class KConfig; #include @@ -39,9 +39,9 @@ public: * Return the default font for KOffice programs. * This is (currently) the same as the KDE-global default font, * except that it is guaranteed to have a point size set, - * never a pixel size (see @ref QFont). + * never a pixel size (see @ref TQFont). */ - static QFont defaultFont() { + static TQFont defaultFont() { return self()->_defaultFont(); } @@ -66,32 +66,32 @@ public: /// Return the list of available languages, in their displayable form /// (translated names) - static QStringList listOfLanguages() { + static TQStringList listOfLanguages() { return self()->_listOfLanguages(); } /// Return the list of available languages, in their internal form /// e.g. "fr" or "en_US", here called "tag" - static QStringList listTagOfLanguages() { // TODO rename to listOfLanguageTags + static TQStringList listTagOfLanguages() { // TODO rename to listOfLanguageTags return self()->_listOfLanguageTags(); } /// For a given language display name, return its tag - static QString tagOfLanguage( const QString & _lang ); + static TQString tagOfLanguage( const TQString & _lang ); /// For a given language tag, return its display name - static QString languageFromTag( const QString &_lang ); + static TQString languageFromTag( const TQString &_lang ); ~KoGlobal(); private: static KoGlobal* self(); KoGlobal(); - QFont _defaultFont(); - QStringList _listOfLanguages(); - QStringList _listOfLanguageTags(); + TQFont _defaultFont(); + TQStringList _listOfLanguages(); + TQStringList _listOfLanguageTags(); KConfig* _kofficeConfig(); void createListOfLanguages(); int m_pointSize; - typedef QMap LanguageMap; + typedef TQMap LanguageMap; LanguageMap m_langMap; // display-name -> language tag KConfig* m_kofficeConfig; int m_dpiX; diff --git a/kexi/3rdparty/kolibs/koPageLayout.cpp b/kexi/3rdparty/kolibs/koPageLayout.cpp index 4ec985f3..7888ba7d 100644 --- a/kexi/3rdparty/kolibs/koPageLayout.cpp +++ b/kexi/3rdparty/kolibs/koPageLayout.cpp @@ -28,7 +28,7 @@ # include # include #endif -#include +#include // paper formats ( mm ) #define PG_A3_WIDTH 297.0 @@ -60,21 +60,21 @@ KoGenStyle KoPageLayout::saveOasis() const return style; } -void KoPageLayout::loadOasis(const QDomElement &style) +void KoPageLayout::loadOasis(const TQDomElement &style) { - QDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-layout-properties" ) ); + TQDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-tqlayout-properties" ) ); if ( !properties.isNull() ) { - ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", QString::null ) ); - ptHeight = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-height", QString::null ) ); - if (properties.attributeNS( KoXmlNS::style, "print-orientation", QString::null)=="portrait") + ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", TQString() ) ); + ptHeight = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-height", TQString() ) ); + if (properties.attributeNS( KoXmlNS::style, "print-orientation", TQString())=="portrait") orientation=PG_PORTRAIT; else orientation=PG_LANDSCAPE; - ptRight = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-right", QString::null ) ); - ptBottom = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-bottom", QString::null ) ); - ptLeft = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-left", QString::null ) ); - ptTop = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-top", QString::null ) ); + ptRight = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-right", TQString() ) ); + ptBottom = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-bottom", TQString() ) ); + ptLeft = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-left", TQString() ) ); + ptTop = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-top", TQString() ) ); // guessFormat takes millimeters if ( orientation == PG_LANDSCAPE ) format = KoPageFormat::guessFormat( POINT_TO_MM(ptHeight), POINT_TO_MM(ptWidth) ); @@ -86,16 +86,16 @@ void KoPageLayout::loadOasis(const QDomElement &style) KoPageLayout KoPageLayout::standardLayout() { - KoPageLayout layout; - layout.format = KoPageFormat::defaultFormat(); - layout.orientation = PG_PORTRAIT; - layout.ptWidth = MM_TO_POINT( KoPageFormat::width( layout.format, layout.orientation ) ); - layout.ptHeight = MM_TO_POINT( KoPageFormat::height( layout.format, layout.orientation ) ); - layout.ptLeft = MM_TO_POINT( 20.0 ); - layout.ptRight = MM_TO_POINT( 20.0 ); - layout.ptTop = MM_TO_POINT( 20.0 ); - layout.ptBottom = MM_TO_POINT( 20.0 ); - return layout; + KoPageLayout tqlayout; + tqlayout.format = KoPageFormat::defaultFormat(); + tqlayout.orientation = PG_PORTRAIT; + tqlayout.ptWidth = MM_TO_POINT( KoPageFormat::width( tqlayout.format, tqlayout.orientation ) ); + tqlayout.ptHeight = MM_TO_POINT( KoPageFormat::height( tqlayout.format, tqlayout.orientation ) ); + tqlayout.ptLeft = MM_TO_POINT( 20.0 ); + tqlayout.ptRight = MM_TO_POINT( 20.0 ); + tqlayout.ptTop = MM_TO_POINT( 20.0 ); + tqlayout.ptBottom = MM_TO_POINT( 20.0 ); + return tqlayout; } struct PageFormatInfo @@ -151,12 +151,12 @@ int KoPageFormat::printerPageSize( KoFormat format ) { if ( format == PG_SCREEN ) { - kdWarning() << "You use the page layout SCREEN. Printing in DIN A4 LANDSCAPE." << endl; + kdWarning() << "You use the page tqlayout SCREEN. Printing in DIN A4 LANDSCAPE." << endl; return KPrinter::A4; } else if ( format == PG_CUSTOM ) { - kdWarning() << "The used page layout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl; + kdWarning() << "The used page tqlayout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl; return KPrinter::A4; } else if ( format <= PG_LAST_FORMAT ) @@ -197,18 +197,18 @@ KoFormat KoPageFormat::guessFormat( double width, double height ) return PG_CUSTOM; } -QString KoPageFormat::formatString( KoFormat format ) +TQString KoPageFormat::formatString( KoFormat format ) { if ( format <= PG_LAST_FORMAT ) - return QString::fromLatin1( pageFormatInfo[ format ].shortName ); - return QString::fromLatin1( "A4" ); + return TQString::tqfromLatin1( pageFormatInfo[ format ].shortName ); + return TQString::tqfromLatin1( "A4" ); } -KoFormat KoPageFormat::formatFromString( const QString & string ) +KoFormat KoPageFormat::formatFromString( const TQString & string ) { for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) { - if (string == QString::fromLatin1( pageFormatInfo[ i ].shortName )) + if (string == TQString::tqfromLatin1( pageFormatInfo[ i ].shortName )) return pageFormatInfo[ i ].format; } // We do not know the format name, so we have a custom format @@ -226,16 +226,16 @@ KoFormat KoPageFormat::defaultFormat() return PG_DIN_A4; } -QString KoPageFormat::name( KoFormat format ) +TQString KoPageFormat::name( KoFormat format ) { if ( format <= PG_LAST_FORMAT ) return i18n( pageFormatInfo[ format ].descriptiveName ); return i18n( pageFormatInfo[ PG_DIN_A4 ].descriptiveName ); } -QStringList KoPageFormat::allFormats() +TQStringList KoPageFormat::allFormats() { - QStringList lst; + TQStringList lst; for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) { lst << i18n( pageFormatInfo[ i ].descriptiveName ); diff --git a/kexi/3rdparty/kolibs/koPageLayout.h b/kexi/3rdparty/kolibs/koPageLayout.h index b526620e..724f9275 100644 --- a/kexi/3rdparty/kolibs/koPageLayout.h +++ b/kexi/3rdparty/kolibs/koPageLayout.h @@ -25,15 +25,15 @@ #ifndef SIMPLE_KOLIBS # include #endif -#include +#include #include -class QDomElement; +class TQDomElement; /** * @brief Represents the paper format a document shall be printed on. * * For compatibility reasons, and because of screen and custom, - * this enum doesn't map to QPrinter::PageSize but KoPageFormat::printerPageSize + * this enum doesn't map to TQPrinter::PageSize but KoPageFormat::printerPageSize * does the conversion. * * @todo convert DIN to ISO in the names @@ -110,13 +110,13 @@ namespace KoPageFormat * Returns the internal name of the given page format. * Use for saving. */ - KOFFICECORE_EXPORT QString formatString( KoFormat format ); + KOFFICECORE_EXPORT TQString formatString( KoFormat format ); /** * Convert a format string (internal name) to a page format value. * Use for loading. */ - KOFFICECORE_EXPORT KoFormat formatFromString( const QString & string ); + KOFFICECORE_EXPORT KoFormat formatFromString( const TQString & string ); /** * Returns the default format (based on the KControl settings) @@ -127,12 +127,12 @@ namespace KoPageFormat * Returns the translated name of the given page format. * Use for showing the user. */ - KOFFICECORE_EXPORT QString name( KoFormat format ); + KOFFICECORE_EXPORT TQString name( KoFormat format ); /** * Lists the translated names of all the available formats */ - KOFFICECORE_EXPORT QStringList allFormats(); + KOFFICECORE_EXPORT TQStringList allFormats(); /** * Try to find the paper format for the given width and height (in mm). @@ -156,7 +156,7 @@ enum KoHFType { }; /** - * This structure defines the page layout, including + * This structure defines the page tqlayout, including * its size in pt, its format (e.g. A4), orientation, unit, margins etc. */ struct KoPageLayout @@ -193,18 +193,18 @@ struct KoPageLayout #ifndef SIMPLE_KOLIBS /** - * Save this page layout to OASIS. + * Save this page tqlayout to OASIS. */ KOFFICECORE_EXPORT KoGenStyle saveOasis() const; /** - * Load this page layout from OASIS + * Load this page tqlayout from OASIS */ - KOFFICECORE_EXPORT void loadOasis(const QDomElement &style); + KOFFICECORE_EXPORT void loadOasis(const TQDomElement &style); #endif /** - * @return a page layout with the default page size depending on the locale settings, + * @return a page tqlayout with the default page size depending on the locale settings, * default margins (2 cm), and portrait orientation. * @since 1.4 */ @@ -214,12 +214,12 @@ struct KoPageLayout /** structure for header-footer */ struct KoHeadFoot { - QString headLeft; - QString headMid; - QString headRight; - QString footLeft; - QString footMid; - QString footRight; + TQString headLeft; + TQString headMid; + TQString headRight; + TQString footLeft; + TQString footMid; + TQString footRight; }; /** structure for columns */ @@ -229,11 +229,11 @@ struct KoColumns double ptColumnSpacing; bool operator==( const KoColumns& rhs ) const { return columns == rhs.columns && - QABS(ptColumnSpacing - rhs.ptColumnSpacing) <= 1E-10; + TQABS(ptColumnSpacing - rhs.ptColumnSpacing) <= 1E-10; } bool operator!=( const KoColumns& rhs ) const { return columns != rhs.columns || - QABS(ptColumnSpacing - rhs.ptColumnSpacing) > 1E-10; + TQABS(ptColumnSpacing - rhs.ptColumnSpacing) > 1E-10; } }; @@ -247,9 +247,9 @@ struct KoKWHeaderFooter double ptFootNoteBodySpacing; bool operator==( const KoKWHeaderFooter& rhs ) const { return header == rhs.header && footer == rhs.footer && - QABS(ptHeaderBodySpacing - rhs.ptHeaderBodySpacing) <= 1E-10 && - QABS(ptFooterBodySpacing - rhs.ptFooterBodySpacing) <= 1E-10 && - QABS(ptFootNoteBodySpacing - rhs.ptFootNoteBodySpacing) <= 1E-10; + TQABS(ptHeaderBodySpacing - rhs.ptHeaderBodySpacing) <= 1E-10 && + TQABS(ptFooterBodySpacing - rhs.ptFooterBodySpacing) <= 1E-10 && + TQABS(ptFootNoteBodySpacing - rhs.ptFootNoteBodySpacing) <= 1E-10; } bool operator!=( const KoKWHeaderFooter& rhs ) const { return !( *this == rhs ); diff --git a/kexi/3rdparty/kolibs/koPageLayoutDia.cc b/kexi/3rdparty/kolibs/koPageLayoutDia.cc index 5fe8832e..991a2ced 100644 --- a/kexi/3rdparty/kolibs/koPageLayoutDia.cc +++ b/kexi/3rdparty/kolibs/koPageLayoutDia.cc @@ -33,26 +33,26 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /******************************************************************/ /* class KoPagePreview */ /******************************************************************/ /*===================== constrcutor ==============================*/ -KoPagePreview::KoPagePreview( QWidget* parent, const char *name, const KoPageLayout& layout ) - : QGroupBox( i18n( "Page Preview" ), parent, name ) +KoPagePreview::KoPagePreview( TQWidget* tqparent, const char *name, const KoPageLayout& tqlayout ) + : TQGroupBox( i18n( "Page Preview" ), tqparent, name ) { - setPageLayout( layout ); + setPageLayout( tqlayout ); columns = 1; setMinimumSize( 150, 150 ); } @@ -62,47 +62,47 @@ KoPagePreview::~KoPagePreview() { } -/*=================== set layout =================================*/ -void KoPagePreview::setPageLayout( const KoPageLayout &layout ) +/*=================== set tqlayout =================================*/ +void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout ) { // resolution[XY] is in pixel per pt double resolutionX = POINT_TO_INCH( static_cast(KoGlobal::dpiX()) ); double resolutionY = POINT_TO_INCH( static_cast(KoGlobal::dpiY()) ); - m_pageWidth = layout.ptWidth * resolutionX; - m_pageHeight = layout.ptHeight * resolutionY; + m_pageWidth = tqlayout.ptWidth * resolutionX; + m_pageHeight = tqlayout.ptHeight * resolutionY; double zh = 110.0 / m_pageHeight; double zw = 110.0 / m_pageWidth; - double z = QMIN( zw, zh ); + double z = TQMIN( zw, zh ); m_pageWidth *= z; m_pageHeight *= z; - m_textFrameX = layout.ptLeft * resolutionX * z; - m_textFrameY = layout.ptTop * resolutionY * z; - m_textFrameWidth = m_pageWidth - ( layout.ptLeft + layout.ptRight ) * resolutionX * z; - m_textFrameHeight = m_pageHeight - ( layout.ptTop + layout.ptBottom ) * resolutionY * z; + m_textFrameX = tqlayout.ptLeft * resolutionX * z; + m_textFrameY = tqlayout.ptTop * resolutionY * z; + m_textFrameWidth = m_pageWidth - ( tqlayout.ptLeft + tqlayout.ptRight ) * resolutionX * z; + m_textFrameHeight = m_pageHeight - ( tqlayout.ptTop + tqlayout.ptBottom ) * resolutionY * z; - repaint( true ); + tqrepaint( true ); } -/*=================== set layout =================================*/ +/*=================== set tqlayout =================================*/ void KoPagePreview::setPageColumns( const KoColumns &_columns ) { columns = _columns.columns; - repaint( true ); + tqrepaint( true ); } /*======================== draw contents =========================*/ -void KoPagePreview::drawContents( QPainter *painter ) +void KoPagePreview::drawContents( TQPainter *painter ) { double cw = m_textFrameWidth; if(columns!=1) cw/=static_cast(columns); painter->setBrush( white ); - painter->setPen( QPen( black ) ); + painter->setPen( TQPen( black ) ); int x=static_cast( ( width() - m_pageWidth ) * 0.5 ); int y=static_cast( ( height() - m_pageHeight ) * 0.5 ); @@ -111,7 +111,7 @@ void KoPagePreview::drawContents( QPainter *painter ) //painter->drawRect( x + 1, y + 1, w, h); painter->drawRect( x, y, w, h ); - painter->setBrush( QBrush( black, HorPattern ) ); + painter->setBrush( TQBrush( black, HorPattern ) ); if ( m_textFrameWidth == m_pageWidth || m_textFrameHeight == m_pageHeight ) painter->setPen( NoPen ); else @@ -128,16 +128,16 @@ void KoPagePreview::drawContents( QPainter *painter ) /******************************************************************/ /*==================== constructor ===============================*/ -KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name, - const KoPageLayout& layout, +KoPageLayoutDia::KoPageLayoutDia( TQWidget* tqparent, const char* name, + const KoPageLayout& tqlayout, const KoHeadFoot& hf, int tabs, KoUnit::Unit unit, bool modal ) : KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel, - KDialogBase::Ok, parent, name, modal) + KDialogBase::Ok, tqparent, name, modal) { flags = tabs; - m_layout = layout; + m_layout = tqlayout; m_unit = unit; m_pageSizeTab = 0; m_columnsTab = 0; @@ -148,23 +148,23 @@ KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name, if ( tabs & FORMAT_AND_BORDERS ) setupTab1( true ); if ( tabs & HEADER_AND_FOOTER ) setupTab2( hf ); - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); setFocus(); } /*==================== constructor ===============================*/ -KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name, - const KoPageLayout& layout, +KoPageLayoutDia::KoPageLayoutDia( TQWidget* tqparent, const char* name, + const KoPageLayout& tqlayout, const KoHeadFoot& hf, const KoColumns& columns, const KoKWHeaderFooter& kwhf, int tabs, KoUnit::Unit unit ) : KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel, - KDialogBase::Ok, parent, name, true) + KDialogBase::Ok, tqparent, name, true) { flags = tabs; - m_layout = layout; + m_layout = tqlayout; m_column = columns; m_unit = unit; m_pageSizeTab = 0; @@ -176,7 +176,7 @@ KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name, if ( tabs & COLUMNS ) setupTab3(); if ( tabs & KW_HEADER_AND_FOOTER ) setupTab4(kwhf); - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); setFocus(); } @@ -186,14 +186,14 @@ KoPageLayoutDia::~KoPageLayoutDia() } /*======================= show dialog ============================*/ -bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, QWidget* parent ) +bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, TQWidget* tqparent ) { bool res = false; - KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, tabs, unit ); + KoPageLayoutDia *dlg = new KoPageLayoutDia( tqparent, "PageLayout", tqlayout, hf, tabs, unit ); - if ( dlg->exec() == QDialog::Accepted ) { + if ( dlg->exec() == TQDialog::Accepted ) { res = true; - if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout(); + if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout(); if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot(); unit = dlg->unit(); } @@ -204,15 +204,15 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs } /*======================= show dialog ============================*/ -bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumns& columns, - KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, QWidget* parent ) +bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, KoColumns& columns, + KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, TQWidget* tqparent ) { bool res = false; - KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, columns, _kwhf, tabs, unit ); + KoPageLayoutDia *dlg = new KoPageLayoutDia( tqparent, "PageLayout", tqlayout, hf, columns, _kwhf, tabs, unit ); - if ( dlg->exec() == QDialog::Accepted ) { + if ( dlg->exec() == TQDialog::Accepted ) { res = true; - if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout(); + if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout(); if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot(); if ( tabs & COLUMNS ) columns = dlg->columns(); if ( tabs & KW_HEADER_AND_FOOTER ) _kwhf = dlg->headerFooter(); @@ -224,7 +224,7 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumn return res; } -/*===================== get a standard page layout ===============*/ +/*===================== get a standard page tqlayout ===============*/ KoPageLayout KoPageLayoutDia::standardLayout() { return KoPageLayout::standardLayout(); @@ -252,121 +252,121 @@ const KoKWHeaderFooter& KoPageLayoutDia::headerFooter() /*================ setup page size & margins tab ==================*/ void KoPageLayoutDia::setupTab1( bool enableBorders ) { - QWidget *tab1 = addPage(i18n( "Page Size && &Margins" )); - QHBoxLayout *lay = new QHBoxLayout(tab1); + TQWidget *tab1 = addPage(i18n( "Page Size && &Margins" )); + TQHBoxLayout *lay = new TQHBoxLayout(tab1); m_pageSizeTab = new KoPageLayoutSize(tab1, m_layout, m_unit, m_column, !(flags & DISABLE_UNIT), enableBorders ); lay->addWidget(m_pageSizeTab); m_pageSizeTab->show(); - connect (m_pageSizeTab, SIGNAL( propertyChange(KoPageLayout&)), - this, SLOT (sizeUpdated( KoPageLayout&))); + connect (m_pageSizeTab, TQT_SIGNAL( propertyChange(KoPageLayout&)), + this, TQT_SLOT (sizeUpdated( KoPageLayout&))); } -void KoPageLayoutDia::sizeUpdated(KoPageLayout &layout) { - m_layout.ptWidth = layout.ptWidth; - m_layout.ptHeight = layout.ptHeight; - m_layout.ptLeft = layout.ptLeft; - m_layout.ptRight = layout.ptRight; - m_layout.ptTop = layout.ptTop; - m_layout.ptBottom = layout.ptBottom; - m_layout.format = layout.format; - m_layout.orientation = layout.orientation; +void KoPageLayoutDia::sizeUpdated(KoPageLayout &tqlayout) { + m_layout.ptWidth = tqlayout.ptWidth; + m_layout.ptHeight = tqlayout.ptHeight; + m_layout.ptLeft = tqlayout.ptLeft; + m_layout.ptRight = tqlayout.ptRight; + m_layout.ptTop = tqlayout.ptTop; + m_layout.ptBottom = tqlayout.ptBottom; + m_layout.format = tqlayout.format; + m_layout.orientation = tqlayout.orientation; if(m_columnsTab) - m_columnsTab->setLayout(layout); + m_columnsTab->setLayout(tqlayout); } /*================ setup header and footer tab ===================*/ void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf ) { - QWidget *tab2 = addPage(i18n( "H&eader && Footer" )); - QGridLayout *grid2 = new QGridLayout( tab2, 7, 2, 0, KDialog::spacingHint() ); + TQWidget *tab2 = addPage(i18n( "H&eader && Footer" )); + TQGridLayout *grid2 = new TQGridLayout( tab2, 7, 2, 0, KDialog::spacingHint() ); // ------------- header --------------- - QGroupBox *gHead = new QGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 ); - gHead->layout()->setSpacing(KDialog::spacingHint()); - gHead->layout()->setMargin(KDialog::marginHint()); - QGridLayout *headGrid = new QGridLayout( gHead->layout(), 2, 3 ); + TQGroupBox *gHead = new TQGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 ); + gHead->tqlayout()->setSpacing(KDialog::spacingHint()); + gHead->tqlayout()->setMargin(KDialog::marginHint()); + TQGridLayout *headGrid = new TQGridLayout( gHead->tqlayout(), 2, 3 ); - QLabel *lHeadLeft = new QLabel( i18n( "Left:" ), gHead ); + TQLabel *lHeadLeft = new TQLabel( i18n( "Left:" ), gHead ); headGrid->addWidget( lHeadLeft, 0, 0 ); - eHeadLeft = new QLineEdit( gHead ); + eHeadLeft = new TQLineEdit( gHead ); headGrid->addWidget( eHeadLeft, 1, 0 ); eHeadLeft->setText( hf.headLeft ); - QLabel *lHeadMid = new QLabel( i18n( "Mid:" ), gHead ); + TQLabel *lHeadMid = new TQLabel( i18n( "Mid:" ), gHead ); headGrid->addWidget( lHeadMid, 0, 1 ); - eHeadMid = new QLineEdit( gHead ); + eHeadMid = new TQLineEdit( gHead ); headGrid->addWidget( eHeadMid, 1, 1 ); eHeadMid->setText( hf.headMid ); - QLabel *lHeadRight = new QLabel( i18n( "Right:" ), gHead ); + TQLabel *lHeadRight = new TQLabel( i18n( "Right:" ), gHead ); headGrid->addWidget( lHeadRight, 0, 2 ); - eHeadRight = new QLineEdit( gHead ); + eHeadRight = new TQLineEdit( gHead ); headGrid->addWidget( eHeadRight, 1, 2 ); eHeadRight->setText( hf.headRight ); grid2->addMultiCellWidget( gHead, 0, 1, 0, 1 ); // ------------- footer --------------- - QGroupBox *gFoot = new QGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 ); - gFoot->layout()->setSpacing(KDialog::spacingHint()); - gFoot->layout()->setMargin(KDialog::marginHint()); - QGridLayout *footGrid = new QGridLayout( gFoot->layout(), 2, 3 ); + TQGroupBox *gFoot = new TQGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 ); + gFoot->tqlayout()->setSpacing(KDialog::spacingHint()); + gFoot->tqlayout()->setMargin(KDialog::marginHint()); + TQGridLayout *footGrid = new TQGridLayout( gFoot->tqlayout(), 2, 3 ); - QLabel *lFootLeft = new QLabel( i18n( "Left:" ), gFoot ); + TQLabel *lFootLeft = new TQLabel( i18n( "Left:" ), gFoot ); footGrid->addWidget( lFootLeft, 0, 0 ); - eFootLeft = new QLineEdit( gFoot ); + eFootLeft = new TQLineEdit( gFoot ); footGrid->addWidget( eFootLeft, 1, 0 ); eFootLeft->setText( hf.footLeft ); - QLabel *lFootMid = new QLabel( i18n( "Mid:" ), gFoot ); + TQLabel *lFootMid = new TQLabel( i18n( "Mid:" ), gFoot ); footGrid->addWidget( lFootMid, 0, 1 ); - eFootMid = new QLineEdit( gFoot ); + eFootMid = new TQLineEdit( gFoot ); footGrid->addWidget( eFootMid, 1, 1 ); eFootMid->setText( hf.footMid ); - QLabel *lFootRight = new QLabel( i18n( "Right:" ), gFoot ); + TQLabel *lFootRight = new TQLabel( i18n( "Right:" ), gFoot ); footGrid->addWidget( lFootRight, 0, 2 ); - eFootRight = new QLineEdit( gFoot ); + eFootRight = new TQLineEdit( gFoot ); footGrid->addWidget( eFootRight, 1, 2 ); eFootRight->setText( hf.footRight ); grid2->addMultiCellWidget( gFoot, 2, 3, 0, 1 ); - QLabel *lMacros2 = new QLabel( i18n( "You can insert several tags in the text:" ), tab2 ); + TQLabel *lMacros2 = new TQLabel( i18n( "You can insert several tags in the text:" ), tab2 ); grid2->addMultiCellWidget( lMacros2, 4, 4, 0, 1 ); - QLabel *lMacros3 = new QLabel( i18n("
  • <sheet> The sheet name
  • " + TQLabel *lMacros3 = new TQLabel( i18n("
    • <sheet> The sheet name
    • " "
    • <page> The current page
    • " "
    • <pages> The total number of pages
    • " "
    • <name> The filename or URL
    • " "
    • <file> The filename with complete path or the URL
    "), tab2 ); - grid2->addMultiCellWidget( lMacros3, 5, 6, 0, 0, Qt::AlignTop ); + grid2->addMultiCellWidget( lMacros3, 5, 6, 0, 0, TQt::AlignTop ); - QLabel *lMacros4 = new QLabel( i18n("
    • <time> The current time
    • " + TQLabel *lMacros4 = new TQLabel( i18n("
      • <time> The current time
      • " "
      • <date> The current date
      • " "
      • <author> Your full name
      • " "
      • <org> Your organization
      • " "
      • <email> Your email address
      "), tab2 ); - grid2->addMultiCellWidget( lMacros4, 5, 6, 1, 1, Qt::AlignTop ); + grid2->addMultiCellWidget( lMacros4, 5, 6, 1, 1, TQt::AlignTop ); } /*================================================================*/ void KoPageLayoutDia::setupTab3() { - QWidget *tab3 = addPage(i18n( "Col&umns" )); - QHBoxLayout *lay = new QHBoxLayout(tab3); + TQWidget *tab3 = addPage(i18n( "Col&umns" )); + TQHBoxLayout *lay = new TQHBoxLayout(tab3); m_columnsTab = new KoPageLayoutColumns(tab3, m_column, m_unit, m_layout); - m_columnsTab->layout()->setMargin(0); + m_columnsTab->tqlayout()->setMargin(0); lay->addWidget(m_columnsTab); m_columnsTab->show(); - connect (m_columnsTab, SIGNAL( propertyChange(KoColumns&)), - this, SLOT (columnsUpdated( KoColumns&))); + connect (m_columnsTab, TQT_SIGNAL( propertyChange(KoColumns&)), + this, TQT_SLOT (columnsUpdated( KoColumns&))); } void KoPageLayoutDia::columnsUpdated(KoColumns &columns) { @@ -379,10 +379,10 @@ void KoPageLayoutDia::columnsUpdated(KoColumns &columns) { /*================================================================*/ void KoPageLayoutDia::setupTab4(const KoKWHeaderFooter kwhf ) { - QWidget *tab4 = addPage(i18n( "H&eader && Footer" )); - QHBoxLayout *lay = new QHBoxLayout(tab4); + TQWidget *tab4 = addPage(i18n( "H&eader && Footer" )); + TQHBoxLayout *lay = new TQHBoxLayout(tab4); m_headerTab = new KoPageLayoutHeader(tab4, m_unit, kwhf); - m_headerTab->layout()->setMargin(0); + m_headerTab->tqlayout()->setMargin(0); lay->addWidget(m_headerTab); m_headerTab->show(); diff --git a/kexi/3rdparty/kolibs/koPageLayoutDia.h b/kexi/3rdparty/kolibs/koPageLayoutDia.h index f3f1d932..05f8f3db 100644 --- a/kexi/3rdparty/kolibs/koPageLayoutDia.h +++ b/kexi/3rdparty/kolibs/koPageLayoutDia.h @@ -22,16 +22,16 @@ #ifndef __KOPGLAYOUTDIA_H__ #define __KOPGLAYOUTDIA_H__ -#include +#include #include #include #include #include -class QButtonGroup; -class QComboBox; -class QLineEdit; -class QCheckBox; +class TQButtonGroup; +class TQComboBox; +class TQLineEdit; +class TQCheckBox; class KoUnitDoubleSpinBox; class KoPageLayoutColumns; class KoPageLayoutSize; @@ -44,23 +44,24 @@ enum { FORMAT_AND_BORDERS = 1, HEADER_AND_FOOTER = 2, COLUMNS = 4, DISABLE_BORDE * KoPagePreview. * Internal to KoPageLayoutDia. */ -class KoPagePreview : public QGroupBox +class KoPagePreview : public TQGroupBox { Q_OBJECT + TQ_OBJECT public: /** * constructor */ - KoPagePreview( QWidget*, const char*, const KoPageLayout & ); + KoPagePreview( TQWidget*, const char*, const KoPageLayout & ); /** * destructor */ ~KoPagePreview(); /** - * set page layout + * set page tqlayout */ void setPageLayout( const KoPageLayout& ); void setPageColumns( const KoColumns& ); @@ -68,7 +69,7 @@ public: protected: // paint page - void drawContents( QPainter* ); + void drawContents( TQPainter* ); double m_pageHeight, m_pageWidth, m_textFrameX, m_textFrameY, m_textFrameWidth, m_textFrameHeight; int columns; @@ -77,44 +78,45 @@ protected: class KoPageLayoutDiaPrivate; /** - * With this dialog the user can specify the layout of the paper during printing. + * With this dialog the user can specify the tqlayout of the paper during printing. */ class KOFFICEUI_EXPORT KoPageLayoutDia : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * Constructor. * - * @param parent The parent of the dialog. + * @param tqparent The tqparent of the dialog. * @param name The name of the dialog. - * @param layout The layout. + * @param tqlayout The tqlayout. * @param headfoot The header and the footer. * @param flags a variable with all features this dialog should show. * @param unit The unit to use for displaying the values to the user. * @param modal Whether the dialog is modal or not. */ - KoPageLayoutDia( QWidget* parent, const char* name, - const KoPageLayout& layout, + KoPageLayoutDia( TQWidget* tqparent, const char* name, + const KoPageLayout& tqlayout, const KoHeadFoot& headfoot, int flags, KoUnit::Unit unit, bool modal=true ); /** * Constructor. * - * @param parent The parent of the dialog. + * @param tqparent The tqparent of the dialog. * @param name The name of the dialog. - * @param layout The layout. + * @param tqlayout The tqlayout. * @param headfoot The header and the footer. * @param columns The number of columns on the page. * @param kwheadfoot The KWord header and footer. * @param tabs The number of tabs. * @param unit The unit to use for displaying the values to the user */ - KoPageLayoutDia( QWidget* parent, const char* name, - const KoPageLayout& layout, + KoPageLayoutDia( TQWidget* tqparent, const char* name, + const KoPageLayout& tqlayout, const KoHeadFoot& headfoot, const KoColumns& columns, const KoKWHeaderFooter& kwheadfoot, @@ -126,26 +128,26 @@ public: ~KoPageLayoutDia(); /** - * Show page layout dialog. + * Show page tqlayout dialog. * See constructor for documentation on the parameters */ - static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit, QWidget* parent = 0 ); + static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit, TQWidget* tqparent = 0 ); /** - * Show page layout dialog. + * Show page tqlayout dialog. * See constructor for documentation on the parameters */ - static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit, QWidget* parent = 0 ); + static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit, TQWidget* tqparent = 0 ); /** - * Retrieves a standard page layout. + * Retrieves a standard page tqlayout. * Deprecated: better use KoPageLayout::standardLayout() */ static KDE_DEPRECATED KoPageLayout standardLayout(); /** - * Returns the layout + * Returns the tqlayout */ - const KoPageLayout& layout() const { return m_layout; } + const KoPageLayout& tqlayout() const { return m_layout; } /** * Returns the header and footer information @@ -168,14 +170,14 @@ private: void setupTab4( const KoKWHeaderFooter kwhf ); // dialog objects - QLineEdit *eHeadLeft; - QLineEdit *eHeadMid; - QLineEdit *eHeadRight; - QLineEdit *eFootLeft; - QLineEdit *eFootMid; - QLineEdit *eFootRight; - - // layout + TQLineEdit *eHeadLeft; + TQLineEdit *eHeadMid; + TQLineEdit *eHeadRight; + TQLineEdit *eFootLeft; + TQLineEdit *eFootMid; + TQLineEdit *eFootRight; + + // tqlayout KoPageLayout m_layout; KoColumns m_column; @@ -187,7 +189,7 @@ protected slots: virtual void slotOk(); private slots: - void sizeUpdated(KoPageLayout &layout); + void sizeUpdated(KoPageLayout &tqlayout); void columnsUpdated(KoColumns &columns); private: diff --git a/kexi/3rdparty/kolibs/koUnit.cc b/kexi/3rdparty/kolibs/koUnit.cc index 6c19a29f..bd10e26e 100644 --- a/kexi/3rdparty/kolibs/koUnit.cc +++ b/kexi/3rdparty/kolibs/koUnit.cc @@ -28,12 +28,12 @@ #include #include -#include -#include +#include +#include -QStringList KoUnit::listOfUnitName() +TQStringList KoUnit::listOfUnitName() { - QStringList lst; + TQStringList lst; for ( uint i = 0 ; i <= KoUnit::U_LASTUNIT ; ++i ) { KoUnit::Unit unit = static_cast( i ); @@ -42,7 +42,7 @@ QStringList KoUnit::listOfUnitName() return lst; } -QString KoUnit::unitDescription( Unit _unit ) +TQString KoUnit::unitDescription( Unit _unit ) { switch ( _unit ) { @@ -114,7 +114,7 @@ double KoUnit::ptToUnit( const double ptValue, const Unit unit ) } } -QString KoUnit::toUserStringValue( double ptValue, Unit unit ) +TQString KoUnit::toUserStringValue( double ptValue, Unit unit ) { return KGlobal::locale()->formatNumber( toUserValue( ptValue, unit ) ); } @@ -142,12 +142,12 @@ double KoUnit::fromUserValue( double value, Unit unit ) } } -double KoUnit::fromUserValue( const QString& value, Unit unit, bool* ok ) +double KoUnit::fromUserValue( const TQString& value, Unit unit, bool* ok ) { return fromUserValue( KGlobal::locale()->readNumber( value, ok ), unit ); } -double KoUnit::parseValue( QString value, double defaultVal ) +double KoUnit::parseValue( TQString value, double defaultVal ) { value.simplifyWhiteSpace(); value.remove( ' ' ); @@ -155,11 +155,11 @@ double KoUnit::parseValue( QString value, double defaultVal ) if( value.isEmpty() ) return defaultVal; - int index = value.find( QRegExp( "[a-z]+$" ) ); + int index = value.tqfind( TQRegExp( "[a-z]+$" ) ); if ( index == -1 ) return value.toDouble(); - QString unit = value.mid( index ); + TQString unit = value.mid( index ); value.truncate ( index ); double val = value.toDouble(); @@ -181,34 +181,34 @@ double KoUnit::parseValue( QString value, double defaultVal ) return defaultVal; } -KoUnit::Unit KoUnit::unit( const QString &_unitName, bool* ok ) +KoUnit::Unit KoUnit::unit( const TQString &_unitName, bool* ok ) { if ( ok ) *ok = true; - if ( _unitName == QString::fromLatin1( "mm" ) ) return U_MM; - if ( _unitName == QString::fromLatin1( "cm" ) ) return U_CM; - if ( _unitName == QString::fromLatin1( "dm" ) ) return U_DM; - if ( _unitName == QString::fromLatin1( "in" ) - || _unitName == QString::fromLatin1("inch") /*compat*/ ) return U_INCH; - if ( _unitName == QString::fromLatin1( "pi" ) ) return U_PI; - if ( _unitName == QString::fromLatin1( "dd" ) ) return U_DD; - if ( _unitName == QString::fromLatin1( "cc" ) ) return U_CC; - if ( _unitName == QString::fromLatin1( "pt" ) ) return U_PT; + if ( _unitName == TQString::tqfromLatin1( "mm" ) ) return U_MM; + if ( _unitName == TQString::tqfromLatin1( "cm" ) ) return U_CM; + if ( _unitName == TQString::tqfromLatin1( "dm" ) ) return U_DM; + if ( _unitName == TQString::tqfromLatin1( "in" ) + || _unitName == TQString::tqfromLatin1("inch") /*compat*/ ) return U_INCH; + if ( _unitName == TQString::tqfromLatin1( "pi" ) ) return U_PI; + if ( _unitName == TQString::tqfromLatin1( "dd" ) ) return U_DD; + if ( _unitName == TQString::tqfromLatin1( "cc" ) ) return U_CC; + if ( _unitName == TQString::tqfromLatin1( "pt" ) ) return U_PT; if ( ok ) *ok = false; return U_PT; } -QString KoUnit::unitName( Unit _unit ) +TQString KoUnit::unitName( Unit _unit ) { - if ( _unit == U_MM ) return QString::fromLatin1( "mm" ); - if ( _unit == U_CM ) return QString::fromLatin1( "cm" ); - if ( _unit == U_DM ) return QString::fromLatin1( "dm" ); - if ( _unit == U_INCH ) return QString::fromLatin1( "in" ); - if ( _unit == U_PI ) return QString::fromLatin1( "pi" ); - if ( _unit == U_DD ) return QString::fromLatin1( "dd" ); - if ( _unit == U_CC ) return QString::fromLatin1( "cc" ); - return QString::fromLatin1( "pt" ); + if ( _unit == U_MM ) return TQString::tqfromLatin1( "mm" ); + if ( _unit == U_CM ) return TQString::tqfromLatin1( "cm" ); + if ( _unit == U_DM ) return TQString::tqfromLatin1( "dm" ); + if ( _unit == U_INCH ) return TQString::tqfromLatin1( "in" ); + if ( _unit == U_PI ) return TQString::tqfromLatin1( "pi" ); + if ( _unit == U_DD ) return TQString::tqfromLatin1( "dd" ); + if ( _unit == U_CC ) return TQString::tqfromLatin1( "cc" ); + return TQString::tqfromLatin1( "pt" ); } #ifndef SIMPLE_KOLIBS diff --git a/kexi/3rdparty/kolibs/koUnit.h b/kexi/3rdparty/kolibs/koUnit.h index 86f749d6..7f02f6fd 100644 --- a/kexi/3rdparty/kolibs/koUnit.h +++ b/kexi/3rdparty/kolibs/koUnit.h @@ -20,13 +20,13 @@ #ifndef kounit_h #define kounit_h -#include -#include +#include +#include #include // for floor #include class KoXmlWriter; -class QDomElement; +class TQDomElement; // 1 inch ^= 72 pt // 1 inch ^= 25.399956 mm (-pedantic ;p) @@ -137,7 +137,7 @@ public: /// This method is the one to use to display a value in a dialog /// @return the value @p ptValue converted to @p unit and rounded, ready to be displayed /// Old name: userValue - static QString toUserStringValue( double ptValue, Unit unit ); + static TQString toUserStringValue( double ptValue, Unit unit ); /// This method is the one to use to read a value from a dialog /// @return the value in @p unit, converted to points for internal use @@ -150,20 +150,20 @@ public: /// @param ok if set, the pointed bool is set to true if the value could be /// converted to a double, and to false otherwise. /// @return the value in @p unit, converted to points for internal use - static double fromUserValue( const QString& value, Unit unit, bool* ok = 0 ); + static double fromUserValue( const TQString& value, Unit unit, bool* ok = 0 ); /// Convert a unit name into a Unit enum /// @param _unitName name to convert /// @param ok if set, it will be true if the unit was known, false if unknown - static Unit unit( const QString &_unitName, bool* ok = 0 ); + static Unit unit( const TQString &_unitName, bool* ok = 0 ); /// Get the name of a unit - static QString unitName( Unit _unit ); + static TQString unitName( Unit _unit ); /// Get the full (translated) description of a unit - static QString unitDescription( Unit _unit ); - static QStringList listOfUnitName(); + static TQString unitDescription( Unit _unit ); + static TQStringList listOfUnitName(); /// parse common %KOffice and OO values, like "10cm", "5mm" to pt - static double parseValue( QString value, double defaultVal = 0.0 ); + static double parseValue( TQString value, double defaultVal = 0.0 ); // Note: the above method doesn't take a const ref, since it modifies the arg. #ifndef SIMPLE_KOLIBS diff --git a/kexi/3rdparty/kolibs/koUnitWidgets.cc b/kexi/3rdparty/kolibs/koUnitWidgets.cc index 0472caf5..21251b81 100644 --- a/kexi/3rdparty/kolibs/koUnitWidgets.cc +++ b/kexi/3rdparty/kolibs/koUnitWidgets.cc @@ -22,27 +22,27 @@ #include #include #include -#include -#include +#include +#include // ---------------------------------------------------------------- // Support classes -KoUnitDoubleValidator::KoUnitDoubleValidator( KoUnitDoubleBase *base, QObject *parent, const char *name ) -: KDoubleValidator( parent, name ), m_base( base ) +KoUnitDoubleValidator::KoUnitDoubleValidator( KoUnitDoubleBase *base, TQObject *tqparent, const char *name ) +: KDoubleValidator( tqparent, name ), m_base( base ) { } -QValidator::State -KoUnitDoubleValidator::validate( QString &s, int &pos ) const +TQValidator::State +KoUnitDoubleValidator::validate( TQString &s, int &pos ) const { kdDebug(30004) << "KoUnitDoubleValidator::validate : " << s << " at " << pos << endl; - QValidator::State result = Acceptable; + TQValidator::State result = Acceptable; - QRegExp regexp ("([ a-zA-Z]+)$"); // Letters or spaces at end + TQRegExp regexp ("([ a-zA-Z]+)$"); // Letters or spaces at end const int res = regexp.search( s ); if ( res == -1 ) @@ -52,9 +52,9 @@ KoUnitDoubleValidator::validate( QString &s, int &pos ) const return Intermediate; } - // ### TODO: are all the QString::stripWhiteSpace really necessary? - const QString number ( s.left( res ).stripWhiteSpace() ); - const QString unitName ( regexp.cap( 1 ).stripWhiteSpace().lower() ); + // ### TODO: are all the TQString::stripWhiteSpace really necessary? + const TQString number ( s.left( res ).stripWhiteSpace() ); + const TQString unitName ( regexp.cap( 1 ).stripWhiteSpace().lower() ); kdDebug(30004) << "Split:" << number << ":" << unitName << ":" << endl; @@ -87,25 +87,25 @@ KoUnitDoubleValidator::validate( QString &s, int &pos ) const } -QString KoUnitDoubleBase::getVisibleText( double value ) const +TQString KoUnitDoubleBase::getVisibleText( double value ) const { - const QString num ( QString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); - kdDebug(30004) << "getVisibleText: " << QString::number( value, 'f', 12 ) << " => " << num << endl; + const TQString num ( TQString( "%1%2").tqarg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); + kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl; return num; } -double KoUnitDoubleBase::toDouble( const QString& str, bool* ok ) const +double KoUnitDoubleBase::toDouble( const TQString& str, bool* ok ) const { - QString str2( str ); + TQString str2( str ); /* KLocale::readNumber wants the thousand separator exactly at 1000. But when editing, it might be anywhere. So we need to remove it. */ - const QString sep( KGlobal::locale()->thousandsSeparator() ); + const TQString sep( KGlobal::locale()->thousandsSeparator() ); if ( !sep.isEmpty() ) str2.remove( sep ); str2.remove( KoUnit::unitName( m_unit ) ); const double dbl = KGlobal::locale()->readNumber( str2, ok ); if ( ok ) - kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << QString::number( dbl, 'f', 12 ) << endl; + kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << TQString::number( dbl, 'f', 12 ) << endl; else kdWarning(30004) << "toDouble error:" << str << ": => :" << str2 << ":" << endl; return dbl; @@ -116,42 +116,42 @@ double KoUnitDoubleBase::toDouble( const QString& str, bool* ok ) const // Widget classes -KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( QWidget *parent, const char *name ) - : KDoubleSpinBox( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ) +KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( TQWidget *tqparent, const char *name ) + : KDoubleSpinBox( tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ) , m_lowerInPoints( -9999 ) , m_upperInPoints( 9999 ) , m_stepInPoints( 1 ) { KDoubleSpinBox::setPrecision( 2 ); m_validator = new KoUnitDoubleValidator( this, this ); - QSpinBox::setValidator( m_validator ); + TQSpinBox::setValidator( m_validator ); setAcceptLocalizedNumbers( true ); setUnit( KoUnit::U_PT ); - connect(this, SIGNAL(valueChanged( double )), SLOT(privateValueChanged())); + connect(this, TQT_SIGNAL(valueChanged( double )), TQT_SLOT(privateValueChanged())); } -KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( QWidget *parent, +KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( TQWidget *tqparent, double lower, double upper, double step, double value, KoUnit::Unit unit, unsigned int precision, const char *name ) - : KDoubleSpinBox( lower, upper, step, value, precision, parent, name ), + : KDoubleSpinBox( lower, upper, step, value, precision, tqparent, name ), KoUnitDoubleBase( unit, precision ), m_lowerInPoints( lower ), m_upperInPoints( upper ), m_stepInPoints( step ) { m_unit = KoUnit::U_PT; m_validator = new KoUnitDoubleValidator( this, this ); - QSpinBox::setValidator( m_validator ); + TQSpinBox::setValidator( m_validator ); setAcceptLocalizedNumbers( true ); setUnit( unit ); changeValue( value ); setLineStep( 0.5 ); - connect(this, SIGNAL(valueChanged( double )), SLOT(privateValueChanged())); + connect(this, TQT_SIGNAL(valueChanged( double )), TQT_SLOT(privateValueChanged())); } void @@ -218,23 +218,23 @@ void KoUnitDoubleSpinBox::setMinMaxStep( double min, double max, double step ) // ---------------------------------------------------------------- -KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( QWidget *parent, const char *name ) - : KLineEdit( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), +KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *tqparent, const char *name ) + : KLineEdit( tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { - setAlignment( Qt::AlignRight ); + tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); setValidator( m_validator ); setUnit( KoUnit::U_PT ); changeValue( KoUnit::ptToUnit( 0.0, KoUnit::U_PT ) ); } -KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( QWidget *parent, double lower, double upper, double value, KoUnit::Unit unit, +KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *tqparent, double lower, double upper, double value, KoUnit::Unit unit, unsigned int precision, const char *name ) - : KLineEdit( parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), + : KLineEdit( tqparent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), m_lowerInPoints( lower ), m_upperInPoints( upper ) { - setAlignment( Qt::AlignRight ); + tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); setValidator( m_validator ); setUnit( unit ); @@ -259,10 +259,10 @@ KoUnitDoubleLineEdit::setUnit( KoUnit::Unit unit ) } bool -KoUnitDoubleLineEdit::eventFilter( QObject* o, QEvent* ev ) +KoUnitDoubleLineEdit::eventFilter( TQObject* o, TQEvent* ev ) { #if 0 - if( ev->type() == QEvent::FocusOut || ev->type() == QEvent::Leave || ev->type() == QEvent::Hide ) + if( ev->type() == TQEvent::FocusOut || ev->type() == TQEvent::Leave || ev->type() == TQEvent::Hide ) { bool ok; double value = toDouble( text(), &ok ); @@ -271,7 +271,7 @@ KoUnitDoubleLineEdit::eventFilter( QObject* o, QEvent* ev ) } else #endif - return QLineEdit::eventFilter( o, ev ); + return TQLineEdit::eventFilter( o, ev ); } double KoUnitDoubleLineEdit::value( void ) const @@ -283,34 +283,34 @@ double KoUnitDoubleLineEdit::value( void ) const // ---------------------------------------------------------------- -KoUnitDoubleComboBox::KoUnitDoubleComboBox( QWidget *parent, const char *name ) - : KComboBox( true, parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) +KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *tqparent, const char *name ) + : KComboBox( true, tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { - lineEdit()->setAlignment( Qt::AlignRight ); + lineEdit()->tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); lineEdit()->setValidator( m_validator ); setUnit( KoUnit::U_PT ); changeValue( KoUnit::ptToUnit( 0.0, KoUnit::U_PT ) ); - connect( this, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) ); + connect( this, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) ); } -KoUnitDoubleComboBox::KoUnitDoubleComboBox( QWidget *parent, double lower, double upper, double value, KoUnit::Unit unit, +KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *tqparent, double lower, double upper, double value, KoUnit::Unit unit, unsigned int precision, const char *name ) - : KComboBox( true, parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), + : KComboBox( true, tqparent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), m_lowerInPoints( lower ), m_upperInPoints( upper ) { - lineEdit()->setAlignment( Qt::AlignRight ); + lineEdit()->tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); lineEdit()->setValidator( m_validator ); setUnit( unit ); changeValue( KoUnit::ptToUnit( value, unit ) ); - connect( this, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) ); + connect( this, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) ); } void KoUnitDoubleComboBox::changeValue( double value ) { - QString oldLabel = lineEdit()->text(); + TQString oldLabel = lineEdit()->text(); updateValue( value ); if( lineEdit()->text() != oldLabel ) emit valueChanged( m_value ); @@ -351,10 +351,10 @@ KoUnitDoubleComboBox::setUnit( KoUnit::Unit unit ) } bool -KoUnitDoubleComboBox::eventFilter( QObject* o, QEvent* ev ) +KoUnitDoubleComboBox::eventFilter( TQObject* o, TQEvent* ev ) { #if 0 - if( ev->type() == QEvent::FocusOut || ev->type() == QEvent::Leave || ev->type() == QEvent::Hide ) + if( ev->type() == TQEvent::FocusOut || ev->type() == TQEvent::Leave || ev->type() == TQEvent::Hide ) { bool ok; double value = toDouble( lineEdit()->text(), &ok ); @@ -363,7 +363,7 @@ KoUnitDoubleComboBox::eventFilter( QObject* o, QEvent* ev ) } else #endif - return QComboBox::eventFilter( o, ev ); + return TQComboBox::eventFilter( o, ev ); } double KoUnitDoubleComboBox::value( void ) const @@ -375,51 +375,51 @@ double KoUnitDoubleComboBox::value( void ) const // ---------------------------------------------------------------- -KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( QWidget *parent, const char *name ) - : QWidget( parent ), m_step( 1.0 ) +KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *tqparent, const char *name ) + : TQWidget( tqparent ), m_step( 1.0 ) { - QGridLayout *layout = new QGridLayout( this, 2, 3 ); - //layout->setMargin( 2 ); - QPushButton *up = new QPushButton( "+", this ); + TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 ); + //tqlayout->setMargin( 2 ); + TQPushButton *up = new TQPushButton( "+", this ); //up->setFlat( true ); up->setMaximumHeight( 15 ); up->setMaximumWidth( 15 ); - layout->addWidget( up, 0, 0 ); - connect( up, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) ); + tqlayout->addWidget( up, 0, 0 ); + connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) ); - QPushButton *down = new QPushButton( "-", this ); + TQPushButton *down = new TQPushButton( "-", this ); down->setMaximumHeight( 15 ); down->setMaximumWidth( 15 ); - layout->addWidget( down, 1, 0 ); - connect( down, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) ); + tqlayout->addWidget( down, 1, 0 ); + connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) ); m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( 0.0, KoUnit::U_PT ), KoUnit::ptToUnit( 9999.99, KoUnit::U_PT ), 0.0, KoUnit::U_PT, 2, name ); - connect( m_combo, SIGNAL( valueChanged( double ) ), this, SIGNAL( valueChanged( double ) ) ); - layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); + connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) ); + tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); } -KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( QWidget *parent, double lower, double upper, double step, double value, +KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *tqparent, double lower, double upper, double step, double value, KoUnit::Unit unit, unsigned int precision, const char *name ) - : QWidget( parent ), m_step( step )//, m_lowerInPoints( lower ), m_upperInPoints( upper ) + : TQWidget( tqparent ), m_step( step )//, m_lowerInPoints( lower ), m_upperInPoints( upper ) { - QGridLayout *layout = new QGridLayout( this, 2, 3 ); - //layout->setMargin( 2 ); - QPushButton *up = new QPushButton( "+", this ); + TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 ); + //tqlayout->setMargin( 2 ); + TQPushButton *up = new TQPushButton( "+", this ); //up->setFlat( true ); up->setMaximumHeight( 15 ); up->setMaximumWidth( 15 ); - layout->addWidget( up, 0, 0 ); - connect( up, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) ); + tqlayout->addWidget( up, 0, 0 ); + connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) ); - QPushButton *down = new QPushButton( "-", this ); + TQPushButton *down = new TQPushButton( "-", this ); down->setMaximumHeight( 15 ); down->setMaximumWidth( 15 ); - layout->addWidget( down, 1, 0 ); - connect( down, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) ); + tqlayout->addWidget( down, 1, 0 ); + connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) ); m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( lower, unit ), KoUnit::ptToUnit( upper, unit ), value, unit, precision, name ); - connect( m_combo, SIGNAL( valueChanged( double ) ), this, SIGNAL( valueChanged( double ) ) ); - layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); + connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) ); + tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); } void diff --git a/kexi/3rdparty/kolibs/koUnitWidgets.h b/kexi/3rdparty/kolibs/koUnitWidgets.h index 957b1b36..dbdcb9c0 100644 --- a/kexi/3rdparty/kolibs/koUnitWidgets.h +++ b/kexi/3rdparty/kolibs/koUnitWidgets.h @@ -44,9 +44,9 @@ class KoUnitDoubleBase; class KOFFICEUI_EXPORT KoUnitDoubleValidator : public KDoubleValidator { public: - KoUnitDoubleValidator( KoUnitDoubleBase *base, QObject *parent, const char *name = 0 ); + KoUnitDoubleValidator( KoUnitDoubleBase *base, TQObject *tqparent, const char *name = 0 ); - virtual QValidator::State validate( QString &, int & ) const; + virtual TQValidator::State validate( TQString &, int & ) const; private: KoUnitDoubleBase *m_base; @@ -80,14 +80,14 @@ protected: * @param value the number as double * @return the resulting string */ - QString getVisibleText( double value ) const; + TQString getVisibleText( double value ) const; /** * Transfrom a string into a double, while taking care of locale specific symbols. * @param str the string to transform into a number * @param ok true, if the conversion was succesful * @return the value as double */ - double toDouble( const QString& str, bool* ok ) const; + double toDouble( const TQString& str, bool* ok ) const; protected: KoUnitDoubleValidator *m_validator; @@ -107,10 +107,11 @@ protected: class KOFFICEUI_EXPORT KoUnitDoubleSpinBox : public KDoubleSpinBox, public KoUnitDoubleBase { Q_OBJECT + TQ_OBJECT public: - KoUnitDoubleSpinBox( QWidget *parent = 0L, const char *name = 0L ); + KoUnitDoubleSpinBox( TQWidget *tqparent = 0L, const char *name = 0L ); // lower, upper, step and value are in pt - KoUnitDoubleSpinBox( QWidget *parent, double lower, double upper, double step, double value = 0.0, + KoUnitDoubleSpinBox( TQWidget *tqparent, double lower, double upper, double step, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); // added so the class can be used in .ui files(by Tymoteusz Majewski, maju7@o2.pl) virtual void changeValue( double ); @@ -135,7 +136,7 @@ public: void setMinMaxStep( double min, double max, double step ); signals: - /// emitted like valueChanged in the parent, but this one emits the point value + /// emitted like valueChanged in the tqparent, but this one emits the point value void valueChangedPt( double ); @@ -157,9 +158,10 @@ private slots: class KOFFICEUI_EXPORT KoUnitDoubleLineEdit : public KLineEdit, public KoUnitDoubleBase { Q_OBJECT + TQ_OBJECT public: - KoUnitDoubleLineEdit( QWidget *parent = 0L, const char *name = 0L ); - KoUnitDoubleLineEdit( QWidget *parent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); + KoUnitDoubleLineEdit( TQWidget *tqparent = 0L, const char *name = 0L ); + KoUnitDoubleLineEdit( TQWidget *tqparent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); virtual void changeValue( double ); virtual void setUnit( KoUnit::Unit = KoUnit::U_PT ); @@ -168,7 +170,7 @@ public: double value( void ) const; protected: - bool eventFilter( QObject* obj, QEvent* ev ); + bool eventFilter( TQObject* obj, TQEvent* ev ); private: double m_value; @@ -185,9 +187,10 @@ private: class KOFFICEUI_EXPORT KoUnitDoubleComboBox : public KComboBox, public KoUnitDoubleBase { Q_OBJECT + TQ_OBJECT public: - KoUnitDoubleComboBox( QWidget *parent = 0L, const char *name = 0L ); - KoUnitDoubleComboBox( QWidget *parent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); + KoUnitDoubleComboBox( TQWidget *tqparent = 0L, const char *name = 0L ); + KoUnitDoubleComboBox( TQWidget *tqparent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); virtual void changeValue( double ); void updateValue( double ); @@ -198,7 +201,7 @@ public: void insertItem( double, int index = -1 ); protected: - bool eventFilter( QObject* obj, QEvent* ev ); + bool eventFilter( TQObject* obj, TQEvent* ev ); signals: void valueChanged(double); @@ -218,12 +221,13 @@ protected: * Combo box (with spin control) for double precision numbers with unit display * \since 1.4 (change of behavior) */ -class KOFFICEUI_EXPORT KoUnitDoubleSpinComboBox : public QWidget +class KOFFICEUI_EXPORT KoUnitDoubleSpinComboBox : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KoUnitDoubleSpinComboBox( QWidget *parent = 0L, const char *name = 0L ); - KoUnitDoubleSpinComboBox( QWidget *parent, double lower, double upper, double step, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); + KoUnitDoubleSpinComboBox( TQWidget *tqparent = 0L, const char *name = 0L ); + KoUnitDoubleSpinComboBox( TQWidget *tqparent, double lower, double upper, double step, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 ); void insertItem( double, int index = -1 ); void updateValue( double ); -- cgit v1.2.1