[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kutils
From: Matthias Kretz <kretz () kde ! org>
Date: 2003-08-28 19:21:55
[Download RAW message or body]
CVS commit by mkretz:
new function removeModule that checks whether the KCM is in the dialog and
removes the page if it is
M +18 -0 kcmultidialog.cpp 1.34
M +5 -0 kcmultidialog.h 1.18
--- kdelibs/kutils/kcmultidialog.cpp #1.33:1.34
@@ -190,4 +190,22 @@ void KCMultiDialog::addModule(const KCMo
}
+void KCMultiDialog::removeModule( const KCModuleInfo& moduleinfo )
+{
+ kdDebug( 1208 ) << k_funcinfo << moduleinfo.moduleName() << endl;
+ QPtrDictIterator<LoadInfo> it( moduleDict );
+ for( ; it.current(); ++it )
+ {
+ if( it.current()->info == moduleinfo )
+ {
+ kdDebug( 1208 ) << "found module to remove" << endl;
+ QWidget * page = ( QWidget* )it.currentKey();
+ delete it.current();
+ moduleDict.remove( page );
+ delete page;
+ break;
+ }
+ }
+}
+
void KCMultiDialog::slotAboutToShow(QWidget *page)
{
--- kdelibs/kutils/kcmultidialog.h #1.17:1.18
@@ -101,4 +101,9 @@ public:
void addModule(const KCModuleInfo& moduleinfo, bool withfallback=false);
+ /**
+ * Remove a module from the dialog.
+ */
+ void removeModule( const KCModuleInfo& moduleinfo );
+
signals:
void configCommitted( const QCString & instanceName );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic