diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:56:31 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:56:31 -0600 |
commit | c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch) | |
tree | 1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /lib/kotext/KoParagDia.cpp | |
parent | 94844816550ad672ccfcdc25659c625546239998 (diff) | |
download | koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'lib/kotext/KoParagDia.cpp')
-rw-r--r-- | lib/kotext/KoParagDia.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/lib/kotext/KoParagDia.cpp b/lib/kotext/KoParagDia.cpp index ed7700e2..2bc0262d 100644 --- a/lib/kotext/KoParagDia.cpp +++ b/lib/kotext/KoParagDia.cpp @@ -50,7 +50,7 @@ #include <tqvbox.h> #include <tqhbox.h> #include <tqtooltip.h> -#include <layout.h> +#include <tqlayout.h> #include <tqapplication.h> #include <tqwidgetstack.h> @@ -129,7 +129,7 @@ KoCounterStyleWidget::KoCounterStyleWidget( bool displayDepth, bool onlyStyleTyp grid->addWidget( spnStart, 2, 2); lAlignment = new TQLabel( gStyle, "lAlignment" ); - lAlignment->setText( i18n( "Counter alignment:" ) ); + lAlignment->setText( i18n( "Counter tqalignment:" ) ); grid->addWidget( lAlignment, 2, 3 ); cbAlignment = new KComboBox( gStyle, "cbAlignment" ); @@ -205,7 +205,7 @@ void KoCounterStyleWidget::alignmentChanged(const TQString& s) kdError()<<"Not Implemented"<<endl; return; } - m_counter.setAlignment(a); + m_counter.tqsetAlignment(a); emit sig_alignmentChanged(a); } @@ -296,11 +296,11 @@ void KoCounterStyleWidget::displayStyle( KoParagCounter::Style style ) spnStart->setValue( m_counter.startNumber() ); cbRestart->setChecked( m_counter.restartCounter() ); - if(m_counter.alignment()==TQt::AlignLeft) + if(m_counter.tqalignment()==TQt::AlignLeft) cbAlignment->setCurrentText(i18n("Align Left")); - else if(m_counter.alignment()==TQt::AlignRight) + else if(m_counter.tqalignment()==TQt::AlignRight) cbAlignment->setCurrentText(i18n("Align Right")); - else if(m_counter.alignment()==TQt::AlignAuto) + else if(m_counter.tqalignment()==TQt::AlignAuto) cbAlignment->setCurrentText(i18n("Align Auto")); else kdError()<<"Not Implemented"<<endl; @@ -812,14 +812,14 @@ void KoStylePreview::setCounter( const KoParagCounter & counter ) { KoTextParag * parag = m_textdoc->firstParag(); parag->setCounter( counter ); - repaint( true ); + tqrepaint( true ); } void KoStylePreview::setStyle( KoParagStyle * style ) { KoTextParag * parag = m_textdoc->firstParag(); parag->applyStyle( style ); - repaint(true); + tqrepaint(true); } void KoStylePreview::drawContents( TQPainter *painter ) @@ -830,7 +830,7 @@ void KoStylePreview::drawContents( TQPainter *painter ) TQRect whiteRect( r.x() + 10, r.y() + 10, r.width() - 20, r.height() - 20 ); - TQColorGroup cg = TQApplication::palette().active(); + TQColorGroup cg = TQApplication::tqpalette().active(); painter->fillRect( whiteRect, cg.brush( TQColorGroup::Base ) ); KoTextParag * parag = m_textdoc->firstParag(); @@ -839,13 +839,13 @@ void KoStylePreview::drawContents( TQPainter *painter ) { // For centering to work, and to even get word wrapping when the thing is too big :) m_textdoc->setWidth( widthLU ); - parag->invalidate(0); + parag->tqinvalidate(0); } parag->format(); TQRect textRect = parag->pixelRect( m_zoomHandler ); - // Center vertically, but not horizontally, to keep the parag alignment working, + // Center vertically, but not horizontally, to keep the parag tqalignment working, textRect.moveTopLeft( TQPoint( whiteRect.x(), whiteRect.y() + ( whiteRect.height() - textRect.height() ) / 2 ) ); // Move it from the left border a little @@ -879,8 +879,8 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW frameWidth=9999; } else { length=i18n("Frame width: %1 %2") - .arg(KoUnit::toUserStringValue(frameWidth,m_unit)) - .arg(KoUnit::unitName(m_unit)); + .tqarg(KoUnit::toUserStringValue(frameWidth,m_unit)) + .tqarg(KoUnit::unitName(m_unit)); frameWidth=KoUnit::toUserValue(frameWidth,m_unit); } @@ -890,12 +890,12 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW TQLabel * lLimit = new TQLabel(length , indentFrame ); if(frameWidth!=-1) { - lLimit->setAlignment( AlignRight ); + lLimit->tqsetAlignment( AlignRight ); indentGrid->addWidget( lLimit, 1,0 ); } TQLabel * lLeft = new TQLabel( i18n("&Left:"), indentFrame ); - lLeft->setAlignment( TQt::AlignVCenter | TQt::AlignRight ); + lLeft->tqsetAlignment( TQt::AlignVCenter | TQt::AlignRight ); indentGrid->addWidget( lLeft, 1, 0 ); eLeft = new KoUnitDoubleSpinBox( indentFrame, 0, 9999, 1, 0.0, m_unit ); @@ -904,7 +904,7 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW connect( eLeft, TQT_SIGNAL( valueChangedPt(double ) ), this, TQT_SLOT( leftChanged( double ) ) ); TQLabel * lRight = new TQLabel( i18n("&Right:"), indentFrame ); - lRight->setAlignment( TQt::AlignVCenter | TQt::AlignRight ); + lRight->tqsetAlignment( TQt::AlignVCenter | TQt::AlignRight ); indentGrid->addWidget( lRight, 2, 0 ); eRight = new KoUnitDoubleSpinBox( indentFrame, 0, 9999, 1, 0.0, m_unit ); @@ -913,7 +913,7 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW connect( eRight, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( rightChanged( double ) ) ); TQLabel * lFirstLine = new TQLabel( i18n("&First line:"), indentFrame ); - lFirstLine->setAlignment( TQt::AlignVCenter | TQt::AlignRight ); + lFirstLine->tqsetAlignment( TQt::AlignVCenter | TQt::AlignRight ); indentGrid->addWidget( lFirstLine, 3, 0 ); eFirstLine = new KoUnitDoubleSpinBox( indentFrame, -9999, 9999, 1, 0.0, m_unit ); @@ -938,9 +938,9 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW cSpacing->insertItem( i18n( "Line spacing value", "1.5 Lines" ) ); cSpacing->insertItem( i18n( "Line spacing value", "Double" ) ); cSpacing->insertItem( i18n( "Proportional") ); // LS_MULTIPLE, called Proportional like in OO - cSpacing->insertItem( i18n( "Line Distance (%1)" ).arg(unitName) ); // LS_CUSTOM - cSpacing->insertItem( i18n( "At Least (%1)" ).arg(unitName) ); - cSpacing->insertItem( i18n( "Fixed (%1)").arg(unitName) ); // LS_FIXED + cSpacing->insertItem( i18n( "Line Distance (%1)" ).tqarg(unitName) ); // LS_CUSTOM + cSpacing->insertItem( i18n( "At Least (%1)" ).tqarg(unitName) ); + cSpacing->insertItem( i18n( "Fixed (%1)").tqarg(unitName) ); // LS_FIXED connect( cSpacing, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( spacingActivated( int ) ) ); spacingGrid->addWidget( cSpacing, 1, 0 ); @@ -974,7 +974,7 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW KDialog::marginHint(), KDialog::spacingHint() ); TQLabel * lBefore = new TQLabel( i18n("Before:"), pSpaceFrame ); - lBefore->setAlignment( AlignRight ); + lBefore->tqsetAlignment( AlignRight ); pSpaceGrid->addWidget( lBefore, 1, 0 ); eBefore = new KoUnitDoubleSpinBox( pSpaceFrame, 0, 9999, CM_TO_POINT(1), 0.0, m_unit ); @@ -983,7 +983,7 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW pSpaceGrid->addWidget( eBefore, 1, 1 ); TQLabel * lAfter = new TQLabel( i18n("After:"), pSpaceFrame ); - lAfter->setAlignment( AlignRight ); + lAfter->tqsetAlignment( AlignRight ); pSpaceGrid->addWidget( lAfter, 2, 0 ); eAfter = new KoUnitDoubleSpinBox( pSpaceFrame, 0, 9999, 1, 0.0, m_unit ); @@ -1273,7 +1273,7 @@ int KoParagAlignWidget::pageBreaking() const void KoParagAlignWidget::display( const KoParagLayout & lay ) { - int align = lay.alignment; + int align = lay.tqalignment; prev2->setAlign( align ); clearAligns(); @@ -1302,7 +1302,7 @@ void KoParagAlignWidget::display( const KoParagLayout & lay ) void KoParagAlignWidget::save( KoParagLayout & lay ) { - lay.alignment = align(); + lay.tqalignment = align(); lay.pageBreaking = pageBreaking(); } @@ -1605,10 +1605,10 @@ KoParagCounterWidget::KoParagCounterWidget( bool disableAll, TQWidget * parent, gNumbering = new TQButtonGroup( this, "numberingGroup" ); gNumbering->setTitle( i18n( "Numbering" ) ); gNumbering->setColumnLayout(0, Qt::Vertical ); - gNumbering->layout()->setSpacing( 0 ); - gNumbering->layout()->setMargin( 0 ); - TQHBoxLayout *numberingGroupLayout = new TQHBoxLayout( gNumbering->layout() ); - numberingGroupLayout->setAlignment( TQt::AlignTop ); + gNumbering->tqlayout()->setSpacing( 0 ); + gNumbering->tqlayout()->setMargin( 0 ); + TQHBoxLayout *numberingGroupLayout = new TQHBoxLayout( gNumbering->tqlayout() ); + numberingGroupLayout->tqsetAlignment( TQt::AlignTop ); numberingGroupLayout->setSpacing( KDialog::spacingHint() ); numberingGroupLayout->setMargin( KDialog::marginHint() ); @@ -1705,7 +1705,7 @@ void KoParagCounterWidget::display( const KoParagLayout & lay ) { void KoParagCounterWidget::updatePreview() { preview->setCounter(m_counter); - preview->repaint(true); + preview->tqrepaint(true); } void KoParagCounterWidget::save( KoParagLayout & lay ) { @@ -1746,8 +1746,8 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram } else { m_toplimit=frameWidth; length=i18n("Frame width: %1 %2") - .arg(KoUnit::toUserStringValue(frameWidth,m_unit)) - .arg(KoUnit::unitName(m_unit)); + .tqarg(KoUnit::toUserStringValue(frameWidth,m_unit)) + .tqarg(KoUnit::unitName(m_unit)); frameWidth=KoUnit::toUserValue(frameWidth,m_unit); } TQVBoxLayout* Form1Layout = new TQVBoxLayout( this ); @@ -1770,10 +1770,10 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram gPosition = new TQGroupBox( this, "gPosition" ); gPosition->setTitle( i18n( "Po&sition" ) ); gPosition->setColumnLayout(0, Qt::Vertical ); - gPosition->layout()->setSpacing( 0 ); - gPosition->layout()->setMargin( 0 ); - TQVBoxLayout* GroupBox2Layout = new TQVBoxLayout( gPosition->layout() ); - GroupBox2Layout->setAlignment( TQt::AlignTop ); + gPosition->tqlayout()->setSpacing( 0 ); + gPosition->tqlayout()->setMargin( 0 ); + TQVBoxLayout* GroupBox2Layout = new TQVBoxLayout( gPosition->tqlayout() ); + GroupBox2Layout->tqsetAlignment( TQt::AlignTop ); GroupBox2Layout->setSpacing( KDialog::spacingHint() ); GroupBox2Layout->setMargin( KDialog::marginHint() ); @@ -1798,10 +1798,10 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram bgAlign = new TQButtonGroup( this ); bgAlign->setTitle( i18n( "Alignment" ) ); bgAlign->setColumnLayout(0, Qt::Vertical ); - bgAlign->layout()->setSpacing( 0 ); - bgAlign->layout()->setMargin( 0 ); - TQVBoxLayout* ButtonGroup1Layout = new TQVBoxLayout( bgAlign->layout() ); - ButtonGroup1Layout->setAlignment( TQt::AlignTop ); + bgAlign->tqlayout()->setSpacing( 0 ); + bgAlign->tqlayout()->setMargin( 0 ); + TQVBoxLayout* ButtonGroup1Layout = new TQVBoxLayout( bgAlign->tqlayout() ); + ButtonGroup1Layout->tqsetAlignment( TQt::AlignTop ); ButtonGroup1Layout->setSpacing( KDialog::spacingHint() ); ButtonGroup1Layout->setMargin( KDialog::marginHint() ); @@ -1837,7 +1837,7 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram gTabLeader = new TQGroupBox( this, "gTabLeader" ); gTabLeader->setTitle( i18n( "Tab Leader" ) ); TQVBoxLayout* GroupBox5Layout = new TQVBoxLayout( gTabLeader ); - GroupBox5Layout->setAlignment( TQt::AlignTop ); + GroupBox5Layout->tqsetAlignment( TQt::AlignTop ); GroupBox5Layout->setSpacing( KDialog::spacingHint() ); GroupBox5Layout->setMargin( KDialog::marginHint() ); GroupBox5Layout->addSpacing( fontMetrics().height() / 2 ); // groupbox title @@ -1850,7 +1850,7 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram TQLabel* TextLabel2 = new TQLabel( gTabLeader); TextLabel2->setText( i18n( "&Filling:" ) ); - TextLabel2->setAlignment( AlignRight ); + TextLabel2->tqsetAlignment( AlignRight ); fillingGrid->addWidget( TextLabel2, 0, 0 ); cFilling = new TQComboBox( FALSE, gTabLeader); @@ -1864,7 +1864,7 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram fillingGrid->addWidget( cFilling, 0, 1 ); TQLabel * TextLabel3 = new TQLabel( i18n("&Width:"), gTabLeader ); - TextLabel3->setAlignment( AlignRight ); + TextLabel3->tqsetAlignment( AlignRight ); fillingGrid->addWidget( TextLabel3, 1, 0 ); eWidth = new KoUnitDoubleSpinBox( gTabLeader ); @@ -2159,31 +2159,31 @@ KoParagDia::KoParagDia( TQWidget* parent, const char* name, { TQVBox * page = addVBoxPage( i18n( "Indent && S&pacing" ) ); m_indentSpacingWidget = new KoIndentSpacingWidget( unit,_frameWidth,page, "indent-spacing" ); - m_indentSpacingWidget->layout()->setMargin(0); + m_indentSpacingWidget->tqlayout()->setMargin(0); } if ( m_flags & PD_ALIGN ) { TQVBox * page = addVBoxPage( i18n( "General &Layout" ) ); m_alignWidget = new KoParagAlignWidget( breakLine, page, "align" ); - m_alignWidget->layout()->setMargin(0); + m_alignWidget->tqlayout()->setMargin(0); } if ( m_flags & PD_DECORATION ) { TQVBox * page = addVBoxPage( i18n( "D&ecorations" ) ); m_decorationsWidget = new KoParagDecorationWidget( page, "decorations"); - m_decorationsWidget->layout()->setMargin(0); + m_decorationsWidget->tqlayout()->setMargin(0); } if ( m_flags & PD_NUMBERING ) { TQVBox * page = addVBoxPage( i18n( "B&ullets/Numbers" ) ); m_counterWidget = new KoParagCounterWidget( disableAll , page, "numbers" ); - m_counterWidget->layout()->setMargin(0); + m_counterWidget->tqlayout()->setMargin(0); } if ( m_flags & PD_TABS ) { TQVBox * page = addVBoxPage( i18n( "&Tabulators" ) ); m_tabulatorsWidget = new KoParagTabulatorsWidget( unit,_frameWidth, page, "tabs"); - m_tabulatorsWidget->layout()->setMargin(0); + m_tabulatorsWidget->tqlayout()->setMargin(0); } connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT(slotReset())); @@ -2272,7 +2272,7 @@ KoParagLayout KoParagDia::paragLayout() const newLayout.setLineSpacingValue( lineSpacing() ); newLayout.lineSpacingType = lineSpacingType(); newLayout.setTabList( tabListTabulator() ); - newLayout.alignment = align(); + newLayout.tqalignment = align(); newLayout.margins[TQStyleSheetItem::MarginFirstLine] = firstLineIndent(); newLayout.margins[TQStyleSheetItem::MarginLeft] = leftIndent(); newLayout.margins[TQStyleSheetItem::MarginRight] = rightIndent(); |