[Fwd: kdelibs/kdeui]
Ian Reinhart Geiser
ian at geiseri.com
Tue Sep 14 14:14:17 BST 2004
On Monday 13 September 2004 11:45 pm, Frans Englich wrote:
> On Monday 13 September 2004 15:17, Ian Reinhart Geiser wrote:
> > damn i gotta learn how to spell somday ;)
> >
[...]
> How did I solve the wonderful world of moc's members-in-other-files issue?
> I didn't; I blatantly copied the enum into KPushButton. It's butt ugly, but
> it works, and all it requires is making sure the two copies(KStdGuiItem,
> KPushButton) is kept in sync; large scary comments next to them. (IMHO,
> AFAIK)
Yeah code duplication is the worst possible sin you can perform IMHO, so that
scheme was outright rejected without even minor consideration. Since these
enums will be added to actively that duplication would have become a
liability much too quickly.
>
> Avoiding getting the text written back was solved by testing the kapp
> pointer in the get function(here was some weird problem, IIRC perhaps, the
> class inheritage/chain).
>
Not sure if I get this part? I see that designer writes back the accell and
the text, but I am not sure if this is a problem at all. Since in the
generated code the proper method is called in KPushButton that sets the
correct stdguiitem.
> I doubt I'll find the patch, but perhaps it spur some ideas.
>
> (I wish Designer in Qt 4 will be a big, flexible, plugin system..)
>
don't we all ;)
> > End result we can now do standard gui items from Qt
> > designer, and now with the ability to extract UI files from a QWidget we
> > can completely maintain KControl pages with UI files.
>
> FYI, Ian talks about Reinhold's(and others, dunno) cool code:
> http://lists.kde.org/?l=kde-cvs&m=109501930823176&w=2
Yeah, I'm not really sure how much of my original code is left in the tool,
but from what I can see its even more useful for extracting the view
component of an application out of widget code. The more widgets we move to
use the stdguiitems vs plain gui items the easier the conversion will go,
since the stditem property will be set. This is because there is no way to
work back from a GUI item to a standard gui item. While annoying in this
instance its not horribly useful, or efficient code wise.
Happy hacking.
Cheers
-ian reinhart geiser
--
=======+<KWeather for KDE 3.2>+=+<http://www.kde.org>+===
Report for Philadelphia, Northeast Philadelphia Airport
on Tuesday 14 September 2004 08:31 am
21°C with winds at 12 km/h ENE and 16km of visibility.
===============================+<geiseri at kde.org>+=======
More information about the kde-core-devel
mailing list