diff options
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 2bc0262d..ed7700e2 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 <tqlayout.h> +#include <layout.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 tqalignment:" ) ); + lAlignment->setText( i18n( "Counter alignment:" ) ); 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.tqsetAlignment(a); + m_counter.setAlignment(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.tqalignment()==TQt::AlignLeft) + if(m_counter.alignment()==TQt::AlignLeft) cbAlignment->setCurrentText(i18n("Align Left")); - else if(m_counter.tqalignment()==TQt::AlignRight) + else if(m_counter.alignment()==TQt::AlignRight) cbAlignment->setCurrentText(i18n("Align Right")); - else if(m_counter.tqalignment()==TQt::AlignAuto) + else if(m_counter.alignment()==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 ); - tqrepaint( true ); + repaint( true ); } void KoStylePreview::setStyle( KoParagStyle * style ) { KoTextParag * parag = m_textdoc->firstParag(); parag->applyStyle( style ); - tqrepaint(true); + repaint(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::tqpalette().active(); + TQColorGroup cg = TQApplication::palette().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->tqinvalidate(0); + parag->invalidate(0); } parag->format(); TQRect textRect = parag->pixelRect( m_zoomHandler ); - // Center vertically, but not horizontally, to keep the parag tqalignment working, + // Center vertically, but not horizontally, to keep the parag alignment 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") - .tqarg(KoUnit::toUserStringValue(frameWidth,m_unit)) - .tqarg(KoUnit::unitName(m_unit)); + .arg(KoUnit::toUserStringValue(frameWidth,m_unit)) + .arg(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->tqsetAlignment( AlignRight ); + lLimit->setAlignment( AlignRight ); indentGrid->addWidget( lLimit, 1,0 ); } TQLabel * lLeft = new TQLabel( i18n("&Left:"), indentFrame ); - lLeft->tqsetAlignment( TQt::AlignVCenter | TQt::AlignRight ); + lLeft->setAlignment( 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->tqsetAlignment( TQt::AlignVCenter | TQt::AlignRight ); + lRight->setAlignment( 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->tqsetAlignment( TQt::AlignVCenter | TQt::AlignRight ); + lFirstLine->setAlignment( 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)" ).tqarg(unitName) ); // LS_CUSTOM - cSpacing->insertItem( i18n( "At Least (%1)" ).tqarg(unitName) ); - cSpacing->insertItem( i18n( "Fixed (%1)").tqarg(unitName) ); // LS_FIXED + 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 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->tqsetAlignment( AlignRight ); + lBefore->setAlignment( 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->tqsetAlignment( AlignRight ); + lAfter->setAlignment( 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.tqalignment; + int align = lay.alignment; prev2->setAlign( align ); clearAligns(); @@ -1302,7 +1302,7 @@ void KoParagAlignWidget::display( const KoParagLayout & lay ) void KoParagAlignWidget::save( KoParagLayout & lay ) { - lay.tqalignment = align(); + lay.alignment = 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->tqlayout()->setSpacing( 0 ); - gNumbering->tqlayout()->setMargin( 0 ); - TQHBoxLayout *numberingGroupLayout = new TQHBoxLayout( gNumbering->tqlayout() ); - numberingGroupLayout->tqsetAlignment( TQt::AlignTop ); + gNumbering->layout()->setSpacing( 0 ); + gNumbering->layout()->setMargin( 0 ); + TQHBoxLayout *numberingGroupLayout = new TQHBoxLayout( gNumbering->layout() ); + numberingGroupLayout->setAlignment( 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->tqrepaint(true); + preview->repaint(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") - .tqarg(KoUnit::toUserStringValue(frameWidth,m_unit)) - .tqarg(KoUnit::unitName(m_unit)); + .arg(KoUnit::toUserStringValue(frameWidth,m_unit)) + .arg(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->tqlayout()->setSpacing( 0 ); - gPosition->tqlayout()->setMargin( 0 ); - TQVBoxLayout* GroupBox2Layout = new TQVBoxLayout( gPosition->tqlayout() ); - GroupBox2Layout->tqsetAlignment( TQt::AlignTop ); + gPosition->layout()->setSpacing( 0 ); + gPosition->layout()->setMargin( 0 ); + TQVBoxLayout* GroupBox2Layout = new TQVBoxLayout( gPosition->layout() ); + GroupBox2Layout->setAlignment( 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->tqlayout()->setSpacing( 0 ); - bgAlign->tqlayout()->setMargin( 0 ); - TQVBoxLayout* ButtonGroup1Layout = new TQVBoxLayout( bgAlign->tqlayout() ); - ButtonGroup1Layout->tqsetAlignment( TQt::AlignTop ); + bgAlign->layout()->setSpacing( 0 ); + bgAlign->layout()->setMargin( 0 ); + TQVBoxLayout* ButtonGroup1Layout = new TQVBoxLayout( bgAlign->layout() ); + ButtonGroup1Layout->setAlignment( 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->tqsetAlignment( TQt::AlignTop ); + GroupBox5Layout->setAlignment( 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->tqsetAlignment( AlignRight ); + TextLabel2->setAlignment( 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->tqsetAlignment( AlignRight ); + TextLabel3->setAlignment( 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->tqlayout()->setMargin(0); + m_indentSpacingWidget->layout()->setMargin(0); } if ( m_flags & PD_ALIGN ) { TQVBox * page = addVBoxPage( i18n( "General &Layout" ) ); m_alignWidget = new KoParagAlignWidget( breakLine, page, "align" ); - m_alignWidget->tqlayout()->setMargin(0); + m_alignWidget->layout()->setMargin(0); } if ( m_flags & PD_DECORATION ) { TQVBox * page = addVBoxPage( i18n( "D&ecorations" ) ); m_decorationsWidget = new KoParagDecorationWidget( page, "decorations"); - m_decorationsWidget->tqlayout()->setMargin(0); + m_decorationsWidget->layout()->setMargin(0); } if ( m_flags & PD_NUMBERING ) { TQVBox * page = addVBoxPage( i18n( "B&ullets/Numbers" ) ); m_counterWidget = new KoParagCounterWidget( disableAll , page, "numbers" ); - m_counterWidget->tqlayout()->setMargin(0); + m_counterWidget->layout()->setMargin(0); } if ( m_flags & PD_TABS ) { TQVBox * page = addVBoxPage( i18n( "&Tabulators" ) ); m_tabulatorsWidget = new KoParagTabulatorsWidget( unit,_frameWidth, page, "tabs"); - m_tabulatorsWidget->tqlayout()->setMargin(0); + m_tabulatorsWidget->layout()->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.tqalignment = align(); + newLayout.alignment = align(); newLayout.margins[TQStyleSheetItem::MarginFirstLine] = firstLineIndent(); newLayout.margins[TQStyleSheetItem::MarginLeft] = leftIndent(); newLayout.margins[TQStyleSheetItem::MarginRight] = rightIndent(); |