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
9906af38
Commit
9906af38
authored
Sep 19, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rework of the embedded stuff. This breaks everything :)
parent
3dda1153
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
233 additions
and
85 deletions
+233
-85
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+45
-4
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+26
-4
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+133
-68
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+29
-9
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
9906af38
...
...
@@ -92,7 +92,7 @@ VideoWidget::~VideoWidget()
QSize
VideoWidget
::
sizeHint
()
const
{
return
p_intf
->
p_sys
->
p_mi
->
video
Size
;
return
widget
Size
;
}
static
void
*
DoRequest
(
intf_thread_t
*
p_intf
,
vout_thread_t
*
p_vout
,
...
...
@@ -112,7 +112,7 @@ void *VideoWidget::Request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
p_vout
=
p_nvout
;
setMinimumSize
(
1
,
1
);
p_intf
->
p_sys
->
p_mi
->
video
Size
=
QSize
(
*
pi_width
,
*
pi_height
);
widget
Size
=
QSize
(
*
pi_width
,
*
pi_height
);
updateGeometry
();
need_update
=
true
;
return
(
void
*
)
winId
();
...
...
@@ -128,7 +128,7 @@ void VideoWidget::Release( void *p_win )
p_vout
=
NULL
;
if
(
config_GetInt
(
p_intf
,
"qt-always-video"
)
==
0
)
{
p_intf
->
p_sys
->
p_mi
->
video
Size
=
QSize
(
1
,
1
);
widget
Size
=
QSize
(
1
,
1
);
updateGeometry
();
need_update
=
true
;
}
...
...
@@ -161,7 +161,7 @@ int VideoWidget::Control( void *p_window, int i_query, va_list args )
if
(
!
i_width
&&
p_vout
)
i_width
=
p_vout
->
i_window_width
;
if
(
!
i_height
&&
p_vout
)
i_height
=
p_vout
->
i_window_height
;
p_intf
->
p_sys
->
p_mi
->
video
Size
=
QSize
(
i_width
,
i_height
);
widget
Size
=
QSize
(
i_width
,
i_height
);
updateGeometry
();
need_update
=
true
;
i_ret
=
VLC_SUCCESS
;
...
...
@@ -219,6 +219,11 @@ int BackgroundWidget::CleanBackground()
return
0
;
}
QSize
BackgroundWidget
::
sizeHint
()
const
{
return
widgetSize
;
}
void
BackgroundWidget
::
hasAudio
()
{
/* We have video already, do nothing */
...
...
@@ -240,3 +245,39 @@ void BackgroundWidget::resizeEvent( QResizeEvent *e )
else
label
->
setMaximumWidth
(
ICON_SIZE
);
}
/**********************************************************************
* Playlist Widget. The embedded playlist
**********************************************************************/
#include "components/playlist/panels.hpp"
#include "components/playlist/selector.hpp"
PlaylistWidget
::
PlaylistWidget
(
intf_thread_t
*
_p_intf
)
:
QFrame
(
NULL
),
p_intf
(
_p_intf
)
{
selector
=
new
PLSelector
(
this
,
p_intf
,
THEPL
);
selector
->
setMaximumWidth
(
130
);
playlist_item_t
*
p_root
=
playlist_GetPreferredNode
(
THEPL
,
THEPL
->
p_local_category
);
rightPanel
=
qobject_cast
<
PLPanel
*>
(
new
StandardPLPanel
(
this
,
p_intf
,
THEPL
,
p_root
)
);
CONNECT
(
selector
,
activated
(
int
),
rightPanel
,
setRoot
(
int
)
);
QHBoxLayout
*
layout
=
new
QHBoxLayout
();
layout
->
addWidget
(
selector
,
0
);
layout
->
addWidget
(
rightPanel
,
10
);
setLayout
(
layout
);
}
PlaylistWidget
::~
PlaylistWidget
()
{
}
QSize
PlaylistWidget
::
sizeHint
()
const
{
return
widgetSize
;
}
modules/gui/qt4/components/interface_widgets.hpp
View file @
9906af38
...
...
@@ -34,8 +34,8 @@
class
QLabel
;
class
QHBoxLayout
;
class
QColor
;
/******************** Video Widget ****************/
class
VideoWidget
:
public
QFrame
{
Q_OBJECT
...
...
@@ -43,14 +43,16 @@ public:
VideoWidget
(
intf_thread_t
*
);
virtual
~
VideoWidget
();
virtual
QSize
sizeHint
()
const
;
void
*
Request
(
vout_thread_t
*
,
int
*
,
int
*
,
unsigned
int
*
,
unsigned
int
*
);
void
Release
(
void
*
);
int
Control
(
void
*
,
int
,
va_list
);
int
i_video_height
,
i_video_width
;
vout_thread_t
*
p_vout
;
QSize
widgetSize
;
virtual
QSize
sizeHint
()
const
;
private:
QWidget
*
frame
;
intf_thread_t
*
p_intf
;
...
...
@@ -59,12 +61,15 @@ private slots:
void
update
();
};
/******************** Background Widget ****************/
class
BackgroundWidget
:
public
QFrame
{
Q_OBJECT
public:
BackgroundWidget
(
intf_thread_t
*
);
virtual
~
BackgroundWidget
();
QSize
widgetSize
;
virtual
QSize
sizeHint
()
const
;
private:
QPalette
plt
;
QLabel
*
label
;
...
...
@@ -79,7 +84,24 @@ private slots:
};
/******************** Playlist Widget ****************/
#include <QModelIndex>
class
QSignalMapper
;
class
PLSelector
;
class
PLPanel
;
class
PlaylistWidget
:
public
QFrame
{
Q_OBJECT
;
public:
PlaylistWidget
(
intf_thread_t
*
);
virtual
~
PlaylistWidget
();
QSize
widgetSize
;
virtual
QSize
sizeHint
()
const
;
private:
PLSelector
*
selector
;
PLPanel
*
rightPanel
;
intf_thread_t
*
p_intf
;
};
#endif
modules/gui/qt4/main_interface.cpp
View file @
9906af38
This diff is collapsed.
Click to expand it.
modules/gui/qt4/main_interface.hpp
View file @
9906af38
...
...
@@ -28,13 +28,20 @@
#include "ui/main_interface.h"
#include "util/qvlcframe.hpp"
#include <QSize>
class
QSettings
;
class
QCloseEvent
;
class
QKeyEvent
;
class
QLabel
;
class
InputManager
;
class
InputSlider
;
class
VideoWidget
;
class
BackgroundWidget
;
class
PlaylistWidget
;
class
VolumeClickHandler
;
class
MainInterface
:
public
QVLCMW
{
Q_OBJECT
;
...
...
@@ -44,21 +51,33 @@ public:
void
resizeEvent
(
QResizeEvent
*
);
QSize
videoSize
,
addSize
;
protected:
void
closeEvent
(
QCloseEvent
*
);
Ui
::
MainInterfaceUI
ui
;
friend
class
VolumeClickHandler
;
private:
QSettings
*
settings
;
QSize
mainSize
,
addSize
;
void
calculateInterfaceSize
();
void
handleMainUi
(
QSettings
*
);
virtual
void
keyPressEvent
(
QKeyEvent
*
);
VideoWidget
*
videoWidget
;
InputManager
*
main_input_manager
;
QLabel
*
timeLabel
;
QLabel
*
nameLabel
;
InputSlider
*
slider
;
/// Main input associated to the playlist
input_thread_t
*
p_input
;
/* All the stuff that goes in the main position */
VideoWidget
*
videoWidget
;
BackgroundWidget
*
bgWidget
;
PlaylistWidget
*
playlistWidget
;
bool
playlistEmbeddedFlag
;
bool
videoEmbeddedFlag
;
InputManager
*
main_input_manager
;
InputSlider
*
slider
;
input_thread_t
*
p_input
;
///< Main input associated to the playlist
QLabel
*
timeLabel
;
QLabel
*
nameLabel
;
private
slots
:
void
setStatus
(
int
);
void
setName
(
QString
);
...
...
@@ -68,6 +87,7 @@ private slots:
void
stop
();
void
prev
();
void
next
();
void
playlist
();
void
updateVolume
(
int
sliderVolume
);
};
...
...
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