[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KConfigDialogManager without Q3SqlPropertyMap
From: Benjamin Meyer <ben () meyerhome ! net>
Date: 2006-01-29 20:37:52
Message-ID: 200601292323.47795.ben () meyerhome ! net
[Download RAW message or body]
On Sunday 29 January 2006 10:59 pm, Benjamin Meyer wrote:
> On Saturday 28 January 2006 6:12 pm, Szombathelyi György wrote:
> > And here's an improved patch, with api docs. I'll commit tomorrow if
> > there will no objections.
> >
> > Bye,
> > György
>
> Don't remove the kapplication function. It is deprecated and part of
> support sense other things use it. We could move it into the header file
> and make it inline for those few classes that use it. As for the other
> class I added support in moc for a USER propery in 4.1. Here is an example
> way to find out what property should be used.
>
> QHash<QString, QString> userPropertyMapping;
>
> QString getUserProperty(const QWidget *widget) {
> if (!userPropertyMapping.contains(widget->metaObject()->className())) {
> const QMetaObject *metaObject = widget->metaObject();
> int propertyCount = metaObject->propertyCount();
> for (int i = 0; i < propertyCount; ++i) {
> const QMetaProperty metaProperty = metaObject->property(i);
> if (metaProperty.isUser()) {
> userPropertyMapping[widget->metaObject()->className()] =
> metaProperty.name();
> break;
> }
> }
> }
>
> return userPropertyMapping[widget->metaObject()->className()];
> }
>
> QString propertyToUse = getUserProperty(widget);
> return widget->property(qPrintable(propertyToUse));
>
> -Benjamin Meyer
if you want I can just do this.
-Benjamin Meyer
--
aka icefox
Public Key: http://www.icefox.net/public_key.asc
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic