[prev in list] [next in list] [prev in thread] [next in thread]
List: kde
Subject: Re: Roberto's themes
From: mosfet <mosfet () jorsm ! com>
Date: 1998-08-27 18:01:10
[Download RAW message or body]
I'll ask the trolls about how close one can make derived methods to the
original.
On Thu, 27 Aug 1998, mosfet wrote:
>Good example.
>
>QListBox inherits QTableView. Thus you would need to provide both
>a new QTableView and QListBox child. In the QTableView widget, you have to
>replace the methods that assigns *vScrollBar and *hScrollBar to a QScrollBar
>with an assignment to a KDE themed replacement. Since the replacement widget is
>derived from QScrollBar, all you have to do is provide methods for where the
>scrollbar is allocated. Since you are not changing that library itself or
>providing a replacement of such, I think it would be legal to write methods
>identical to the original, only replacing the new statements for themed
>children. Tedious, but not difficult. Then your themed QListBox child would
>just derive from your new QTableView.
>
>On Thu, 27 Aug 1998, Roberto Alsina wrote:
>>Please notice that there are a few issues with that approach.
>>
>>For one thing, you need to reimplement a lot of stuff.
>>For example, even if you replace QScrollBar with your own XScrollBar,
>>look at QListBox. It creates it's own QScrollBar, and the widget is not
>>created in your code, but in Qt's.
>>
>>So, you need to reimplement QListBox a lot more deep than you expect.
>>
>>QMessageBoxes create QPushButtons. QComboBoxes has QlineEdits inside of them.
>>
>>And so on.
>>
>>On Thu, 27 Aug 1998, mosfet wrote:
>>
>>> I thought about this too. Essentially what one can do to get full theme support
>>> would be to do the following:
>>>
>>> Create a new library, possibly libktheme, that contains children of each QT
>>> widget that you want to add theme capability to. These children would have
>>> the following methods:
>>> A) A constructor that reads a KConfig entry for a pixmap and possibly a
>>> foreground and background color entry. We would want to extend color schemes
>>> somewhat. Also, we would need to incorparate a check for the parent class.
>>> People would probably want different pixmaps/colors for a QButton sitting in a
>>> toolbar verses a regular one. Enabling that pixmap in many cases would be
>>> simply calling setBackgroundPixmap. In order to be effecient, we would
>>> probably want to incorparate inital loading of pixmaps into KApplication (or a
>>> theme capable child of it).
>>> B) The constructor could have three additional arguments: bool enablepixmap,
>>> bool enablecolor, bool scale. These would respectively enable the pixmaps,
>>> enable the additional color entries, and scale (xForm) the pixmap to the widget
>>> size. During testing, all three would default to false. Thus applications can
>>> move to using the new widgets before the theming is totally tested, only
>>> enabling it for ones known to work. Once the library becomes widely accepted
>>> and seems to work well, we could change the default args to true, true, and
>>> false.
>>> C) We could throw in a few (possibly inline) methods for getting the pixmap,
>>>
>>> Using this method, it would be fairly easy to add theme support to KDE. Since
>>> the additional constructor parameters all take default values, developers would
>>> only need to replace the class names in their code. A sed script could do it.
>>> And of course, they would need to link to a new library.
>>>
>>> I need to complete a few KDE projects already in progress, but once that is
>>> done I would be glad to help.
>>>
>>>
>>> Wed, 26 Aug 1998, Kevin Forge wrote: >Martin Konold wrote: >>
>>> >> On Wed, 26 Aug 1998, Roberto Alsina wrote:
>>> >>
>>> >> > > Are these scrollbars "home made" or it's something new in Qt ?
>>> >> >
>>> >> > Those scrollbars are a hack on top of Qt's scrollbars.
>>> >> > Not pretty code, but pretty widget, IMHO :-)
>>> >>
>>> >> And the nicest thing about this "study" was that Roberto did not change a
>>> >> single line of Qt.
>>> >
>>> >They are cute. how many people wold want to use those instead ?
>>> >Perhaps we culd have "KScrollbar" or "RScrolbar" in adition to
>>> >"QScrollbar" ?
>>> >--
>>> >"So let me get this straight," one IBM lawyer said.
>>> >"We're doing a deal with . . . a Web site?"
>>> >http://www.forbes.com/forbes/98/0810/6209094a.htm For context.
>>> >mailto:forgeltd@usa.net http://www.independence.seul.org
>>> >--
>>> >Send posts to: kde@lists.netcentral.net
>>> > Send all commands to: kde-request@lists.netcentral.net
>>> > Put your command in the SUBJECT of the message:
>>> > "subscribe", "unsubscribe", "set digest on", or "set digest off"
>>> >**********************************************************************
>>> >This list is from your pals at NetCentral <http://www.netcentral.net/>
>>> --
>>> Send posts to: kde@lists.netcentral.net
>>> Send all commands to: kde-request@lists.netcentral.net
>>> Put your command in the SUBJECT of the message:
>>> "subscribe", "unsubscribe", "set digest on", or "set digest off"
>>> **********************************************************************
>>> This list is from your pals at NetCentral <http://www.netcentral.net/>
>>>
>>
>> ("\''/").__..-''"`-. . Roberto Alsina
>> `9_ 9 ) `-. ( ).`-._.`) ralsina@unl.edu.ar
>> (_Y_.)' ._ ) `._`. " -.-' Centro de Telematica
>> _..`-'_..-_/ /-'_.' Universidad Nacional del Litoral
>>(l)-'' ((i).' ((!.' Santa Fe - Argentina
>> KDE Developer (MFCH)
>>"I can attempt anything, specialization is for insects" (50% Heinlein).
>>--
>>Send posts to: kde@lists.netcentral.net
>> Send all commands to: kde-request@lists.netcentral.net
>> Put your command in the SUBJECT of the message:
>> "subscribe", "unsubscribe", "set digest on", or "set digest off"
>>**********************************************************************
>>This list is from your pals at NetCentral <http://www.netcentral.net/>
>--
>Send posts to: kde@lists.netcentral.net
> Send all commands to: kde-request@lists.netcentral.net
> Put your command in the SUBJECT of the message:
> "subscribe", "unsubscribe", "set digest on", or "set digest off"
>**********************************************************************
>This list is from your pals at NetCentral <http://www.netcentral.net/>
--
Send posts to: kde@lists.netcentral.net
Send all commands to: kde-request@lists.netcentral.net
Put your command in the SUBJECT of the message:
"subscribe", "unsubscribe", "set digest on", or "set digest off"
**********************************************************************
This list is from your pals at NetCentral <http://www.netcentral.net/>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic