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

kutils

  • KSettings
  • PluginPage
Public Member Functions | List of all members
KSettings::PluginPage Class Reference
Settings UI classes | Plugin handling classes

#include <pluginpage.h>

Inheritance diagram for KSettings::PluginPage:
KCModule

Public Member Functions

 PluginPage (TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList())
 
 PluginPage (KInstance *instance, TQWidget *parent=0, const TQStringList &args=TQStringList())
 
KPluginSelector * pluginSelector ()
 
virtual void load ()
 
virtual void save ()
 
virtual void defaults ()
 
- Public Member Functions inherited from KCModule
virtual void sysdefaults ()
 
virtual TQString quickHelp () const
 
virtual const KAboutData * aboutData () const
 
void setAboutData (KAboutData *about)
 
int buttons () const
 
TQString rootOnlyMsg () const
 
bool useRootOnlyMsg () const
 
const TQPtrList
< KConfigDialogManager > & 
configs () const
 

Additional Inherited Members

- Public Types inherited from KCModule
enum  Button
 
- Signals inherited from KCModule
void changed (bool state)
 
void quickHelpChanged ()
 
- Protected Slots inherited from KCModule
void changed ()
 
void widgetChanged ()
 
- Protected Member Functions inherited from KCModule
KConfigDialogManager * addConfig (KConfigSkeleton *config, TQWidget *widget)
 
void setQuickHelp (const TQString &help)
 
void setButtons (int btn)
 
void setRootOnlyMsg (const TQString &msg)
 
void setUseRootOnlyMsg (bool on)
 
bool managedWidgetChangeState () const
 
void unmanagedWidgetChangeState (bool)
 

Detailed Description

Convenience KCModule for creating a plugins config page.

This class makes it very easy to create a plugins configuration page to your program. All you need to do is create a class that is derived from PluginPage and add the appropriate plugin infos to the KPluginSelector. This is done using the pluginSelector() method:

typedef KGenericFactory<MyAppPluginConfig, TQWidget> MyAppPluginConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_myapppluginconfig, MyAppPluginConfigFactory( "kcm_myapppluginconfig" ) );
MyAppPluginConfig( TQWidget * parent, const char *, const TQStringList & args )
: PluginPage( MyAppPluginConfigFactory::instance(), parent, args )
{
pluginSelector()->addPlugins( KGlobal::instance()->instanceName(), i18n( "General Plugins" ), "General" );
pluginSelector()->addPlugins( KGlobal::instance()->instanceName(), i18n( "Effects" ), "Effects" );
}

All that remains to be done is to create the appropriate .desktop file

[Desktop Entry]
Encoding=UTF-8
Icon=plugin
Type=Service
ServiceTypes=KCModule

X-KDE-ModuleType=Library
X-KDE-Library=myapppluginconfig
X-KDE-FactoryName=MyAppPluginConfigFactory
X-KDE-ParentApp=myapp
X-KDE-ParentComponents=myapp

Name=Plugins
Comment=Select and configure your plugins:
Author
Matthias Kretz kretz.nosp@m.@kde.nosp@m..org
Since
3.2

Definition at line 73 of file pluginpage.h.

Constructor & Destructor Documentation

KSettings::PluginPage::PluginPage ( TQWidget *  parent = 0,
const char *  name = 0,
const TQStringList &  args = TQStringList() 
)

Standart KCModule constructor.

Automatically creates the the KPluginSelector widget.

Definition at line 40 of file pluginpage.cpp.

KSettings::PluginPage::PluginPage ( KInstance *  instance,
TQWidget *  parent = 0,
const TQStringList &  args = TQStringList() 
)

Standart KCModule constructor.

Automatically creates the the KPluginSelector widget.

Definition at line 49 of file pluginpage.cpp.

Member Function Documentation

void KSettings::PluginPage::load ( )
virtual

Load the state of the plugins (selected or not) from the KPluginInfo objects.

For KParts plugins everything should work automatically. For your own type of plugins you might need to reimplement the KPluginInfo::pluginLoaded() method. If that doesn't fit your needs you can also reimplement this method.

Reimplemented from KCModule.

Definition at line 70 of file pluginpage.cpp.

KPluginSelector * KSettings::PluginPage::pluginSelector ( )
Returns
a reference to the KPluginSelector.

Definition at line 65 of file pluginpage.cpp.

void KSettings::PluginPage::save ( )
virtual

Save the state of the plugins to KConfig objects.

Reimplemented from KCModule.

Definition at line 75 of file pluginpage.cpp.


The documentation for this class was generated from the following files:
  • pluginpage.h
  • pluginpage.cpp

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.8
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |