Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
7ab98f85
Commit
7ab98f85
authored
Apr 12, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: rename a class
parent
71b6f892
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+2
-2
modules/gui/qt4/components/controller.hpp
modules/gui/qt4/components/controller.hpp
+1
-1
modules/gui/qt4/dialogs/toolbar.cpp
modules/gui/qt4/dialogs/toolbar.cpp
+1
-1
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.cpp
+13
-13
modules/gui/qt4/util/input_slider.hpp
modules/gui/qt4/util/input_slider.hpp
+3
-3
No files found.
modules/gui/qt4/components/controller.cpp
View file @
7ab98f85
...
...
@@ -37,7 +37,7 @@
#include "input_manager.hpp"
#include "actions_manager.hpp"
#include "util/input_slider.hpp"
/*
Input
Slider */
#include "util/input_slider.hpp"
/*
Seek
Slider */
#include "util/customwidgets.hpp"
/* qEventToKey */
#include <QSpacerItem>
...
...
@@ -289,7 +289,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
}
break
;
case
INPUT_SLIDER
:
{
InputSlider
*
slider
=
new
Input
Slider
(
Qt
::
Horizontal
,
NULL
);
SeekSlider
*
slider
=
new
Seek
Slider
(
Qt
::
Horizontal
,
NULL
);
/* Update the position when the IM has changed */
CONNECT
(
THEMIM
->
getIM
(),
positionUpdated
(
float
,
int64_t
,
int
),
...
...
modules/gui/qt4/components/controller.hpp
View file @
7ab98f85
...
...
@@ -50,7 +50,7 @@ class QBoxLayout;
class
QAbstractSlider
;
class
QAbstractButton
;
class
Input
Slider
;
class
Seek
Slider
;
class
QToolButton
;
class
VolumeClickHandler
;
...
...
modules/gui/qt4/dialogs/toolbar.cpp
View file @
7ab98f85
...
...
@@ -333,7 +333,7 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
break
;
case
INPUT_SLIDER
:
{
InputSlider
*
slider
=
new
Input
Slider
(
Qt
::
Horizontal
,
this
);
SeekSlider
*
slider
=
new
Seek
Slider
(
Qt
::
Horizontal
,
this
);
widget
=
slider
;
}
widgetItem
->
setText
(
qtr
(
"Time Slider"
)
);
...
...
modules/gui/qt4/util/input_slider.cpp
View file @
7ab98f85
...
...
@@ -39,12 +39,12 @@
#define MINIMUM 0
#define MAXIMUM 1000
InputSlider
::
Input
Slider
(
QWidget
*
_parent
)
:
QSlider
(
_parent
)
SeekSlider
::
Seek
Slider
(
QWidget
*
_parent
)
:
QSlider
(
_parent
)
{
Input
Slider
(
Qt
::
Horizontal
,
_parent
);
Seek
Slider
(
Qt
::
Horizontal
,
_parent
);
}
InputSlider
::
Input
Slider
(
Qt
::
Orientation
q
,
QWidget
*
_parent
)
SeekSlider
::
Seek
Slider
(
Qt
::
Orientation
q
,
QWidget
*
_parent
)
:
QSlider
(
q
,
_parent
)
{
b_isSliding
=
false
;
...
...
@@ -72,7 +72,7 @@ InputSlider::InputSlider( Qt::Orientation q, QWidget *_parent )
/***
* \brief Public interface, like setValue, but disabling the slider too
***/
void
Input
Slider
::
setPosition
(
float
pos
,
int64_t
a
,
int
b
)
void
Seek
Slider
::
setPosition
(
float
pos
,
int64_t
a
,
int
b
)
{
if
(
pos
==
-
1.0
)
{
...
...
@@ -88,20 +88,20 @@ void InputSlider::setPosition( float pos, int64_t a, int b )
inputLength
=
b
;
}
void
Input
Slider
::
startSeekTimer
(
int
new_value
)
void
Seek
Slider
::
startSeekTimer
(
int
new_value
)
{
/* Only fire one update, when sliding, every 150ms */
if
(
b_isSliding
&&
!
seekLimitTimer
->
isActive
()
)
seekLimitTimer
->
start
(
150
);
}
void
Input
Slider
::
updatePos
()
void
Seek
Slider
::
updatePos
()
{
float
f_pos
=
(
float
)(
value
())
/
1000.0
;
emit
sliderDragged
(
f_pos
);
/* Send new position to VLC's core */
}
void
Input
Slider
::
mouseReleaseEvent
(
QMouseEvent
*
event
)
void
Seek
Slider
::
mouseReleaseEvent
(
QMouseEvent
*
event
)
{
event
->
accept
();
b_isSliding
=
false
;
...
...
@@ -110,7 +110,7 @@ void InputSlider::mouseReleaseEvent( QMouseEvent *event )
updatePos
();
}
void
Input
Slider
::
mousePressEvent
(
QMouseEvent
*
event
)
void
Seek
Slider
::
mousePressEvent
(
QMouseEvent
*
event
)
{
/* Right-click */
if
(
event
->
button
()
!=
Qt
::
LeftButton
&&
...
...
@@ -125,7 +125,7 @@ void InputSlider::mousePressEvent(QMouseEvent* event)
event
->
accept
();
}
void
Input
Slider
::
mouseMoveEvent
(
QMouseEvent
*
event
)
void
Seek
Slider
::
mouseMoveEvent
(
QMouseEvent
*
event
)
{
if
(
b_isSliding
)
{
...
...
@@ -138,7 +138,7 @@ void InputSlider::mouseMoveEvent(QMouseEvent *event)
event
->
accept
();
}
void
Input
Slider
::
wheelEvent
(
QWheelEvent
*
event
)
void
Seek
Slider
::
wheelEvent
(
QWheelEvent
*
event
)
{
/* Don't do anything if we are for somehow reason sliding */
if
(
!
b_isSliding
)
...
...
@@ -154,19 +154,19 @@ void InputSlider::wheelEvent( QWheelEvent *event)
event
->
accept
();
}
QSize
Input
Slider
::
sizeHint
()
const
QSize
Seek
Slider
::
sizeHint
()
const
{
return
(
orientation
()
==
Qt
::
Horizontal
)
?
QSize
(
100
,
18
)
:
QSize
(
18
,
100
);
}
QSize
Input
Slider
::
handleSize
()
const
QSize
Seek
Slider
::
handleSize
()
const
{
const
int
size
=
(
orientation
()
==
Qt
::
Horizontal
?
height
()
:
width
()
);
return
QSize
(
size
,
size
);
}
void
Input
Slider
::
paintEvent
(
QPaintEvent
*
event
)
void
Seek
Slider
::
paintEvent
(
QPaintEvent
*
event
)
{
Q_UNUSED
(
event
);
...
...
modules/gui/qt4/util/input_slider.hpp
View file @
7ab98f85
...
...
@@ -34,12 +34,12 @@
#include <QTimer>
/* Input Slider derived from QSlider */
class
Input
Slider
:
public
QSlider
class
Seek
Slider
:
public
QSlider
{
Q_OBJECT
public:
Input
Slider
(
QWidget
*
_parent
);
Input
Slider
(
Qt
::
Orientation
q
,
QWidget
*
_parent
);
Seek
Slider
(
QWidget
*
_parent
);
Seek
Slider
(
Qt
::
Orientation
q
,
QWidget
*
_parent
);
protected:
virtual
void
mouseMoveEvent
(
QMouseEvent
*
event
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment