[Kde-java] QTableSignals Interface

Richard Dale kde-java@kde.org
Fri, 17 Jan 2003 19:56:54 +0000

On Friday 17 January 2003 1:58 pm, Felix Rodriguez wrote:
> Richard,
>    Thanks. That was driving me crazy. So crazy in fact, that I found a work
> around. I actually overrode the doubleClickEvent method and emitted my own
> signal. That seems to do the job. I am hesitant to put your patch in
> because I plan on releasing the application to the general public and I
> want to make sure that I don't deviate from the java kdebindings that come
> with kde. Is this patch going to be included in future a future version of
> the java-kde-qt bindings?
Yes, I've just commited the change to the HEAD and KDE_3_1_BRANCHs - thanks 
for the bug report! It might be too late for the KDE 3.1 release though. The 
bug would have meant that the bindings runtime thought the 
'int,int,int,QPoint' was a java signal and connected to that, rather than the 
correct C++ one. And you would have never emitted the signal in java, so 
nothing happened.

>    By the way thanks for doing such a great job with the java kde/qt
> bindings. I am a java developer at work and have gotten accustomed to using
> Borland's JBuilder. I love the fact that I can use JBuilder to write my own
> KDE applications. This is much easier than using C++ to build my KDE apps
That's good news - encouraging that java bindings makes KDE programming 
easier. Then we get more programmers, and so more apps.. I can program in 
C++, but I just personally find it all a bit of a headache and 

-- Richard

> At 12:45 PM 1/17/2003 +0000, you wrote:
> >I sent a mail last night with the attached sources uncompressed, and it
> > got blocked by the 40k limit on this list. So here it is again a bit
> > smaller
> >
> >On Thursday 16 January 2003 3:43 pm, Felix Rodriguez wrote:
> > > Does anyone know how to use the QTableSignals Interface with QTable. I
> > > am try to connect a slot with the doubleClicked signal emitted from the
> > > QTable. I discovered that all the QTable signals are located in the
> > > QTableSignals interface. So I implemented the QTableSignals interface
> > > along with extending the same class from QTable. I then try to connect
> > > a slot to the doubleClicked signal and nothing happens. I know I must
> > > be missing a step somewhere. Thanks.
> >
> >This is a bug in the code that maps between the java signal type and the
> > C++ one. In QTable the doubleClicked signal is 'int, int, int, const
> > QPoint&'. But there was only a mapping for  'int, int, int, const
> > QPoint', not QPoint as a reference, so it didn't work. Please find new
> > versions of
> >JavaSlot.cpp/.h attached with a fix. Copy the sources to
> >kdebindings/qtjava/javalib/qtjava and rebuild and reinstall the bindings.
> >
> >I need to find if the signal type 'int, int, int, const QPoint' is used
> >anywhere in Qt, otherwise I'll remove it.
> >
> >The interfaces like QTableSignals are just for documentary purposes, you
> >don't
> >have to implement the methods, they just tell you what java type
> > signatures to use when connecting up signals.
> >
> >-- Richard
> Felix Rodriguez
> Programmer Analyst
> Phone: 860-685-3984
> Email: frodriguez@mail.wesleyan.edu
> _______________________________________________
> Kde-java mailing list
> Kde-java@mail.kde.org
> http://mail.kde.org/mailman/listinfo/kde-java