#include <vlc_common.h>
#include "timetooltip.hpp"
+#include "styles/seekstyle.hpp"
#include <QSlider>
#include <QPainter>
+#include <QTime>
#define MSTRTIME_MAX_SIZE 22
class QTimer;
class SeekPoints;
class QPropertyAnimation;
+class QStyleOption;
+class QCommonStyle;
/* Input Slider derived from QSlider */
class SeekSlider : public QSlider
virtual void enterEvent( QEvent * );
virtual void leaveEvent( QEvent * );
virtual void hideEvent( QHideEvent * );
+ virtual void paintEvent(QPaintEvent *ev);
- virtual void paintEvent( QPaintEvent* event );
virtual bool eventFilter( QObject *obj, QEvent *event );
- QSize handleSize() const;
virtual QSize sizeHint() const;
- bool isAnimationRunning() const;
+ void processReleasedButton();
qreal handleOpacity() const;
void setHandleOpacity( qreal opacity );
+ int handleLength();
private:
bool isSliding; /* Whether we are currently sliding by user action */
QTimer *seekLimitTimer;
TimeTooltip *mTimeTooltip;
float f_buffering;
+ QTime bufferingStart;
SeekPoints* chapters;
bool b_classic;
+ bool b_seekable;
+ int mHandleLength;
/* Colors & gradients */
QSize gradientsTargetSize;
QColor tickpointForeground;
QColor shadowDark;
QColor shadowLight;
+ QCommonStyle *alternativeStyle;
+
/* Handle's animation */
qreal mHandleOpacity;
QPropertyAnimation *animHandle;
public slots:
void setPosition( float, int64_t, int );
+ void setSeekable( bool b ) { b_seekable = b ; }
void updateBuffering( float );
void hideHandle();
signals:
void sliderDragged( float );
-};
+};
/* Sound Slider inherited directly from QAbstractSlider */
class QPaintEvent;
+#define SOUNDMAX 125 // % (+6dB)
+
class SoundSlider : public QAbstractSlider
{
Q_OBJECT
public:
- SoundSlider( QWidget *_parent, int _i_step, bool b_softamp, char * );
+ SoundSlider(QWidget *_parent, float _i_step, char *psz_colors, int max = SOUNDMAX );
void setMuted( bool ); /* Set Mute status */
protected:
virtual void mouseMoveEvent( QMouseEvent * );
virtual void mouseReleaseEvent( QMouseEvent * );
+ void processReleasedButton();
+
private:
bool isSliding; /* Whether we are currently sliding by user action */
bool b_mouseOutside; /* Whether the mouse is outside or inside the Widget */