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

List:       kde-commits
Subject:    proko2: kdepim/certmanager/lib
From:       Marc Mutz <mutz () kde ! org>
Date:       2005-04-25 6:54:38
Message-ID: 20050425065438.0A0CF488 () office ! kde ! org
[Download RAW message or body]

CVS commit by mutz: 

Let there be group icons...


  A            pics/chiasmus_chi.png   1.1.2.1
  M +1 -1      pics/Makefile.am   1.4.8.1
  M +20 -12    ui/cryptoconfigmodule.cpp   1.6.6.6


--- kdepim/certmanager/lib/pics/Makefile.am  #1.4:1.4.8.1
@@ -1,4 +1,4 @@
 picsdir = $(kde_datadir)/libkleopatra/pics
-pics_DATA = key.png key_ok.png key_bad.png key_unknown.png
+pics_DATA = key.png key_ok.png key_bad.png key_unknown.png chiasmus_chi.png
 
 KDE_ICON = gpg gpgsm

--- kdepim/certmanager/lib/ui/cryptoconfigmodule.cpp  #1.6.6.5:1.6.6.6
@@ -68,10 +68,4 @@ Kleo::CryptoConfigModule::CryptoConfigMo
   : KJanusWidget( parent, name, determineJanusFace( config ) ), mConfig( config )
 {
-//  QVBoxLayout *vlay = new QVBoxLayout( this, 0, KDialog::spacingHint() );
-//  mTabWidget = new QTabWidget( this );
-//  vlay->addWidget( mTabWidget );
-
-  const QStringList components = config->componentList();
-
   QWidget * vbox = 0;
   if ( face() == Plain ) {
@@ -81,14 +75,16 @@ Kleo::CryptoConfigModule::CryptoConfigMo
   }
 
-  for( QStringList::const_iterator compit = components.begin(); compit != components.end(); ++compit ) {
-    //kdDebug(5150) << "Component " << (*compit).local8Bit() << ":" << endl;
-    Kleo::CryptoConfigComponent* comp = config->component( *compit );
+  const QStringList components = config->componentList();
+  for ( QStringList::const_iterator it = components.begin(); it != components.end(); ++it ) {
+    //kdDebug(5150) << "Component " << (*it).local8Bit() << ":" << endl;
+    Kleo::CryptoConfigComponent* comp = config->component( *it );
     Q_ASSERT( comp );
     if ( comp->groupList().empty() )
       continue;
-    if ( face() != Plain )
-    vbox = addVBoxPage( comp->description(), QString::null, loadIcon( *compit ) );
+    if ( face() != Plain ) {
+      vbox = addVBoxPage( comp->description(), QString::null, loadIcon( comp->iconName() ) );
+    }
     CryptoConfigComponentGUI* compGUI =
-      new CryptoConfigComponentGUI( this, comp, vbox, (*compit).local8Bit() );
+      new CryptoConfigComponentGUI( this, comp, vbox, (*it).local8Bit() );
     // KJanusWidget doesn't seem to have iterators, so we store a copy...
     mComponentGUIs.append( compGUI );
@@ -190,4 +186,5 @@ Kleo::CryptoConfigGroupGUI::CryptoConfig
   : QObject( module, name ), mGroup( group )
 {
+  const int startRow = glay->numRows();
   const QStringList entries = mGroup->entryList();
   for( QStringList::const_iterator it = entries.begin(), end = entries.end() ; it != end; ++it ) {
@@ -201,4 +198,15 @@ Kleo::CryptoConfigGroupGUI::CryptoConfig
     }
   }
+  const int endRow = glay->numRows() - 1;
+  if ( endRow < startRow )
+    return;
+
+  const QString iconName = group->iconName();
+  if ( iconName.isEmpty() )
+    return;
+
+  QLabel * l = new QLabel( widget );
+  l->setPixmap( loadIcon( iconName ) );
+  glay->addMultiCellWidget( l, startRow, endRow, 0, 0, Qt::AlignTop );
 }
 


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

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