mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 02:45:38 +00:00
Allow dnd
svn path=/trunk/kdegraphics/kpdf/; revision=251232
This commit is contained in:
parent
10f5a7bb56
commit
85e7b1ff91
|
@ -5,7 +5,7 @@
|
|||
#include <qpainter.h>
|
||||
#include <qmutex.h>
|
||||
#include <kdebug.h>
|
||||
|
||||
#include <kurldrag.h>
|
||||
#include "PDFDoc.h"
|
||||
|
||||
#include "kpdf_pagewidget.h"
|
||||
|
@ -261,6 +261,19 @@ namespace KPDF
|
|||
}
|
||||
}
|
||||
|
||||
void PageWidget::dropEvent( QDropEvent* ev )
|
||||
{
|
||||
KURL::List lst;
|
||||
if ( KURLDrag::decode( ev, lst ) ) {
|
||||
emit urlDropped( lst.first() );
|
||||
}
|
||||
}
|
||||
|
||||
void PageWidget::dragEnterEvent( QDragEnterEvent * ev )
|
||||
{
|
||||
ev->accept();
|
||||
}
|
||||
|
||||
bool PageWidget::readDown()
|
||||
{
|
||||
if( atBottom() )
|
||||
|
|
|
@ -58,6 +58,7 @@ namespace KPDF
|
|||
void ZoomOut();
|
||||
void ZoomIn();
|
||||
void rightClick();
|
||||
void urlDropped( const KURL& );
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent( QKeyEvent* );
|
||||
|
@ -66,7 +67,8 @@ namespace KPDF
|
|||
void contentsMouseMoveEvent(QMouseEvent*);
|
||||
virtual void wheelEvent( QWheelEvent * );
|
||||
virtual void drawContents ( QPainter *p, int, int, int, int );
|
||||
|
||||
virtual void dragEnterEvent( QDragEnterEvent* );
|
||||
virtual void dropEvent( QDropEvent* );
|
||||
private:
|
||||
|
||||
QOutputDevPixmap * m_outputdev;
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace KPDF
|
|||
void showMarkList( bool );
|
||||
void slotReadUp();
|
||||
void slotReadDown();
|
||||
|
||||
void slotOpenUrlDropped( const KURL & );
|
||||
private:
|
||||
PDFDoc* m_doc;
|
||||
PageWidget* m_outputDev;
|
||||
|
|
Loading…
Reference in a new issue