home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ksettings / componentsdialog.h next >
Encoding:
C/C++ Source or Header  |  2006-05-22  |  2.5 KB  |  89 lines

  1. /*  This file is part of the KDE project
  2.     Copyright (C) 2003 Matthias Kretz <kretz@kde.org>
  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.  
  20. #ifndef KSETTINGS_COMPONENTSDIALOG_H
  21. #define KSETTINGS_COMPONENTSDIALOG_H
  22.  
  23. #include <kdialogbase.h>
  24.  
  25. class QString;
  26. class KPluginInfo;
  27.  
  28. namespace KSettings
  29. {
  30.  
  31. /**
  32.   @ingroup plugin
  33.   @ingroup settings
  34.   Dialog for selecting which plugins should be active for an application. Set
  35.   the list of available plugins with \ref setPluginInfos. The dialog will save the
  36.   configuration on clicking ok or apply to the applications config file. Connect
  37.   to the okClicked() and applyClicked() signals to be notified about
  38.   configuration changes.
  39. */
  40. class KUTILS_EXPORT ComponentsDialog : public KDialogBase
  41. {
  42.     Q_OBJECT
  43.     public:
  44.         /**
  45.           Create Dialog.
  46.  
  47.           @param parent parent widget
  48.           @param name   name
  49.         */
  50.         ComponentsDialog( QWidget * parent = 0, const char * name = 0 );
  51.         ~ComponentsDialog();
  52.  
  53.         /**
  54.           Add a plugin that the dialog offers for selection.
  55.         */
  56.         void addPluginInfo( KPluginInfo * );
  57.         /**
  58.           Set list of plugins the dialog offers for selection. (Overwrites a previous list)
  59.         */
  60.         void setPluginInfos( const QMap<QString, KPluginInfo*> & plugininfos );
  61.         /**
  62.           Set list of plugins the dialog offers for selection. (Overwrites a previous list)
  63.         */
  64.         void setPluginInfos( const QValueList<KPluginInfo *> &plugins );
  65.  
  66.         /**
  67.          * reimplemented
  68.          */
  69.         void show();
  70.  
  71.     protected slots:
  72.         void slotOk();
  73.         void slotApply();
  74.  
  75.     private slots:
  76.         void executed( QListViewItem * );
  77.  
  78.     private:
  79.         void savePluginInfos();
  80.  
  81.         class ComponentsDialogPrivate;
  82.         ComponentsDialogPrivate * d;
  83. };
  84.  
  85. }
  86.  
  87. // vim: sw=4 sts=4 et
  88. #endif // KSETTINGS_COMPONENTSDIALOG_H
  89.