summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-11-05 11:54:26 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-11-16 23:37:57 +0900
commitef06f14f2475bd08d3ea2ceec54a7b2238f3554e (patch)
tree03df826633e4ba084d133ca977c4fc37c74f21ac /lib/kofficeui
parent895081803a715ee89f4a90cfbf63d558ef2b2ebc (diff)
downloadkoffice-ef06f14f2475bd08d3ea2ceec54a7b2238f3554e.tar.gz
koffice-ef06f14f2475bd08d3ea2ceec54a7b2238f3554e.zip
Replace Qt with TQt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'lib/kofficeui')
-rw-r--r--lib/kofficeui/KoGuideLineDia.cpp8
-rw-r--r--lib/kofficeui/KoGuideLineDia.h2
-rw-r--r--lib/kofficeui/KoGuides.cpp68
-rw-r--r--lib/kofficeui/KoGuides.h6
-rw-r--r--lib/kofficeui/KoPageLayoutDia.cpp4
-rw-r--r--lib/kofficeui/KoPageLayoutSize.cpp2
-rw-r--r--lib/kofficeui/KoPen.cpp2
-rw-r--r--lib/kofficeui/KoPen.h2
-rw-r--r--lib/kofficeui/KoRuler.cpp22
-rw-r--r--lib/kofficeui/KoRuler.h6
-rw-r--r--lib/kofficeui/KoTabBar.cpp4
-rw-r--r--lib/kofficeui/KoTabChooser.cpp4
-rw-r--r--lib/kofficeui/KoToolBox.cpp10
-rw-r--r--lib/kofficeui/KoToolBox.h4
-rw-r--r--lib/kofficeui/KoTooluButton.cpp4
-rw-r--r--lib/kofficeui/Kolinestyleaction.cpp2
16 files changed, 75 insertions, 75 deletions
diff --git a/lib/kofficeui/KoGuideLineDia.cpp b/lib/kofficeui/KoGuideLineDia.cpp
index 9f49d062..740a7191 100644
--- a/lib/kofficeui/KoGuideLineDia.cpp
+++ b/lib/kofficeui/KoGuideLineDia.cpp
@@ -57,7 +57,7 @@ KoGuideLineDia::KoGuideLineDia( TQWidget *parent, KoPoint &pos, KoRect &rect,
setCaption( i18n("Add Guide Line") );
TQVBox * vbox = makeVBoxMainWidget();
- TQButtonGroup *group = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Orientation" ), vbox );
+ TQButtonGroup *group = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Orientation" ), vbox );
group->setRadioButtonExclusive( true );
//group->layout();
m_hButton = new TQRadioButton( i18n( "Horizontal" ), group );
@@ -83,12 +83,12 @@ double KoGuideLineDia::pos() const
}
-Qt::Orientation KoGuideLineDia::orientation() const
+TQt::Orientation KoGuideLineDia::orientation() const
{
- Qt::Orientation o = Qt::Horizontal;
+ TQt::Orientation o = TQt::Horizontal;
if ( m_vButton && m_vButton->isChecked() )
{
- o = Qt::Vertical;
+ o = TQt::Vertical;
}
return o;
}
diff --git a/lib/kofficeui/KoGuideLineDia.h b/lib/kofficeui/KoGuideLineDia.h
index cac53f76..797df193 100644
--- a/lib/kofficeui/KoGuideLineDia.h
+++ b/lib/kofficeui/KoGuideLineDia.h
@@ -78,7 +78,7 @@ public:
*
* @return the orientation of the added guide line
*/
- Qt::Orientation orientation() const;
+ TQt::Orientation orientation() const;
protected slots:
void slotOrientationChanged();
diff --git a/lib/kofficeui/KoGuides.cpp b/lib/kofficeui/KoGuides.cpp
index 95fcddbf..cb25ace9 100644
--- a/lib/kofficeui/KoGuides.cpp
+++ b/lib/kofficeui/KoGuides.cpp
@@ -110,7 +110,7 @@ void KoGuides::paintGuides( TQPainter &painter )
painter.setPen( TQPen( blue, 0, DotLine ) );
painter.save();
- if ( ( *it )->orientation == Qt::Vertical )
+ if ( ( *it )->orientation == TQt::Vertical )
{
painter.translate( m_zoomHandler->zoomItX( ( *it )->position ), 0 );
painter.drawLine( 0, 0, 0, height );
@@ -137,9 +137,9 @@ bool KoGuides::mousePressEvent( TQMouseEvent *e )
if ( guideLine )
{
m_lastPoint = e->pos();
- if ( e->button() == Qt::LeftButton || e->button() == Qt::RightButton )
+ if ( e->button() == TQt::LeftButton || e->button() == TQt::RightButton )
{
- if ( e->button() == Qt::LeftButton )
+ if ( e->button() == TQt::LeftButton )
{
m_mouseSelected = true;
}
@@ -188,7 +188,7 @@ bool KoGuides::mousePressEvent( TQMouseEvent *e )
emit moveGuides( false );
}
- if ( e->button() == Qt::RightButton && hasSelected() )
+ if ( e->button() == TQt::RightButton && hasSelected() )
{
m_popup->update( m_guideLines[GL_SELECTED].count() );
m_popup->exec( TQCursor::pos() );
@@ -212,13 +212,13 @@ bool KoGuides::mouseMoveEvent( TQMouseEvent *e )
emit guideLinesChanged( m_view );
eventProcessed = true;
}
- else if ( e->state() == Qt::NoButton )
+ else if ( e->state() == TQt::NoButton )
{
KoPoint p( mapFromScreen( e->pos() ) );
KoGuideLine * guideLine = find( p, m_zoomHandler->unzoomItY( 2 ) );
if ( guideLine )
{
- m_view->canvas()->setCursor( guideLine->orientation == Qt::Vertical ? TQt::sizeHorCursor : TQt::sizeVerCursor );
+ m_view->canvas()->setCursor( guideLine->orientation == TQt::Vertical ? TQt::sizeHorCursor : TQt::sizeVerCursor );
eventProcessed = true;
}
}
@@ -237,7 +237,7 @@ bool KoGuides::mouseReleaseEvent( TQMouseEvent *e )
int x1, y1, x2, y2;
m_view->canvas()->rect().coords( &x1, &y1, &x2, &y2 );
TQPoint gp( m_view->canvas()->mapFromGlobal( e->globalPos() ) );
- if ( m_guideLines[GL_SELECTED].first()->orientation == Qt::Vertical )
+ if ( m_guideLines[GL_SELECTED].first()->orientation == TQt::Vertical )
{
if ( gp.x() < x1 || gp.x() > x2 )
removeSelected();
@@ -251,7 +251,7 @@ bool KoGuides::mouseReleaseEvent( TQMouseEvent *e )
KoGuideLine * guideLine = find( p, m_zoomHandler->unzoomItY( 2 ) );
if ( guideLine )
{
- m_view->canvas()->setCursor( guideLine->orientation == Qt::Vertical ? TQt::sizeHorCursor : TQt::sizeVerCursor );
+ m_view->canvas()->setCursor( guideLine->orientation == TQt::Vertical ? TQt::sizeHorCursor : TQt::sizeVerCursor );
}
m_mouseSelected = false;
eventProcessed = true;
@@ -296,13 +296,13 @@ void KoGuides::setGuideLines( const TQValueList<double> &horizontalPos, const TQ
TQValueList<double>::ConstIterator posIt = horizontalPos.begin();
for ( ; posIt != horizontalPos.end(); ++posIt )
{
- KoGuideLine *guideLine = new KoGuideLine( Qt::Horizontal, *posIt, false );
+ KoGuideLine *guideLine = new KoGuideLine( TQt::Horizontal, *posIt, false );
m_guideLines[GL].append( guideLine );
}
posIt = verticalPos.begin();
for ( ; posIt != verticalPos.end(); ++posIt )
{
- KoGuideLine *guideLine = new KoGuideLine( Qt::Vertical, *posIt, false );
+ KoGuideLine *guideLine = new KoGuideLine( TQt::Vertical, *posIt, false );
m_guideLines[GL].append( guideLine );
}
paint();
@@ -320,13 +320,13 @@ void KoGuides::setAutoGuideLines( const TQValueList<double> &horizontalPos, cons
TQValueList<double>::ConstIterator posIt = horizontalPos.begin();
for ( ; posIt != horizontalPos.end(); ++posIt )
{
- KoGuideLine *guideLine = new KoGuideLine( Qt::Horizontal, *posIt, true );
+ KoGuideLine *guideLine = new KoGuideLine( TQt::Horizontal, *posIt, true );
m_guideLines[GL_AUTOMATIC].append( guideLine );
}
posIt = verticalPos.begin();
for ( ; posIt != verticalPos.end(); ++posIt )
{
- KoGuideLine *guideLine = new KoGuideLine( Qt::Vertical, *posIt, true );
+ KoGuideLine *guideLine = new KoGuideLine( TQt::Vertical, *posIt, true );
m_guideLines[GL_AUTOMATIC].append( guideLine );
}
}
@@ -340,7 +340,7 @@ void KoGuides::getGuideLines( TQValueList<double> &horizontalPos, TQValueList<do
TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[GL].begin();
for ( ; it != m_guideLines[GL].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Horizontal )
+ if ( ( *it )->orientation == TQt::Horizontal )
{
horizontalPos.append( ( *it )->position );
}
@@ -352,7 +352,7 @@ void KoGuides::getGuideLines( TQValueList<double> &horizontalPos, TQValueList<do
it = m_guideLines[GL_SELECTED].begin();
for ( ; it != m_guideLines[GL_SELECTED].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Horizontal )
+ if ( ( *it )->orientation == TQt::Horizontal )
{
horizontalPos.append( ( *it )->position );
}
@@ -376,7 +376,7 @@ void KoGuides::snapToGuideLines( KoRect &rect, int snap, SnapStatus &snapStatus,
TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Horizontal )
+ if ( ( *it )->orientation == TQt::Horizontal )
{
double tmp = (*it)->position - rect.top();
if ( snapStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) )
@@ -440,7 +440,7 @@ void KoGuides::snapToGuideLines( KoPoint &pos, int snap, SnapStatus &snapStatus,
TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Horizontal )
+ if ( ( *it )->orientation == TQt::Horizontal )
{
double tmp = (*it)->position - pos.y();
if ( snapStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) )
@@ -483,7 +483,7 @@ void KoGuides::repaintSnapping( const KoRect &snappedRect )
TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Horizontal )
+ if ( ( *it )->orientation == TQt::Horizontal )
{
if ( virtuallyEqual( snappedRect.top(), (*it)->position )
|| virtuallyEqual( snappedRect.bottom(), ( *it )->position ) )
@@ -537,7 +537,7 @@ void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStat
TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Horizontal && ( snapStatus & SNAP_HORIZ ) )
+ if ( ( *it )->orientation == TQt::Horizontal && ( snapStatus & SNAP_HORIZ ) )
{
if( virtuallyEqual( snappedPoint.y(), (*it)->position ) )
{
@@ -617,7 +617,7 @@ void KoGuides::diffNextGuide( KoRect &rect, KoPoint &diff )
TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Horizontal )
+ if ( ( *it )->orientation == TQt::Horizontal )
{
double moveyl = ( *it )->position - rect.top();
double moveyr = ( *it )->position - rect.bottom();
@@ -686,22 +686,22 @@ void KoGuides::moveGuide( const TQPoint &pos, bool horizontal, int rulerWidth )
if ( ! horizontal && x > 0 )
{
m_insertGuide = true;
- add( Qt::Vertical, p );
+ add( TQt::Vertical, p );
}
else if ( horizontal && y > 0 )
{
m_insertGuide = true;
- add( Qt::Horizontal, p );
+ add( TQt::Horizontal, p );
}
if ( m_insertGuide )
{
- TQMouseEvent e( TQEvent::MouseButtonPress, p, Qt::LeftButton, Qt::LeftButton );
+ TQMouseEvent e( TQEvent::MouseButtonPress, p, TQt::LeftButton, TQt::LeftButton );
mousePressEvent( &e );
}
}
else
{
- TQMouseEvent e( TQEvent::MouseMove, p, Qt::NoButton, Qt::LeftButton );
+ TQMouseEvent e( TQEvent::MouseMove, p, TQt::NoButton, TQt::LeftButton );
mouseMoveEvent( &e );
}
}
@@ -713,7 +713,7 @@ void KoGuides::addGuide( const TQPoint &pos, bool /* horizontal */, int rulerWid
int y = pos.y() - rulerWidth;
TQPoint p( x, y );
m_insertGuide = false;
- TQMouseEvent e( TQEvent::MouseButtonRelease, p, Qt::LeftButton, Qt::LeftButton );
+ TQMouseEvent e( TQEvent::MouseButtonRelease, p, TQt::LeftButton, TQt::LeftButton );
mouseReleaseEvent( &e );
}
@@ -725,7 +725,7 @@ void KoGuides::slotChangePosition()
const KoPageLayout& pl = m_view->koDocument()->pageLayout();
double max = 0.0;
- if ( guideLine->orientation == Qt::Vertical )
+ if ( guideLine->orientation == TQt::Vertical )
{
max = TQMAX( pl.ptWidth, m_zoomHandler->unzoomItX( m_view->canvas()->size().width() + m_view->canvasXOffset() - 1 ) );
}
@@ -757,10 +757,10 @@ void KoGuides::paint()
}
-void KoGuides::add( Qt::Orientation o, TQPoint &pos )
+void KoGuides::add( TQt::Orientation o, TQPoint &pos )
{
KoPoint p( mapFromScreen( pos ) );
- KoGuideLine *guideLine = new KoGuideLine( o, o == Qt::Vertical ? p.x(): p.y() );
+ KoGuideLine *guideLine = new KoGuideLine( o, o == TQt::Vertical ? p.x(): p.y() );
m_guideLines[GL].append( guideLine );
}
@@ -823,11 +823,11 @@ KoGuides::KoGuideLine * KoGuides::find( KoPoint &p, double diff )
TQValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
for ( ; it != m_guideLines[GL_SELECTED].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Vertical && TQABS( ( *it )->position - p.x() ) < diff )
+ if ( ( *it )->orientation == TQt::Vertical && TQABS( ( *it )->position - p.x() ) < diff )
{
return *it;
}
- if ( ( *it )->orientation == Qt::Horizontal && TQABS( ( *it )->position - p.y() ) < diff )
+ if ( ( *it )->orientation == TQt::Horizontal && TQABS( ( *it )->position - p.y() ) < diff )
{
return *it;
}
@@ -836,11 +836,11 @@ KoGuides::KoGuideLine * KoGuides::find( KoPoint &p, double diff )
it = m_guideLines[GL].begin();
for ( ; it != m_guideLines[GL].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Vertical && TQABS( ( *it )->position - p.x() ) < diff )
+ if ( ( *it )->orientation == TQt::Vertical && TQABS( ( *it )->position - p.x() ) < diff )
{
return *it;
}
- if ( ( *it )->orientation == Qt::Horizontal && TQABS( ( *it )->position - p.y() ) < diff )
+ if ( ( *it )->orientation == TQt::Horizontal && TQABS( ( *it )->position - p.y() ) < diff )
{
return *it;
}
@@ -861,7 +861,7 @@ void KoGuides::moveSelectedBy( TQPoint &p )
TQValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
for ( ; it != m_guideLines[GL_SELECTED].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Vertical )
+ if ( ( *it )->orientation == TQt::Vertical )
{
double tmp = ( *it )->position + point.x();
if ( tmp < 0 )
@@ -892,11 +892,11 @@ void KoGuides::moveSelectedBy( TQPoint &p )
{
( *it )->snapping = false;
- if ( ( *it )->orientation == Qt::Vertical && p.x() != 0 )
+ if ( ( *it )->orientation == TQt::Vertical && p.x() != 0 )
{
( *it )->position = ( *it )->position + point.x();
}
- else if ( ( *it )->orientation == Qt::Horizontal && p.y() != 0 )
+ else if ( ( *it )->orientation == TQt::Horizontal && p.y() != 0 )
{
( *it )->position = ( *it )->position + point.y();
}
diff --git a/lib/kofficeui/KoGuides.h b/lib/kofficeui/KoGuides.h
index 7feb7164..e1ba50ff 100644
--- a/lib/kofficeui/KoGuides.h
+++ b/lib/kofficeui/KoGuides.h
@@ -275,14 +275,14 @@ private:
/// Strukt holding the data of a guide line
struct KoGuideLine
{
- KoGuideLine( Qt::Orientation o, double pos, bool a = false )
+ KoGuideLine( TQt::Orientation o, double pos, bool a = false )
: orientation( o )
, position( pos )
, selected( false )
, snapping( false )
, automatic( a )
{}
- Qt::Orientation orientation;
+ TQt::Orientation orientation;
double position;
bool selected; // if this guide is selected
bool snapping; // if this guide is being snapped to
@@ -300,7 +300,7 @@ private:
* @param pos where to insert the guide
* @param o orientation of the guide line
*/
- void add( Qt::Orientation o, TQPoint &pos );
+ void add( TQt::Orientation o, TQPoint &pos );
/**
* @brief Select a guide
diff --git a/lib/kofficeui/KoPageLayoutDia.cpp b/lib/kofficeui/KoPageLayoutDia.cpp
index fc32a2a7..3c0678cc 100644
--- a/lib/kofficeui/KoPageLayoutDia.cpp
+++ b/lib/kofficeui/KoPageLayoutDia.cpp
@@ -281,7 +281,7 @@ void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf )
TQGridLayout *grid2 = new TQGridLayout( tab2, 7, 2, 0, KDialog::spacingHint() );
// ------------- header ---------------
- TQGroupBox *gHead = new TQGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 );
+ TQGroupBox *gHead = new TQGroupBox( 0, TQt::Vertical, i18n( "Head Line" ), tab2 );
gHead->layout()->setSpacing(KDialog::spacingHint());
gHead->layout()->setMargin(KDialog::marginHint());
TQGridLayout *headGrid = new TQGridLayout( gHead->layout(), 2, 3 );
@@ -310,7 +310,7 @@ void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf )
grid2->addMultiCellWidget( gHead, 0, 1, 0, 1 );
// ------------- footer ---------------
- TQGroupBox *gFoot = new TQGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 );
+ TQGroupBox *gFoot = new TQGroupBox( 0, TQt::Vertical, i18n( "Foot Line" ), tab2 );
gFoot->layout()->setSpacing(KDialog::spacingHint());
gFoot->layout()->setMargin(KDialog::marginHint());
TQGridLayout *footGrid = new TQGridLayout( gFoot->layout(), 2, 3 );
diff --git a/lib/kofficeui/KoPageLayoutSize.cpp b/lib/kofficeui/KoPageLayoutSize.cpp
index c4e19fa8..7cc70ca5 100644
--- a/lib/kofficeui/KoPageLayoutSize.cpp
+++ b/lib/kofficeui/KoPageLayoutSize.cpp
@@ -126,7 +126,7 @@ KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& layout,
// --------------- page margins ---------------
TQVGroupBox *marginsFrame = new TQVGroupBox( i18n( "Margins" ), this );
- marginsFrame->setColumnLayout( 0, Qt::Vertical );
+ marginsFrame->setColumnLayout( 0, TQt::Vertical );
marginsFrame->setMargin( KDialog::marginHint() );
grid1->addWidget( marginsFrame, 3, 0 );
diff --git a/lib/kofficeui/KoPen.cpp b/lib/kofficeui/KoPen.cpp
index c1aad91e..caf77a49 100644
--- a/lib/kofficeui/KoPen.cpp
+++ b/lib/kofficeui/KoPen.cpp
@@ -27,7 +27,7 @@ KoPen::KoPen()
m_pointWidth = 1.0;
}
-KoPen::KoPen(const TQColor& _color, double _pointWidth, Qt::PenStyle _style)
+KoPen::KoPen(const TQColor& _color, double _pointWidth, TQt::PenStyle _style)
: TQPen()
{
setColor(_color);
diff --git a/lib/kofficeui/KoPen.h b/lib/kofficeui/KoPen.h
index 84a7ea66..df802907 100644
--- a/lib/kofficeui/KoPen.h
+++ b/lib/kofficeui/KoPen.h
@@ -31,7 +31,7 @@ class KoPen : public TQPen
{
public:
KoPen();
- KoPen(const TQColor& _color, double _pointWidth, Qt::PenStyle _style);
+ KoPen(const TQColor& _color, double _pointWidth, TQt::PenStyle _style);
KoPen(const TQColor& _color);
~KoPen();
diff --git a/lib/kofficeui/KoRuler.cpp b/lib/kofficeui/KoRuler.cpp
index fade3f71..b5ab6ec9 100644
--- a/lib/kofficeui/KoRuler.cpp
+++ b/lib/kofficeui/KoRuler.cpp
@@ -79,7 +79,7 @@ const int KoRuler::F_HELPLINES = 4;
const int KoRuler::F_NORESIZE = 8;
/*================================================================*/
-KoRuler::KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orientation,
+KoRuler::KoRuler( TQWidget *_parent, TQWidget *_canvas, TQt::Orientation _orientation,
const KoPageLayout& _layout, int _flags, KoUnit::Unit _unit, KoTabChooser *_tabChooser )
: TQFrame( _parent ), buffer( width(), height() ), m_zoom(1.0), m_1_zoom(1.0),
m_unit( _unit )
@@ -124,7 +124,7 @@ KoRuler::KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orienta
d->currTab.type = T_INVALID;
d->removeTab.type = T_INVALID;
- if ( orientation == Qt::Horizontal ) {
+ if ( orientation == TQt::Horizontal ) {
frameStart = tqRound( zoomIt(d->layout.ptLeft) );
d->frameEnd = tqRound( zoomIt(d->layout.ptWidth - d->layout.ptRight) );
} else {
@@ -159,7 +159,7 @@ void KoRuler::setMousePos( int mx, int my )
TQPainter p( this );
p.setRasterOp( TQt::NotROP );
- if ( orientation == Qt::Horizontal ) {
+ if ( orientation == TQt::Horizontal ) {
if ( hasToDelete )
p.drawLine( mposX, 1, mposX, height() - 1 );
p.drawLine( mx, 1, mx, height() - 1 );
@@ -486,7 +486,7 @@ void KoRuler::mousePressEvent( TQMouseEvent *e )
d->removeTab.type = T_INVALID;
switch ( e->button() ) {
- case Qt::RightButton:
+ case TQt::RightButton:
if(d->currTab.type == T_INVALID || !(d->flags & F_TABS))
d->rb_menu->setItemEnabled(d->mRemoveTab, false);
else
@@ -495,11 +495,11 @@ void KoRuler::mousePressEvent( TQMouseEvent *e )
d->action = A_NONE;
d->mousePressed = false;
return;
- case Qt::MidButton:
+ case TQt::MidButton:
// MMB shall do like double-click (it opens a dialog).
handleDoubleClick();
return;
- case Qt::LeftButton:
+ case TQt::LeftButton:
if ( d->action == A_BR_RIGHT || d->action == A_BR_LEFT ) {
if ( d->action == A_BR_RIGHT )
d->whileMovingBorderRight = true;
@@ -571,7 +571,7 @@ void KoRuler::mousePressEvent( TQMouseEvent *e )
}
else if ( d->flags & F_HELPLINES )
{
- setCursor( orientation == Qt::Horizontal ?
+ setCursor( orientation == TQt::Horizontal ?
TQt::sizeVerCursor : TQt::sizeHorCursor );
d->action = A_HELPLINES;
}
@@ -655,8 +655,8 @@ void KoRuler::mouseReleaseEvent( TQMouseEvent *e )
}
else if( d->action == A_HELPLINES )
{
- emit addGuide( e->pos(), orientation == Qt::Horizontal, orientation == Qt::Horizontal ? size().height() : size().width() );
- emit addHelpline( e->pos(), orientation == Qt::Horizontal);
+ emit addGuide( e->pos(), orientation == TQt::Horizontal, orientation == TQt::Horizontal ? size().height() : size().width() );
+ emit addHelpline( e->pos(), orientation == TQt::Horizontal);
setCursor( ArrowCursor );
}
d->currTab.type = T_INVALID; // added (DF)
@@ -686,7 +686,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e )
TQToolTip::remove( this);
switch ( orientation ) {
- case Qt::Horizontal: {
+ case TQt::Horizontal: {
if ( !d->mousePressed ) {
setCursor( ArrowCursor );
d->action = A_NONE;
@@ -871,7 +871,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e )
return;
} break;
- case Qt::Vertical: {
+ case TQt::Vertical: {
if ( !d->mousePressed ) {
setCursor( ArrowCursor );
d->action = A_NONE;
diff --git a/lib/kofficeui/KoRuler.h b/lib/kofficeui/KoRuler.h
index 9bf6c8c6..4c8031ec 100644
--- a/lib/kofficeui/KoRuler.h
+++ b/lib/kofficeui/KoRuler.h
@@ -113,7 +113,7 @@ public:
* Create a ruler
* TODO document params
*/
- KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orientation,
+ KoRuler( TQWidget *_parent, TQWidget *_canvas, TQt::Orientation _orientation,
const KoPageLayout& _layout, int _flags, KoUnit::Unit _unit,
KoTabChooser *_tabChooser = 0L );
~KoRuler();
@@ -279,7 +279,7 @@ protected:
A_HELPLINES };
void drawContents( TQPainter *_painter )
- { orientation == Qt::Horizontal ? drawHorizontal( _painter ) : drawVertical( _painter ); }
+ { orientation == TQt::Horizontal ? drawHorizontal( _painter ) : drawVertical( _painter ); }
void drawHorizontal( TQPainter *_painter );
void drawVertical( TQPainter *_painter );
@@ -312,7 +312,7 @@ private:
KoRulerPrivate *d;
- Qt::Orientation orientation;
+ TQt::Orientation orientation;
int diffx, diffy;
double i_left, i_first;
TQPixmap buffer;
diff --git a/lib/kofficeui/KoTabBar.cpp b/lib/kofficeui/KoTabBar.cpp
index c751e4e8..319f2baf 100644
--- a/lib/kofficeui/KoTabBar.cpp
+++ b/lib/kofficeui/KoTabBar.cpp
@@ -768,7 +768,7 @@ void KoTabBar::mousePressEvent( TQMouseEvent* ev )
scrollForward();
}
- if( ev->button() == Qt::RightButton )
+ if( ev->button() == TQt::RightButton )
if( !d->readOnly )
emit contextMenu( ev->globalPos() );
}
@@ -779,7 +779,7 @@ void KoTabBar::mouseReleaseEvent( TQMouseEvent* ev )
d->autoScroll = false;
- if ( ev->button() == Qt::LeftButton && d->targetTab != 0 )
+ if ( ev->button() == TQt::LeftButton && d->targetTab != 0 )
{
emit tabMoved( d->activeTab-1, d->targetTab-1 );
d->targetTab = 0;
diff --git a/lib/kofficeui/KoTabChooser.cpp b/lib/kofficeui/KoTabChooser.cpp
index 325b9c00..8fc563c7 100644
--- a/lib/kofficeui/KoTabChooser.cpp
+++ b/lib/kofficeui/KoTabChooser.cpp
@@ -71,7 +71,7 @@ void KoTabChooser::mousePressEvent( TQMouseEvent *e )
return;
switch ( e->button() ) {
- case Qt::LeftButton: case Qt::MidButton: {
+ case TQt::LeftButton: case TQt::MidButton: {
switch ( currType ) {
case TAB_LEFT: {
if ( flags & TAB_CENTER ) currType = TAB_CENTER;
@@ -96,7 +96,7 @@ void KoTabChooser::mousePressEvent( TQMouseEvent *e )
}
repaint( true );
} break;
- case Qt::RightButton: {
+ case TQt::RightButton: {
TQPoint pnt( TQCursor::pos() );
rb_menu->setItemChecked( mLeft, false );
diff --git a/lib/kofficeui/KoToolBox.cpp b/lib/kofficeui/KoToolBox.cpp
index 222b206d..86d2ad88 100644
--- a/lib/kofficeui/KoToolBox.cpp
+++ b/lib/kofficeui/KoToolBox.cpp
@@ -139,10 +139,10 @@ void KoToolBox::setupTools()
}
-void KoToolBox::setOrientation ( Qt::Orientation o )
+void KoToolBox::setOrientation ( TQt::Orientation o )
{
if ( barPos() == Floating ) { // when floating, make it a standing toolbox.
- o = o == Qt::Vertical ? Qt::Horizontal : Qt::Vertical;
+ o = o == TQt::Vertical ? TQt::Horizontal : TQt::Vertical;
}
TQDockWindow::setOrientation( o );
@@ -239,15 +239,15 @@ TQWidget* ToolArea::getNextParent()
}
-void ToolArea::setOrientation ( Qt::Orientation o )
+void ToolArea::setOrientation ( TQt::Orientation o )
{
- TQBoxLayout::Direction dir = (o != Qt::Horizontal
+ TQBoxLayout::Direction dir = (o != TQt::Horizontal
? TQBoxLayout::TopToBottom
: TQBoxLayout::LeftToRight);
m_leftLayout->setDirection(dir);
m_rightLayout->setDirection(dir);
- m_layout->setDirection(o == Qt::Horizontal
+ m_layout->setDirection(o == TQt::Horizontal
? TQBoxLayout::TopToBottom
: TQBoxLayout::LeftToRight);
}
diff --git a/lib/kofficeui/KoToolBox.h b/lib/kofficeui/KoToolBox.h
index 0d5b2b18..5b0e75d6 100644
--- a/lib/kofficeui/KoToolBox.h
+++ b/lib/kofficeui/KoToolBox.h
@@ -63,7 +63,7 @@ public:
public slots:
- virtual void setOrientation ( Qt::Orientation o );
+ virtual void setOrientation ( TQt::Orientation o );
void slotButtonPressed( int id );
void slotPressButton( int id );
@@ -98,7 +98,7 @@ public:
ToolArea(TQWidget *parent);
~ToolArea();
- void setOrientation ( Qt::Orientation o );
+ void setOrientation ( TQt::Orientation o );
void add(TQWidget *button);
TQWidget* getNextParent();
diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp
index 3adcaca8..f2c64a32 100644
--- a/lib/kofficeui/KoTooluButton.cpp
+++ b/lib/kofficeui/KoTooluButton.cpp
@@ -303,7 +303,7 @@ void KoColorPanel::insertDefaultColors()
void KoColorPanel::mousePressEvent( TQMouseEvent* e )
{
- if ( e->button() == Qt::LeftButton )
+ if ( e->button() == TQt::LeftButton )
m_pressedPos = e->pos();
}
@@ -316,7 +316,7 @@ void KoColorPanel::mouseReleaseEvent( TQMouseEvent* )
void KoColorPanel::mouseMoveEvent( TQMouseEvent* e )
{
- if ( e->state() & Qt::LeftButton ) {
+ if ( e->state() & TQt::LeftButton ) {
TQPoint p = m_pressedPos - e->pos();
if ( p.manhattanLength() > TQApplication::startDragDistance() ) {
TQColor color( mapToColor( m_pressedPos ) );
diff --git a/lib/kofficeui/Kolinestyleaction.cpp b/lib/kofficeui/Kolinestyleaction.cpp
index 08176d1b..82ec3ade 100644
--- a/lib/kofficeui/Kolinestyleaction.cpp
+++ b/lib/kofficeui/Kolinestyleaction.cpp
@@ -76,7 +76,7 @@ void KoLineStyleAction::createMenu()
for(int i = 1; i < 6; i++) {
pix.fill(white);
- pen.setStyle(static_cast<Qt::PenStyle>(i));
+ pen.setStyle(static_cast<TQt::PenStyle>(i));
p.setPen(pen);
p.drawLine(0, 10, pix.width(), 10);
mask = pix;