1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef UBGRAPHICSAUDIOITEMDELEGATE_H
#define UBGRAPHICSAUDIOITEMDELEGATE_H
#include <QtGui>
#include <phonon/MediaObject>
#include "core/UB.h"
#include "UBGraphicsItemDelegate.h"
class QGraphicsItem;
class UBGraphicsAudioItem;
class UBGraphicsAudioItemDelegate : public UBGraphicsItemDelegate
{
Q_OBJECT;
public:
UBGraphicsAudioItemDelegate ( UBGraphicsAudioItem *pDelegated, QObject *parent = 0 );
~UBGraphicsAudioItemDelegate();
private slots:
void togglePlayPause();
void toggleMute();
void remove ( bool canUndo );
void updatePlayPauseState();
private:
DelegateButton* mPlayPauseButton;
DelegateButton* mStopButton;
DelegateButton* mMuteButton;
UBGraphicsAudioItem* mDelegated;
protected:
virtual void buildButtons();
protected slots:
void mediaStateChanged ( Phonon::State newstate, Phonon::State oldstate );
};
#endif // UBGRAPHICSAUDIOITEMDELEGATE_H