krita tools

Boudewijn Rempt boud at
Sat Oct 4 15:58:47 CEST 2003

On Saturday 04 October 2003 13:59, Patrick Julien wrote:

> All right, I'll be waiting.

Well, this morning I implemented the first bit of support for QTabletEvent, 
and took me along a tour of the Krita innards, so I'm a bit more confident 

I still need to expand Krita to know  that it can have three different active 
tools now, of course, instead of just one: mouse, stylus and eraser, but 
that's not that urgent, and it's just administrative code coupled with a bit 
of ui.

I've also started on a KisToolPaint base class analogous to KisToolNonPaint, 
with a silly test class as a first client. And here I run into a bit of KDE 
arcana that I don't know how to handle; perhaps I should CC to kde-devel, if 
you cannot say out of hand what I'm doing wrong.

The goal is to have a mouse-press event paint something to the image, so I 
implemented the following, analogous to similar code in 

void KisToolTest::mousePress(QMouseEvent *e)
    KisImageSP img = m_view -> currentImg();
    if (img) {
        KisPaintDeviceSP parent == img -> activeDevice();
        if (parent) {
             // use parent to paint something, no matter what
             m_doc -> addCommand(new TestCmd(img));

Compiling this results in the following error:

Making all in tools
make[1]: Entering directory `/data/src/kde.HEAD/koffice/krita/tools'
if /bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H 
-I. -I. -I../.. -I./../core -I./../ui -I../../lib/kofficeui 
-I../../lib/kofficeui -I../../lib/kofficecore -I../../lib/kofficecore 
-I../../lib/store -I../../lib/store -I../../lib/kwmf -I../../lib/kwmf 
-I../../lib/kopainter -I../../lib/kopainter -I./../core/strategy/ 
-I/opt/kde3/include -I/usr/lib/qt3/include -I/usr/X11R6/include   
-DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef 
-Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 
-Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new 
".deps/kis_tool_test.Tpo" \
  -c -o kis_tool_test.lo `test -f '' || echo 
'./'`; \
then mv ".deps/kis_tool_test.Tpo" ".deps/kis_tool_test.Plo"; \
else rm -f ".deps/kis_tool_test.Tpo"; exit 1; \
In file included from /opt/kde3/include/kdebug.h:195,
/opt/kde3/include/ksharedptr.h: In destructor `KSharedPtr<T>::~KSharedPtr()
   [with T = KisPaintDevice]':
/opt/kde3/include/ksharedptr.h:143:   instantiated from 
`KSharedPtr<T>::operator T*() const [with T = KisPaintDevice]'
/opt/kde3/include/kdebug.h:195:   instantiated from here
/opt/kde3/include/ksharedptr.h:122: error: `_KShared_unref' undeclared (first
   use this function)
/opt/kde3/include/ksharedptr.h:122: error: (Each undeclared identifier is
   reported only once for each function it appears in.) In member function `virtual void
   KisToolTest::mousePress(QMouseEvent*)': warning: unused parameter `QMouseEvent*e'
make[1]: *** [kis_tool_test.lo] Error 1
make[1]: Leaving directory `/data/src/kde.HEAD/koffice/krita/tools'
make: *** [all-recursive] Error 1

Have you got any idea, or had I better ask on kde-devel?

Boudewijn Rempt |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: signature
Url :

More information about the kimageshop mailing list