~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to plasma/generic/dataengines/nowplaying/playerinterface/juk_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2008  Alex Merry <alex.merry@kdemail.net>
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Lesser General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2.1 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Lesser General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Lesser General Public
 
15
 * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 */
 
17
#ifndef JUK_P_H
 
18
#define JUK_P_H
 
19
 
 
20
#include "juk.h"
 
21
#include "player.h"
 
22
 
 
23
#include <QObject>
 
24
#include <QPixmap>
 
25
#include <QString>
 
26
 
 
27
class OrgKdeJukPlayerInterface;
 
28
 
 
29
 
 
30
 
 
31
class Juk : public Player
 
32
{
 
33
public:
 
34
    Juk(PlayerFactory* factory = 0);
 
35
    ~Juk();
 
36
 
 
37
    bool isRunning();
 
38
    State state();
 
39
    QString artist();
 
40
    QString album();
 
41
    QString title();
 
42
    int trackNumber();
 
43
    QString comment();
 
44
    QString genre();
 
45
    int length();
 
46
    int position();
 
47
    float volume();
 
48
 
 
49
    bool canPlay() { return state() != Playing; }
 
50
    void play();
 
51
    bool canPause() { return true; }
 
52
    void pause();
 
53
    bool canStop() { return state() != Stopped; }
 
54
    void stop();
 
55
    bool canGoPrevious() { return true; }
 
56
    void previous();
 
57
    bool canGoNext() { return true; }
 
58
    void next();
 
59
 
 
60
    bool canSetVolume() { return true; }
 
61
    void setVolume(qreal volume);
 
62
 
 
63
    QPixmap artwork();
 
64
 
 
65
    bool canSeek() { return state() != Stopped; }
 
66
    void seek(int time);
 
67
 
 
68
private:
 
69
    QPixmap m_artwork;
 
70
    QString m_lastPath;
 
71
    typedef OrgKdeJukPlayerInterface JukPlayer;
 
72
    JukPlayer* jukPlayer;
 
73
};
 
74
 
 
75
#endif // JUK_P_H