Re: Steps to get to GTK+ 3.0
- From: Philip Van Hoof <spam pvanhoof be>
- To: Jean-Yves Lefort <jylefort brutele be>
- Cc: gtk-devel-list gnome org, Kristian Rietveld <kris imendio com>
- Subject: Re: Steps to get to GTK+ 3.0
- Date: Fri, 06 Jun 2008 15:53:52 +0200
On Thu, 2008-06-05 at 08:59 +0200, Jean-Yves Lefort wrote:
> On Thu, 05 Jun 2008 00:37:00 -0400
> Behdad Esfahbod <behdad behdad org> wrote:
>
> >
> Likewise, you can implement a class "Foo" containing an int property
> "bar" using the GObject way:
>
[CUT]
>
> or using the Qt way:
>
> class QFoo : public QObject
> {
> Q_OBJECT
>
> Q_PROPERTY(int bar READ bar WRITE setBar)
>
> public:
> void setBar (int value);
> int bar () const;
> };
>
> void QFoo::setBar (int value)
> {
> // ...
> }
>
> int QFoo::bar ()
> {
> // ...
> }
>
> Which way do you prefer?
The Vala way:
public class VFoo : GLib.Object {
public int Bar { get; set; }
}
Now thank you for your whining and let's get productive indeed.
--
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://pvanhoof.be/blog
http://codeminded.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]