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

List:       kde-commits
Subject:    kdeutils/kregexpeditor
From:       Stephan Binner <binner () kde ! org>
Date:       2005-01-29 9:41:02
Message-ID: 20050129094102.9EED61D174 () office ! kde ! org
[Download RAW message or body]

CVS commit by binner: 

iconset for disabled icons


  M +6 -6      auxbuttons.cpp   1.14
  M +13 -0     util.cpp   1.4
  M +2 -0      util.h   1.4
  M +2 -2      verifybuttons.cpp   1.14


--- kdeutils/kregexpeditor/auxbuttons.cpp  #1.13:1.14
@@ -39,5 +39,5 @@ AuxButtons::AuxButtons( QWidget* parent,
 
   _undo = new QToolButton( this );
-  _undo->setPixmap( Util::getSystemIcon(QString::fromLatin1("undo") ) );
+  _undo->setIconSet( Util::getSystemIconSet(QString::fromLatin1("undo") ) );
   layout->addWidget( _undo );
   connect( _undo, SIGNAL(clicked()), this, SIGNAL(undo()) );
@@ -45,5 +45,5 @@ AuxButtons::AuxButtons( QWidget* parent,
 
   _redo = new QToolButton( this );
-  _redo->setPixmap( Util::getSystemIcon(QString::fromLatin1("redo") ) );
+  _redo->setIconSet( Util::getSystemIconSet(QString::fromLatin1("redo") ) );
   layout->addWidget( _redo );
   connect( _redo, SIGNAL(clicked()), this, SIGNAL(redo()) );
@@ -51,5 +51,5 @@ AuxButtons::AuxButtons( QWidget* parent,
 
   _cut = new QToolButton( this );
-  _cut->setPixmap( Util::getSystemIcon(QString::fromLatin1("editcut") ) );
+  _cut->setIconSet( Util::getSystemIconSet(QString::fromLatin1("editcut") ) );
   layout->addWidget( _cut );
   connect( _cut, SIGNAL(clicked()), this, SIGNAL(cut()) );
@@ -57,5 +57,5 @@ AuxButtons::AuxButtons( QWidget* parent,
 
   _copy = new QToolButton( this );
-  _copy->setPixmap( Util::getSystemIcon(QString::fromLatin1("editcopy") ) );
+  _copy->setIconSet( Util::getSystemIconSet(QString::fromLatin1("editcopy") ) );
   layout->addWidget( _copy );
   connect( _copy, SIGNAL(clicked()), this, SIGNAL(copy()) );
@@ -63,5 +63,5 @@ AuxButtons::AuxButtons( QWidget* parent,
 
   _paste = new QToolButton( this );
-  _paste->setPixmap( Util::getSystemIcon(QString::fromLatin1("editpaste")) );
+  _paste->setIconSet( Util::getSystemIconSet(QString::fromLatin1("editpaste")) );
   layout->addWidget( _paste );
   connect( _paste, SIGNAL(clicked()), this, SIGNAL(paste()) );
@@ -69,5 +69,5 @@ AuxButtons::AuxButtons( QWidget* parent,
 
   _save = new QToolButton( this );
-  _save->setPixmap( Util::getSystemIcon(QString::fromLatin1("filesave")) );
+  _save->setIconSet( Util::getSystemIconSet(QString::fromLatin1("filesave")) );
   layout->addWidget( _save );
   connect( _save, SIGNAL(clicked()), this, SIGNAL(save()) );

--- kdeutils/kregexpeditor/util.cpp  #1.3:1.4
@@ -44,2 +44,15 @@ QPixmap Util::getSystemIcon( const QStri
 
 }
+
+QIconSet Util::getSystemIconSet( const QString& name )
+{
+#ifdef QT_ONLY
+    QPixmap pix;
+    pix.convertFromImage( qembed_findImage( name ) );
+    return QIconSet( pix );
+#else
+  KIconLoader loader;
+  return loader.loadIconSet( name, KIcon::Toolbar);
+#endif
+
+}

--- kdeutils/kregexpeditor/util.h  #1.3:1.4
@@ -21,4 +21,5 @@
 
 #include <qpixmap.h>
+#include <qiconset.h>
 
 class Util
@@ -27,4 +28,5 @@ public:
     static QPixmap getKRegExpEditorIcon( const QString& name );
     static QPixmap getSystemIcon( const QString& name );
+    static QIconSet getSystemIconSet( const QString& name );
 };
 

--- kdeutils/kregexpeditor/verifybuttons.cpp  #1.13:1.14
@@ -46,6 +46,6 @@ VerifyButtons::VerifyButtons( QWidget* p
 
     _verify =  new QToolButton(this);
-    QPixmap icon = Util::getSystemIcon( QString::fromLatin1("spellcheck"));
-    _verify->setPixmap( icon );
+    QIconSet icon = Util::getSystemIconSet( QString::fromLatin1("spellcheck"));
+    _verify->setIconSet( icon );
     QToolTip::add( _verify, i18n( "Verify regular expression" ) );
     QWhatsThis::add( _verify, i18n("Shows what part of the regular expression is \
being matched in the <i>verifier window</i>."


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

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