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

List:       kde-pim
Subject:    Re: RFC: A different proposal
From:       Don Sanders <dsanders () cch ! com ! au>
Date:       1999-08-10 8:23:02
[Download RAW message or body]

On Fri, 06 Aug 1999, Tim Rohrer wrote:
> On Thu, 05 Aug 1999, Don Sanders wrote:
> [snip]
> > > 
> > > I'm pretty familiar with Outlook but want to confirm that you are talking
> > > about the Contacts list?
> > 
> > Yes, I am.
> > 
> > >  If I understand the QPrinter class, whatever we
> > > put on the screen is what gets printed.  That opens up to any style view we
> > > want to create.  I like this approach.
> > 
> > That is an important benefit of the approach. Unfortunately it does not
> > necessarily apply to us, that is one of the points I was trying to make in my
> > previous mail. As an example MS Outlook lets the user print out contacts in
> > formats that have no 'GUI' equivalent. Also a spreadsheet may have to be broken
> > up into a grid a pages, which isn't really WYSIWYG.
> 
> Ahhh, yes.  I'll have to go look at Outlook again.  It seems that putting it
> on the screen in any defined format shouldn't be *that* hard.  I reserve the
> right to change my mind after I get started.

There is an additional nontrivial problem. What is shown on the screen should be
editable like the outlook address cards view, (I notice outlook 98 doesn't allow
you to edit the mutiline "notes" field though). Rik sent me some code that might
help a lot in doing this. I'll forward the code to you (it only requires QT not
KDE).

> > > It sounds like we are thinking along the same lines.  If we use the
> > > QDrawing/QPrinter arrangement, we should have print previewing.
> > That would make sense but I'm not sure that's the reality of the situation. I
> > have a feeling kps (a postscript viewer) is used for previewing.
> > 
> 
> We'll see, I guess.  I wasn't thinking of using kps so maybe I should call this
> true print previewing.  I'm just referring to drawing the output on the screen
> dimensionalized (don't think that is a word :) ) as it should be on paper, and
> dumping it to the printer.  As I understand things looking at drawText(), I can
> set the region of the printing and the string will be crammed into that spot. 

Crammed? Not to sure what you mean by that. It could either man the font size
is dynamically resize (which I don't think is the case), or the rectangle could
be used for clipping or for word-wrapping (when the "WordBreak" formatting flag
is set), which I think is probably the case. (Never called qt drawtext directly
so I'm not sure). I do agree that drawtext is probably the way to go for labels.

> This seems like a reasonable approach, especially for labels.  I can play with
> limiting string sizes and truncating.

Yes. The QT "boundingRect" function (which complements drawtext) will probably
be helpful here.

> > >Yes, dumping a widget to ps and printing doesn't quite sound like an
> ideal > >solution :)
> > It's not necessarily *that* bad it's not like the pixels are copied from a
> > bitmap to the printer or anything.
> > 
> I think it will be a good first shot.

I'm glad you are going to give it a try. If you use drawText then hopefully we
can do something like what rik does to create a dynamically positioned
qeditline widget, to allow editing of the label. I have had trouble with
qeditline insisting on a fairly thick white space border around themselves,
we'll need to find a workaround for this problem.

> > >It's a shame we can't assume printing to ps though. I used to do a lot of
> > >postscript programming !
> > I think it makes sense to give QPrinter a try. Perhaps we can benefit from
> > reusing QTs professional print dialog. Then again I can imagine that we would
> > like to customize the print dialog to allow the user to select different print
> > formats, I wonder if QPrinter allows for that.
> > 
> > Really I don't mind as long as it works.
> 
> Oooohhhh, there you go raising the bar!

:-)

There was an implied smiley there I hope, or maybe you know me better
than i realise!
 
> > -- Regrouping threads --
> > >At the risk of duplicating what I just wrote, I think that if we use the
> > >QPrinter, the output is done in postcript.  My primary concern with this is
> > >the accuracy of the translation.  For printing labels and so forth, the
> > >tolerances aren't much.  The only way to find out, I think, is to write it
> > >and test it.
> > 
> > I would be disappointed and surprised if the accuracy you can get from QPrinter
> > isn't good enough. You shouldn't have to work in units as chunky as pixels or
> > anything, surely.
> > 
> 
> Yes, looking the the methods a little closer, I agree.   I'll have a
> basic demo (for me) early next week that I will share the results of.

I'll forward you the program Rik sent me, it won't be immediately useful but if
looks like his technique of using a dynamically positioned qlineedit might be
useful for allowing editable labels. The code is quite simple but personally
it's not something i realised you were allowed to do :-)

BFN,
Don.

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

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