Commit 44783a71 authored by Enrico Ros's avatar Enrico Ros
Browse files

Few bits changed just to test the branch. First commit on kpdf_experiments.

The branch has been created by Albert Astals Cid and Enrico Ros to try to
rearrange the code of kpdf.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=344552
parent f6db5c9d
......@@ -2,6 +2,23 @@ Here are some notes about the inner structure of kpdf for who wants to take
a look at the project.
*** About the 'kpdf_experiments' branch:
----
The kpdf_experiments branch has just been created. Architectural changes will
be described here.
Here are some misc thougths (cut&paste from a mail to Albert):
- I want to clean up some code. I think that some features are just not
implementable in present state. For example multiple pages per sheet or
continous scrolling.
- I think something can be faster if the structure gets cleaned (caching the
TextOuputDev pages when searching for example..) or using directly the
QOutputDevPixmap in cache since thay implement the search too (and you know
it well :-).
- The only feature I want to add is the one I was telling you before.
----
*** Rendering:
- The rendering is done by xpdf/splash. xpdf defines 'OutputDev' class that has
......@@ -51,7 +68,7 @@ document using the ThumbnailCreator class.
*** Last Revisions to this document:
2004-10-04 : 0.2 - Albert Astals Cid <tsdgeos@terra.es>
2004-09-04 : 0.2 - Albert Astals Cid <tsdgeos@terra.es>
- ThumbnailList creates the thumbnails itself
2004-10-04 : 0.1 - Enrico Ros <eros.kde@email.it>
2004-09-04 : 0.1 - Enrico Ros <eros.kde@email.it>
- just read the code and created this file
......@@ -24,8 +24,6 @@
class TextPage;
class QPainter;
//------------------------------------------------------------------------
// QOutputDev
//------------------------------------------------------------------------
......
......@@ -16,6 +16,7 @@
#include "QOutputDev.h"
class KPrinter;
class QPainter;
class QOutputDevKPrinter : public QOutputDev
{
......
......@@ -25,6 +25,8 @@
#include "kpdf_pagewidget.h"
#include "kpdf_pagewidget.moc"
#include "QOutputDevPixmap.h"
#include <qpushbutton.h>
#include <kiconloader.h>
namespace KPDF
{
......@@ -42,6 +44,10 @@ namespace KPDF
m_outputdev = new QOutputDevPixmap(paperColor);
setFocusPolicy( QWidget::StrongFocus );
viewport()->setFocusPolicy( QWidget::WheelFocus );
QPushButton * w = new QPushButton( viewport() );
w->setPixmap( SmallIcon("up") );
setCornerWidget( w );
}
PageWidget::~PageWidget()
{
......@@ -232,10 +238,16 @@ namespace KPDF
{
switch ( e->key() ) {
case Key_Up:
scrollUp();
if ( atTop() )
emit ReadUp();
else
scrollUp();
break;
case Key_Down:
scrollDown();
if ( atBottom() )
emit ReadDown();
else
scrollDown();
break;
case Key_Left:
scrollLeft();
......
......@@ -380,6 +380,7 @@ Part::openFile()
QFile file(m_file);
if (file.open(IO_ReadOnly) == false)
return false;
file.close();
GString* filename = new GString( QFile::encodeName( m_file ) );
m_doc = new PDFDoc(filename, 0, 0);
......
......@@ -130,6 +130,8 @@ Shell::setupActions()
m_popup = new KPopupMenu( this, "rmb popup" );
m_popup->insertTitle( i18n( "Full Screen Options" ) );
m_fullScreenAction->plug( m_popup );
m_popup->insertTitle( i18n( "Tools" ) );
m_showMenuBarAction->plug( m_popup );
}
void
......
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