[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdepim/certmanager/lib/ui
From:       Marc Mutz <Marc.Mutz () uni-bielefeld ! de>
Date:       2004-04-14 10:43:34
Message-ID: 20040414104334.B860A9A38 () office ! kde ! org
[Download RAW message or body]

CVS commit by mutz: 

Make it an icon list. The icons are chosen using component_name =~ \
s/[^a-zA-Z0-9_]/_/g;


  M +10 -2     cryptoconfigmodule.cpp   1.5


--- kdepim/certmanager/lib/ui/cryptoconfigmodule.cpp  #1.4:1.5
@@ -39,4 +39,6 @@
 #include <kdebug.h>
 #include <knuminput.h>
+#include <kiconloader.h>
+#include <kglobal.h>
 
 #include <qgrid.h>
@@ -45,9 +47,15 @@
 #include <qvbox.h>
 #include <qpushbutton.h>
+#include <qregexp.h>
 
 using namespace Kleo;
 
+inline QPixmap loadIcon( QString s ) {
+  return KGlobal::instance()->iconLoader()
+    ->loadIcon( s.replace( QRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, \
KIcon::SizeMedium ); +}
+
 Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidget * \
                parent, const char * name )
-  : KJanusWidget( parent, name, KJanusWidget::TreeList ), mConfig( config )
+  : KJanusWidget( parent, name, KJanusWidget::IconList ), mConfig( config )
 {
 //  QVBoxLayout *vlay = new QVBoxLayout( this, 0, KDialog::spacingHint() );
@@ -62,5 +70,5 @@ Kleo::CryptoConfigModule::CryptoConfigMo
     Q_ASSERT( comp );
     if ( !comp->groupList().isEmpty() ) {
-      QVBox* vbox = addVBoxPage( comp->description() );
+      QVBox* vbox = addVBoxPage( comp->description(), QString::null, loadIcon( \
*compit ) );  CryptoConfigComponentGUI* compGUI =
         new CryptoConfigComponentGUI( this, comp, vbox, (*compit).local8Bit() );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic