Commit f81a49fa authored by Jiri Baum's avatar Jiri Baum Committed by Albert Astals Cid

table selection tool

BUGS: 279859
REVIEW: 102358
FIXED-IN: 4.8.0
parent 9d6926f9
......@@ -2,3 +2,4 @@ Albert Astals Cid <tsdgeos@yahoo.es>
Enrico Ros <eros.kde@email.it>
Wilco Greven <greven@kde.org>
Christophe Devriese <oelewapperke@ulyssis.org>
Jiri Baum - NICTA <jiri@baum.com.au>
......@@ -27,7 +27,8 @@ inline KAboutData okularAboutData( const char* name, const char* iname )
"(C) 2004-2005 Enrico Ros\n"
"(C) 2005 Piotr Szymanski\n"
"(C) 2004-2009 Albert Astals Cid\n"
"(C) 2006-2009 Pino Toscano"),
"(C) 2006-2009 Pino Toscano\n"
"(C) 2011 Jiri Baum - NICTA"),
KLocalizedString(),
"http://okular.kde.org"
);
......@@ -37,6 +38,7 @@ inline KAboutData okularAboutData( const char* name, const char* iname )
about.addAuthor(ki18n("Albert Astals Cid"), ki18n("Current maintainer"), "aacid@kde.org");
about.addAuthor(ki18n("Piotr Szymanski"), ki18n("Created Okular from KPDF codebase"), "djurban@pld-dc.org");
about.addAuthor(ki18n("Enrico Ros"), ki18n("KPDF developer"), "eros.kde@email.it");
about.addAuthor(ki18n("Jiri Baum - NICTA"), ki18n("Table selection tool"), "jiri@baum.com.au");
about.addCredit(ki18n("Eugene Trounev"), ki18n("Annotations artwork"), "eugene.trounev@gmail.com");
return about;
......
......@@ -590,11 +590,10 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
reload->setShortcut( KStandardShortcut::reload() );
m_reload = reload;
KAction *closeFindBar = new KAction( i18n( "Close &Find Bar" ), ac );
ac->addAction("close_find_bar", closeFindBar);
connect(closeFindBar, SIGNAL(triggered()), this, SLOT(slotHideFindBar()));
closeFindBar->setShortcut( QKeySequence( Qt::Key_Escape ) );
widget()->addAction(closeFindBar);
m_closeFindBar = new KAction( i18n( "Close &Find Bar" ), ac );
ac->addAction("close_find_bar", m_closeFindBar);
connect(m_closeFindBar, SIGNAL(triggered()), this, SLOT(slotHideFindBar()));
widget()->addAction(m_closeFindBar);
KToggleAction *blackscreenAction = new KToggleAction( i18n( "Switch Blackscreen Mode" ), ac );
ac->addAction( "switch_blackscreen_mode", blackscreenAction );
......@@ -1408,6 +1407,7 @@ void Part::slotShowFindBar()
{
m_findBar->show();
m_findBar->focusAndSetCursor();
m_closeFindBar->setShortcut( QKeySequence( Qt::Key_Escape ) );
}
void Part::slotHideFindBar()
......@@ -1415,6 +1415,7 @@ void Part::slotHideFindBar()
if ( m_findBar->maybeHide() )
{
m_pageView->setFocus();
m_closeFindBar->setShortcut( QKeySequence( /* None */ ) );
}
}
......
......@@ -257,6 +257,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
KAction *m_aboutBackend;
KAction *m_reload;
QMenu *m_exportAsMenu;
KAction *m_closeFindBar;
bool m_actionsSearched;
BrowserExtension *m_bExtension;
......
......@@ -68,6 +68,7 @@
<Action name="mouse_zoom"/>
<Action name="mouse_select"/>
<Action name="mouse_textselect"/>
<Action name="mouse_tableselect"/>
<Separator/>
<Action name="mouse_toggle_annotate"/>
<Separator/>
......
This diff is collapsed.
......@@ -26,6 +26,7 @@
#include "core/area.h"
#include "core/observer.h"
#include "core/view.h"
#include "core/textpage.h"
class KAction;
class KActionCollection;
......@@ -58,7 +59,7 @@ Q_OBJECT
// Zoom mode ( last 4 are internally used only! )
enum ZoomMode { ZoomFixed = 0, ZoomFitWidth = 1, ZoomFitPage = 2, ZoomFitText,
ZoomIn, ZoomOut, ZoomRefreshCurrent };
enum MouseMode { MouseNormal, MouseZoom, MouseSelect, MouseImageSelect, MouseTextSelect };
enum MouseMode { MouseNormal, MouseZoom, MouseSelect, MouseImageSelect, MouseTextSelect, MouseTableSelect };
// create actions that interact with this widget
void setupBaseActions( KActionCollection * collection );
......@@ -156,10 +157,13 @@ Q_OBJECT
void updateItemSize( PageViewItem * item, int columnWidth, int rowHeight );
// return the widget placed on a certain point or 0 if clicking on empty space
PageViewItem * pickItemOnPoint( int x, int y );
// extract text from a rectangular region
const QString rectExtractText(const QRect &selectionRect, const Okular::TextPage::TextAreaInclusionBehaviour b);
// start / modify / clear selection rectangle
void selectionStart( const QPoint & pos, const QColor & color, bool aboveAll = false );
void selectionEndPoint( const QPoint & pos );
void selectionClear();
void drawTableDividers(QPainter * screenPainter);
// update internal zoom values and end in a slotRelayoutPages();
void updateZoom( ZoomMode newZm );
// update the text on the label using global zoom value or current page's one
......@@ -216,6 +220,7 @@ Q_OBJECT
void slotSetMouseZoom();
void slotSetMouseSelect();
void slotSetMouseTextSelect();
void slotSetMouseTableSelect();
void slotToggleAnnotator( bool );
void slotScrollUp();
void slotScrollDown();
......
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