]> git.sesse.net Git - kdenlive/commitdiff
Various fixes and improvments to online resources
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 4 Jan 2012 22:51:52 +0000 (23:51 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 4 Jan 2012 22:51:52 +0000 (23:51 +0100)
src/utils/abstractservice.h
src/utils/archiveorg.cpp
src/utils/freesound.cpp
src/utils/openclipart.cpp
src/utils/resourcewidget.cpp
src/utils/resourcewidget.h
src/widgets/freesound_ui.ui

index 7f7c4ed09fa8ca9686187c866a66fc0d7232f8f4..cf514734127c1f7f4b0347b0559d0f7c4455eaed 100644 (file)
@@ -91,6 +91,8 @@ signals:
     void gotMetaInfo(QMap <QString, QString> info);
     /** @brief We have an url for current item's preview thumbnail. */
     void gotThumb(const QString url);
+    /** @brief The requested search query is finished. */
+    void searchDone();
 };
 
 
index de4bb332413001129859b29e1db2eb298e94f074..86f9c7d13c6a91ecf0c228fca71dbe94ca837ea7 100644 (file)
@@ -117,6 +117,7 @@ void ArchiveOrg::slotShowResults(KJob* job)
 #endif  
     m_listWidget->blockSignals(false);
     m_listWidget->setCurrentRow(0);
+    emit searchDone();
 }
     
 
@@ -138,10 +139,12 @@ OnlineItemInfo ArchiveOrg::displayItemDetails(QListWidgetItem *item)
     info.description = item->data(descriptionRole).toString();
     
     m_metaInfo.insert("url", info.itemDownload);
+    m_metaInfo.insert("id", info.itemId);
     
     QString extraInfoUrl = item->data(downloadRole).toString();
     if (!extraInfoUrl.isEmpty()) {
         KJob* resolveJob = KIO::storedGet( KUrl(extraInfoUrl), KIO::NoReload, KIO::HideProgressInfo );
+        resolveJob->setProperty("id", info.itemId);
         connect( resolveJob, SIGNAL( result( KJob* ) ), this, SLOT( slotParseResults( KJob* ) ) );
     }
     return info;
@@ -152,7 +155,7 @@ void ArchiveOrg::slotParseResults(KJob* job)
 {
     KIO::StoredTransferJob* storedQueryJob = static_cast<KIO::StoredTransferJob*>( job );
     QDomDocument doc;
-    doc.setContent(storedQueryJob->data());
+    doc.setContent(QString::fromUtf8(storedQueryJob->data()));
     QDomNodeList links = doc.elementsByTagName("a");
     QString html = QString("<style type=\"text/css\">tr.cellone {background-color: %1;}").arg(qApp->palette().alternateBase().color().name());
     html += "</style><table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
@@ -165,6 +168,7 @@ void ArchiveOrg::slotParseResults(KJob* job)
             // sub folder contains image thumbs, display one.
             m_thumbsPath = m_metaInfo.value("url") + "/" + href;
             KJob* thumbJob = KIO::storedGet( KUrl(m_thumbsPath), KIO::NoReload, KIO::HideProgressInfo );
+            thumbJob->setProperty("id", m_metaInfo.value("id"));
             connect( thumbJob, SIGNAL( result( KJob* ) ), this, SLOT( slotParseThumbs( KJob* ) ) );
         }
         else if (!href.contains('/') && !href.endsWith(".xml")) {
@@ -174,11 +178,11 @@ void ArchiveOrg::slotParseResults(KJob* job)
                 html += "<tr class=\"cellone\">";
             }
             else html += "<tr>";
-            html += "<td>" + KUrl(link).fileName() + QString("</td><td><a href=\"%1\">preview</a></td><td><a href=\"%2\">download</a></td></tr>").arg(link + "_preview").arg(link);
+            html += "<td>" + KUrl(link).fileName() + QString("</td><td><a href=\"%1\">%2</a></td><td><a href=\"%3\">%4</a></td></tr>").arg(link).arg(i18n("Preview")).arg(link + "_import").arg(i18n("Import"));
         }
     }
     html += "</table>";
-    emit gotMetaInfo(html);
+    if (m_metaInfo.value("id") == job->property("id").toString()) emit gotMetaInfo(html);
 }
 
 
@@ -195,7 +199,7 @@ bool ArchiveOrg::startItemPreview(QListWidgetItem *item)
 }
 
 
-void ArchiveOrg::stopItemPreview(QListWidgetItem *item)
+void ArchiveOrg::stopItemPreview(QListWidgetItem */*item*/)
 {    
     if (m_previewProcess && m_previewProcess->state() != QProcess::NotRunning) {
         m_previewProcess->close();
@@ -219,14 +223,15 @@ void ArchiveOrg::slotParseThumbs(KJob* job)
 {
     KIO::StoredTransferJob* storedQueryJob = static_cast<KIO::StoredTransferJob*>( job );
     QDomDocument doc;
-    doc.setContent(storedQueryJob->data());
+    doc.setContent(QString::fromUtf8(storedQueryJob->data()));
     QDomNodeList links = doc.elementsByTagName("a");
     if (links.isEmpty()) return;
     for (int i = 0; i < links.count(); i++) {
         QString href = links.at(i).toElement().attribute("href");
         if (!href.contains('/') && i >= links.count() / 2) {
             QString thumbUrl = m_thumbsPath + href;
-            emit gotThumb(thumbUrl);
+            if (m_metaInfo.value("id") == job->property("id").toString())
+                emit gotThumb(thumbUrl);
             break;
         }
     }
index 5cbdf8784688ab287837f99f5a1ed419e70ca40f..c74054fff62d5231d08f16eb3aef81ad3e8d7899 100644 (file)
@@ -117,6 +117,7 @@ void FreeSound::slotShowResults(KJob* job)
 #endif  
     m_listWidget->blockSignals(false);
     m_listWidget->setCurrentRow(0);
+    emit searchDone();
 }
     
 
@@ -204,7 +205,7 @@ void FreeSound::slotParseResults(KJob* job)
         }
         html +="</table>";
         if (infos.contains("description")) {
-            html += "<em>" + infos.value("description").toString() + "</em>";
+            m_metaInfo.insert("description", infos.value("description").toString());
         }
     }
     emit gotMetaInfo(html);
@@ -226,7 +227,7 @@ bool FreeSound::startItemPreview(QListWidgetItem *item)
 }
 
 
-void FreeSound::stopItemPreview(QListWidgetItem *item)
+void FreeSound::stopItemPreview(QListWidgetItem */*item*/)
 {    
     if (m_previewProcess && m_previewProcess->state() != QProcess::NotRunning) {
         m_previewProcess->close();
index 0ba51fa4ea4a9cffe51dd6a41516a888aded044e..a1202661af71513034be56ddeb1652a00db3cc86 100644 (file)
@@ -58,30 +58,29 @@ void OpenClipArt::slotShowResults(KJob* job)
     KIO::StoredTransferJob* storedQueryJob = static_cast<KIO::StoredTransferJob*>( job );
     
     QDomDocument doc;
-        doc.setContent(storedQueryJob->data());
-        QDomNodeList items = doc.documentElement().elementsByTagName("item");
-        for (int i = 0; i < items.count(); i++) {
-            QDomElement currentClip = items.at(i).toElement();
-            QDomElement title = currentClip.firstChildElement("title");
-            QListWidgetItem *item = new QListWidgetItem(title.firstChild().nodeValue(), m_listWidget);
-            QDomElement thumb = currentClip.firstChildElement("media:thumbnail");
-            item->setData(imageRole, thumb.attribute("url"));
-            emit gotThumb(thumb.attribute("url"));
-            QDomElement enclosure = currentClip.firstChildElement("enclosure");
-            item->setData(downloadRole, enclosure.attribute("url"));
-            QDomElement link = currentClip.firstChildElement("link");
-            item->setData(infoUrl, link.firstChild().nodeValue());
-            QDomElement license = currentClip.firstChildElement("cc:license");
-            item->setData(licenseRole, license.firstChild().nodeValue());
-            QDomElement desc = currentClip.firstChildElement("description");
-            item->setData(descriptionRole, desc.firstChild().nodeValue());
-            QDomElement author = currentClip.firstChildElement("dc:creator");
-            item->setData(authorRole, author.firstChild().nodeValue());
-            item->setData(authorUrl, QString("http://openclipart.org/user-detail/") + author.firstChild().nodeValue());
-        }
-            
+    doc.setContent(QString::fromAscii(storedQueryJob->data()));
+    QDomNodeList items = doc.documentElement().elementsByTagName("item");
+    for (int i = 0; i < items.count(); i++) {
+        QDomElement currentClip = items.at(i).toElement();
+        QDomElement title = currentClip.firstChildElement("title");
+        QListWidgetItem *item = new QListWidgetItem(title.firstChild().nodeValue(), m_listWidget);
+        QDomElement thumb = currentClip.firstChildElement("media:thumbnail");
+        item->setData(imageRole, thumb.attribute("url"));
+        QDomElement enclosure = currentClip.firstChildElement("enclosure");
+        item->setData(downloadRole, enclosure.attribute("url"));
+        QDomElement link = currentClip.firstChildElement("link");
+        item->setData(infoUrl, link.firstChild().nodeValue());
+        QDomElement license = currentClip.firstChildElement("cc:license");
+        item->setData(licenseRole, license.firstChild().nodeValue());
+        QDomElement desc = currentClip.firstChildElement("description");
+        item->setData(descriptionRole, desc.firstChild().nodeValue());
+        QDomElement author = currentClip.firstChildElement("dc:creator");
+        item->setData(authorRole, author.firstChild().nodeValue());
+        item->setData(authorUrl, QString("http://openclipart.org/user-detail/") + author.firstChild().nodeValue());
+    }        
     m_listWidget->blockSignals(false);
     m_listWidget->setCurrentRow(0);
+    emit searchDone();
 }
     
 
index cce3858314c4d6c7d9df39fc94d0491bb6ff84a9..39c8ec5263eec0f17f8c59c06725ea870ad98233 100644 (file)
@@ -27,7 +27,8 @@
 #include <QPushButton>
 #include <QSpinBox>
 #include <QListWidget>
-#include <QDomDocument>
+#include <QAction>
+#include <QMenu>
 
 #include <KDebug>
 #include <kdeversion.h>
 #include <KIO/NetAccess>
 #include <Solid/Networking>
 #include <KRun>
+#include <KPixmapSequence>
+#include <KPixmapSequenceOverlayPainter>
+
 
 #ifdef USE_NEPOMUK
 #if KDE_IS_VERSION(4,6,0)
 #include <Nepomuk/Variant>
 #include <Nepomuk/Resource>
 #include <Nepomuk/ResourceManager>
-#include <Soprano/Vocabulary/NAO>
 #include <Nepomuk/Vocabulary/NIE>
+#include <Nepomuk/Vocabulary/NCO>
 #include <Nepomuk/Vocabulary/NDO>
 #include <kfileitem.h>
 #endif
@@ -71,11 +75,8 @@ ResourceWidget::ResourceWidget(const QString & folder, QWidget * parent) :
     connect(search_results, SIGNAL(currentRowChanged(int)), this, SLOT(slotUpdateCurrentSound()));
     connect(button_preview, SIGNAL(clicked()), this, SLOT(slotPlaySound()));
     connect(button_import, SIGNAL(clicked()), this, SLOT(slotSaveItem()));
-    connect(sound_author, SIGNAL(leftClickedUrl(const QString &)), this, SLOT(slotOpenUrl(const QString &)));
     connect(item_license, SIGNAL(leftClickedUrl(const QString &)), this, SLOT(slotOpenUrl(const QString &)));
-    connect(sound_name, SIGNAL(leftClickedUrl(const QString &)), this, SLOT(slotOpenUrl(const QString &)));
     connect(service_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotChangeService()));
-    item_image->setFixedWidth(180);
     if (Solid::Networking::status() == Solid::Networking::Unconnected) {
         slotOffline();
     }
@@ -86,6 +87,17 @@ ResourceWidget::ResourceWidget(const QString & folder, QWidget * parent) :
     connect(page_number, SIGNAL(valueChanged(int)), this, SLOT(slotStartSearch(int)));
     connect(info_browser, SIGNAL(anchorClicked(const QUrl &)), this, SLOT(slotOpenLink(const QUrl &)));
     
+    m_autoPlay = new QAction(i18n("Auto Play"), this);
+    m_autoPlay->setCheckable(true);
+    QMenu *resourceMenu = new QMenu;
+    resourceMenu->addAction(m_autoPlay);
+    config_button->setMenu(resourceMenu);
+    config_button->setIcon(KIcon("configure"));
+
+    m_busyWidget = new KPixmapSequenceOverlayPainter(this);
+    m_busyWidget->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
+    m_busyWidget->setWidget(search_results->viewport());
+    
     sound_box->setEnabled(false);
     search_text->setFocus();
 #ifdef USE_NEPOMUK
@@ -99,6 +111,7 @@ ResourceWidget::ResourceWidget(const QString & folder, QWidget * parent) :
 ResourceWidget::~ResourceWidget()
 {
     if (m_currentService) delete m_currentService;
+    KIO::NetAccess::removeTempFile(m_tmpThumbFile);
 }
 
 void ResourceWidget::slotStartSearch(int page)
@@ -106,15 +119,19 @@ void ResourceWidget::slotStartSearch(int page)
     page_number->blockSignals(true);
     page_number->setValue(page);
     page_number->blockSignals(false);
+    m_busyWidget->start();
     m_currentService->slotStartSearch(search_text->text(), page);
 }
 
 void ResourceWidget::slotUpdateCurrentSound()
 {
-    item_image->setEnabled(false);
-    if (!sound_autoplay->isChecked()) m_currentService->stopItemPreview(NULL);
-    info_browser->clear();
+    KIO::NetAccess::removeTempFile(m_tmpThumbFile);
+    if (!m_autoPlay->isChecked()) m_currentService->stopItemPreview(NULL);
     item_license->clear();
+    m_title.clear();
+    m_image.clear();
+    m_desc.clear();
+    m_meta.clear();
     QListWidgetItem *item = search_results->currentItem();
     if (!item) {
         sound_box->setEnabled(false);
@@ -122,13 +139,25 @@ void ResourceWidget::slotUpdateCurrentSound()
     }
     m_currentInfo = m_currentService->displayItemDetails(item);
     
-    if (sound_autoplay->isChecked()) m_currentService->startItemPreview(item);
+    if (m_autoPlay->isChecked() && m_currentService->hasPreview) m_currentService->startItemPreview(item);
     sound_box->setEnabled(true);
-    sound_name->setText(item->text());
-    sound_name->setUrl(m_currentInfo.infoUrl);
-    sound_author->setText(m_currentInfo.author);
-    sound_author->setUrl(m_currentInfo.authorUrl);
-    if (!m_currentInfo.description.isEmpty()) info_browser->setHtml("<em>" + m_currentInfo.description + "</em>");
+    QString title = "<h3>" + m_currentInfo.itemName;
+    if (!m_currentInfo.infoUrl.isEmpty()) title += QString(" (<a href=\"%1\">%2</a>)").arg(m_currentInfo.infoUrl).arg(i18nc("the url link pointing to a web page", "link"));
+    title.append("</h3>");
+    
+    if (!m_currentInfo.authorUrl.isEmpty()) {
+        title += QString("<a href=\"%1\">").arg(m_currentInfo.authorUrl);
+        if (!m_currentInfo.author.isEmpty())
+            title.append(m_currentInfo.author);
+        else title.append(i18n("Author"));
+        title.append("</a><br />");
+    }
+    else if (!m_currentInfo.author.isEmpty())
+        title.append(m_currentInfo.author + "<br />");
+    else title.append("<br />");
+    
+    slotSetTitle(title);
+    if (!m_currentInfo.description.isEmpty()) slotSetDescription(m_currentInfo.description);
     if (!m_currentInfo.license.isEmpty()) parseLicense(m_currentInfo.license);
 }
 
@@ -138,9 +167,10 @@ void ResourceWidget::slotLoadThumb(const QString url)
     KUrl img(url);
     if (img.isEmpty()) return;
     if (KIO::NetAccess::exists(img, KIO::NetAccess::SourceSide, this)) {
-        QString tmpFile;
-        if (KIO::NetAccess::download(img, tmpFile, this)) {
-            QPixmap pix(tmpFile);
+        if (KIO::NetAccess::download(img, m_tmpThumbFile, this)) {
+            slotSetImage(m_tmpThumbFile);
+            /*QPixmap pix(tmpFile);
+            
             int newHeight = pix.height() * item_image->width() / pix.width();
             if (newHeight > 200) {
                 item_image->setScaledContents(false);
@@ -150,11 +180,9 @@ void ResourceWidget::slotLoadThumb(const QString url)
                 item_image->setScaledContents(true);
                 item_image->setFixedHeight(newHeight);
             }
-            item_image->setPixmap(pix);
-            KIO::NetAccess::removeTempFile(tmpFile);
+            item_image->setPixmap(pix);*/
         }
     }
-    item_image->setEnabled(true);
 }
 
 
@@ -163,6 +191,9 @@ void ResourceWidget::slotDisplayMetaInfo(QMap <QString, QString> metaInfo)
     if (metaInfo.contains("license")) {
         parseLicense(metaInfo.value("license"));
     }
+    if (metaInfo.contains("description")) {
+        slotSetDescription(metaInfo.value("description"));
+    }
 }
 
 
@@ -219,6 +250,11 @@ void ResourceWidget::slotSaveItem(const QString originalUrl)
     
     KFileItem info(entry, srcUrl); 
     getJob->setSourceSize(info.size());
+    getJob->setProperty("license", item_license->text());
+    getJob->setProperty("licenseurl", item_license->url());
+    getJob->setProperty("originurl", m_currentInfo.itemDownload);
+    if (!m_currentInfo.authorUrl.isEmpty()) getJob->setProperty("author", m_currentInfo.authorUrl);
+    else if (!m_currentInfo.author.isEmpty()) getJob->setProperty("author", m_currentInfo.author);
     connect(getJob, SIGNAL(result(KJob*)), this, SLOT(slotGotFile(KJob*)));
     getJob->start();
 }
@@ -231,14 +267,16 @@ void ResourceWidget::slotGotFile(KJob *job)
 #ifdef USE_NEPOMUK
 #if KDE_IS_VERSION(4,6,0)
         Nepomuk::Resource res( filePath );
-        res.setProperty( Nepomuk::Vocabulary::NIE::license(), (Nepomuk::Variant) item_license->text() );
-        res.setProperty( Nepomuk::Vocabulary::NIE::licenseType(), (Nepomuk::Variant) item_license->url() );
-        res.setProperty( Nepomuk::Vocabulary::NDO::copiedFrom(), sound_name->url() );
+        res.setProperty( Nepomuk::Vocabulary::NIE::license(), (Nepomuk::Variant) job->property("license") );
+        res.setProperty( Nepomuk::Vocabulary::NIE::licenseType(), (Nepomuk::Variant) job->property("licenseurl") );
+        res.setProperty( Nepomuk::Vocabulary::NDO::copiedFrom(), (Nepomuk::Variant) job->property("originurl") );
+        res.setProperty( Nepomuk::Vocabulary::NDO::copiedFrom(), (Nepomuk::Variant) job->property("originurl") );
+        res.setProperty( Nepomuk::Vocabulary::NCO::creator(), (Nepomuk::Variant) job->property("author") );
         //res.setDescription(item_description->toPlainText());
         //res.setProperty( Soprano::Vocabulary::NAO::description(), 
 #endif
 #endif
-        emit addClip(filePath, QString());//, sound_name->url());
+        emit addClip(filePath, QString());
 }
 
 void ResourceWidget::slotOpenUrl(const QString &url)
@@ -263,17 +301,16 @@ void ResourceWidget::slotChangeService()
         m_currentService = new ArchiveOrg(search_results);
     }
 
-    connect(m_currentService, SIGNAL(gotMetaInfo(const QString)), this, SLOT(slotGotMetaInfo(const QString)));
+    connect(m_currentService, SIGNAL(gotMetaInfo(const QString)), this, SLOT(slotSetMetadata(const QString)));
     connect(m_currentService, SIGNAL(gotMetaInfo(QMap <QString, QString>)), this, SLOT(slotDisplayMetaInfo(QMap <QString, QString>)));
     connect(m_currentService, SIGNAL(maxPages(int)), page_number, SLOT(setMaximum(int)));
     connect(m_currentService, SIGNAL(searchInfo(QString)), search_info, SLOT(setText(QString)));
     connect(m_currentService, SIGNAL(gotThumb(const QString)), this, SLOT(slotLoadThumb(const QString)));
+    connect(m_currentService, SIGNAL(searchDone()), m_busyWidget, SLOT(stop()));
     
     button_preview->setVisible(m_currentService->hasPreview);
     button_import->setVisible(!m_currentService->inlineDownload);
-    sound_autoplay->setVisible(m_currentService->hasPreview);
     search_info->setText(QString());
-    info_browser->setVisible(m_currentService->hasMetadata);
     if (!search_text->text().isEmpty()) slotStartSearch();
 }
 
@@ -327,22 +364,49 @@ void ResourceWidget::parseLicense(const QString &licenseUrl)
     item_license->setUrl(licenseUrl);
 }
 
-void ResourceWidget::slotGotMetaInfo(const QString info)
-{
-    info_browser->setHtml(info_browser->toHtml() + info);
-}
-
 
 void ResourceWidget::slotOpenLink(const QUrl &url)
 {
     QString path = url.toEncoded();
-    if (path.endsWith("_preview")) {
-        path.chop(8);
-        slotOpenUrl(path);
-    }
-    else {
+    if (path.endsWith("_import")) {
+        path.chop(7);
         // import file in Kdenlive
         slotSaveItem(path);
     }
+    else {
+        slotOpenUrl(path);
+    }
+}
+
+void ResourceWidget::slotSetDescription(const QString desc)
+{
+    m_desc = desc;
+    updateLayout();
+}
+
+void ResourceWidget::slotSetMetadata(const QString desc)
+{
+    m_meta = desc;
+    updateLayout();
 }
 
+void ResourceWidget::slotSetImage(const QString desc)
+{
+    m_image = QString("<img src=\"%1\" style=\"max-height:150px\" max-width=\"%2px\" />").arg(desc).arg((int) (info_browser->width() * 0.9));
+    updateLayout();
+}
+
+void ResourceWidget::slotSetTitle(const QString desc)
+{
+    m_title = desc;
+    updateLayout();
+}
+
+void ResourceWidget::updateLayout()
+{
+    QString content = m_title;
+    if (!m_image.isEmpty()) content.append(m_image + "<br clear=\"all\" />");
+    if (!m_desc.isEmpty()) content.append(m_desc);
+    if (!m_meta.isEmpty()) content.append(m_meta);
+    info_browser->setHtml(content);
+}
\ No newline at end of file
index 575f46101b372077900867cdac852a0afc61cfa2..71253c763a57d077df8a204e826f5f14d850dedc 100644 (file)
@@ -30,6 +30,8 @@
 #include <QProcess>
 #include <kio/jobclasses.h>
 
+class KPixmapSequenceOverlayPainter;
+class QAction;
 
 class ResourceWidget : public QDialog, public Ui::FreeSound_UI
 {
@@ -54,17 +56,28 @@ private slots:
     void slotOffline();
     void slotNextPage();
     void slotPreviousPage();
-    void slotGotMetaInfo(const QString info);
     void slotOpenLink(const QUrl &url);
     void slotLoadThumb(const QString url);
     /** @brief A file download is finished */
     void slotGotFile(KJob *job);
+    void slotSetMetadata(const QString desc);
+    void slotSetDescription(const QString desc);
+    void slotSetImage(const QString desc);
+    void slotSetTitle(const QString desc);
 
 private:
     QString m_folder;
     AbstractService *m_currentService;
     void parseLicense(const QString &);
     OnlineItemInfo m_currentInfo;
+    KPixmapSequenceOverlayPainter *m_busyWidget;
+    QAction *m_autoPlay;
+    QString m_tmpThumbFile;
+    QString m_title;
+    QString m_image;
+    QString m_desc;
+    QString m_meta;
+    void updateLayout();
    
 signals:
     void addClip(KUrl, const QString &);
index a61d5c57cc0485a0bbd231b9c3434547b84073cf..aab6824dafafd531c0b9373a62c2d9b909c16912 100644 (file)
        </property>
       </widget>
      </item>
+     <item>
+      <widget class="QToolButton" name="config_button">
+       <property name="text">
+        <string>...</string>
+       </property>
+       <property name="popupMode">
+        <enum>QToolButton::InstantPopup</enum>
+       </property>
+      </widget>
+     </item>
     </layout>
    </item>
    <item row="1" column="0" colspan="2">
       <string/>
      </property>
      <layout class="QGridLayout" name="gridLayout">
-      <item row="1" column="0" colspan="3">
-       <widget class="QLabel" name="item_image">
-        <property name="text">
-         <string/>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignCenter</set>
-        </property>
-       </widget>
-      </item>
-      <item row="10" column="1" colspan="2">
+      <item row="5" column="1" colspan="2">
        <widget class="QPushButton" name="button_import">
         <property name="text">
          <string>Import</string>
         </property>
        </widget>
       </item>
-      <item row="4" column="0" colspan="3">
-       <widget class="KUrlLabel" name="sound_author">
-        <property name="minimumSize">
-         <size>
-          <width>26</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="0" colspan="3">
-       <widget class="KUrlLabel" name="sound_name">
-        <property name="text">
-         <string/>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignCenter</set>
-        </property>
-       </widget>
-      </item>
-      <item row="10" column="0">
+      <item row="5" column="0">
        <widget class="QPushButton" name="button_preview">
         <property name="text">
          <string>Preview</string>
         </property>
        </widget>
       </item>
-      <item row="9" column="0">
-       <widget class="QCheckBox" name="sound_autoplay">
-        <property name="text">
-         <string>Auto play</string>
-        </property>
-       </widget>
-      </item>
-      <item row="8" column="0">
+      <item row="4" column="0">
        <widget class="QLabel" name="label">
         <property name="text">
          <string>License</string>
         </property>
        </widget>
       </item>
-      <item row="8" column="1" colspan="2">
+      <item row="4" column="1" colspan="2">
        <widget class="KUrlLabel" name="item_license">
         <property name="text">
          <string/>
         </property>
        </widget>
       </item>
-      <item row="5" column="0" colspan="3">
+      <item row="2" column="0" colspan="3">
        <widget class="QTextBrowser" name="info_browser">
         <property name="sizePolicy">
-         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+         <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>