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

List:       kde-core-devel
Subject:    kurlrequester clickMessage property
From:       Aleix <aleixpol () gmail ! com>
Date:       2008-10-15 18:30:54
Message-ID: 757d9a550810151130w5d1cafb6g4910b040c8a7d4da () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


hi list,
I was doing some interfaces on kdevelop and saw that the property was not
exposed to the properties so i couldn't put them in the UI files so i was
convinced to make a little patch and send it to you.

I hope you find the patch useful.

Thanks,
Aleix

[Attachment #5 (text/html)]

<div dir="ltr">hi list,<br>I was doing some interfaces on kdevelop and saw that the \
property was not exposed to the properties so i couldn&#39;t put them in the UI files \
so i was convinced to make a little patch and send it to you.<br> <br>I hope you find \
the patch useful.<br><br>Thanks,<br>Aleix<br></div>


["clickMessage_kurlrequester.patch" (text/x-diff)]

Index: kurlrequester.h
===================================================================
--- kurlrequester.h	(revision 869931)
+++ kurlrequester.h	(working copy)
@@ -57,6 +57,7 @@
     Q_PROPERTY( QString filter READ filter WRITE setFilter )
     Q_FLAGS( KFile::Modes )
     Q_PROPERTY( KFile::Modes mode READ mode WRITE setMode )
+    Q_PROPERTY( QString clickMessage READ clickMessage WRITE setClickMessage )
 
 public:
     /**
@@ -162,6 +163,17 @@
      */
     const KEditListBox::CustomEditor &customEditor();
 
+    /**
+     * @returns the message set with setClickMessage
+     */
+    QString clickMessage() const;
+
+    /**
+     * Set a click message @p msg
+     */
+    void setClickMessage(const QString& msg);
+    
+
 public Q_SLOTS:
     /**
      * Sets the url in the lineedit to @p url.
Index: kurlrequester.cpp
===================================================================
--- kurlrequester.cpp	(revision 869931)
+++ kurlrequester.cpp	(working copy)
@@ -403,6 +403,20 @@
     return d->myCompletion;
 }
 
+void KUrlRequester::setClickMessage(const QString& msg)
+{
+    if(d->edit)
+        d->edit->setClickMessage(msg);
+}
+
+QString KUrlRequester::clickMessage() const
+{
+    if(d->edit)
+        return d->edit->clickMessage();
+    else
+        return QString();
+}
+
 const KEditListBox::CustomEditor &KUrlRequester::customEditor()
 {
     setSizePolicy(QSizePolicy( QSizePolicy::Preferred,


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

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