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

List:       kde-devel
Subject:    Re: XML and UI
From:       Stephan Hermann <sh () kde-coder ! de>
Date:       2002-07-26 20:12:26
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On Friday 26 July 2002 21:49, Nicolas Goutte wrote:
> Do not forget that QT Designer's UI files must be compiled! So you have to
> choose another way than QT Designer to achieve what you want.

No, you missunderstanding me.

Example:

	<?xml...>
	<XMLUI version="0.1">
		<MAINWIDGET type="KDialog" varname="exampleDlg">
			<CHILDWIDGET type="KPushButton" varname="btnOK" X="10" Y="10" W="100" 
H="100">
				<TEXT>&amp;Ok</TEXT>
			</CHILDWIDGET>
			<CHILDWIDGET type="KPushButton" varname="btnCancel" X="10" Y="40" W="100" 
H="20">
				<TEXT>&amp;Cancel</TEXT>
			</CHILDWIDGET>
			<CONNECT SIGNAL="btnOK::clicked()" SLOT="accept()"/>
			<CONNECT SIGNAL="btnCancel::clicked()" SLOT="reject()"/>
		</WIDGET>
	</XMLUI>

Something like this, I think u got it...

And now, we have a xmlui class, who is taking this file, analysing it, and 
build an instance of KDialog, this the children btnOk and btnCancel, connect 
automatically the signale clicked() of both widgets to the slots accept() and 
reject() of KDialog(exampleDlg).

But, we don't need to compile it, we generate it at runtime.

This is what I have in mind.

Something like the windows resources at the end of the EXE file (i don't know 
if this is today the case in windows..but win 3.x had it ;))

An idea, but I don't know if this would work.

\sh


>
> Have a nice day/evening/night!
>
> On Freitag, 26. Juli 2002 20:00, Stephan Hermann wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi all,
> >
> >
> > the thread with Pupeno brings to another idea.
> > What about building a complete window ui in XML and generating it
> > dynamically after compiling the code ?
> >
> > If I'm looking through the "XML" files qt designer is generating, it must
> > be an easy way to build e.g. a dialog window dynamically.
> > Also connecting signals to slots must be easy.
> >
> > At least I could be wrong, but is it possible ?
> >
> > \sh
> >
> >
> > - --
> > St. Hermann, Troisdorf
> > One solution for a simple problem: A7 B4 C2 D5 E8 F1 G3 H6
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.0.6 (GNU/Linux)
> > Comment: For info see http://www.gnupg.org
> >
> > iD8DBQE9QY5MV8AnusWiV6wRAjfQAKCOcxrZbv6ABj4PRguYv/XfqtQsbgCgyrhE
> > YMKgo9nrkNCNirvxU+LogIw=
> > =lmmt
> > -----END PGP SIGNATURE-----
> >
> > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> > >> unsubscribe <<
> >>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<

- -- 
St. Hermann, Troisdorf
One solution for a simple problem: A7 B4 C2 D5 E8 F1 G3 H6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9Qa0sV8AnusWiV6wRAgSlAJ0YXra80+nJxMoyhPs3WQtz4z/EogCffLkO
AowA8yF7bBbiL9Z2QPHiEyA=
=gCoe
-----END PGP SIGNATURE-----


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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