KPrinter::setOrientation disables the orientation group in the setupdlg

Goffioul Michael goffioul at imec.be
Mon Jul 25 10:21:31 BST 2005


> Hi guys,
> In KOrganizer we have several different print styles, each 
> with a different 
> default orientation. E.g. the time table week view should by 
> default printed 
> in landscape, while the filofax week view should by default 
> be printed in 
> portrait, etc. So depending on the chosen print style, a 
> different default 
> orientation needs to be set for the printer.
> 
> Now, I use mPrinter->setOrientation(..) to set this default 
> orientation, and 
> then call the mPrinter->setup dialog. Although I have set the 
> orientation to 
> a default, I also want the user to be able to change this in 
> the "Properties" 
> dlg of the printer. However, it seems that as soon as I use 
> setOrientation, 
> the Orientation group in the printer properties dialog will 
> be disabled. 
> 
> Is there any way around this problem (i.e. set a default 
> orientation depending 
> on the print tyle, but let the user later on still change it)?

No. This behavior has been designed that way in cooperation with the
koffice developers. The idea was to keep a single location where the
orientation is set and to avoid mismatch between application-level
orientation and kdeprint-level orientation. This could be changed, but
it requires some coding.

Michael.




More information about the kde-core-devel mailing list