[PyKDE] Sip, C wrapping

2004-10-16 Thread Andreas Gerber
Hi, 

are there any examples wrapping C code using sip? Especially I'm interested in 
functions which returns a pointer to a struct as the example in the 
documentation of sip. 

Andreas

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Eric3: Code coverage.

2004-10-16 Thread Detlev Offenbach
Am Samstag, 16. Oktober 2004 13:27 schrieb Simon Edwards:
 Hello all,

 Can anyone explain how to use the code coverage tool in Eric3?

 TIA,

Just run your program with code coverage analysis and after it is finished 
view the collected data via the respective entry in the Show submenu of the 
project menu, the source browser or the editor context menu.

Detlev
-- 
Detlev Offenbach
[EMAIL PROTECTED]

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re:[PyKDE] QScintilla bug and workaround

2004-10-16 Thread Timo Schüring
Hi Torsten and List User,
I had the same problem with AltGR but another solution,
maybe useful for those who do not like to patch QScintilla at C-Level:
Thank you for your analysis, I did check the ascii-value first and then just set the
state to 0 to pass just the ascii - key. But your solution is the better one
Regards,
 Timo
Just subclass the keyPressEvent Handler and modify it,
class SomeClassEdit(QextScintilla):
def __init__(self,parent=None,name=None,flags=0):
QextScintilla.__init__(self, parent, name, flags | Qt.WDestructiveClose)
 ...
 blabala
 ...
def keyPressEvent(self,ke):
# In windows scintilla, Alt Gr expansion lead to command expansion
# and thus with German keyboards and others no characters which need
# alt gr can be composed
# Workaround : Subclass KeyEvent-Handler and modify Key-Event for
#  to translate Alt and Control to Meta
#
#
if ke.state() ==  Qt.AltButton | Qt.ControlButton :
mke = QKeyEvent(ke.type(),ke.key(),ke.ascii(),Qt.MetaButton,ke.text())
ke.accept()
QextScintilla.keyPressEvent(self,mke)
else:
QextScintilla.keyPressEvent(self,ke)



___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Eric3: Code coverage.

2004-10-16 Thread Simon Edwards
On Saturday 16 October 2004 14:07, Detlev Offenbach wrote:
 Am Samstag, 16. Oktober 2004 13:27 schrieb Simon Edwards:
  Hello all,
 
  Can anyone explain how to use the code coverage tool in Eric3?
 
  TIA,
 
 Just run your program with code coverage analysis and after it is finished 
 view the collected data via the respective entry in the Show submenu of 
the 
 project menu, the source browser or the editor context menu.

Ok, I couldn't use the menu entry on the Project menu, but I see the context 
menu now. (Really, everything that is available on a context menu should also 
be available on a normal menu.)

Are there any plans to build the coverage results directly into the editor? 
cruising around the source with the coverage info right in with it would be 
awesome.

cheers,

-- 
Simon Edwards             | Guarddog Firewall
[EMAIL PROTECTED]       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | ZooTV? You made the right choice.

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] The tablet event, it works not!

2004-10-16 Thread Sundance
I heard Kaleb Pederson said:

 My new kernel works.  Your program worked just fine with my Tablet as
 did my old test program (I would have given it to you as well, but I
 wasn't sure what state I had left it in).  I'm using sip 4.1.1, PyQt
 3.13 and Qt 3.3.3. There must be something else awry :(

Raahr! *bites into various things*
Okay, so. I'm confused.
I'm running Qt 3.3.3 and PyQt 3.12 with SIP 4.0.1.
Tablet drivers are linuxwacom 0.6.3 on kernel Andrew Morton/2.6.7 and 
X.Org 6.8.

I'll update my packages to the same versions you use, and get back to 
you.

In the meanwhile, please find attached the C++ test code.
'qmake -project  qmake  make' to compile.

Thank you very much for your kind help. I was starting to grow 
desperate.

-- S.
#include iostream.h
#include qlabel.h
#include qapplication.h
#include qevent.h

class QSize;


class TabletWidget: public QLabel {

public:

  TabletWidget(QWidget *parent=0) : QLabel(parent) {
setText(Please move and click\nthe pointer here!);
setAlignment(AlignHCenter|AlignVCenter);
setMinimumSize(QSize(320, 200));
setMouseTracking(true);
  }

protected:

  void tabletEvent(QTabletEvent *e) {
QString deviceTypeName;
switch (e-device()) {
case QTabletEvent::Puck:
  deviceTypeName = Puck;
  break;
case QTabletEvent::Eraser:
  deviceTypeName = Eraser;
  break;
case QTabletEvent::Stylus:
  deviceTypeName = Stylus;
  break;
default:
  deviceTypeName = None/Unknown;
}
  
cout  Device:  deviceTypeName
   Pr:  e-pressure()
   X:  e-x()
   Y:  e-y()
  endl;

e-ignore();
  }
};


int main(int argc, char *argv[]) {
  QApplication app(argc, argv);
  TabletWidget widget;
  app.setMainWidget(widget);
  widget.show();
  return app.exec();
}
___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Eric3: Code coverage.

2004-10-16 Thread Simon Edwards
On Saturday 16 October 2004 20:27, Detlev Offenbach wrote:
 This functionality is already there. In the Show coverage dialog open the 
 context menu and select Annotate. This produces a file with the 
 extension ,cover. This file has the lines marked with some characters 
telling 
 you the coverage status. You may open this file in the editor.

I would like to see this integrated with the original source using some kind 
of symbol in the left column just like the breakpoint and bookmarks, and not 
in a new file. THAT would be cool.

cheers,

-- 
Simon Edwards             | Guarddog Firewall
[EMAIL PROTECTED]       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | ZooTV? You made the right choice.

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde