kpluginselector.h
00001 /* This file is part of the KDE project 00002 Copyright (C) 2002-2003 Matthias Kretz <kretz@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 00018 */ 00019 00020 #ifndef KPLUGINSELECTOR_H 00021 #define KPLUGINSELECTOR_H 00022 00023 #include <tqwidget.h> 00024 #include <tqstring.h> 00025 00026 #include <kdelibs_export.h> 00027 00028 class KInstance; 00029 class KPluginInfo; 00030 class TQWidgetStack; 00031 class KConfig; 00032 class KConfigGroup; 00033 00060 class KUTILS_EXPORT KPluginSelector : public TQWidget 00061 { 00062 friend class KPluginSelectionWidget; 00063 00064 Q_OBJECT 00065 public: 00069 KPluginSelector( TQWidget * parent, const char * name = 0 ); 00070 ~KPluginSelector(); 00071 00101 void addPlugins( const TQString & instanceName, 00102 const TQString & catname = TQString::null, 00103 const TQString & category = TQString::null, 00104 KConfig * config = 0 ); 00105 00110 void addPlugins( const KInstance * instance, 00111 const TQString & catname = TQString::null, 00112 const TQString & category = TQString::null, 00113 KConfig * config = 0 ); 00114 00140 void addPlugins( const TQValueList<KPluginInfo*> & plugininfos, 00141 const TQString & catname = TQString::null, 00142 const TQString & category = TQString::null, 00143 KConfig * config = 0 ); 00144 00152 void setShowEmptyConfigPage( bool ); 00153 00161 void load(); 00162 00166 void save(); 00167 00171 void defaults(); 00172 00173 signals: 00177 void changed( bool ); 00178 00184 void configCommitted( const TQCString & instanceName ); 00185 00186 private: 00192 TQWidgetStack * widgetStack(); 00193 00199 void configPage( int id ); 00200 00204 void checkNeedForTabWidget(); 00205 00209 void addPluginsInternal( const TQValueList<KPluginInfo*> plugininfos, 00210 const TQString & catname, const TQString & category, 00211 KConfigGroup* cfgGroup ); 00212 00213 class KPluginSelectorPrivate; 00214 KPluginSelectorPrivate * d; 00215 }; 00216 00217 // vim: sw=4 sts=4 et tw=80 00218 #endif // KPLUGINSELECTOR_H