[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: RFC: toPrinter flag in KoDocument::paintContent()?
From:       Simon Hausmann <shaus () helios ! Med ! Uni-Magdeburg ! DE>
Date:       2000-05-19 9:36:54
[Download RAW message or body]



On Fri, 19 May 2000, Werner Trobin wrote:

> Hi!
> 
> Nearly all applications implement a "paint" and a "print" method
> (or something similar). This is quite okay, as long as the app
> is not embedded, because we can define the "correct" behavior 
> (i.e. calling print() instead of paint()) in the app's main window
> via overriding slotPrint()...
> 
> However, if the app is embedded only paintContent() is called
> and due to that we "paint" to the printer. Normally this would
> be no problem, because QPainter handles this transparently.
> Now think of all the stuff which should be painted to the screen,
> but should not be printed (like cursors, KSpread's grid,...).

Hmm, I don't see any real difference between the embedded painting and
printing.

Cursors shouldn't be painted using paintContents() IMHO (and AFAIK kspread
doesn't, right?) .

But that's just my 0.02 cents :-), from a unfortunately-cannot-help-
hacking-koffice POV

Bye,
 Simon

> As there is no other (easy :) way to find out whether we are
> painted or printed, I suggest adding a "toPrinter" flag to
> paintContents() which defaults to false. When an application
> wants to print its document, it simply calls the paintContents
> method with the flag set to true.
> 
> What do you think? Do I miss something?
> 
> -- 
> Werner Trobin - wtrobin@mandrakesoft.com
> 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic