diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
commit | 5f5ee2367157176ed223b86343eb0a9e4022e020 (patch) | |
tree | 6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /kregexpeditor/regexpwidget.cpp | |
parent | 4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff) | |
download | tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kregexpeditor/regexpwidget.cpp')
-rw-r--r-- | kregexpeditor/regexpwidget.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kregexpeditor/regexpwidget.cpp b/kregexpeditor/regexpwidget.cpp index 2ee2aa7..a64b0c4 100644 --- a/kregexpeditor/regexpwidget.cpp +++ b/kregexpeditor/regexpwidget.cpp @@ -24,8 +24,8 @@ #include "regexpwidget.h" #include <iostream> -#include <qpainter.h> -#include <qcursor.h> +#include <tqpainter.h> +#include <tqcursor.h> #include "concwidget.h" #include "dragaccepter.h" @@ -33,9 +33,9 @@ const int RegExpWidget::pw = 1; const int RegExpWidget::bdSize = 5; const int RegExpWidget::space = 5; -RegExpWidget::RegExpWidget(RegExpEditorWindow* editorWindow, QWidget *parent, +RegExpWidget::RegExpWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, const char *name) - : QWidget(parent, name ? name : "RegExpWidget", WNoMousePropagation ), + : TQWidget(parent, name ? name : "RegExpWidget", WNoMousePropagation ), _editorWindow( editorWindow ), _isSelected( false ), _isToplevel( false ) { } @@ -59,7 +59,7 @@ void RegExpWidget::setConcChild(ConcWidget *) bool RegExpWidget::updateSelection(bool parentSelected) { bool selected = ( parentSelected || - _editorWindow->selectionOverlap( mapToGlobal( QPoint(0,0) ), size() ) ) + _editorWindow->selectionOverlap( mapToGlobal( TQPoint(0,0) ), size() ) ) && !_isToplevel; if ( _isSelected != selected ) { @@ -71,10 +71,10 @@ bool RegExpWidget::updateSelection(bool parentSelected) return false; } -void RegExpWidget::drawPossibleSelection( QPainter& painter, QSize mySize ) +void RegExpWidget::drawPossibleSelection( TQPainter& painter, TQSize mySize ) { if ( _isSelected ) { - painter.fillRect( 0, 0, mySize.width(), mySize.height(), QBrush( gray ) ); + painter.fillRect( 0, 0, mySize.width(), mySize.height(), TQBrush( gray ) ); } } @@ -114,22 +114,22 @@ int RegExpWidget::edit() return 0; // Compiler shut up } -void RegExpWidget::mousePressEvent ( QMouseEvent* event ) +void RegExpWidget::mousePressEvent ( TQMouseEvent* event ) { if ( _editorWindow->isPasteing() || _editorWindow->isInserting() ) return; if ( event->button() == LeftButton ) { - if ( ! _editorWindow->pointSelected( QCursor::pos() ) ) { + if ( ! _editorWindow->pointSelected( TQCursor::pos() ) ) { _editorWindow->clearSelection( true ); if ( dynamic_cast<DragAccepter*>(this) == 0 && dynamic_cast<ConcWidget*>(this) == 0 ) { selectWidget( true ); } } - QMouseEvent ev( event->type(), mapTo(_editorWindow, event->pos()), + TQMouseEvent ev( event->type(), mapTo(_editorWindow, event->pos()), event->button(), event->state()); - QApplication::sendEvent( _editorWindow, &ev ); + TQApplication::sendEvent( _editorWindow, &ev ); } else if ( event->button() == RightButton ) { _editorWindow->showRMBMenu( true ); @@ -139,10 +139,10 @@ void RegExpWidget::mousePressEvent ( QMouseEvent* event ) // and thus sends the event to the parent - given that the following line is in. // It doesn't make any change to leave it out. // 25 Oct. 2001 19:03 -- Jesper K. Pedersen - // QWidget::mousePressEvent( event ); + // TQWidget::mousePressEvent( event ); } -void RegExpWidget::mouseReleaseEvent( QMouseEvent* ) +void RegExpWidget::mouseReleaseEvent( TQMouseEvent* ) { if ( _editorWindow->isInserting() && acceptWidgetInsert( _editorWindow->insertType() ) ) { if ( !_editorWindow->hasSelection() ) @@ -156,20 +156,20 @@ void RegExpWidget::mouseReleaseEvent( QMouseEvent* ) } } -QRect RegExpWidget::selectionRect() const +TQRect RegExpWidget::selectionRect() const { - return QRect( mapToGlobal( QPoint(0,0) ), size() ); + return TQRect( mapToGlobal( TQPoint(0,0) ), size() ); } -void RegExpWidget::enterEvent( QEvent * ) +void RegExpWidget::enterEvent( TQEvent * ) { updateCursorShape(); } void RegExpWidget::updateCursorShape() { - QCursor cursor; + TQCursor cursor; if ( _editorWindow->isPasteing() ) { if ( acceptWidgetPaste() ) @@ -205,9 +205,9 @@ bool RegExpWidget::acceptWidgetInsert( RegExpType tp ) const return WidgetFactory::isContainer( tp ); } -RegExpWidget* RegExpWidget::widgetUnderPoint( QPoint globalPos, bool ) +RegExpWidget* RegExpWidget::widgetUnderPoint( TQPoint globalPos, bool ) { - if ( QRect(mapToGlobal( QPoint(0,0) ), size() ).contains( globalPos ) ) + if ( TQRect(mapToGlobal( TQPoint(0,0) ), size() ).contains( globalPos ) ) return this; else return 0; |