Commit graph

54 commits

Author SHA1 Message Date
Pino Toscano fb825ff1d4 add a form widget controller to prepare the pageview to possible changes when the content in a form widget changes
svn path=/trunk/KDE/kdegraphics/okular/; revision=726788
2007-10-18 22:09:49 +00:00
Pino Toscano 746074cfcb Make use of the Esc key in the content area:
- when the document is auto-scrolling, stop the scrolling
- when building an annotation, stop its construction

svn path=/trunk/KDE/kdegraphics/okular/; revision=716000
2007-09-23 17:45:36 +00:00
Pino Toscano 7eb8659d4f Add a tool button in the toolbar with the "select" actions.
Preparing a bit for separating rectangular text selection and rectangular image selection.

svn path=/trunk/KDE/kdegraphics/okular/; revision=712381
2007-09-14 10:02:33 +00:00
Pino Toscano b56ad8c3ae Change the DocumentObserver::notifySetup() to allow a better tuning of the different setup options (different layout for the pages, or different document).
svn path=/trunk/KDE/kdegraphics/okular/; revision=710227
2007-09-09 10:50:36 +00:00
Pino Toscano 969bc7b908 Ctrl+A to select all the text in the document.
Implements KPDF bug #109346.

svn path=/trunk/KDE/kdegraphics/okular/; revision=708124
2007-09-03 21:35:05 +00:00
Pino Toscano f2ef436a56 when in embedded mode, create only the base actions for the view (zoom combo/in/out)
svn path=/trunk/KDE/kdegraphics/okular/; revision=687811
2007-07-14 12:31:26 +00:00
Pino Toscano 8a31e6f3f0 Allow the user to change the visible part(s) of the document by dragging the visible areas in the thumbnails, and to change the zoom of the document by Ctrl+wheel on them.
Patch by Diego R. Brogna, thanks a lot!

BUG: 135521

svn path=/trunk/KDE/kdegraphics/okular/; revision=685273
2007-07-08 14:25:08 +00:00
Pino Toscano faeaa3ec01 Sharing the same option for the accessibility render mode and for the view mode is not a good idea, really.
So, create a new ViewMode setting for the single/facing/columns view mode (leaving the RenderMode for compatibility with KPDF).
Rename [Rr]enderMode into [Vv]iewMode in the page view, following the new name of the setting.
Remove the "padding" enums from the settings, as it seems they have no real use beside giving issues.

svn path=/trunk/KDE/kdegraphics/okular/; revision=665773
2007-05-17 20:46:16 +00:00
Pino Toscano 1eb435cddb remove the kdebug.h inclusion in area.h
svn path=/trunk/KDE/kdegraphics/okular/; revision=661410
2007-05-05 13:50:44 +00:00
Pino Toscano 7cfa67ecf4 improve a bit the Document::setPageSize API -- better pass the size, and not an index
svn path=/trunk/KDE/kdegraphics/okular/; revision=660208
2007-05-01 23:21:29 +00:00
Christian Ehrlicher c5c2da7c89 fix win32 compilation
warnings--

svn path=/trunk/playground/graphics/okular/; revision=643874
2007-03-18 17:14:36 +00:00
Pino Toscano f55c401b20 Refactor the document search interfaces, as discussed on the mailing list.
Merge the search in normal mode and the type-ahead in a search bar that appears on the bottom of the page view. This should work nicely.
In presentation mode, add a small floating search toolbar that takes care of searching during the presentation mode, on document request. This is not working yet, but basically most of the work is done.

Please test and report any problems you find.

CCMAIL: okular-devel@kde.org

svn path=/trunk/playground/graphics/okular/; revision=643607
2007-03-17 22:58:41 +00:00
Pino Toscano db8a10dc2c Preliminary supports for text and choice form fields.
This includes:
- the interfaces for the generators
- the basic widgets for editing their value
- a top bar for show/hide the forms of a document
- the implementation of the forms for the PDF backend
still nothing that can be done with them, nor the value of the forms can be saved...
... but it's a start! :-)

svn path=/trunk/playground/graphics/okular/; revision=637001
2007-02-25 00:07:59 +00:00
Pino Toscano 1041866493 Improve the Orientation menu, as suggested by our usability export Florian:
instead of choosing the orientation degrees (eg 0, 90, etc), use two Rotate Left/Right actions to rotate the whole document 90 degrees resp. on the left or on the right.
Also add an 'Original orientation' action to restore to the orientation of the document.

svn path=/trunk/playground/graphics/okular/; revision=625297
2007-01-19 21:43:53 +00:00
Tobias Koenig 777877f2d2 Refactor the RMB menu for annotations, so we can use the menu for
the PageView and the SideReview.

BUGS: 137722

svn path=/trunk/playground/graphics/okular/; revision=617807
2006-12-30 12:40:54 +00:00
Pino Toscano 5ce4b0674e Make okular able to copy the text selection to the clipboard (finally!).
svn path=/trunk/playground/graphics/okular/; revision=607496
2006-11-24 21:02:38 +00:00
Albert Astals Cid ee046a1ad6 fordward port Revision 606296
********
 Fix "No scrolling when selection reaches border"

svn path=/trunk/playground/graphics/okular/; revision=607042
2006-11-22 21:32:21 +00:00
Albert Astals Cid ac1c0b75bc const_iterator is your friend :-)
svn path=/trunk/playground/graphics/okular/; revision=606558
2006-11-20 20:10:42 +00:00
Pino Toscano 45fe1103c4 SVN_SILENT const
svn path=/trunk/playground/graphics/okular/; revision=606150
2006-11-19 13:50:41 +00:00
Pino Toscano 6ac2174811 move the configuration update procedures of the page view into the page view itself
make the pageview update when changing the number of columns in overview mode

svn path=/trunk/playground/graphics/okular/; revision=599878
2006-10-28 22:58:05 +00:00
Pino Toscano 339bfc6907 Create a new AnnotationEngine to select some text from the current page, and make it able to distill Highlight annotations. Now you can hightlight th text in your document, wooo :)
svn path=/trunk/playground/graphics/okular/; revision=598201
2006-10-22 20:53:56 +00:00
Pino Toscano ef1fb7e8d5 const
svn path=/trunk/playground/graphics/okular/; revision=596146
2006-10-16 19:47:20 +00:00
Albert Astals Cid e6dae78ac3 Port Q3ScrollView to QScrollArea, probably still has some small issues but seems to work quite well
svn path=/trunk/playground/graphics/okular/; revision=593332
2006-10-07 14:40:32 +00:00
Pino Toscano 858a6bf783 factor out the text selections ruotines, so they can be used also from other places
svn path=/trunk/playground/graphics/okular/; revision=592041
2006-10-03 17:13:42 +00:00
Pino Toscano 853d6c70a7 Give a tooltip in the page view for every kind of lnk we support.
Also improve a bit the one in the presentation mode, and give a message when the link is a "go to the page x" link.
Implements KPDF wish #131361.

svn path=/trunk/playground/graphics/okular/; revision=588899
2006-09-27 10:28:03 +00:00
Pino Toscano 42310e184c Restructuring a bit how the text-editor-like selection works:
* putting it in an own view mode
* associating the selection to every page
* using a better algorithm to calculate the selection, even in a page range
* moving its drawing from the page view to the page painter, so it's possibile to draw it just like it's done with eg annotations

Other changes (more or less related):
* moved the annotation popup to a better place, so it won't interfere with annotation drawing
* commented some debug code in TextPage

svn path=/trunk/playground/graphics/okular/; revision=588795
2006-09-26 22:22:01 +00:00
Tobias Koenig df7d144c10 Moved all classes in core/ into the 'Okular' namespace and removed
nearly all references to kpdf (knewstuff still missing).

svn path=/trunk/playground/graphics/okular/; revision=586993
2006-09-21 08:45:36 +00:00
Pino Toscano 9bbabc1f64 Forward port to okular of KPDF commit 586747:
Make okular a bit more friendly for users of RtL languages:
- correctly place the message pane (top-left corner of page view for LtR, top-right for RtL)
- make the mini-progressbar fully usable for both the writing directions
(the icons of the previous/next page buttons were already fixed by me)

svn path=/trunk/playground/graphics/okular/; revision=586751
2006-09-20 13:58:28 +00:00
Albert Astals Cid 5ce0f2a634 branchport r573007
svn path=/trunk/playground/graphics/okular/; revision=573009
2006-08-14 15:03:12 +00:00
Chu Xiaodong 3f81e3788f Free TextAnnotation,pop-up window and annotation properties dialog added.
svn path=/trunk/playground/graphics/okular/; revision=571124
2006-08-08 15:31:13 +00:00
Pino Toscano 60eab90248 small API changes to Generator:
- more const'ness in signals
- no need to redeclare the signals in the generators, as they are already in Generator

svn path=/branches/work/kde4/playground/graphics/okular/; revision=549941
2006-06-10 12:59:09 +00:00
Albert Astals Cid db09e1aabe some more things compile, commiting so Pino has lastest
svn path=/branches/work/kde4/playground/graphics/okular/; revision=522242
2006-03-24 20:40:02 +00:00
Albert Astals Cid ec923ec701 compile some more files
svn path=/branches/work/kde4/playground/graphics/okular/; revision=521912
2006-03-23 20:43:38 +00:00
Piotr Szymanski 4387e1489e - 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
Piotr Szymanski 34b8e28322 - 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
Enrico Ros 51b07b3169 merged patch_053,062 (tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428592
2005-06-24 16:43:19 +00:00
Enrico Ros 37abd55198 CVS_SILENT more naming changes
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=402436
2005-04-01 16:24:11 +00:00
Albert Astals Cid 99a10e1841 All fixes done in HEAD come to annotations branch
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=395067
2005-03-05 15:59:15 +00:00
Enrico Ros c6191c4836 Annotations -Part2- PDF1.6 DSs are summarized and ready4impl in ann*.h
Annotation: the class has been passivized. It's only a data container now,
  no more active manipulation of events/paints.
PageViewAnnotator: this class has been created to handle creating annots.
  PageView creates its 'Annotator on demand. The annotator parses tool
  definition from the 'tool.xml' file.
  The Annotator internally uses AnnotatorEngine(s) to react to mouse events
  and the annotation is created when the job is really finished.
Page: added a (maybe temporary) NormalizedPoint to complement Norm..Rect.
PageViewUtils: removed PageViewEditTools and cleaned up header.
conf/: added a debug option for showing annotation boundary while creating
  one and added a temporary 'debug' toolbox in the config dialogs.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=394959
2005-03-04 23:06:24 +00:00
Enrico Ros fbc7d45083 Adding support for annotations in framework. Only need to add and
implement annotations now (and create the save/load procedure).

Annotations: converging to a stable Annotation definition. Changed a bit
  the paint functions. Added a first 'template' annotation, a simple
  pen-like segments recorder for framework testing purposes only. This
  has events filters in place and the rough paint function implemented.

PageView: removed the MouseEdit mode and using that button for toggling
  the editToolBox instead. Added Annotation support. When the Annotation
  is created, all pageView events flow through that new object. Repaint
  of damaged/old areas is done internally and is based on the geometry
  of the annotation we're creating. When an Annotation is complete, it
  is reparented to the Page that adds it to its internal list.
  From that point on the annotation will be rendered by pagePainter
  using the pixmap-based paint function provided by the annotation
  itself.

PagePainter: draws annotations stored in pages when rendering (using the
  'rought paint function' till the good pixmap based one will be in
  place.

Page: added preliminary support for adding Annotation(s) to the page
  and deleting them all.

Document: added the pass-through call to add an Annotation to the Page
  and notify observers.

PageViewToolbox: can be draged and attached to any side. Position is
  remembered between runs (choose your side and that the toolbox will
  always be there). Available on Right and Bottom sides too. Emits -1
  when the current tool is deselected.

Misc: added Annotations to both the 'observers changed flags' and the
  'pagepainter' ones and updated ui classes accordingly.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=390638
2005-02-18 18:24:45 +00:00
Enrico Ros 451a3091cc Opening kdpf_annotations branch. Code changes:
User Interface: added a toolbox for selecting an annotation tool without
   polluting the toolbar (pageviewtoolbox animated widget). Icons of that
   toolbar are gimped version of ones in nuvola icontheme.
 Core: added annotation class. this will support all features (except for
   silly ones (really there are some!)) from pdf 1.6 specs but abstracted
   in the kdpf way. (api changes in progress...)

About annotations: only some incomplete interfaces are in plasefor now.
Every type of pdf annotations has tens of parameters. I think we'll render
correctly everything but provide only simple and useful tools for making
annotations over the pages, otherwise a 'Qt designer like' property view
will be required to do fine adjustment over the crappy thousands of
settings. (and we're aiming at a quick and simple viewer with lots of
coolness, not chaos).

Note: the code has been wrongly committed to HEAD before,but soon reverted.
Have fun!

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=388768
2005-02-12 17:42:54 +00:00
Enrico Ros f4b94c016d SEARCH CHANGES: absolutely want to get in those fixes before freeze.
fixed multiple selections on page bugs.
next commits will come tomorrow.

svn path=/trunk/kdegraphics/kpdf/; revision=385045
2005-02-01 18:26:56 +00:00
Enrico Ros 3e1834c261 smoothscroll
svn path=/trunk/kdegraphics/kpdf/; revision=385041
2005-02-01 18:24:16 +00:00
Enrico Ros d1e074058b cleanups and scroll api
svn path=/trunk/kdegraphics/kpdf/; revision=385040
2005-02-01 18:23:55 +00:00
Enrico Ros c4c09c7c04 Added KTTSD support (only for selections). This is done via pure dcop and
without including any 3.4 header (like kspeech.h) to keep compatibility
 with 3.3 and older releases (reported to work on these).
Cleanups in PageView's mouse handling. Supports selections of different
 colors now.

svn path=/trunk/kdegraphics/kpdf/; revision=383651
2005-01-29 12:32:59 +00:00
Enrico Ros f644f4e8c4 Switch to seleciton mode when pressing RMB while in normal (drag) mode.
svn path=/trunk/kdegraphics/kpdf/; revision=383326
2005-01-28 17:21:28 +00:00
Enrico Ros e65c7058c3 Added the MiniBar class, a layouted widget that displays current page
number, the total number of pages and a little grahical 'progress'
 indicator. Moved 'next page' and 'prev page' buttons from the main toolbar
 to the MiniBar. Minibar lets you edit the page number, click or wheel on
 progress, go to next/prev page, show the gotoPage dialog.
Added rmb popup when clicking on thumbnails. When clicking, the
 ThumbnailList only emits the same signal emitted by PageView so the same
 context menu is displayed.
Misc fixes: [MEM] enabled allocated pages raising in queue when displayed
 again, [ThumbnailList] enabled PageUp/PageDown.

svn path=/trunk/kdegraphics/kpdf/; revision=382597
2005-01-26 10:42:07 +00:00
Jakub Stachowski cc5f8bb689 Findahead - as in khtml.
svn path=/trunk/kdegraphics/kpdf/; revision=378583
2005-01-14 23:19:04 +00:00
Enrico Ros 3bf154b57d Viewport: fixes, setViewport( vp, id ) excludes id from the notified
bodies. Optimized fit width and a saved a couple of pixmap requests. Busy
cursor on load and searches.

svn path=/trunk/kdegraphics/kpdf/; revision=377152
2005-01-10 13:43:44 +00:00
Enrico Ros 6dd95c9e06 Viewport MOD 1. Implemented the DocumentViewport class, owned by Document.
A const reference may be asked. When set all DocumentObservers will be
notified so they can update their gfx if needed. Converted TOC, Links
to the new usage. DocumentViewport can be saved/restored to/from QString
so it can be asked as metadata and saved on document's XML. When loading
a document the viewport is restored exactly where it was when the document
was closed. More fixes with Viewport class. Swapped groupboxes in Perform
dialog. Changed members naming in DocumentObservers and inherited classes.
PageView and ThumbnailsList now linked.

Still regressions / TODOs about the Viewport thing.

svn path=/trunk/kdegraphics/kpdf/; revision=377066
2005-01-09 23:37:07 +00:00