SVN commit 1098107 by sebas:

Make this guy a Plasma::Label,

It shouldn't be separately clickable, as this brings some interaction problems
with it. Now the whole area of this widget is clickable and triggers the details
view.

We should probably expose the setPixmap(QPixmap) method in Plasma::Label's API,
as this functionality is very useful if you want to display a custom-painted
pixmap we don't have the path of.

CCMAIL:plasma-devel@kde.org

 M  +5 -3      interfaceitem.cpp  
 M  +1 -1      interfaceitem.h  
 M  +1 -1      nmpopup.cpp  
 M  +1 -1      nmpopup.h  
 M  +4 -1      wirelessinterfaceitem.cpp  


--- trunk/kdereview/networkmanagement/applet/interfaceitem.cpp #1098106:1098107
@@ -68,7 +68,7 @@
     m_layout->setColumnFixedWidth(2, 16); // FIXME: spacing?
     //m_layout->setColumnFixedWidth(3, 22); // FIXME: spacing?
 
-    m_icon = new Plasma::IconWidget(this);
+    m_icon = new Plasma::Label(this);
     m_icon->setMinimumHeight(48);
     m_icon->setMaximumHeight(48);
     setMinimumHeight(54);
@@ -79,8 +79,9 @@
 
     m_interfaceName = UiUtils::interfaceNameLabel(m_iface->uni());
 
-    m_icon->setIcon(UiUtils::iconName(m_iface));
-    m_icon->setAcceptHoverEvents(false);
+    //m_icon->setIcon(UiUtils::iconName(m_iface));
+    //m_icon->setAcceptHoverEvents(false);
+    
m_icon->nativeWidget()->setPixmap(KIcon(UiUtils::iconName(m_iface)).pixmap(QSize(48,
 48)));
 
     //     interface layout
     m_ifaceNameLabel = new Plasma::Label(this);
@@ -207,6 +208,7 @@
             //kDebug() << "addresses non-empty" << m_currentIp;
         }
     }
+    
m_icon->nativeWidget()->setPixmap(KIcon(UiUtils::iconName(m_iface)).pixmap(QSize(64,
 64)));
 }
 
 QString InterfaceItem::currentIpAddress()
--- trunk/kdereview/networkmanagement/applet/interfaceitem.h #1098106:1098107
@@ -105,7 +105,7 @@
 
     QGraphicsGridLayout* m_layout;
     QGraphicsLinearLayout* m_infoLayout;
-    Plasma::IconWidget* m_icon;
+    Plasma::Label* m_icon;
     Plasma::PushButton* m_disconnectButton;
     Plasma::Label* m_ifaceNameLabel;
     Plasma::Label* m_connectionNameLabel;
--- trunk/kdereview/networkmanagement/applet/nmpopup.cpp #1098106:1098107
@@ -121,7 +121,7 @@
 
     m_mainLayout->addItem(m_leftWidget, 0, 0);
 
-    m_rightWidget = new Plasma::Frame(this);
+    m_rightWidget = new QGraphicsWidget(this);
     m_rightWidget->setSizePolicy(QSizePolicy::Fixed, 
QSizePolicy::MinimumExpanding);
     m_rightLayout = new QGraphicsLinearLayout(m_rightWidget);
     m_rightLayout->setOrientation(Qt::Vertical);
--- trunk/kdereview/networkmanagement/applet/nmpopup.h #1098106:1098107
@@ -86,7 +86,7 @@
     QGraphicsWidget* m_widget;
     QGraphicsGridLayout* m_mainLayout;
     Plasma::TabBar* m_leftWidget;
-    Plasma::Frame* m_rightWidget;
+    QGraphicsWidget* m_rightWidget;
     QGraphicsWidget* m_interfaceWidget;
     QGraphicsLinearLayout* m_leftLayout;
     QGraphicsLinearLayout* m_rightLayout;
--- trunk/kdereview/networkmanagement/applet/wirelessinterfaceitem.cpp 
#1098106:1098107
@@ -23,6 +23,7 @@
 #include "uiutils.h"
 
 #include <QGraphicsGridLayout>
+#include <QLabel>
 
 #include <solid/control/wirelessaccesspoint.h>
 #include <solid/control/wirelessnetworkinterface.h>
@@ -101,13 +102,15 @@
             break;
         default:
         {
+            kDebug() << "showing infoicon";
             if (m_activeAccessPoint) {
                 m_connectionInfoIcon->show();
             }
             break;
         }
     }
-    m_icon->setIcon(UiUtils::iconName(m_iface));
+    kDebug() << "Icon:" << UiUtils::iconName(m_iface);
+    //m_icon->nativeWidget()->setPixmap(UiUtils::iconName(m_iface));
 }
 
 QList<Solid::Control::AccessPoint*> 
WirelessInterfaceItem::availableAccessPoints() const
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to