I have made the following changes intended for :
  CE:MW:Shared / nemo-qml-plugin-grilo

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/7068

Thank You,
msameer

[This message was auto-generated]

---

Request # 7068:

Messages from BOSS:

State: review at 2012-10-17T16:34:40 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: home:msameer:grilo / nemo-qml-plugin-grilo -> CE:MW:Shared / 
nemo-qml-plugin-grilo
  
changes files:
--------------
--- nemo-qml-plugin-grilo.changes
+++ nemo-qml-plugin-grilo.changes
@@ -0,0 +1,3 @@
+* Wed Oct 17 2012 Mohammed Hassan <[email protected]> - 
0.0.20121017
+- New release (Added duration support)
+

old:
----
  qtgrilo-0.0.20121008.tar.gz

new:
----
  qtgrilo-0.0.20121017.tar.gz

spec files:
-----------
--- nemo-qml-plugin-grilo.spec
+++ nemo-qml-plugin-grilo.spec
@@ -1,6 +1,6 @@
 Name:       nemo-qml-plugin-grilo
 Summary:    Framework for discovering and browsing media
-Version:    0.0.20121008
+Version:    0.0.20121017
 Release:    1
 Group:      Development/Libraries
 License:    LGPLv2.1

other changes:
--------------

++++++ qtgrilo-0.0.20121008.tar.gz -> qtgrilo-0.0.20121017.tar.gz
--- declarative/declarative.pro
+++ declarative/declarative.pro
@@ -4,8 +4,12 @@
 
 PKGCONFIG = grilo-0.2
 
-DESTDIR = org/nemomobile/grilo
+EXAMPLE = ../example/*
+
+OTHER_FILES += $${EXAMPLE}
+
 TARGET = qmlgriloplugin
+PLUGIN_IMPORT_PATH = org/nemomobile/grilo
 
 SOURCES += griloplugin.cpp grilomodel.cpp griloregistry.cpp grilomedia.cpp 
grilodatasource.cpp \
            grilobrowse.cpp grilosearch.cpp griloquery.cpp grilomultisearch.cpp
@@ -13,8 +17,8 @@
 HEADERS += griloplugin.h grilomodel.h griloregistry.h grilomedia.h 
grilodatasource.h \
            grilobrowse.h grilosearch.h griloquery.h grilomultisearch.h
 
-target.path = /usr/lib/qt4/imports/org/nemomobile/grilo/
+target.path = $$[QT_INSTALL_IMPORTS]/$$PLUGIN_IMPORT_PATH
 qml.files = qmldir
-qml.path = /usr/lib/qt4/imports/org/nemomobile/grilo/
+qml.path = $$[QT_INSTALL_IMPORTS]/$$PLUGIN_IMPORT_PATH
 
 INSTALLS += target qml
--- declarative/grilomedia.cpp
+++ declarative/grilomedia.cpp
@@ -62,6 +62,10 @@
   return url;
 }
 
+int GriloMedia::duration() const {
+  return grl_media_get_duration(m_media);
+}
+
 bool GriloMedia::isContainer() const {
   return GRL_IS_MEDIA_BOX(m_media) == TRUE;
 }
--- declarative/grilomedia.h
+++ declarative/grilomedia.h
@@ -35,6 +35,7 @@
   Q_PROPERTY(QString title READ title CONSTANT);
   Q_PROPERTY(QUrl url READ url CONSTANT);
   Q_PROPERTY(bool container READ isContainer CONSTANT);
+  Q_PROPERTY(int duration READ duration CONSTANT);
 
 public:
   GriloMedia(GrlMedia *media, QObject *parent = 0);
@@ -44,7 +45,7 @@
   QString title() const;
   QUrl url() const;
   bool isContainer() const;
-
+  int duration() const;
   GrlMedia *media();
 
   Q_INVOKABLE QString serialize();
--- example/tracker.qml
+++ example/tracker.qml
@@ -25,7 +25,7 @@
                                 id: browser
                                 source: "grl-tracker-source"
                                 registry: registry
-                                metadataKeys: [GriloBrowse.Title, 
GriloBrowse.Url]
+                                metadataKeys: [GriloBrowse.Title, 
GriloBrowse.Url, GriloBrowse.Duration]
                                 typeFilter: [GriloBrowse.Audio]
                                 Component.onCompleted: {
                                         console.log(browser.supportedKeys);
@@ -65,12 +65,22 @@
 
                                 Text {
                                         id: label
-                                        width: parent.width
+                                        width: parent.width - 50
                                         text: media.title
                                         height: 30
                                         font.pixelSize: 36
                                         anchors.verticalCenter: 
parent.verticalCenter
                                 }
+
+                               Text {
+                                       id: duration
+                                       text: media.duration
+                                       font.pixelSize: 36
+                                       anchors.verticalCenter: 
parent.verticalCenter
+                                       height: label.height
+                                       width: 50
+                                       anchors.left: label.right
+                               }
                         }
                 }
         }



Reply via email to