KPrinter::setOrientation disables the orientation group in the setupdlg

Reinhold Kainhofer reinhold at
Mon Jul 25 13:55:09 BST 2005

Goffioul Michael wrote:
>> Is there any way around this problem (i.e. set a default
>> orientation depending
>> on the print style, but let the user later on still change it)?
> No. This behavior has been designed that way in cooperation with the
> koffice developers. 

Isn't that mixing two different functionalities:
1) That the application should be able to change the printer's default 
orientation and
2) that the application should tell the printer dialog that the user can't 
change the orientation manually.

For KOffice both might be needed, but other applications have other needs.

> 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. 

That's fine for applications like koffice, where you have a page layout 
setting. KOrganizer doesn't have this (and doesn't need it IMO), and the data 
is not tailored to a specific orientation. Rather the print routines are 
implemented so that they simply take the available rectangle and use that. 
E.g. in month print style landscape is the default (allows longer texts), but 
sometimes one might also want to print it in portrait, because then more 
events fit into each day's box (actually, I always print the month view in 
portrait). So the user needs to be able to select the orientation at some 
point after the default orientation is set.

As a workaround in KOrganizer we have a combobox in the printing dialog (the 
dialog that lets you select the print type and layout and other options; 
shown before the KPrinter::setup dialog) with the following entries:
-) Use Default of selected print style
-) Use Printer Default
-) Landscape
-) Portrait

Now the problem is that if you print once in e.g. Landscape and then a second 
time in "Use Printer Default", you won't be able to change the printer 
default later on (because in the first printing it was set manually -> 
orientation group is grayed out forever afterwards).

Also, it seems an artificial restriction for the korganizer user that he can't 
change the orientation later on, when the printing functions clearly support 
both orientations.

> This could be changed, but it requires some coding.

Is there some workaround that re-enables the orientation box (also with 
kdelibs 3.4)? I tried manually setting 
   mPrinter->setOption( "kde-orientation-fixed", "0" );
but that doesn't seem to wiork (i'm developing with kdelibs 3.4.1)...


Reinhold Kainhofer, Vienna University of Technology, Austria
email: reinhold at,
 * Financial and Actuarial Mathematics, TU Wien,
 * K Desktop Environment,, KOrganizer / KPilot maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list