[Kde-bindings] RE: KDE.NET

Martin Welch martin at welch.eclipse.co.uk
Thu Apr 22 17:58:32 UTC 2004


>>Maybe a better starting point would be a cut down version of
>>Qt# v1/QtC with all the unwanted classes removed.

I know it goes against the grain to reinvent the wheel but I'm not convinced
that using existing bindings is the right answer for two reasons:

First, the bindings won't deal with callbacks->delegates (?) so I've had to
override KMainWindow to do this. All the necessary bindings I've written use
CMainWindow, not KMainWindow.

Second, consider the following:

void CMainWindow::SetIsMdiContainer(bool value)
{
	if ( value == true )
	{
		if ( m_pWorkspace == 0 )
		{
			QVBox* vb = new QVBox( this );
			vb->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
			m_pWorkspace = new QWorkspace( vb );
			m_pWorkspace->setScrollBarsEnabled( TRUE );
			setCentralWidget( vb );
		}
	}
}

This one function, with one binding, I believe, if far better than the
sequence of binding API's I'd need to call using the C bindings. There's
less bindings and the performance would be better.

>>On the other hand if you
>>don't use any KDE classes it won't really be a KDE project.

Right. I want to create KDE.NET, not Qt.NET. I know I'm getting ahead of
myself but perhaps one day I could create a KPart in C# - or VB!

>>I wonder
>>if there's any code that could be borrowed from the Gtk version.

That's quite possible.

>>one which uses Wine for maximum compatibilty
>>with existing native code widgets

I might be wrong here but I think most people use P/Invoke to handle the
fact that SWF is actually quite limited and primitive. I know that's all
I've used it for.

>> I probably know stuff about polish()

My lack of KDE knowledge is certainly slowing me down but then one of the
reasons for starting this in the first place was to learn KDE programming.
Any help is welcome :)

Cheers!

Martin

-----Original Message-----
From: Richard Dale [mailto:Richard_Dale at tipitina.demon.co.uk]
Sent: 22 April 2004 16:40
To: KDE bindings for other programming languages
Subject: Re: [Kde-bindings] RE: KDE.NET


On Thursday 22 April 2004 15:38, Martin Welch wrote:
> >>OK, maybe you could build an SWF api on top of C# v2 bindings to
> >>the native Qt and KDE classes? I would say developing another C
> >>bindings library is not a good idea - I've recently scrapped the
> >>QtC and KDEC bindings, as it was the wrong way to go.
>
> I've discovered that (so far) 90% of the effort is in figuring out how to
> implement SWF in Qt rather than the bindings. I spent far longer, for
> example, finding out that a call to polish() is the best place for a
> callback for Form.Load than implementing Form.Load. Implementing SWF using
> Qt# will still need that 90% effort.
Yes, you probably only need a fraction of the classes in Qt. polish() is a
virtual method which you have to override, but the old QtC bindings didn't
override that one, only event handlers. I probably know stuff about
polish(),
and you may well know more about C#/.NET than I do.

> My other reservation would be that SWF->qt#->smoke may get a little too
> top-heavy from a performance point of view ?
Yes, I think you might be right. And the SMOKE version of Qt#/Kimono isn't
nearly finished and working yet - I'm afraid I haven't done much at all for
the past month. Maybe a better starting point would be a cut down version of
Qt# v1/QtC with all the unwanted classes removed. On the other hand if you
don't use any KDE classes it won't really be a KDE project.

> >>But I think you're trying to do something different
> >>to both Qt# v1 and Qt# v2/Kimono
>
> I'm inclined to agree with you here.
>
> >>I've personally never had a desire to implement SWF,
> >>or even thought about it.
>
> I'm convinced that an implementation of SWF is critical since 100% of .NET
> windows forms developers are already familiar with it. Very, very few .NET
> developers are familiar with Qt.
>
> I've just subscribed to kde-bindings - shall we continue this on
> kde-bindings instead?
Yes, please do. I think it would be nice to be able to have a KDE answer to
both Gtk# native api and the SWF api built on top of it. I think that in
Gtk#
they have two versions of SWF; one which uses Wine for maximum compatibilty
with existing native code widgets, and another 'lighter weight' one. I
wonder
if there's any code that could be borrowed from the Gtk version.

-- Richard
_______________________________________________
Kde-bindings mailing list
Kde-bindings at kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings




More information about the Kde-bindings mailing list