[Digikam-devel] setButtonGuiItem() from KDE 3.3

Mike Seymour (sent by Nabble.com) lists at nabble.com
Tue Nov 22 21:58:02 GMT 2005


Hello:

Actually, the change in the SVN souce will leave the forward and back buttons blank in the image properties dialog.  I added the code below which seemed to give the buttons for those of us stuck with KDE < 3.3

cordialement

Mike

*** imageproperties.cpp 2005-11-22 22:40:41.023253880 +0100
--- imageproperties.cpp.bak     2005-11-16 15:18:32.000000000 +0100
***************
*** 59,74 ****
  {
      if (m_mode == MULTI)
      {
-     #if KDE_IS_VERSION(3,3,0)
          setButtonGuiItem(User1, KStdGuiItem::guiItem(KStdGuiItem::Forward));
          setButtonGuiItem(User2, KStdGuiItem::guiItem(KStdGuiItem::Back));
-     #else
-       setButtonText(User1,  KStdGuiItem::guiItem(KStdGuiItem::Forward).plainTe
xt() );
-       setButtonTip( User1, KStdGuiItem::guiItem(KStdGuiItem::Forward).toolTip(
) );
-       setButtonText(User2,  KStdGuiItem::guiItem(KStdGuiItem::Back).plainText(
) );
-       setButtonTip( User2, KStdGuiItem::guiItem(KStdGuiItem::Back).toolTip() )
;

-     #endif
          enableButton(User1, m_currItem->nextItem() != 0);
          enableButton(User2, m_currItem->prevItem() != 0);
      }
--- 59,67 ----




Gilles Caulier wrote: 
> 
> Le Mardi 15 Novembre 2005 00:14, Uwe Reder a écrit :
>> Hi!
>>
>> I run KDE 3.2.3. Compilation breaks in
>> digikam-0.8.0-rc/digikam/digikam/imageproperties.cpp with
>> setButtonGuiItem() undefined. It seams setButtonGuiItem() appeared with
>> KDE 3.3. There must be a way to work around setButtonGuiItem() since it is
>> the only method (as far as I can see) that is used from 3.3.
>>
>> I took a rather simple approach to solve the problem: I backported
>> setButtonGuiItem() to 3.2.3's libkdeui.so. Works perfectly for me :-)
>>
>> Uwe.
> 
> Fixed on svn to ignore this method if compiling under kde 3.2.x like this :
> 
> ImageProperties::ImageProperties(enum Mode mode, QWidget* parent,
>                                  AlbumIconView* view, AlbumIconItem* currItem,
>                                  QRect* selectionArea, uint* imageData,
>                                  int imageWidth, int imageHeight)
>     : KDialogBase(Tabbed, QString::null,
>                   (mode == MULTI) ? Help|User1|User2|Stretch|Close : Help|
> Stretch|Close,
>                   Close, parent, 0, true, true),
>       m_view(view), m_currItem(currItem), m_mode(mode)
> {
>     if (m_mode == MULTI)
>     {
> #if KDE_IS_VERSION(3,3,0)
>         setButtonGuiItem(User1, KStdGuiItem::guiItem(KStdGuiItem::Forward));
>         setButtonGuiItem(User2, KStdGuiItem::guiItem(KStdGuiItem::Back));
> #endif
>         enableButton(User1, m_currItem->nextItem() != 0);
>         enableButton(User2, m_currItem->prevItem() != 0);
>     }
> ...
> 
> Regards
> 
> -- 
> Gilles Caulier
> 
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
> 
>
--
Sent from the digikam-devel forum at Nabble.com:
http://www.nabble.com/setButtonGuiItem%28%29-from-KDE-3.3-t552361.html#a1607996
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20051122/981ba6d0/attachment.html>


More information about the Digikam-devel mailing list