mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 02:45:38 +00:00
tiny update
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=354546
This commit is contained in:
parent
30f135838d
commit
5b60da8d57
|
@ -19,6 +19,7 @@ More items (first items will enter 'In progress list' first):
|
|||
-> text selection in wordprocessor style (very hard/impossible)
|
||||
-> implement history (mainly for actionNamed)
|
||||
-> history as a toolbox child (collecting DOs's setPage calls)
|
||||
-> click over image allows "save image"
|
||||
-> zoom: fit text (with configurable margin)
|
||||
-> automatic online dictionaries / translators (BR80338)
|
||||
-> add OCR for building TextPages out of pure graphical (aka scanned) pages
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
#include <qpainter.h>
|
||||
#include <qtimer.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qapplication.h>
|
||||
#include <qclipboard.h>
|
||||
|
||||
#include <kiconloader.h>
|
||||
#include <kurldrag.h>
|
||||
|
@ -322,7 +324,6 @@ void PageView::contentsMousePressEvent( QMouseEvent * e )
|
|||
}
|
||||
}
|
||||
|
||||
#include <kdebug.h>
|
||||
void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
|
||||
{
|
||||
bool leftButton = e->button() & LeftButton,
|
||||
|
@ -382,10 +383,17 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
|
|||
case MouseSelection: // get text from the page
|
||||
if ( leftButton && d->mouseSelectionWidget )
|
||||
{
|
||||
// request the textpage if there isn't one
|
||||
const KPDFPage * kpdfPage = d->mouseSelectionWidget->page();
|
||||
if ( !kpdfPage->hasSearchPage() )
|
||||
d->document->requestTextPage( kpdfPage->number() );
|
||||
kdWarning() << d->mouseSelectionWidget->selectedText() << endl;
|
||||
// copy text into the clipboard
|
||||
QClipboard *cb = QApplication::clipboard();
|
||||
const QString & selection = d->mouseSelectionWidget->selectedText();
|
||||
cb->setText( selection, QClipboard::Clipboard );
|
||||
if ( cb->supportsSelection() )
|
||||
cb->setText( selection, QClipboard::Selection );
|
||||
// clear widget selection
|
||||
d->mouseSelectionWidget->clearSelection();
|
||||
d->mouseSelectionWidget = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue