31 #include "overlaywidget.h"
34 OverlayWidget::OverlayWidget( TQWidget* alignWidget, TQWidget* parent, const char* name )
35 : TQHBox( parent, name ), mAlignWidget( 0 )
37 setAlignWidget( alignWidget );
40 OverlayWidget::~OverlayWidget()
44 void OverlayWidget::reposition()
51 p.setX( mAlignWidget->width() - width() );
54 TQPoint pTopLevel = mAlignWidget->mapTo( topLevelWidget(), p );
56 TQPoint pParent = parentWidget()->mapFrom( topLevelWidget(), pTopLevel );
61 void OverlayWidget::setAlignWidget( TQWidget * w )
63 if (w == mAlignWidget)
67 mAlignWidget->removeEventFilter( this);
72 mAlignWidget->installEventFilter( this);
77 bool OverlayWidget::eventFilter( TQObject* o, TQEvent* e)
79 if ( o == mAlignWidget &&
80 ( e->type() == TQEvent::Move || e->type() == TQEvent::Resize ) ) {
83 return TQFrame::eventFilter(o,e);
86 void OverlayWidget::resizeEvent( TQResizeEvent* ev )
89 TQFrame::resizeEvent( ev );
92 #include "overlaywidget.moc"
TDEPIM classes for drag and drop of mails.
|