Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
6c3d9910
Commit
6c3d9910
authored
May 31, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
0bfccfad
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
18 deletions
+13
-18
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+2
-5
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+0
-1
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+2
-5
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.cpp
+7
-3
modules/gui/qt4/util/input_slider.hpp
modules/gui/qt4/util/input_slider.hpp
+2
-4
No files found.
modules/gui/qt4/input_manager.cpp
View file @
6c3d9910
...
@@ -40,9 +40,8 @@ InputManager::~InputManager()
...
@@ -40,9 +40,8 @@ InputManager::~InputManager()
void
InputManager
::
setInput
(
input_thread_t
*
_p_input
)
void
InputManager
::
setInput
(
input_thread_t
*
_p_input
)
{
{
fprintf
(
stderr
,
"[IM] Got input
\n
"
);
p_input
=
_p_input
;
p_input
=
_p_input
;
emit
reset
(
);
emit
positionUpdated
(
0.0
,
0
,
0
);
}
}
void
InputManager
::
update
()
void
InputManager
::
update
()
...
@@ -51,7 +50,7 @@ void InputManager::update()
...
@@ -51,7 +50,7 @@ void InputManager::update()
if
(
p_input
->
b_dead
)
if
(
p_input
->
b_dead
)
{
{
//emit statusChanged(
0 );
emit
positionUpdated
(
0.0
,
0
,
0
);
}
}
mtime_t
i_length
,
i_time
;
mtime_t
i_length
,
i_time
;
float
f_pos
;
float
f_pos
;
...
@@ -59,12 +58,10 @@ void InputManager::update()
...
@@ -59,12 +58,10 @@ void InputManager::update()
i_time
=
var_GetTime
(
p_input
,
"time"
)
/
1000000
;
i_time
=
var_GetTime
(
p_input
,
"time"
)
/
1000000
;
f_pos
=
var_GetFloat
(
p_input
,
"position"
);
f_pos
=
var_GetFloat
(
p_input
,
"position"
);
fprintf
(
stderr
,
"Changing pos
\n
"
);
emit
positionUpdated
(
f_pos
,
i_time
,
i_length
);
emit
positionUpdated
(
f_pos
,
i_time
,
i_length
);
}
}
void
InputManager
::
sliderUpdate
(
float
new_pos
)
void
InputManager
::
sliderUpdate
(
float
new_pos
)
{
{
fprintf
(
stderr
,
"Seek to %f
\n
"
,
new_pos
);
var_SetFloat
(
p_input
,
"position"
,
new_pos
);
var_SetFloat
(
p_input
,
"position"
,
new_pos
);
}
}
modules/gui/qt4/input_manager.hpp
View file @
6c3d9910
...
@@ -45,7 +45,6 @@ public slots:
...
@@ -45,7 +45,6 @@ public slots:
signals:
signals:
/// Send new position, new time and new length
/// Send new position, new time and new length
void
positionUpdated
(
float
,
int
,
int
);
void
positionUpdated
(
float
,
int
,
int
);
void
reset
();
///< Input changed, tell others to reset
};
};
...
...
modules/gui/qt4/main_interface.cpp
View file @
6c3d9910
...
@@ -30,10 +30,8 @@
...
@@ -30,10 +30,8 @@
MainInterface
::
MainInterface
(
intf_thread_t
*
_p_intf
)
:
MainInterface
::
MainInterface
(
intf_thread_t
*
_p_intf
)
:
QWidget
(
NULL
),
p_intf
(
_p_intf
)
QWidget
(
NULL
),
p_intf
(
_p_intf
)
{
{
fprintf
(
stderr
,
"QT Main interface
\n
"
);
/* Init UI */
/* Init UI */
slider
=
new
InputSlider
(
Qt
::
Horizontal
,
this
);
slider
->
init
();
slider
=
new
InputSlider
(
Qt
::
Horizontal
,
this
);
/* Init input manager */
/* Init input manager */
p_input
=
NULL
;
p_input
=
NULL
;
...
@@ -49,7 +47,7 @@ void MainInterface::init()
...
@@ -49,7 +47,7 @@ void MainInterface::init()
QObject
::
connect
(
this
,
SIGNAL
(
inputChanged
(
input_thread_t
*
)
),
QObject
::
connect
(
this
,
SIGNAL
(
inputChanged
(
input_thread_t
*
)
),
main_input_manager
,
SLOT
(
setInput
(
input_thread_t
*
)
)
);
main_input_manager
,
SLOT
(
setInput
(
input_thread_t
*
)
)
);
/* Connect the slider and the input manager */
/* Connect the slider and the input manager
(both ways)
*/
QObject
::
connect
(
main_input_manager
,
SIGNAL
(
positionUpdated
(
QObject
::
connect
(
main_input_manager
,
SIGNAL
(
positionUpdated
(
float
,
int
,
int
)
),
slider
,
SLOT
(
setPosition
(
float
,
int
,
float
,
int
,
int
)
),
slider
,
SLOT
(
setPosition
(
float
,
int
,
int
)
)
);
int
)
)
);
...
@@ -88,7 +86,6 @@ void MainInterface::updateOnTimer()
...
@@ -88,7 +86,6 @@ void MainInterface::updateOnTimer()
if
(
p_input
)
if
(
p_input
)
{
{
vlc_object_yield
(
p_input
);
vlc_object_yield
(
p_input
);
fprintf
(
stderr
,
"Sending input
\n
"
);
emit
inputChanged
(
p_input
);
emit
inputChanged
(
p_input
);
}
}
...
...
modules/gui/qt4/util/input_slider.cpp
View file @
6c3d9910
...
@@ -23,7 +23,13 @@
...
@@ -23,7 +23,13 @@
#include "util/input_slider.hpp"
#include "util/input_slider.hpp"
void
InputSlider
::
init
()
InputSlider
::
InputSlider
(
QWidget
*
_parent
)
:
DirectSlider
(
_parent
)
{
InputSlider
::
InputSlider
(
Qt
::
Horizontal
,
_parent
);
}
InputSlider
::
InputSlider
(
Qt
::
Orientation
q
,
QWidget
*
_parent
)
:
DirectSlider
(
q
,
_parent
)
{
{
mymove
=
false
;
mymove
=
false
;
setMinimum
(
0
);
setMinimum
(
0
);
...
@@ -37,7 +43,6 @@ void InputSlider::init()
...
@@ -37,7 +43,6 @@ void InputSlider::init()
void
InputSlider
::
setPosition
(
float
pos
,
int
a
,
int
b
)
void
InputSlider
::
setPosition
(
float
pos
,
int
a
,
int
b
)
{
{
fprintf
(
stderr
,
"Set pos %f
\n
"
,
pos
);
mymove
=
true
;
mymove
=
true
;
setValue
(
(
int
)(
pos
*
1000.0
)
);
setValue
(
(
int
)(
pos
*
1000.0
)
);
mymove
=
false
;
mymove
=
false
;
...
@@ -48,7 +53,6 @@ void InputSlider::userDrag( int new_value )
...
@@ -48,7 +53,6 @@ void InputSlider::userDrag( int new_value )
float
f_pos
=
(
float
)(
new_value
)
/
1000.0
;
float
f_pos
=
(
float
)(
new_value
)
/
1000.0
;
if
(
!
mymove
)
if
(
!
mymove
)
{
{
fprintf
(
stderr
,
"Emitting %f
\n
"
,
f_pos
);
emit
sliderDragged
(
f_pos
);
emit
sliderDragged
(
f_pos
);
}
}
}
}
modules/gui/qt4/util/input_slider.hpp
View file @
6c3d9910
...
@@ -29,11 +29,9 @@ class InputSlider : public DirectSlider
...
@@ -29,11 +29,9 @@ class InputSlider : public DirectSlider
{
{
Q_OBJECT
Q_OBJECT
public:
public:
InputSlider
(
QWidget
*
_parent
)
:
DirectSlider
(
_parent
)
{};
InputSlider
(
QWidget
*
_parent
);
InputSlider
(
Qt
::
Orientation
q
,
QWidget
*
_parent
)
:
DirectSlider
(
q
,
_parent
)
InputSlider
(
Qt
::
Orientation
q
,
QWidget
*
_parent
);
{};
virtual
~
InputSlider
()
{};
virtual
~
InputSlider
()
{};
void
init
();
private:
private:
bool
mymove
;
bool
mymove
;
public
slots
:
public
slots
:
...
...
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