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"
This file is part of the documentation for korganizer Library Version 3.2.2.