[prev in list] [next in list] [prev in thread] [next in thread]
List: amarok-devel
Subject: Re: Queue Manager
From: furt () gmx ! de
Date: 2010-02-01 14:55:32
Message-ID: 20100201145532.135760 () gmx ! net
[Download RAW message or body]
> Datum: Mon, 01 Feb 2010 08:12:04 -0500
> Von: Jeff Mitchell <mitchell@kde.org>
> On 01/31/2010 08:06 PM, furt@gmx.de wrote:
> > Concerning the actual implementation: currently I use a very basic
> approach by
> > simply polling TrackNavigator::queue() from within a QueueEngine and
> Anytime you use the word "polling" and you're not talking about device
> drivers, you're probably doing something wrong. These days, even if you
> are writing device drivers, you might very well be doing something wrong
> anyways. :-)
Thanks, I know that of course. But as I said, I am new to kde programming, and I just wanted to get in \
touch with plasma programming and get some visible results to prove that my understanding of displaying \
things in plasma (for the context view) was correct - so I used the possibility of the Plasma::DataEngine \
to poll, so that I didn't have to change any code in any amarok classes in the first iteration.
> Why not emit a signal when the queue is modified, and connect that
> signal to a slot in your manager?
As far as I understand, plasma applets should use a data engine to access any data ( \
http://techbase.kde.org/Development/Tutorials/Plasma#Plasma_Programming_with_C.2B.2B ). That's the reason \
why I wrote the QueueEngine. That one of course, could connect to a Signal. But I've had a look at the \
AlbumsApplet and the CurrentApplet, which both use an observer to observe the playlist or the current \
track. The observer lives in amaroklib, and only that observer would have to be exported from amaroklib, \
so it can be used from the plasma applets. If I wanted to connect to the queue directly, the \
TrackNavigator would have to exported - I don't know about the policy to export arbitrary classes... and \
of course, there would be problems when the track navigator changes, e.g. when the playmode is switched \
from random to dynamic mode.
-Marius
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
_______________________________________________
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic