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

List:       kde-commits
Subject:    [amarok/spotify] src/core-impl/collections/spotifycollection: Move resolver download progress in ded
From:       Bart Cerneels <bart.cerneels () kde ! org>
Date:       2012-11-06 20:22:52
Message-ID: 20121106202252.94C49A60C4 () git ! kde ! org
[Download RAW message or body]

Git commit 39ddbca2a6e72d8eb777d7d7a3797d2291ce18e8 by Bart Cerneels.
Committed on 06/11/2012 at 07:49.
Pushed by shanachie into branch 'spotify'.

Move resolver download progress in dedicated dialog.

M  +5    -1    src/core-impl/collections/spotifycollection/CMakeLists.txt
M  +3    -29   src/core-impl/collections/spotifycollection/SpotifyConfigWidget.ui
A  +14   -0    src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.cpp  \
[License: UNKNOWN]  * A  +22   -0    \
src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.h     [License: \
UNKNOWN]  * A  +138  -0    \
src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.ui

The files marked with a * at the end have a non valid license. Please read: \
http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are \
listed at that page.


http://commits.kde.org/amarok/39ddbca2a6e72d8eb777d7d7a3797d2291ce18e8

diff --git a/src/core-impl/collections/spotifycollection/CMakeLists.txt \
b/src/core-impl/collections/spotifycollection/CMakeLists.txt index 35c1865..8cc7c35 \
                100644
--- a/src/core-impl/collections/spotifycollection/CMakeLists.txt
+++ b/src/core-impl/collections/spotifycollection/CMakeLists.txt
@@ -12,12 +12,16 @@ set( amarok_collection-spotifycollection_PART_SRCS
      SpotifyMeta.cpp
      SpotifyConfig.cpp
      SpotifySettings.cpp
+     SpotifyDownloadDialog.cpp
      support/TrackProxy.cpp
      support/Query.cpp
      support/Controller.cpp )
 
 kde4_add_ui_files( amarok_collection-spotifycollection_PART_SRCS
-    SpotifyConfigWidget.ui )
+    SpotifyConfigWidget.ui
+    SpotifyDownloadDialog.ui
+)
+
 kde4_add_plugin(amarok_collection-spotifycollection \
${amarok_collection-spotifycollection_PART_SRCS})  \
#kde4_add_library(amarok_collection-spotifycollection SHARED \
${amarok_collection-spotifycollection_PART_SRCS})  
diff --git a/src/core-impl/collections/spotifycollection/SpotifyConfigWidget.ui \
b/src/core-impl/collections/spotifycollection/SpotifyConfigWidget.ui index \
                14c294d..cc6aeb9 100644
--- a/src/core-impl/collections/spotifycollection/SpotifyConfigWidget.ui
+++ b/src/core-impl/collections/spotifycollection/SpotifyConfigWidget.ui
@@ -6,15 +6,15 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>309</width>
-    <height>223</height>
+    <width>320</width>
+    <height>263</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
-   <item row="6" column="0">
+   <item row="4" column="0">
     <widget class="QLabel" name="lblNote">
      <property name="text">
       <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Note: &lt;br/&gt;Spotify \
service is only avaiable in certain countries. And content and policy may vary in \
different regions.&lt;/p&gt;&lt;p&gt;Only Spotify Premium user can use this feature. \
You may need to subscribe Premium first to continue using it with \
Amarok.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> @@ -24,33 +24,7 @@
      </property>
     </widget>
    </item>
-   <item row="5" column="0">
-    <widget class="QProgressBar" name="progDownload">
-     <property name="enabled">
-      <bool>true</bool>
-     </property>
-     <property name="maximum">
-      <number>1000</number>
-     </property>
-     <property name="value">
-      <number>0</number>
-     </property>
-    </widget>
-   </item>
    <item row="3" column="0">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>0</width>
-       <height>0</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="4" column="0">
     <widget class="QFrame" name="frameMain">
      <layout class="QVBoxLayout" name="verticalLayout">
       <item>
diff --git a/src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.cpp \
b/src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.cpp new file mode \
100644 index 0000000..3809b6a
--- /dev/null
+++ b/src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.cpp
@@ -0,0 +1,14 @@
+#include "SpotifyDownloadDialog.h"
+#include "ui_SpotifyDownloadDialog.h"
+
+SpotifyDownloadDialog::SpotifyDownloadDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::SpotifyDownloadDialog)
+{
+    ui->setupUi(this);
+}
+
+SpotifyDownloadDialog::~SpotifyDownloadDialog()
+{
+    delete ui;
+}
diff --git a/src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.h \
b/src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.h new file mode \
100644 index 0000000..8ef2d46
--- /dev/null
+++ b/src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.h
@@ -0,0 +1,22 @@
+#ifndef SPOTIFYDOWNLOADDIALOG_H
+#define SPOTIFYDOWNLOADDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+class SpotifyDownloadDialog;
+}
+
+class SpotifyDownloadDialog : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit SpotifyDownloadDialog(QWidget *parent = 0);
+    ~SpotifyDownloadDialog();
+
+private:
+    Ui::SpotifyDownloadDialog *ui;
+};
+
+#endif // SPOTIFYDOWNLOADDIALOG_H
diff --git a/src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.ui \
b/src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.ui new file mode \
100644 index 0000000..77d380e
--- /dev/null
+++ b/src/core-impl/collections/spotifycollection/SpotifyDownloadDialog.ui
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SpotifyDownloadDialog</class>
+ <widget class="QDialog" name="SpotifyDownloadDialog">
+  <property name="windowModality">
+   <enum>Qt::WindowModal</enum>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>378</width>
+    <height>213</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Ignored" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Download Spotify Resolver?</string>
+  </property>
+  <property name="modal">
+   <bool>true</bool>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QLabel" name="messageLabel">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>1</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="autoFillBackground">
+      <bool>false</bool>
+     </property>
+     <property name="text">
+      <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; \
&quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; \
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; \
/&gt;&lt;style type=&quot;text/css&quot;&gt; +p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; \
font-size:11pt; font-weight:400; font-style:normal;&quot;&gt; +&lt;p style=&quot; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;&quot;&gt;The Spotify resolver is missing or not \
installed correctly on your system. This program is needed to enable the Spotify \
Collection.&lt;/p&gt; +&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;&quot;&gt;&lt;/p&gt; +&lt;p style=&quot; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;&quot;&gt;Do you want to download and install it now?&lt;/p&gt; \
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; \
text-decoration: underline; color:#0000ff;&quot;&gt;&amp;lt;more \
info&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> +     \
</property> +     <property name="scaledContents">
+      <bool>false</bool>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+     <property name="textInteractionFlags">
+      <set>Qt::TextBrowserInteraction</set>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <spacer name="horizontalSpacer_2">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QProgressBar" name="progDownload">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>1</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="maximum">
+        <number>1000</number>
+       </property>
+       <property name="value">
+        <number>0</number>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_3">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>


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

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