You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1007 B
55 lines
1007 B
14 years ago
|
#ifndef UBGRAPHICSVIDEOITEM_H
|
||
|
#define UBGRAPHICSVIDEOITEM_H
|
||
|
|
||
|
#include <phonon/VideoWidget>
|
||
|
#include "UBGraphicsMediaItem.h"
|
||
|
#include "core/UB.h"
|
||
|
|
||
|
class UBGraphicsVideoItem : public UBGraphicsMediaItem
|
||
|
{
|
||
|
Q_OBJECT;
|
||
|
|
||
|
public:
|
||
|
UBGraphicsVideoItem(const QUrl& pMediaFileUrl, QGraphicsItem *parent = 0);
|
||
|
~UBGraphicsVideoItem();
|
||
|
|
||
|
enum { Type = UBGraphicsItemType::VideoItemType };
|
||
|
|
||
|
virtual int type() const
|
||
|
{
|
||
|
return Type;
|
||
|
}
|
||
|
|
||
|
virtual UBItem* deepCopy() const;
|
||
|
|
||
|
Phonon::VideoWidget* videoWidget() const
|
||
|
{
|
||
|
return mVideoWidget;
|
||
|
}
|
||
|
|
||
|
|
||
|
public slots:
|
||
|
void hasVideoChanged(bool hasVideo);
|
||
|
|
||
|
|
||
|
protected:
|
||
|
|
||
|
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||
|
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||
|
|
||
|
Phonon::VideoWidget *mVideoWidget;
|
||
|
|
||
|
private slots:
|
||
|
void showOnDisplayChanged(bool shown);
|
||
|
|
||
|
|
||
|
private:
|
||
|
bool mShouldMove;
|
||
|
QPointF mMousePressPos;
|
||
|
QPointF mMouseMovePos;
|
||
|
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif // UBGRAPHICSVIDEOITEM_H
|