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

List:       kde-commits
Subject:    playground/base/plasma/applets/groupphoto
From:       Laurent Montel <montel () kde ! org>
Date:       2008-06-01 12:05:59
Message-ID: 1212321959.408563.30717.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 815207 by mlaurent:

Use klineedit


 M  +7 -3      groupphoto.cpp  
 M  +3 -4      groupphoto.h  


--- trunk/playground/base/plasma/applets/groupphoto/groupphoto.cpp #815206:815207
@@ -41,6 +41,7 @@
 #include <kio/netaccess.h>
 #include <kurl.h>
 #include <QPicture>
+#include <KLineEdit>
 
 #include <plasma/dataenginemanager.h>
 #include <plasma/animator.h>
@@ -53,7 +54,7 @@
     m_name = name;
     m_width = width;
 
-    m_label = new QLineEdit();
+    m_label = new KLineEdit();
 }
 
 HitBox::~HitBox()
@@ -112,10 +113,13 @@
     m_timer->setSingleShot(true);
     connect(m_timer, SIGNAL(timeout()), this, SLOT(search()));
 
-    m_searchEdit = new QLineEdit(0);
+    m_searchEdit = new KLineEdit(0);
     m_proxyWidget = new QGraphicsProxyWidget(this);
     m_proxyWidget->setWidget(m_searchEdit);
-    m_searchEdit->setText(i18n("Enter participant to search here..."));
+    m_searchEdit->setClearButtonShown( true );
+
+    m_searchEdit->setClickMessage(i18n("Enter participant to search here..."));
+
     m_layout->addItem(m_proxyWidget);
     m_layout->addItem(m_proxyWidget);
     Animator::self()->animateItem(m_proxyWidget, Animator::AppearAnimation);
--- trunk/playground/base/plasma/applets/groupphoto/groupphoto.h #815206:815207
@@ -24,8 +24,6 @@
 #include <QPixmap>
 #include <QPainter>
 #include <QGraphicsItem>
-#include <QColor>
-#include <QLineEdit>
 #include <QGraphicsLinearLayout>
 #include <QGraphicsProxyWidget>
 
@@ -36,6 +34,7 @@
 
 class QGraphicsSceneDragDropEvent;
 class QTimer;
+class KLineEdit;
 
 // Widget to show search hits in the group photo
 class HitBox : public QObject, public QGraphicsItem
@@ -50,7 +49,7 @@
     private:
         int m_width;
         QString m_name;
-        QLineEdit *m_label;
+        KLineEdit *m_label;
         void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
 };
 
@@ -114,7 +113,7 @@
         void readNames();
         QList<_person*> m_personList;
         QList<HitBox*> m_hitboxList;
-        QLineEdit *m_searchEdit;
+        KLineEdit *m_searchEdit;
         QGraphicsProxyWidget * m_proxyWidget;
         QPointF m_oldPos;
         QTimer* m_timer;
[prev in list] [next in list] [prev in thread] [next in thread] 

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