[Kde-games-devel] First wishes for KGamePopupItem

Dmitry Suzdalev dimsuz at gmail.com
Sun Jun 24 23:44:30 CEST 2007


On Monday 25 June 2007 00:38, Kleag wrote:
> Dmitry,
>
> I just tried KGamePopupItem and here are my first wishes :-)
Great! Let's see :)

> - it does not use the same colors, so this should probably be configurable
>  (through styles ? I had not tried them up to now) ;
I thought about this. Perhaps I shoud just add methods for setting up 
background and text colors... and font.

> - it has square angles, where I'd like rounded ones. I implemented them by
>  making my MessageBubble to be a QGraphicsPathItem with a QGraphicsTextItem
>  children for the message itself. Have a look at
Yes, this could be delivered as an option (some enum).

> svn+ssh://kleag@svn.kde.org/home/kde/trunk/playground/games/ksirk/ksirk/Mes
>sageBubble .[h|cpp] if you want;
Thanks I'll take a look. But I think svn+ssh needs a pair of keys, no? :) Do 
you have anonymous access set up?

> - I use rich text (setHtml with the message on the children item), so with
>  your version, my message are a little bit ugly with their <br/> :-) ;
Well, I really don't know about this one. I must say that I designed this 
class to _specifically_ show _simple_ one-line _text_ messages to user.
I don't know whether I should drop this and implement full featured multiline 
rich text support...

What do others think? Will be such functionality much used?

Other options we might have: implement similar but more complex (internally of 
course) QGraphicsItem with multiline rich text support.

This would follow QGV way then: they have QGraphicsSimpleTextItem and 
QGraphicsTextItem.

> - one should probably be able to change or hide the icon;
Hmm. How about providing "roles"? I mean something like {Q,K}MessageBox has: 
KGamePopupItem::Information, KGamePopupItem::Error, etc.
OTOH apps might need something different than we provide.
I think we should just study real usecases to see what route to take.

Kleag, what icon would you want to set?

> - finally, I had the plan to add to my version a control to allow the user
> to say he don't want to see this message anymore. I'd like to be able to do
> so with yours too.
Well, it can be disabled by providing a link to follow (when richtext will be 
supported)

> I could do some of these changes myself, if you agree ?
Let's come to agreement with all the points above before taking any action ;)

> Sorry, I forgot one point. My graphics scene is larger than the window, so
> I display my message not at the top left of the scene but at the top left
> of the window, using a mapToscene... To use KGamePopuItemp, I should also
> solve this problem.
Ah. Yes, we should implement this.

Thanks for your input!

Dmitry.


More information about the kde-games-devel mailing list