korganizer Library API Documentation

testit.cpp

00001 #include <qobject.h>
00002 #include <stdio.h>
00003 
00004 #include "testit.h"
00005 
00006 void Foo::setValue(int v)
00007 {
00008         if (v != val) {
00009                 val = v;
00010                 emit valueChanged(v);
00011         }
00012 }
00013 
00014 Foo::Foo()
00015 {
00016 }
00017 
00018 void main()
00019 {
00020   Foo a, b;
00021 
00022   QObject::connect(&a, SIGNAL(valueChanged(int)), 
00023                 &b, SLOT(setValue(int)));
00024   b.setValue(11);
00025   a.setValue(79);
00026   printf("b is now: %d\n",b.value());
00027 }
00028 #include "testit.moc"
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:32 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001