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

List:       kde-core-devel
Subject:    RFC : Layer widget
From:       Patrick Julien <freak () ideasandassociates ! com>
Date:       2002-04-02 14:44:54
[Download RAW message or body]

I need some advice. In krita, the code for the layer widget and the 
channel widget are basically copy pasted from each other.  Since I need 
to add a path widget and a mask widget, I'm thinking I want a generic 
one for all of these, but I've been struggling with the way I it should 
be implemented...

Basically, I want a widget with 2 buttons, 1 label and 1 editable text 
area.  The first button is Show/Hide layer/channel/whatever button, the 
second one is linked/unlinked button, the label is a preview of the 
paint device(layer/channel/whatever), the edit box is the name of the 
painting device.

This seems easy enough, just put 2 buttons, 1 label and 1 KLineEdit 
inside a QHBox and put these in a QListBox.

However, since QListBoxItem isn't a widget, I can't do this directly, I 
would have to resort to some bitBlt()'s from some internal widget inside 
the QListBoxItem to the QPainter passed to it.  I don't really want to 
do this ;-).

If I choose a QListView instead of a QListBox, I have the same problem, 
now QTable supports placing widgets in it's cells, but that seems like a 
waste for what I want to do.

Obviously I could do a QListBox and a custom QListBoxItem which paints 3 
pixmaps an some text, I just find it hard to believe that I'm the first 
one that needs a QListBox that has widgets in all of Qt/KDE.

Advice?  Comments?

-- 
Patrick Julien
Ideas & Associates
(514) 940-2891x211

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

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