summaryrefslogtreecommitdiffstats
path: root/tdehtml/tdehtmlview.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-11-13 20:33:00 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-11-15 23:47:11 +0900
commit303b6445011a6ed10c48ac6e1eda415e5c371264 (patch)
treeaded2a8ee5046176d3295bbf1f90f5dd73746677 /tdehtml/tdehtmlview.cpp
parent141ced0c41af8726eedac425ea24cd162bcff862 (diff)
downloadtdelibs-303b6445011a6ed10c48ac6e1eda415e5c371264.tar.gz
tdelibs-303b6445011a6ed10c48ac6e1eda415e5c371264.zip
Replace Qt with TQt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit c8ece3630d4d21acaf1749fc2cf660a0463070c3)
Diffstat (limited to 'tdehtml/tdehtmlview.cpp')
-rw-r--r--tdehtml/tdehtmlview.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/tdehtml/tdehtmlview.cpp b/tdehtml/tdehtmlview.cpp
index 28a81a91f..324119805 100644
--- a/tdehtml/tdehtmlview.cpp
+++ b/tdehtml/tdehtmlview.cpp
@@ -941,7 +941,7 @@ void TDEHTMLView::closeEvent( TQCloseEvent* ev )
void TDEHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse )
{
if (!m_part->xmlDocImpl()) return;
- if (d->possibleTripleClick && ( _mouse->button() & Qt::MouseButtonMask ) == Qt::LeftButton)
+ if (d->possibleTripleClick && ( _mouse->button() & TQt::MouseButtonMask ) == TQt::LeftButton)
{
viewportMouseDoubleClickEvent( _mouse ); // it handles triple clicks too
return;
@@ -958,7 +958,7 @@ void TDEHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse )
//kdDebug(6000) << "innerNode="<<mev.innerNode.nodeName().string()<<endl;
- if ( (_mouse->button() == Qt::MidButton) &&
+ if ( (_mouse->button() == TQt::MidButton) &&
!m_part->d->m_bOpenMiddleClick && !d->m_mouseScrollTimer &&
mev.url.isNull() && (mev.innerNode.elementId() != ID_INPUT) ) {
TQPoint point = mapFromGlobal( _mouse->globalPos() );
@@ -1168,7 +1168,7 @@ void TDEHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse )
DOM::NodeImpl::MouseEvent mev( _mouse->stateAfter(), DOM::NodeImpl::MouseMove );
// Do not modify :hover/:active state while mouse is pressed.
- m_part->xmlDocImpl()->prepareMouseEvent( _mouse->state() & Qt::MouseButtonMask /*readonly ?*/, xm, ym, &mev );
+ m_part->xmlDocImpl()->prepareMouseEvent( _mouse->state() & TQt::MouseButtonMask /*readonly ?*/, xm, ym, &mev );
// kdDebug(6000) << "mouse move: " << _mouse->pos()
// << " button " << _mouse->button()
@@ -1341,7 +1341,7 @@ void TDEHTMLView::viewportMouseReleaseEvent( TQMouseEvent * _mouse )
DOM::NodeImpl* fn = m_part->xmlDocImpl()->focusNode();
if (fn && fn != mev.innerNode.handle() &&
fn->renderer() && fn->renderer()->isWidget() &&
- _mouse->button() != Qt::MidButton) {
+ _mouse->button() != TQt::MidButton) {
forwardPeripheralEvent(static_cast<tdehtml::RenderWidget*>(fn->renderer()), _mouse, xm, ym);
}
@@ -2884,15 +2884,15 @@ void TDEHTMLView::print(bool quick)
if (printHeader)
{
int available_width = metrics.width() - 10 -
- 2 * kMax(p->boundingRect(0, 0, metrics.width(), p->fontMetrics().lineSpacing(), Qt::AlignLeft, headerLeft).width(),
- p->boundingRect(0, 0, metrics.width(), p->fontMetrics().lineSpacing(), Qt::AlignLeft, headerRight).width());
+ 2 * kMax(p->boundingRect(0, 0, metrics.width(), p->fontMetrics().lineSpacing(), TQt::AlignLeft, headerLeft).width(),
+ p->boundingRect(0, 0, metrics.width(), p->fontMetrics().lineSpacing(), TQt::AlignLeft, headerRight).width());
if (available_width < 150)
available_width = 150;
int mid_width;
int squeeze = 120;
do {
headerMid = KStringHandler::csqueeze(docname, squeeze);
- mid_width = p->boundingRect(0, 0, metrics.width(), p->fontMetrics().lineSpacing(), Qt::AlignLeft, headerMid).width();
+ mid_width = p->boundingRect(0, 0, metrics.width(), p->fontMetrics().lineSpacing(), TQt::AlignLeft, headerMid).width();
squeeze -= 10;
} while (mid_width > available_width);
}
@@ -2906,14 +2906,14 @@ void TDEHTMLView::print(bool quick)
if (printHeader)
{
int dy = p->fontMetrics().lineSpacing();
- p->setPen(Qt::black);
+ p->setPen(TQt::black);
p->setFont(headerFont);
headerRight = TQString("#%1").arg(page);
- p->drawText(0, 0, metrics.width(), dy, Qt::AlignLeft, headerLeft);
- p->drawText(0, 0, metrics.width(), dy, Qt::AlignHCenter, headerMid);
- p->drawText(0, 0, metrics.width(), dy, Qt::AlignRight, headerRight);
+ p->drawText(0, 0, metrics.width(), dy, TQt::AlignLeft, headerLeft);
+ p->drawText(0, 0, metrics.width(), dy, TQt::AlignHCenter, headerMid);
+ p->drawText(0, 0, metrics.width(), dy, TQt::AlignRight, headerRight);
}
@@ -3156,13 +3156,13 @@ bool TDEHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode,
int screenY = _mouse->globalY();
int button = -1;
switch (_mouse->button()) {
- case Qt::LeftButton:
+ case TQt::LeftButton:
button = 0;
break;
- case Qt::MidButton:
+ case TQt::MidButton:
button = 1;
break;
- case Qt::RightButton:
+ case TQt::RightButton:
button = 2;
break;
default:
@@ -3278,12 +3278,12 @@ void TDEHTMLView::viewportWheelEvent(TQWheelEvent* e)
{
e->accept();
}
- else if( ( (e->orientation() == Qt::Vertical &&
+ else if( ( (e->orientation() == TQt::Vertical &&
((d->ignoreWheelEvents && !verticalScrollBar()->isVisible())
|| e->delta() > 0 && contentsY() <= 0
|| e->delta() < 0 && contentsY() >= contentsHeight() - visibleHeight()))
||
- (e->orientation() == Qt::Horizontal &&
+ (e->orientation() == TQt::Horizontal &&
((d->ignoreWheelEvents && !horizontalScrollBar()->isVisible())
|| e->delta() > 0 && contentsX() <=0
|| e->delta() < 0 && contentsX() >= contentsWidth() - visibleWidth())))
@@ -3302,7 +3302,7 @@ void TDEHTMLView::viewportWheelEvent(TQWheelEvent* e)
TQScrollView::viewportWheelEvent( e );
#endif
- TQMouseEvent *tempEvent = new TQMouseEvent( TQEvent::MouseMove, TQPoint(-1,-1), TQPoint(-1,-1), Qt::NoButton, e->state() );
+ TQMouseEvent *tempEvent = new TQMouseEvent( TQEvent::MouseMove, TQPoint(-1,-1), TQPoint(-1,-1), TQt::NoButton, e->state() );
emit viewportMouseMoveEvent ( tempEvent );
delete tempEvent;
}
@@ -4604,9 +4604,9 @@ void TDEHTMLView::scrollViewWheelEvent( TQWheelEvent *e )
if ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) )
step = pageStep;
- if(e->orientation() == Qt::Horizontal)
+ if(e->orientation() == TQt::Horizontal)
scrollBy(-((e->delta()*step)/120), 0);
- else if(e->orientation() == Qt::Vertical)
+ else if(e->orientation() == TQt::Vertical)
scrollBy(0,-((e->delta()*step)/120));
e->accept();