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

tdeutils

  • tdeutils
tdecmoduleproxyIfaceImpl.cpp
1/*
2 * Copyright (C) 2004 Frans Englich <frans.englich@telia.com>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License version 2 as published by the Free Software Foundation.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU Library General Public License
14 * along with this library; see the file COPYING.LIB. If not, write to
15 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17 */
18
19#include <tqcstring.h>
20#include <tqdatastream.h>
21
22#include <dcopclient.h>
23
24#include <tdeapplication.h>
25#include <tdecmoduleproxy.h>
26#include <kdebug.h>
27
28#include "tdecmoduleproxyIfaceImpl.h"
29
30
31#include <tqmessagebox.h>
32
33TDECModuleProxyIfaceImpl::TDECModuleProxyIfaceImpl( const TQCString& name,
34 TDECModuleProxy* const client )
35 : DCOPObject( name ), TQObject( 0, name ),
36 p( const_cast<TDECModuleProxy *>( client ))
37{
38 connect( p, TQ_SIGNAL( changed(bool)),
39 TQ_SLOT( changedRelay(bool)));
40 connect( p, TQ_SIGNAL( quickHelpChanged()),
41 TQ_SLOT( quickHelpRelay()));
42}
43
44void TDECModuleProxyIfaceImpl::save()
45{
46 kdDebug(711) << k_funcinfo << endl;
47 p->save();
48}
49
50void TDECModuleProxyIfaceImpl::load()
51{
52 kdDebug(711) << k_funcinfo << endl;
53 p->load();
54}
55
56void TDECModuleProxyIfaceImpl::defaults()
57{
58 kdDebug(711) << k_funcinfo << endl;
59 p->defaults();
60}
61
62TQString TDECModuleProxyIfaceImpl::applicationName()
63{
64 return tdeApp->caption();
65}
66
67TQString TDECModuleProxyIfaceImpl::quickHelp()
68{
69 return p->quickHelp();
70}
71
72bool TDECModuleProxyIfaceImpl::changed()
73{
74 return p->changed();
75}
76
77void TDECModuleProxyIfaceImpl::changedRelay( bool c )
78{
79 TQByteArray data;
80 TQDataStream stream(data, IO_WriteOnly);
81 stream << c;
82 emitDCOPSignal( "changed(bool)", data );
83}
84
85void TDECModuleProxyIfaceImpl::quickHelpRelay()
86{
87 TQByteArray data;
88 emitDCOPSignal( "quickHelpChanged()", data );
89}
90
91/***************************************************************/
92
93
94
95
96/***************************************************************/
97TDECModuleProxyRootCommunicatorImpl::TDECModuleProxyRootCommunicatorImpl
98 ( const TQCString& name, TDECModuleProxy* const client )
99 : DCOPObject( name ), TQObject( 0, name ),
100 p( const_cast<TDECModuleProxy *>( client ))
101{
102 /*
103 * Connect tdecmshell's TDECModuleProxy's change signal
104 * to us, such that we act as a proxy for
105 * TDECModuleProxy's API.
106 */
107
108 /* Note, we don't use TDECModuleProxy::d->dcopClient */
109 tdeApp->dcopClient()->connectDCOPSignal( 0, p->dcopName(),
110 "changed(bool)", objId(), "changed(bool)", false );
111
112 tdeApp->dcopClient()->connectDCOPSignal( 0, p->dcopName(),
113 "quickHelpChanged()", objId(), "quickHelpChanged()", false );
114}
115
116/* Reimplementations of DCOP members */
117void TDECModuleProxyRootCommunicatorImpl::changed( bool c )
118{
119 kdDebug(711) << k_funcinfo << endl;
120 p->moduleChanged( c );
121}
122
123void TDECModuleProxyRootCommunicatorImpl::quickHelpChanged()
124{
125 kdDebug(711) << k_funcinfo << endl;
126 p->emitQuickHelpChanged();
127}
128
129#include "tdecmoduleproxyIfaceImpl.moc"
TDECModuleProxy
Encapsulates a TDECModule for embedding.
Definition: tdecmoduleproxy.h:69
endl
kndbgstream & endl(kndbgstream &s)
kdDebug
kdbgstream kdDebug(int area=0)
TDEStdAccel::name
TQString name(StdAccel id)

tdeutils

Skip menu "tdeutils"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeutils

Skip menu "tdeutils"
  • 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 tdeutils by doxygen 1.9.4
This website is maintained by Timothy Pearson.