mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2024-06-02 13:29:23 +00:00
2d75a32dd0
Use GNU formatter from Eclipse.
20 lines
437 B
C++
20 lines
437 B
C++
#include "SeekSlider.h"
|
|
|
|
void
|
|
SeekSlider::mousePressEvent (QMouseEvent *event)
|
|
{
|
|
if (event->button () == Qt::LeftButton) {
|
|
if (orientation () == Qt::Vertical)
|
|
setValue (minimum ()
|
|
+ ((maximum () - minimum ()) * (height () - event->y ())) / height ());
|
|
else
|
|
setValue (minimum ()
|
|
+ ((maximum () - minimum ()) * event->x ()) / width ());
|
|
|
|
event->accept ();
|
|
}
|
|
|
|
QSlider::mousePressEvent (event);
|
|
}
|
|
;
|