Commit 5b60da8d authored by Enrico Ros's avatar Enrico Ros
Browse files

tiny update

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=354546
parent 30f13583
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment