2005-07-15 18:20:57 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2004-05 by Enrico Ros <eros.kde@email.it> *
|
|
|
|
* Copyright (C) 2005 by Piotr Szymanski <niedakh@gmail.com> *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _KPDF_AREA_H_
|
|
|
|
#define _KPDF_AREA_H_
|
2006-03-20 23:14:05 +00:00
|
|
|
#include <qlist.h>
|
2005-07-15 18:20:57 +00:00
|
|
|
#include <qcolor.h>
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
#include <kdebug.h>
|
2005-07-15 18:20:57 +00:00
|
|
|
class QRect;
|
|
|
|
class KPDFLink;
|
|
|
|
|
2006-03-20 22:40:11 +00:00
|
|
|
class NormalizedShape;
|
|
|
|
|
2005-07-15 18:20:57 +00:00
|
|
|
/**
|
|
|
|
* @short A point in [0,1] coordinates (only used in annotations atm)
|
|
|
|
*/
|
|
|
|
class NormalizedPoint
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
double x, y;
|
|
|
|
|
|
|
|
NormalizedPoint();
|
|
|
|
NormalizedPoint( double dX, double dY );
|
|
|
|
NormalizedPoint( int ix, int iy, int xScale, int yScale );
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @short A rect in normalized [0,1] coordinates.
|
|
|
|
*/
|
|
|
|
class NormalizedRect
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
double left, top, right, bottom;
|
|
|
|
|
|
|
|
NormalizedRect();
|
|
|
|
NormalizedRect( double l, double t, double r, double b );
|
|
|
|
NormalizedRect( const QRect &r, double xScale, double yScale );
|
|
|
|
bool isNull() const;
|
|
|
|
bool contains( double x, double y ) const;
|
|
|
|
bool intersects( const NormalizedRect & normRect ) const;
|
|
|
|
bool intersects( double l, double t, double r, double b ) const;
|
|
|
|
bool intersects( const NormalizedRect * r ) const;
|
|
|
|
QRect geometry( int xScale, int yScale ) const;
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
NormalizedRect operator| (const NormalizedRect & r) const;
|
|
|
|
NormalizedRect& operator|= (const NormalizedRect & r);
|
2005-07-15 18:20:57 +00:00
|
|
|
};
|
|
|
|
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
// kdbgstream& operator << (kdbgstream &, const NormalizedRect &);
|
2005-07-15 18:20:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @short NormalizedRect that contains a reference to an object.
|
|
|
|
*
|
|
|
|
* These rects contains a pointer to a kpdf object (such as a link or something
|
|
|
|
* like that). The pointer is read and stored as 'void pointer' so cast is
|
|
|
|
* performed by accessors based on the value returned by objectType(). Objects
|
|
|
|
* are reparented to this class.
|
|
|
|
*
|
|
|
|
* Type / Class correspondency tab:
|
|
|
|
* - Link : class KPDFLink : description of a link
|
|
|
|
* - Image : class KPDFImage : description of an image (n/a)
|
|
|
|
*/
|
|
|
|
class ObjectRect : public NormalizedRect
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// definition of the types of storable objects
|
|
|
|
enum ObjectType { Link, Image };
|
|
|
|
|
|
|
|
// default constructor: initialize all parameters
|
|
|
|
ObjectRect( double l, double t, double r, double b, ObjectType typ, void * obj );
|
2005-08-30 13:24:29 +00:00
|
|
|
ObjectRect( NormalizedRect x, ObjectType type, void * pnt ) ;
|
2005-07-15 18:20:57 +00:00
|
|
|
~ObjectRect();
|
|
|
|
|
|
|
|
// query type and get a const pointer to the stored object
|
|
|
|
inline ObjectType objectType() const { return m_objectType; }
|
|
|
|
inline const void * pointer() const { return m_pointer; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
ObjectType m_objectType;
|
|
|
|
void * m_pointer;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal Storage: normalized colored highlight owned by id
|
|
|
|
*/
|
|
|
|
struct HighlightRect : public NormalizedRect
|
|
|
|
{
|
|
|
|
// searchID of the highlight owner
|
|
|
|
int s_id;
|
|
|
|
// color of the highlight
|
|
|
|
QColor color;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @short A regular area of NormalizedShape which normalizes a Shape
|
|
|
|
*
|
|
|
|
* Class NormalizedShape must have the following functions defined:
|
|
|
|
* contains (double, double)
|
|
|
|
* intersects(NormalizedShape)
|
|
|
|
* isNull()
|
|
|
|
* geometry(int,int)
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
* operator | and |= which unite two NormalizedShapes
|
2005-07-15 18:20:57 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
template <class NormalizedShape, class Shape> class RegularArea :
|
2006-03-21 20:00:24 +00:00
|
|
|
public QList<NormalizedShape>
|
- Page/Link: tooltips for links backported
- Page: rotation does not switch height and width
- Document/Part/Generator:
1. Add API for attaching stuff to the interface: ActionCollection and the Navigation Panel
also add possibility to merge an XML .rc file with menu layout. Relevant functions are:
QString Generator::getXMLFile(), returns a QString with your .rc file name.
void Generator::setupGUI (KActionCollection* , QToolbox* ), add your components to the user interface
2. Supporting backend settings:
If during startup, backends which provide a configuration ([X-KDE-oKularHasInternalSettings]
set to true) are found, a menu item: configure backends is created, clicking on it results in
loading all the generators that have settings, but not those that dont. the Generator::addPages(KConfigDialog *dlg)
function should be overloaded by a generator and dlg->addPage should be used to add pages.
If a user opens a file that needs an already loaded generator, the already loaded one is used instead of loading another.
3. Error/Warning/Notice sending support, to send a notice/error/warning, add a relevant notice/error/warning(QString& txt ,int duration)
to the generator class, and sending a message to the user is as simple as emitting a signal!
4. Intercepting of events generated by the PageView is done by Generator::handleEvent(QEvent*), subclass it, do a switch on QEvent::type(), handle your
event and return true if pageview is to proceed with its handling or false if not.
5. Support configuring the KPrinter on the generator side, use Generator::canConfigurePrinter(), return true there, and you get a nonconfigured KPrinter in your
Generator::print()
6. PixmapRequest handling update:
a.) Generator::canGeneratePixmap is now Generator::canGeneratePixmap(bool async)
b.) Document::sendGeneratorRequests is a slot now
c.) Old way of sending pixmaps (Document::requestPixmaps(QValueList<PixmapRequest*> checking if we can generate pixmap if not, waiting for receiving)
is replaced with: requestPixmaps only queues the pixmap all checking if w can generate is done in sendGeneratorReqest, the sendGeneratorRequest is
run in three places:
1. in requestPixmaps when we receive a request
2. in requestDone if pixmapStack is not empty
3. sendGeneratorRequest, apart from removing invalid requests, takes the current request and if generator canGeratePixmap(request->async)
it removes the pixmap from stack and sends to generator if not, QTimer::singleshots to itself after 20ms, it ends when stack has no valid pixmap request
7. Added a commented out zoom field to PixmapGenerator, mightcome in handy sometime
- TextPage: add instructions that handle simplyfing the RegularAreaRect, no more double painted borders in selection rectangles, this rocks.
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445196
2005-08-10 16:14:39 +00:00
|
|
|
{
|
2005-07-15 18:20:57 +00:00
|
|
|
public:
|
|
|
|
bool contains( double x, double y ) const;
|
2006-03-21 20:00:24 +00:00
|
|
|
bool contains( NormalizedShape ) const;
|
2005-07-15 18:20:57 +00:00
|
|
|
bool intersects (const RegularArea<NormalizedShape,Shape> * area) const;
|
2006-03-21 20:00:24 +00:00
|
|
|
bool intersects (const NormalizedShape shape) const;
|
2005-07-15 18:20:57 +00:00
|
|
|
void appendArea (const RegularArea<NormalizedShape,Shape> *area);
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
void simplify ();
|
2005-07-15 18:20:57 +00:00
|
|
|
bool isNull() const;
|
2006-03-20 23:14:05 +00:00
|
|
|
QList<Shape>* geometry( int xScale, int yScale, int dx=0,int dy=0 ) const;
|
2005-07-15 18:20:57 +00:00
|
|
|
};
|
|
|
|
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
template <class NormalizedShape, class Shape>
|
|
|
|
void RegularArea<NormalizedShape, Shape>::simplify()
|
|
|
|
{
|
|
|
|
int end=this->count(),i=0,x=0;
|
2006-03-21 20:00:24 +00:00
|
|
|
QList <NormalizedShape> m_remove;
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
for (;i<end;i++)
|
|
|
|
{
|
|
|
|
if ( i < (end-1) )
|
|
|
|
{
|
|
|
|
if ( (*this)[x]->intersects( (*this)[i+1] ) )
|
|
|
|
{
|
|
|
|
*((*this)[x]) |= *((*this)[i+1]);
|
|
|
|
m_remove.append( (*this)[i+1] );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
x=i+1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
while (!m_remove.isEmpty())
|
|
|
|
{
|
2006-03-31 21:51:45 +00:00
|
|
|
this->removeAll( m_remove.last() );
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
m_remove.pop_back();
|
|
|
|
}
|
2006-03-20 22:40:11 +00:00
|
|
|
kDebug() << "from " << end << " to " << this->count() << endl;
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
}
|
|
|
|
|
2005-07-15 18:20:57 +00:00
|
|
|
template <class NormalizedShape, class Shape>
|
|
|
|
bool RegularArea<NormalizedShape, Shape>::isNull() const
|
|
|
|
{
|
|
|
|
if (!this)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if (this->isEmpty())
|
|
|
|
return false;
|
|
|
|
|
2006-03-21 20:00:24 +00:00
|
|
|
foreach(const NormalizedShape ns, *this)
|
2006-03-20 23:14:05 +00:00
|
|
|
if (!(ns->isNull()))
|
2005-07-15 18:20:57 +00:00
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class NormalizedShape, class Shape>
|
2006-03-21 20:00:24 +00:00
|
|
|
bool RegularArea<NormalizedShape, Shape>::intersects (const NormalizedShape rect) const
|
2005-07-15 18:20:57 +00:00
|
|
|
{
|
|
|
|
if (!this)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if (this->isEmpty())
|
|
|
|
return false;
|
|
|
|
|
2006-03-21 20:00:24 +00:00
|
|
|
foreach(const NormalizedShape ns, *this)
|
2005-07-15 18:20:57 +00:00
|
|
|
{
|
2006-03-20 23:14:05 +00:00
|
|
|
if(!(ns->isNull()) && ns->intersects (rect))
|
2005-07-15 18:20:57 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class NormalizedShape, class Shape>
|
|
|
|
bool RegularArea<NormalizedShape, Shape>::intersects
|
|
|
|
(const RegularArea<NormalizedShape,Shape> *area) const
|
|
|
|
{
|
|
|
|
if (!this)
|
|
|
|
return false;
|
|
|
|
if (this->isEmpty())
|
|
|
|
return false;
|
|
|
|
|
2006-03-20 23:14:05 +00:00
|
|
|
foreach(const NormalizedShape ns, this)
|
2005-07-15 18:20:57 +00:00
|
|
|
{
|
2006-03-20 23:14:05 +00:00
|
|
|
foreach(const Shape s, area)
|
2005-07-15 18:20:57 +00:00
|
|
|
{
|
2006-03-20 23:14:05 +00:00
|
|
|
if(!(ns->isNull) && ns->intersects (s))
|
2005-07-15 18:20:57 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class NormalizedShape, class Shape>
|
|
|
|
void RegularArea<NormalizedShape, Shape>::appendArea
|
|
|
|
(const RegularArea<NormalizedShape, Shape> *area)
|
|
|
|
{
|
|
|
|
if (!this)
|
|
|
|
return false;
|
|
|
|
|
2006-03-20 23:14:05 +00:00
|
|
|
foreach(const Shape s, area)
|
2005-07-15 18:20:57 +00:00
|
|
|
{
|
2006-03-20 23:14:05 +00:00
|
|
|
this->append(s);
|
2005-07-15 18:20:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template <class NormalizedShape, class Shape>
|
|
|
|
bool RegularArea<NormalizedShape, Shape>::contains (double x, double y) const
|
|
|
|
{
|
|
|
|
if (!this)
|
|
|
|
return false;
|
|
|
|
if (this->isEmpty())
|
|
|
|
return false;
|
|
|
|
|
2006-03-20 23:14:05 +00:00
|
|
|
foreach(const NormalizedShape ns, this)
|
2005-07-15 18:20:57 +00:00
|
|
|
{
|
2006-03-20 23:14:05 +00:00
|
|
|
if(ns->contains (x,y))
|
2005-07-15 18:20:57 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
template <class NormalizedShape, class Shape>
|
2006-03-21 20:00:24 +00:00
|
|
|
bool RegularArea<NormalizedShape, Shape>::contains (NormalizedShape shape) const
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
{
|
|
|
|
if (!this)
|
|
|
|
return false;
|
|
|
|
if (this->isEmpty())
|
|
|
|
return false;
|
|
|
|
|
2006-03-20 23:14:05 +00:00
|
|
|
const QList<NormalizedShape*> * const lista=dynamic_cast<const QList<NormalizedShape*> * const >(this);
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
return lista->contains(shape);
|
|
|
|
}
|
|
|
|
|
2005-07-15 18:20:57 +00:00
|
|
|
template <class NormalizedShape, class Shape>
|
2006-03-20 23:14:05 +00:00
|
|
|
QList<Shape> *
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
RegularArea<NormalizedShape, Shape>::geometry( int xScale, int yScale, int dx, int dy ) const
|
2005-07-15 18:20:57 +00:00
|
|
|
{
|
|
|
|
if (!this)
|
|
|
|
return false;
|
|
|
|
if (this->isEmpty())
|
|
|
|
return 0;
|
|
|
|
|
2006-03-20 23:14:05 +00:00
|
|
|
QList<Shape>* ret=new QList<Shape>;
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
Shape t;
|
2006-03-23 19:02:55 +00:00
|
|
|
foreach(const NormalizedShape ns, *this)
|
2005-07-15 18:20:57 +00:00
|
|
|
{
|
2006-03-20 23:14:05 +00:00
|
|
|
t=ns->geometry(xScale,yScale);
|
2006-03-29 16:46:09 +00:00
|
|
|
t.translate(dx,dy);
|
- GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor
(like the ones acroread and kviewshell have) it doesnt intersect the
selection area with words under it, no, it does a lot more, including
work on cursors and searching for the text area closest to the given
cursor
- 2. rotation support, change the orientation of the documents if
you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender
instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended,
the kviewshell is only one state, while we support it in both
continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
it is an impressive bit right? but oKular cant be run by only one person,
join in on the fun! i can introduce you into the code just mail niedakh@gmail.com
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
|
|
|
ret->append(t);
|
2005-07-15 18:20:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2006-03-21 20:00:24 +00:00
|
|
|
typedef RegularArea<NormalizedRect*,QRect> RegularAreaRect;
|
2005-07-15 18:20:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HighlightAreaRect : public RegularAreaRect {
|
|
|
|
public:
|
|
|
|
HighlightAreaRect(RegularAreaRect *area);
|
|
|
|
// searchID of the highlight owner
|
|
|
|
int s_id;
|
|
|
|
// color of the highlight
|
|
|
|
QColor color;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|