Commit graph

450 commits

Author SHA1 Message Date
Enrico Ros 4502706beb Better policies for memory management. Auto memory clean when a document is
opened. More stuff for getting async generator to work. Leakfix.

Note: memory management coolness Vol.1 : now kpdf has memory profiles that
allow using up to xx% of the total memory and clip maximum usable memory to
a half of the free one. Example: an istance of kpdf is using all the
memory (as regular cache). You open some memory hungry app or another kpdf
and you'll see the first istance dropping cached pages (freeing memory!)
to leave room for the other app! It's dynamic, fast, avoids swap and
something cool from my programmer's viewpoint.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373123
2004-12-24 10:24:10 +00:00
Albert Astals Cid 41d4933460 Remove possible trigraph as per Scott Wheeler suggestion
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372828
2004-12-22 20:43:48 +00:00
Albert Astals Cid 174650af34 fix xpdf buffer overflow
By Dirk Mueller

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372821
2004-12-22 20:21:56 +00:00
Enrico Ros 16908b2f0c Changed pixmap requesting methods. Now each request is packed into a
PixmapRequest class. When requesting pixmaps, one or multiple requests are
sent to the Document that (frees memory as in current policy) and send each
PixmapRequest to the current Generator. Added a signal in generators to
notify the Document when a pixmap generation has finished.

PageView, ThumbnailsList, PreviewWidget have been unbroken after the memory
management commit. (mem management seems in pretty good shape..it's smart.)
Added 'visible widgets' list to those classes to speed up searching and
processing on visible widgets only.

Note: asyncronous pixmap requests can now be queued and we're getting very
close to the threaded generator.

Note2: Leakfixes and memory improvements.

Final NOTE: head merging is possible now, as all remaining work can be
considered bugfixes.. API is getting final. It will only change in xpdf
dep stuff, the already undefined Viewport object and some bits in
Generators.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372787
2004-12-22 18:21:36 +00:00
Albert Astals Cid c9dc4c5bc9 Commit the current changes of "authorship"
Enrico feel free to add your description on the main.cpp file and/or change your mail addreesses

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372585
2004-12-21 20:14:27 +00:00
Aaron J. Seigo 6511b29275 don't search after every single key press as that tends to freeze the gui
up nice and solid when viewing large PDFs, even on fast machines. instead
search after the user has paused typing

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372580
2004-12-21 19:58:51 +00:00
Enrico Ros 05924776fa The long awaited (by me) memory manager is in place. It unloads pixmaps
not on screen starting from the oldest generated one. Rules (aka memory
profiles) are simple by now, but they work as expected.
Plus: added functions for getting Linux total memory and free memory by
querying the /proc filesystem. Generator creation by mimetype. -Fixes.
BROKEN: thumbnail, presentation (need to reimpl a virtual method)
TODO1: notify generators when cancelling jobs.
TODO2: add forward caching.
TODO3: rationalize code, clean it up and update README.png
TODO4: periodically check for free memory and unload pixmaps if needed.
TODO5: wisely choose default values for memory profiles.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372514
2004-12-21 12:38:52 +00:00
Enrico Ros 70ea81ca15 Added full screen 'Presentation' support. Only Replace and Dissolve pdf
effects are implemented for now. TODO: detect Transitions from the PDF
(maybe xpdf don't tell us).
Adding this (another DocumentObserver) is helping me to better focus the
'memory manager' concept. But still there are some clouds..

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=371429
2004-12-17 17:14:46 +00:00
Enrico Ros 58797ffe73 bits
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=371428
2004-12-17 17:10:47 +00:00
Enrico Ros eed32c7654 FixPack 1: Small fix all over the code. Searwidget rewrite: looks good,
feels better. Updated TODO with interesting things.
Note: I feel performance loss. Need to check carefully all zoom functions,
relayouts and wasted paints. I'll love to do that after merging to HEAD.
Note to all: HEAD merge only after API will be final (the only 2 variables
are MemManager, ThreadedGen and maybe a DocumentDom (if I can make it next
weekend, but I think not)).

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370404
2004-12-13 18:21:37 +00:00
Enrico Ros dea9cfdf8d Tidy up the structure.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370401
2004-12-13 18:15:39 +00:00
Albert Astals Cid 6de9874082 Update zoom text
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370270
2004-12-13 00:28:52 +00:00
Albert Astals Cid 1df24e0951 fullscreenmode lovin'
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370269
2004-12-13 00:27:09 +00:00
Albert Astals Cid f46c9176e4 When in non continous mode and scrolling up a page, set the viewport at the bottom of the page (Albert)
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370246
2004-12-12 22:57:54 +00:00
Enrico Ros f7406846d0 Added a wish by Pino Toscano and many other for sure: bookmarks.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370140
2004-12-12 17:10:59 +00:00
Enrico Ros 001c5b03d4 ++items; Adding a little feature+cleanup.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370059
2004-12-12 11:21:59 +00:00
Enrico Ros 62da55011c Changed max slider width. Not sure about the default (1st time) one. Will
check later.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370057
2004-12-12 11:13:15 +00:00
Enrico Ros 8aaec0dd08 TOC displays the Synopsis DomTree and reacts on clicks. Viewport changes
moved to #1 in TODO list. Let's hope next items won't start from #2..

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370056
2004-12-12 11:11:57 +00:00
Enrico Ros 246d0b5e78 Cosmetic fix :-) after a day of non-gui changes that broke up many things I
had to do a candy-little-commit.. just to relax.. ^_^

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369972
2004-12-11 21:54:00 +00:00
Enrico Ros 0c5cd4e01a Fixed a GeneratorPDF <-> KPDFOutputDev bug.
Abstracted xpdf's Outline to a Dom Tree. Fixed MERGE tags through the code.
Added comments (documentation) to KPDFDocument class and other classes in
document.h. Changed a little Generator interface.
Moved code from toc.h/.cpp to GeneratorPDF and shrinked a lot.

TODO (now): Convert TOC (widget) to use the Dom tree as data source.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369914
2004-12-11 17:25:03 +00:00
Enrico Ros 8724403042 Merge ASAP. Only left a couple of items as merge blockers and moved other
stuff to the fix-after-merge list.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369799
2004-12-11 08:51:55 +00:00
Albert Astals Cid b7588b4b33 Show the window maximized when the user opens the program for the very first time
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369730
2004-12-10 22:27:55 +00:00
Enrico Ros 3ff4415c92 Modified to insert the new DocumentInfo class into the game.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369655
2004-12-10 16:12:55 +00:00
Enrico Ros 5f4236d801 Abstracted Generator and ported xpdf dependant code (most of) to the
GeneratorPDF class. Adapted the whole KPDFLink class to a hieracy of
classes and added a Viewport description associated to 'Goto' links.

Link hasn't got geometry properties. A PageRect class has born to describe
all 'active rects' on a page (hand pointed on mouse over). PageRect can
contain many type of objects such as Links or other active items (images,
...). The Page class now stores PageRects only (no more geometric Links,
as already said).

Added a DocumentInfo class filled in by generators and used by the
PropertiesDialog.

Outline hasn't been abstracted while now, but a DocumentSynopsis class
is in place and work needs to be done to make GeneratorPDF fill in a
DocumentSynopsis instance and pass it to the Toc widget.

Note1: Document has nothing more to do with xpdf, it only commands its
generator.
Note2: 2 remaining classes to be abstracted: Outline, TextPage. But
waning..

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369651
2004-12-10 16:04:45 +00:00
Enrico Ros 18e7d798c8 A quick picture made with kolourpaint to explain internal hieracy of kpdf,
from the gui to the intrnals.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369614
2004-12-10 12:35:54 +00:00
Albert Astals Cid 0bbd77931f fixuifiles
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368770
2004-12-05 22:49:17 +00:00
Albert Astals Cid d2fab9ae82 PDF properties dialog
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368769
2004-12-05 22:47:32 +00:00
Albert Astals Cid 57b31da376 %1 -> %n, at least is what i was getting at the shell
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368763
2004-12-05 22:34:15 +00:00
Albert Astals Cid b9dbc95cbf Add another possible font path, used by Gentoo Linux
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368646
2004-12-05 13:22:06 +00:00
Albert Astals Cid 3b38216405 fixuifiles
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368550
2004-12-05 00:12:31 +00:00
Albert Astals Cid ba20068539 Support for show/hide menubar in rmb menu, different from HEAD so that supports Konqueror too
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368536
2004-12-04 23:23:18 +00:00
Enrico Ros adaa58f11a sync
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368321
2004-12-04 10:59:52 +00:00
Albert Astals Cid a461a21ba7 Add watch file option.
Enrico, i've added it in the menu, do you prefer it to be in the configuration dialog?
CCMAIL: rosenric@dei.unipd.it

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=367732
2004-12-01 22:18:27 +00:00
Aaron J. Seigo e7b59fbb92 fix the plurality, both for english and for translation.
i wonder if it shouldn't reference the document title in this popup too?

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=367453
2004-11-30 20:03:45 +00:00
Albert Astals Cid ebb4ef01e9 Bring that ifdef back to if, use the same configure.in.in from HEAD that makes that possible
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=366736
2004-11-27 20:36:55 +00:00
Albert Astals Cid 8b1366243c Don't cache not translate xpdf error messages, only show them using kdDebug
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=366462
2004-11-26 17:58:19 +00:00
Enrico Ros f79f118854 pending bits
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=366362
2004-11-26 11:34:16 +00:00
Enrico Ros a442e3fe3e more ideas
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=366361
2004-11-26 11:33:47 +00:00
Albert Astals Cid 10c4c7d5f9 Allow editing of both toolbars, part and shell
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=366245
2004-11-25 22:27:01 +00:00
Scott Wheeler e8b2647466 Remove trigraphs, switch to #ifdef where a #if was mistakenly used.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=366204
2004-11-25 19:43:04 +00:00
Scott Wheeler f956c09d42 remove trigraph, don't use round() (it's C99)
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=366203
2004-11-25 19:42:04 +00:00
André Wöbbeking e40e78672e no QObject no moc
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=363953
2004-11-18 13:26:19 +00:00
Albert Astals Cid 5dc270cead Marco martin mail address
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=363767
2004-11-17 19:56:25 +00:00
Albert Astals Cid 326a111b38 Credit the icon artist
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=363533
2004-11-16 22:07:42 +00:00
Albert Astals Cid 313715c0aa New icons :-)
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=363531
2004-11-16 21:58:05 +00:00
nobody ebcada034c This commit was manufactured by cvs2svn to create branch
'kpdf_experiments'.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=363529
2004-11-16 21:49:35 +00:00
Albert Astals Cid 3f8031bb7f New icons!!! rejoice :-)
svn path=/trunk/kdegraphics/kpdf/; revision=363528
2004-11-16 21:49:35 +00:00
Enrico Ros 6a175f7669 Merged Selection tools: a popup asks wether to save/copy text or gfx.
Added 'continous zooming' using mid mouse button. Clipped selections to
viewport. Fixed a bad rounded float-to-int conversion (gives more pixel
precision in zooming).
CCMAIL: burellil@dei.unipd.it

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=363468
2004-11-16 17:36:02 +00:00
Enrico Ros f962069ac3 Small mods. Thanks to Hasso Tepper for fixing typo.
Added a disabled field for setting number of columns. Having dozens of
pages displayed on screen looks somewhat cool!

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=363465
2004-11-16 17:30:44 +00:00
Hasso Tepper 118a096a1b Typo.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=363444
2004-11-16 15:22:09 +00:00