22 #include <tqdragobject.h>
24 #include "dropwidget.h"
26 DropWidget::DropWidget( TQWidget *parent, const char *name )
27 : TQWidget( parent, name )
29 setAcceptDrops( true );
32 void DropWidget::dragEnterEvent( TQDragEnterEvent *event )
34 event->accept( TQTextDrag::canDecode( event ) );
37 void DropWidget::dropEvent( TQDropEvent *event )
39 int alignment = ( event->pos().x() < (width() / 2) ? TQt::AlignLeft : TQt::AlignRight );
40 alignment |= ( event->pos().y() < (height() / 2) ? TQt::AlignTop : TQt::AlignBottom );
41 emit summaryWidgetDropped( this, event->source(), alignment );
44 #include "dropwidget.moc"
|