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

List:       kde-commits
Subject:    extragear/plasma/applets/frame
From:       Anne-Marie Mahfouf <annma () kde ! org>
Date:       2008-02-11 9:38:58
Message-ID: 1202722738.239032.16249.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 773530 by annma:

make preview also work when URL changes via the combobox


 M  +7 -0      configdialog.cpp  
 M  +3 -0      configdialog.h  


--- trunk/extragear/plasma/applets/frame/configdialog.cpp #773529:773530
@@ -17,6 +17,7 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
  ***************************************************************************/
 
+#include <KComboBox>
 #include <KLocale>
 #include <KStandardDirs>
 
@@ -53,6 +54,7 @@
     m_preview->show();
 
     connect(ui.picRequester, SIGNAL(urlSelected(const KUrl & )), this, \
SLOT(changePreview(const KUrl &))); +    connect(ui.picRequester->comboBox(), \
SIGNAL(activated(const QString & )), this, SLOT(changePreview(const QString &)));  }
 
 ConfigDialog::~ConfigDialog()
@@ -121,3 +123,8 @@
     previewPicture(myPicture.setPicture(path));
 }
 
+void ConfigDialog::changePreview(const QString &path)
+{
+    Picture myPicture;
+    previewPicture(myPicture.setPicture(KUrl(path)));
+}
\ No newline at end of file
--- trunk/extragear/plasma/applets/frame/configdialog.h #773529:773530
@@ -54,7 +54,10 @@
 	void previewPicture(const QImage &pix);
 
 private slots:
+	/// Update preview when URL changes via the file dialog
 	void changePreview(const KUrl &);
+	/// Update preview when URL changes via the combobox
+	void changePreview(const QString &);
 
 };
 


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

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