diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-07-27 16:57:53 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-07-27 18:48:46 +0200 |
commit | 7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931 (patch) | |
tree | 4655c7263ca5c64d23d10167cb459dd9cb253815 /src/overlayWidget.cpp | |
parent | 88ea2b6cd4382627fb6efca9cc54825aee881d1e (diff) | |
download | tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.tar.gz tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.zip |
Initial TQt conversion
Diffstat (limited to 'src/overlayWidget.cpp')
-rw-r--r-- | src/overlayWidget.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/overlayWidget.cpp b/src/overlayWidget.cpp index 331a66e..40653b3 100644 --- a/src/overlayWidget.cpp +++ b/src/overlayWidget.cpp @@ -21,14 +21,14 @@ #include "overlayWidget.h" //#include "statusbar.h" -#include <qpoint.h> +#include <ntqpoint.h> namespace KDE { -OverlayWidget::OverlayWidget( QWidget *parent, QWidget *anchor, const char* name ) - : QFrame( parent->parentWidget(), name ) +OverlayWidget::OverlayWidget( TQWidget *parent, TQWidget *anchor, const char* name ) + : TQFrame( parent->parentWidget(), name ) , m_anchor( anchor ) , m_parent( parent ) { @@ -44,16 +44,16 @@ OverlayWidget::reposition() adjustSize(); // p is in the alignWidget's coordinates - QPoint p; + TQPoint p; p.setX( m_anchor->width() - width() ); p.setY( -height() ); // Position in the toplevelwidget's coordinates - QPoint pTopLevel = m_anchor->mapTo( topLevelWidget(), p ); + TQPoint pTopLevel = m_anchor->mapTo( topLevelWidget(), p ); // Position in the widget's parentWidget coordinates - QPoint pParent = parentWidget() ->mapFrom( topLevelWidget(), pTopLevel ); + TQPoint pParent = parentWidget() ->mapFrom( topLevelWidget(), pTopLevel ); // keep it on the screen if( pParent.x() < 0 ) pParent.rx() = 0; @@ -63,28 +63,28 @@ OverlayWidget::reposition() } bool -OverlayWidget::eventFilter( QObject* o, QEvent* e ) +OverlayWidget::eventFilter( TQObject* o, TQEvent* e ) { - if ( e->type() == QEvent::Move || e->type() == QEvent::Resize ) + if ( e->type() == TQEvent::Move || e->type() == TQEvent::Resize ) reposition(); - return QFrame::eventFilter( o, e ); + return TQFrame::eventFilter( o, e ); } void -OverlayWidget::resizeEvent( QResizeEvent* ev ) +OverlayWidget::resizeEvent( TQResizeEvent* ev ) { reposition(); - QFrame::resizeEvent( ev ); + TQFrame::resizeEvent( ev ); } bool -OverlayWidget::event( QEvent *e ) +OverlayWidget::event( TQEvent *e ) { - if ( e->type() == QEvent::ChildInserted ) + if ( e->type() == TQEvent::ChildInserted ) adjustSize(); - return QFrame::event( e ); + return TQFrame::event( e ); } } |