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

List:       kde-core-devel
Subject:    PATCH: use KGuiItem::toolTip and KGuiItem::whatsThis in KPushButton
From:       Sebastian Trueg <trueg () k3b ! org>
Date:       2004-01-07 9:55:17
Message-ID: 200401071055.17852.trueg () k3b ! org
[Download RAW message or body]

Hi,

may I commit? Or is there a reason why these are not used?

Cheers,
Sebastian


--- kpushbutton.cpp     24 Sep 2003 17:27:09 -0000      1.22
+++ kpushbutton.cpp     7 Jan 2004 09:53:18 -0000
@@ -19,6 +19,8 @@

 #include <kglobalsettings.h>
 #include <qdragobject.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
 #include <kconfig.h>
 #include <kglobal.h>

@@ -98,6 +100,11 @@ void KPushButton::init( const KGuiItem &

     setSizePolicy( QSizePolicy( QSizePolicy::Minimum, 
QSizePolicy::Minimum ) );

+    if( !item.toolTip().isEmpty() )
+      QToolTip::add( this, item.toolTip() );
+    if( !item.whtsThis().isEmpty() )
+      QWhatsThis::add( this, item.whatsThis() );
+
     if (kapp)
     {
        connect( kapp, SIGNAL( settingsChanged(int) ),
[prev in list] [next in list] [prev in thread] [next in thread] 

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