-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 26 July 2001 00:14, Daniel Molkentin wrote: > On Wednesday 25 July 2001 16:03, Marc Mutz wrote: > > You won't replace all config dialog GUI elements with this > > approach, but you abstract away all the boring ones, esp. if > > "group" and "key" are designable QProperties, so you can use the > > QtDesigner :-) > > Well, having XML files describing options would be the most ideal > state. I don't know how far this can be supported in Designer2. > If you make the base class for e.g. a boolean option something like: class KBoolConfigWidget : public QCheckBox { Q_OBJECT Q_PROPERTY( QString configGroup READ configGroup \ WRITE setConfigGroup DESIGNABLE true ) Q_PROPERTY( QString configKey READ configKey \ WRITE setConfigKey DESIGNABLE true ) public: KBoolConfigWidget( KConfig * config, ... ); void setConfigGroup( const QString group ); QString configGroup() const; void setConfigKey( const QString key ); QString configKey() const; .... } An you make this class available for QtDesigner, you can set the declared Q_PROPERTY's in the property editor of the Designer. > But even if it is possible I don't know if its woth the effort to go > that far. The above isn't really difficult. It can even be made with current KConfig (and on-disk format). However, the very nice automatic addition of the proper label needs some new backend, yes. But the above alone would make config dialog and kcm* programmers _very_, _very_ happy. Marc - -- Marc Mutz http://marc.mutz.com/ http://www.mathematik.uni-bielefeld.de/~mmutz/ http://EncryptionHOWTO.sourceforge.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7YB+q3oWD+L2/6DgRAqXaAKCbzjLTi3sRMxD8U3wlYCO9lpEAoACg6Ix2 /T+B2eoW94XPwMdw0jjmXbY= =P4P1 -----END PGP SIGNATURE-----