• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • arts
 

arts

  • arts
  • kde
kartsfloatwatch.cpp
1 /*
2
3 Copyright (C) 2001 Stefan Westerfeld
4 stefan@space.twc.de
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20
21 */
22
23#include "artskde.h"
24#include "kartsfloatwatch.moc"
25#include "connect.h"
26
27using namespace Arts;
28
29class KArtsFloatWatchPrivate {
30public:
31 KFloatWatchProxy proxy;
32};
33
34namespace Arts {
35
36class KFloatWatchProxy_impl : public KFloatWatchProxy_skel {
37protected:
38 KArtsFloatWatch *watch;
39public:
40 KFloatWatchProxy_impl(KArtsFloatWatch *watch) : watch(watch) { };
41
42 float value() { return 0.0; /* dummy */ }
43 void value(float newValue) { watch->change(newValue); }
44};
45
46}
47
48KArtsFloatWatch::KArtsFloatWatch(Arts::Object object, const char *stream,
49 TQObject *parent, const char *name) : TQObject(parent, name)
50{
51 d = new KArtsFloatWatchPrivate();
52 d->proxy = KFloatWatchProxy::_from_base(new KFloatWatchProxy_impl(this));
53 Arts::connect(object, stream, d->proxy, "value");
54}
55
56KArtsFloatWatch::~KArtsFloatWatch()
57{
58 delete d;
59}
60
61void KArtsFloatWatch::change(float newValue)
62{
63 emit valueChanged(newValue);
64}
KArtsFloatWatch
KArtsFloatWatch offers an easy way to watch aRts streams via Qt signals.
Definition: kartsfloatwatch.h:50
KArtsFloatWatch::valueChanged
void valueChanged(float newValue)
this signal will be emitted with values of the aRts stream
KArtsFloatWatch::KArtsFloatWatch
KArtsFloatWatch(Arts::Object object, const char *stream, TQObject *parent=0, const char *name=0)
Constructor.
Definition: kartsfloatwatch.cpp:48
KArtsFloatWatch::~KArtsFloatWatch
~KArtsFloatWatch()
Destructor.
Definition: kartsfloatwatch.cpp:56

arts

Skip menu "arts"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

arts

Skip menu "arts"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for arts by doxygen 1.9.4
This website is maintained by Timothy Pearson.