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

kutils

  • kutils
kcmoduleproxy.cpp
1 /* This file is part of the KDE project
2  Copyright (C) 2004 Frans Englich <frans.englich@telia.com>
3  Copyright (C) 2003 Matthias Kretz <kretz@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #include <tqapplication.h>
21 #include <tqcursor.h>
22 #include <tqdatastream.h>
23 #include <tqevent.h>
24 #include <tqfileinfo.h>
25 #include <tqframe.h>
26 #include <tqlabel.h>
27 #include <tqlayout.h>
28 #include <tqpoint.h>
29 #include <tqscrollview.h>
30 #include <tqtextstream.h>
31 #include <tqvbox.h>
32 #include <tqwhatsthis.h>
33 #include <tqwidget.h>
34 
35 #include <dcopclient.h>
36 #include <qxembed.h>
37 
38 #include <kapplication.h>
39 #include <kaboutdata.h>
40 #include <kcmodule.h>
41 #include <kcmoduleinfo.h>
42 #include <kcmoduleloader.h>
43 #include <kdebug.h>
44 #include <kdialog.h>
45 #include <klocale.h>
46 #include <kprocess.h>
47 #include <kservice.h>
48 #include <kstandarddirs.h>
49 #include <kuser.h>
50 
51 #include <X11/Xlib.h>
52 
53 #include "kcmoduleproxy.h"
54 #include "kcmoduleproxyIface.h"
55 #include "kcmoduleproxyIfaceImpl.h"
56 
57 /***************************************************************/
58 class KCModuleProxy::KCModuleProxyPrivate
59 {
60  public:
61  KCModuleProxyPrivate( const KCModuleInfo & info )
62  : args( 0 )
63  , kcm( 0 )
64  //, view( 0 )
65  , embedWidget( 0 )
66  , rootProcess ( 0 )
67  , embedFrame ( 0 )
68  , dcopObject( 0 )
69  , dcopClient( 0 )
70  , topLayout( 0 )
71  , rootCommunicator( 0 )
72  , rootInfo( 0 )
73  , modInfo( info )
74  , withFallback( false )
75  , changed( false )
76  , rootMode( false )
77  , bogusOccupier( false )
78  , isInitialized( false )
79  {}
80 
81  ~KCModuleProxyPrivate()
82  {
83  delete rootInfo; // Delete before embedWidget!
84  delete embedWidget; // Delete before embedFrame!
85  delete embedFrame;
86  delete dcopClient;
87  delete dcopObject;
88  delete rootCommunicator;
89  delete rootProcess;
90  delete kcm;
91  }
92 
93  TQStringList args;
94  KCModule *kcm;
95  QXEmbed *embedWidget;
96  KProcess *rootProcess;
97  TQVBox *embedFrame;
98  KCModuleProxyIfaceImpl *dcopObject;
99  DCOPClient *dcopClient;
100  TQVBoxLayout *topLayout; /* Contains TQScrollView view, and root stuff */
101  KCModuleProxyRootCommunicatorImpl *rootCommunicator;
102  TQLabel *rootInfo;
103  TQCString dcopName;
104  KCModuleInfo modInfo;
105  bool withFallback;
106  bool changed;
107  bool rootMode;
108  bool bogusOccupier;
109  bool isInitialized;
110 };
111 /***************************************************************/
112 
113 
114 
115 /*
116  TODO:
117 
118  - How KCModuleProxy behaves wrt memory leaks and behavior, when exiting
119  from root mode is not tested, because no code make use of it. It needs
120  work, if it should be used.
121 
122  - Should write a document which outlines test cases, to avoid
123  regressions. This class is a hazard.
124 
125  - Two Layout problems in runAsRoot:
126  * lblBusy doesn't show
127  * d->kcm/d->rootInfo doesn't get it right when the user
128  presses cancel in the kdesu dialog
129 
130  - Resizing horizontally is contrained; minimum size is set somewhere.
131  It appears to be somehow derived from the module's size.
132 
133  - Prettify: set icon in KCMultiDialog.
134 
135  - Perhaps it's possible to link against kdesu such that
136  the dialog is in process?
137 
138  */
139 /***************************************************************/
140 KCModule * KCModuleProxy::realModule() const
141 {
142 
143  /*
144  * Note, don't call any function that calls realModule() since
145  * that leads to an infinite loop.
146  */
147 
148  kdDebug(711) << k_funcinfo << endl;
149 
150  /* Already loaded */
151  if( d->kcm )
152  return d->kcm;
153 
154  /* /We/ have no kcm, but kcmshell running with root prevs does.. */
155  if( d->rootMode )
156  return 0;
157 
158  TQApplication::setOverrideCursor( Qt::WaitCursor );
159 
160  KCModuleProxy * that = const_cast<KCModuleProxy*>( this );
161 
162  if( !d->isInitialized )
163  {
164  d->dcopName = TQString(moduleInfo().handle().prepend("KCModuleProxy-")).utf8();
165  d->topLayout = new TQVBoxLayout( that, 0, 0, "topLayout" );
166 
167  d->isInitialized = true;
168  }
169 
170  if( !d->dcopClient )
171  d->dcopClient = new DCOPClient();
172 
173  if( !d->dcopClient->isRegistered() )
174  d->dcopClient->registerAs( d->dcopName, false );
175 
176  d->dcopClient->setAcceptCalls( true );
177 
178  if( d->dcopClient->appId() == d->dcopName || d->bogusOccupier )
179  { /* We got the name we requested, because no one was before us,
180  * or, it was an random application which had picked that name */
181  kdDebug(711) << "Module not already loaded, loading module" << endl;
182 
183  d->dcopObject = new KCModuleProxyIfaceImpl( d->dcopName, that );
184 
185  d->kcm = KCModuleLoader::loadModule( moduleInfo(), KCModuleLoader::Inline, d->withFallback,
186  that, name(), d->args );
187 
188  connect( d->kcm, TQT_SIGNAL( changed( bool ) ),
189  TQT_SLOT(moduleChanged(bool)) );
190  connect( d->kcm, TQT_SIGNAL( destroyed() ),
191  TQT_SLOT( moduleDestroyed() ) );
192  connect( d->kcm, TQT_SIGNAL(quickHelpChanged()),
193  TQT_SIGNAL(quickHelpChanged()));
194  TQWhatsThis::add( that, d->kcm->quickHelp() );
195 
196  d->topLayout->addWidget( d->kcm );
197 
198  if ( !d->rootInfo && /* If it's already done */
199  moduleInfo().needsRootPrivileges() /* root, anyone? */ &&
200  !KUser().isSuperUser() ) /* Not necessary if we're root */
201  {
202 
203  d->rootInfo = new TQLabel( that, "rootInfo" );
204  d->topLayout->insertWidget( 0, d->rootInfo );
205 
206  d->rootInfo->setFrameShape(TQFrame::Box);
207  d->rootInfo->setFrameShadow(TQFrame::Raised);
208 
209  const TQString msg = d->kcm->rootOnlyMsg();
210  if( msg.isEmpty() )
211  d->rootInfo->setText(i18n(
212  "<b>Changes in this section requires root access.</b><br />"
213  "Click the \"Administrator Mode\" button to "
214  "allow modifications."));
215  else
216  d->rootInfo->setText(msg);
217 
218  TQWhatsThis::add( d->rootInfo, i18n(
219  "This section requires special permissions, probably "
220  "for system-wide changes; therefore, it is "
221  "required that you provide the root password to be "
222  "able to change the module's properties. If "
223  "you do not provide the password, the module will be "
224  "disabled."));
225  }
226  }
227  else
228  {
229  kdDebug(711) << "Module already loaded, loading KCMError" << endl;
230 
231  d->dcopClient->detach();
232  /* Re-register as anonymous */
233  d->dcopClient->attach();
234 
235  d->dcopClient->setNotifications( true );
236  connect( d->dcopClient, TQT_SIGNAL( applicationRemoved( const TQCString& )),
237  TQT_SLOT( applicationRemoved( const TQCString& )));
238 
239  /* Figure out the name of where the module is already loaded */
240  TQByteArray replyData, data;
241  TQCString replyType;
242  TQString result;
243  TQDataStream arg, stream( replyData, IO_ReadOnly );
244 
245  if( d->dcopClient->call( d->dcopName, d->dcopName, "applicationName()",
246  data, replyType, replyData ))
247  {
248  stream >> result;
249 
250  d->kcm = KCModuleLoader::reportError( KCModuleLoader::Inline,
251  i18n( "Argument is application name", "This configuration section is "
252  "already opened in %1" ).arg( result ), " ", that );
253 
254  d->topLayout->addWidget( d->kcm );
255  }
256  else
257  {
258  kdDebug(711) << "Calling KCModuleProxy's DCOP interface for fetching the name failed." << endl;
259  d->bogusOccupier = true;
260  TQApplication::restoreOverrideCursor();
261  return realModule();
262  }
263  }
264 
265  TQApplication::restoreOverrideCursor();
266 
267  return d->kcm;
268 }
269 
270 void KCModuleProxy::applicationRemoved( const TQCString& app )
271 {
272  if( app == d->dcopName )
273  {
274  /* Violence: Get rid of KCMError & CO, so that
275  * realModule() attempts to reload the module */
276  delete d->kcm;
277  d->kcm = 0;
278  d->dcopClient->setNotifications( false );
279  realModule();
280  d->kcm->show();
281  }
282 }
283 
284 void KCModuleProxy::showEvent( TQShowEvent * ev )
285 {
286 
287  kdDebug(711) << k_funcinfo << endl;
288  ( void )realModule();
289 
290  /* We have no kcm, if we're in root mode */
291  if( d->kcm )
292  d->kcm->show();
293 
294  TQWidget::showEvent( ev );
295 
296 }
297 
298 void KCModuleProxy::runAsRoot()
299 {
300  if ( !moduleInfo().needsRootPrivileges() )
301  return;
302 
303  TQApplication::setOverrideCursor( Qt::WaitCursor );
304 
305  delete d->rootProcess;
306  delete d->embedWidget;
307  delete d->embedFrame;
308 
309  d->embedFrame = new TQVBox( this, "embedFrame" );
310  d->embedFrame->setFrameStyle( TQFrame::Box | TQFrame::Raised );
311 
312  TQPalette pal( red );
313  pal.setColor( TQColorGroup::Background,
314  colorGroup().background() );
315  d->embedFrame->setPalette( pal );
316  d->embedFrame->setLineWidth( 2 );
317  d->embedFrame->setMidLineWidth( 2 );
318  d->topLayout->addWidget(d->embedFrame,1);
319 
320  d->embedWidget = new QXEmbed( d->embedFrame, "embedWidget" );
321 
322  d->embedFrame->show();
323 
324  TQLabel *lblBusy = new TQLabel(i18n("<big>Loading...</big>"), d->embedWidget, "lblBusy" );
325  lblBusy->setTextFormat(RichText);
326  lblBusy->setAlignment(AlignCenter);
327  lblBusy->setGeometry(0,0, d->kcm->width(), d->kcm->height());
328  lblBusy->show();
329 
330  deleteClient();
331  /* The DCOP registration is now gone, and it will occur again when kcmshell soon
332  * registers. Here's a race condition in other words, but how likely is that?
333  *
334  * - It's a user initiated action, which means the user have to do weird stuff, very
335  * quick.
336  * - If the user _do_ manage to fsck up, the code will recover gracefully, see realModule().
337  *
338  * So no worry. At the end of this function, communication with
339  * the DCOP object is established.
340  */
341 
342  /* Prepare the process to run the kcmshell */
343  TQString cmd = moduleInfo().service()->exec().stripWhiteSpace();
344  if (cmd.left(5) == "kdesu")
345  {
346  cmd = TQString(cmd.remove(0,5)).stripWhiteSpace();
347 
348  /* Remove all kdesu switches */
349  while( cmd.length() > 1 && cmd[ 0 ] == '-' )
350  cmd = TQString(cmd.remove( 0, cmd.find( ' ' ) )).stripWhiteSpace();
351  }
352 
353  if (cmd.left(8) == "kcmshell")
354  cmd = TQString(cmd.remove(0,8)).stripWhiteSpace();
355 
356  /* Run the process */
357  TQString kdesu = KStandardDirs::findExe("kdesu");
358  if (!kdesu.isEmpty())
359  {
360 
361  d->rootProcess = new KProcess;
362 
363  *d->rootProcess << kdesu;
364  *d->rootProcess << "--nonewdcop" << "-n" << "-d" << TQString( "-i%1" ).arg(moduleInfo().icon());
365 
366  *d->rootProcess << TQString("%1 %2 --embed-proxy %3 --lang %4").arg(locate("exe", "kcmshell"))
367  .arg(cmd).arg(d->embedWidget->winId()).arg(KGlobal::locale()->language());
368 
369  connect(d->rootProcess, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(rootExited()));
370 
371  if ( !d->rootProcess->start( KProcess::NotifyOnExit ))
372  {
373  d->rootMode = false;
374  rootExited();
375  }
376  else
377  {
378  d->rootMode = true;
379  kapp->dcopClient();
380  d->rootCommunicator = new KCModuleProxyRootCommunicatorImpl( d->dcopName + "-RootCommunicator", this );
381  }
382 
383  delete lblBusy;
384  TQApplication::restoreOverrideCursor();
385  return;
386  }
387 
388  /* Clean up in case of failure */
389  delete d->embedWidget;
390  d->embedWidget = 0;
391  delete d->embedFrame;
392  d->embedFrame = 0;
393 
394  TQApplication::restoreOverrideCursor();
395 }
396 
397 void KCModuleProxy::rootExited()
398 {
399  kdDebug(711) << k_funcinfo << endl;
400 
401  if ( d->embedWidget->embeddedWinId() )
402  XDestroyWindow(qt_xdisplay(), d->embedWidget->embeddedWinId());
403 
404  delete d->embedWidget;
405  d->embedWidget = 0;
406 
407  delete d->rootProcess;
408  d->rootProcess = 0;
409 
410  delete d->embedFrame;
411  d->embedFrame=0;
412 
413  delete d->rootCommunicator;
414  d->rootCommunicator = 0;
415 
416  /* Such that the "ordinary" module loads again */
417  d->rootMode = false;
418 
419  d->topLayout->invalidate();
420 
421  TQShowEvent ev;
422  showEvent( &ev );
423 
424  moduleChanged( false );
425  emit childClosed();
426 }
427 
428 KCModuleProxy::~KCModuleProxy()
429 {
430  deleteClient();
431  KCModuleLoader::unloadModule(moduleInfo());
432 
433  delete d;
434 }
435 
436 void KCModuleProxy::deleteClient()
437 {
438  if( d->embedWidget )
439  XKillClient(qt_xdisplay(), d->embedWidget->embeddedWinId());
440 
441 
442  delete d->kcm;
443  d->kcm = 0;
444 
445  delete d->dcopObject;
446  d->dcopObject = 0;
447 
448  if( d->dcopClient && !d->dcopClient->detach() )
449  kdDebug(711) << "Unregistering from DCOP failed." << endl;
450 
451  delete d->dcopClient;
452  d->dcopClient = 0;
453 
454  kapp->syncX();
455 
456 }
457 
458 void KCModuleProxy::moduleChanged( bool c )
459 {
460  if( d->changed == c )
461  return;
462 
463  d->changed = c;
464  emit changed( c );
465  emit changed( this );
466 }
467 
468 void KCModuleProxy::moduleDestroyed()
469 {
470  d->kcm = 0;
471 }
472 
473 KCModuleProxy::KCModuleProxy( const KService::Ptr & service, bool withFallback,
474  TQWidget * parent, const char * name, const TQStringList & args)
475  : TQWidget( parent, name )
476 {
477  init( KCModuleInfo( service ));
478  d->args = args;
479  d->withFallback = withFallback;
480 }
481 
482 KCModuleProxy::KCModuleProxy( const KCModuleInfo & info, bool withFallback,
483  TQWidget * parent, const char * name, const TQStringList & args )
484  : TQWidget( parent, name )
485 {
486  init( info );
487  d->args = args;
488  d->withFallback = withFallback;
489 }
490 
491 KCModuleProxy::KCModuleProxy( const TQString& serviceName, bool withFallback,
492  TQWidget * parent, const char * name,
493  const TQStringList & args)
494  : TQWidget( parent, name )
495 {
496  init( KCModuleInfo( serviceName ));
497  d->args = args;
498  d->withFallback = withFallback;
499 }
500 
501 void KCModuleProxy::init( const KCModuleInfo& info )
502 {
503  kdDebug(711) << k_funcinfo << endl;
504 
505  d = new KCModuleProxyPrivate( info );
506 
507  /* This is all we do for now; all the heavy work is
508  * done in realModule(). It's called when the module
509  * _actually_ is needed, in for example showEvent().
510  * The module is loaded "on demand" -- lazy loading.
511  */
512 
513 }
514 
515 void KCModuleProxy::load()
516 {
517 
518  if( d->rootMode )
519  callRootModule( "load()" );
520  else if( realModule() )
521  {
522  d->kcm->load();
523  moduleChanged( false );
524  }
525 }
526 
527 void KCModuleProxy::save()
528 {
529  if( d->rootMode )
530  callRootModule( "save()" );
531  else if( d->changed && realModule() )
532  {
533  d->kcm->save();
534  moduleChanged( false );
535  }
536 }
537 
538 void KCModuleProxy::callRootModule( const TQCString& function )
539 {
540  TQByteArray sendData, replyData;
541  TQCString replyType;
542 
543  /* Note, we don't use d->dcopClient here, because it's used for
544  * the loaded module(and it's not "us" when this function is called) */
545  if( !kapp->dcopClient()->call( d->dcopName, d->dcopName, function, sendData,
546  replyType, replyData, true, -1 ))
547  kdDebug(711) << "Calling function '" << function << "' failed." << endl;
548 
549 }
550 
551 void KCModuleProxy::defaults()
552 {
553  if( d->rootMode )
554  callRootModule( "defaults()" );
555  if( realModule() )
556  d->kcm->defaults();
557 }
558 
559 TQString KCModuleProxy::quickHelp() const
560 {
561 
562  if( !d->rootMode )
563  return realModule() ? realModule()->quickHelp() : TQString::null;
564  else
565  {
566  TQByteArray data, replyData;
567  TQCString replyType;
568 
569  if (kapp->dcopClient()->call(d->dcopName, d->dcopName, "quickHelp()",
570  data, replyType, replyData))
571  kdDebug(711) << "Calling DCOP function bool changed() failed." << endl;
572  else
573  {
574  TQDataStream reply(replyData, IO_ReadOnly);
575  if (replyType == "TQString")
576  {
577  TQString result;
578  reply >> result;
579  return result;
580  }
581  else
582  kdDebug(711) << "DCOP function changed() returned mumbo jumbo." << endl;
583  }
584  return TQString::null;
585  }
586 }
587 
588 const KAboutData * KCModuleProxy::aboutData() const
589 {
590  if( !d->rootMode )
591  return realModule() ? realModule()->aboutData() : 0;
592  else
593  /* This needs fixing, perhaps cache a KAboutData copy
594  * while in root mode? */
595  return 0;
596 
597 
598 }
599 
600 int KCModuleProxy::buttons() const
601 {
602  return realModule() ? realModule()->buttons() :
603  KCModule::Help | KCModule::Default | KCModule::Apply ;
604 }
605 
606 TQString KCModuleProxy::rootOnlyMsg() const
607 {
608  return realModule() ? realModule()->rootOnlyMsg() : TQString::null;
609 }
610 
611 bool KCModuleProxy::useRootOnlyMsg() const
612 {
613  return realModule() ? realModule()->useRootOnlyMsg() : true;
614 }
615 
616 KInstance * KCModuleProxy::instance() const
617 {
618  return realModule() ? realModule()->instance() : 0;
619 }
620 
621 bool KCModuleProxy::changed() const
622 {
623  return d->changed;
624 }
625 
626 const KCModuleInfo& KCModuleProxy::moduleInfo() const
627 {
628  return d->modInfo;
629 }
630 
631 bool KCModuleProxy::rootMode() const
632 {
633  return d->rootMode;
634 }
635 
636 TQCString KCModuleProxy::dcopName() const
637 {
638  return d->dcopName;
639 }
640 
641 void KCModuleProxy::emitQuickHelpChanged()
642 {
643  emit quickHelpChanged();
644 }
645 
646 /***************************************************************/
647 #include "kcmoduleproxy.moc"
648 
649 // vim: sw=4 ts=4 noet
KCModule::useRootOnlyMsg
bool useRootOnlyMsg() const
KCModuleProxy::KCModuleProxy
KCModuleProxy(const KCModuleInfo &info, bool withFallback=true, TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList())
Constructs a KCModuleProxy from a KCModuleInfo class.
Definition: kcmoduleproxy.cpp:482
KProcess
locate
TQString locate(const char *type, const TQString &filename, const KInstance *instance=KGlobal::instance())
KCModuleInfo::service
KService::Ptr service() const
Definition: kcmoduleinfo.h:137
KGlobal::locale
static KLocale * locale()
KProcess::NotifyOnExit
NotifyOnExit
KCModule::buttons
int buttons() const
KCModule::quickHelp
virtual TQString quickHelp() const
KCModuleProxy::emitQuickHelpChanged
void emitQuickHelpChanged()
Emits the quickHelpChanged signal.
Definition: kcmoduleproxy.cpp:641
KLocale::language
TQString language() const
KCModuleProxy::buttons
int buttons() const
Definition: kcmoduleproxy.cpp:600
KStandardDirs::findExe
static TQString findExe(const TQString &appname, const TQString &pathstr=TQString::null, bool ignoreExecBit=false)
kdDebug
kdbgstream kdDebug(int area=0)
KCModuleProxy::instance
KInstance * instance() const
Returns the embedded KCModule&#39;s KInstance.
Definition: kcmoduleproxy.cpp:616
KCModuleProxy::dcopName
TQCString dcopName() const
Returns the DCOP the module&#39;s DCOPClient and DCOPObject has(they are identical).
Definition: kcmoduleproxy.cpp:636
klocale.h
KCModuleProxy::~KCModuleProxy
~KCModuleProxy()
Default destructor.
Definition: kcmoduleproxy.cpp:428
KCModuleLoader::Inline
the error report is shown instead of the KCModule that should have * been loaded
Definition: kcmoduleloader.h:93
KCModuleLoader::loadModule
static KCModule * loadModule(const KCModuleInfo &module, bool withFallback=true, TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList()) KDE_DEPRECATED
Loads a KCModule.
Definition: kcmoduleloader.cpp:116
KUser
KCModuleProxy::childClosed
void childClosed()
When a module running with root privileges and exits, returns to normal mode, the childClosed() signa...
KCModuleProxy::deleteClient
void deleteClient()
Calling this, results in deleting the contained module, and unregistering from DCOP.
Definition: kcmoduleproxy.cpp:436
KCModuleProxy::useRootOnlyMsg
bool useRootOnlyMsg() const
Definition: kcmoduleproxy.cpp:611
KCModuleProxy::load
void load()
Calling it will cause the contained module to run its load() routine.
Definition: kcmoduleproxy.cpp:515
KCModuleLoader::reportError
static KCModule * reportError(ErrorReporting report, const TQString &text, TQString details, TQWidget *parent)
Returns a KCModule containing the messages report and text.
Definition: kcmoduleloader.cpp:284
KCModuleProxy::init
void init(const KCModuleInfo &info)
Internal intialization function, called by the constructors.
Definition: kcmoduleproxy.cpp:501
KCModuleProxy::realModule
KCModule * realModule() const
Access to the actual module.
Definition: kcmoduleproxy.cpp:140
KInstance
KCModuleProxy::runAsRoot
void runAsRoot()
Calling this will cause the module to be run in "administrator mode".
Definition: kcmoduleproxy.cpp:298
KAboutData
KCModule::rootOnlyMsg
TQString rootOnlyMsg() const
KCModule::aboutData
virtual const KAboutData * aboutData() const
KCModuleProxy::defaults
void defaults()
Calling it will cause the contained module to load its default values.
Definition: kcmoduleproxy.cpp:551
KCModuleInfo
A class that provides information about a KCModule.
Definition: kcmoduleinfo.h:49
KCModuleProxy::changed
bool changed() const
Definition: kcmoduleproxy.cpp:621
KCModuleProxy::aboutData
const KAboutData * aboutData() const
Definition: kcmoduleproxy.cpp:588
KCModuleProxy::showEvent
void showEvent(TQShowEvent *)
Reimplemented for internal purposes.
Definition: kcmoduleproxy.cpp:284
KCModuleProxy
Encapsulates a KCModule for embedding.
Definition: kcmoduleproxy.h:68
endl
kndbgstream & endl(kndbgstream &s)
KCModuleProxy::save
void save()
Calling it will cause the contained module to run its save() routine.
Definition: kcmoduleproxy.cpp:527
KCModuleProxy::rootOnlyMsg
TQString rootOnlyMsg() const
Definition: kcmoduleproxy.cpp:606
KCModuleProxy::moduleInfo
const KCModuleInfo & moduleInfo() const
Definition: kcmoduleproxy.cpp:626
KCModuleProxy::quickHelp
TQString quickHelp() const
Definition: kcmoduleproxy.cpp:559
KCModule
KCModuleLoader::unloadModule
static void unloadModule(const KCModuleInfo &mod)
Unloads the module&#39;s library.
Definition: kcmoduleloader.cpp:204
KCModuleProxy::rootMode
bool rootMode() const
Returns whether the module is running in root mode.
Definition: kcmoduleproxy.cpp:631

kutils

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

kutils

Skip menu "kutils"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kutils by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |