You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
15 years ago
|
#include <config.h>
|
||
|
#include "certlistview.h"
|
||
|
#include <kurldrag.h>
|
||
|
#include <kdebug.h>
|
||
|
|
||
|
CertKeyListView::CertKeyListView( const ColumnStrategy * strategy,
|
||
|
const DisplayStrategy * display,
|
||
|
QWidget * parent, const char * name, WFlags f )
|
||
|
: Kleo::KeyListView( strategy, display, parent, name, f )
|
||
|
{
|
||
|
viewport()->setAcceptDrops( true );
|
||
|
}
|
||
|
|
||
|
void CertKeyListView::contentsDragEnterEvent( QDragEnterEvent * event )
|
||
|
{
|
||
|
//const char* fmt;
|
||
|
//for (int i=0; (fmt = event->format(i)); i++)
|
||
|
// kdDebug() << fmt << endl;
|
||
|
|
||
|
// We only accept URL drops. We'll check the mimetype later on.
|
||
|
event->accept( QUriDrag::canDecode( event ) );
|
||
|
}
|
||
|
|
||
|
void CertKeyListView::contentsDragMoveEvent( QDragMoveEvent * event )
|
||
|
{
|
||
|
event->accept( QUriDrag::canDecode( event ) );
|
||
|
}
|
||
|
|
||
|
|
||
|
void CertKeyListView::contentsDragLeaveEvent( QDragLeaveEvent * )
|
||
|
{
|
||
|
// Don't let QListView do its stuff
|
||
|
}
|
||
|
|
||
|
void CertKeyListView::contentsDropEvent( QDropEvent * event )
|
||
|
{
|
||
|
KURL::List lst;
|
||
|
if ( KURLDrag::decode( event, lst ) ) {
|
||
|
event->accept();
|
||
|
emit dropped( lst );
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#include "certlistview.moc"
|