KPrinter::setOrientation disables the orientation group in the setupdlg

James Richard Tyrer tyrerj at
Mon Jul 25 19:34:57 BST 2005

Goffioul Michael wrote:
>> 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.

I am confused about this.  Perhaps this is due to the fact that I have
an old printer Epson LQ1000 that you can put paper in.

There are two parameters:

	How the paper is oriented in the printer

	How the text is printed (Horizontal or Vertical)

If you have WordPerfect 8.1 for Linux, you can easily see how this
should work since it allows you to set both separately and has a nice 
display.  If it would help, I can make screen shots.

This confusion seems to be indicated by the posters use of the terms: 
"landscape" and "portrait" when he is actually referring to printing 
horizontal and vertical.

So, I open the KPrint dialog and select "Properties" and on the "Print
Format" tab, I can check the "Orientation" as "Portrait" or "Landscape"
and it appears to be the place to set how the paper is oriented in the
_Printer_.  But this is NOT what it sets, it sets whether the print is
oriented Horizontal of Vertical.

For best usability, the user should not have to choose whether to print
Horizontal or Vertical since this can be determined by how the paper is
oriented in the printer and how it is oriented in the application.

IMHO, the KPrint dialog should ONLY allow you to set the orientation of 
the paper _in_the_printer_ and the application is the place to set the 
paper orientation you want to use.  Then if necessary (e.g. Landscape in
application and Portrait in the printer) the text will automatically be
printed vertical.

Clearly this needs to be rethought and some design work needs to be done.

Otherwise, the icons in the dialog need to be changed and the current 
method that the application can set this and lock the dialog is correct.


More information about the kde-core-devel mailing list