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
b63140fa
Commit
b63140fa
authored
Aug 24, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Playlist resizing and positionning.
parent
975984c0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
41 deletions
+40
-41
modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.cpp
+0
-5
modules/gui/qt4/components/playlist/playlist.hpp
modules/gui/qt4/components/playlist/playlist.hpp
+0
-1
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+23
-29
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+11
-3
modules/gui/qt4/ui/sout.ui
modules/gui/qt4/ui/sout.ui
+6
-3
No files found.
modules/gui/qt4/components/playlist/playlist.cpp
View file @
b63140fa
...
@@ -134,11 +134,6 @@ void PlaylistWidget::setArt( QString url )
...
@@ -134,11 +134,6 @@ void PlaylistWidget::setArt( QString url )
}
}
}
}
QSize
PlaylistWidget
::
sizeHint
()
const
{
return
QSize
(
600
,
300
);
}
PlaylistWidget
::~
PlaylistWidget
()
PlaylistWidget
::~
PlaylistWidget
()
{
{
getSettings
()
->
beginGroup
(
"playlistdialog"
);
getSettings
()
->
beginGroup
(
"playlistdialog"
);
...
...
modules/gui/qt4/components/playlist/playlist.hpp
View file @
b63140fa
...
@@ -47,7 +47,6 @@ class PlaylistWidget : public QSplitter
...
@@ -47,7 +47,6 @@ class PlaylistWidget : public QSplitter
public:
public:
PlaylistWidget
(
intf_thread_t
*
_p_i
,
QWidget
*
parent
)
;
PlaylistWidget
(
intf_thread_t
*
_p_i
,
QWidget
*
parent
)
;
virtual
~
PlaylistWidget
();
virtual
~
PlaylistWidget
();
QSize
sizeHint
()
const
;
private:
private:
PLSelector
*
selector
;
PLSelector
*
selector
;
PLPanel
*
rightPanel
;
PLPanel
*
rightPanel
;
...
...
modules/gui/qt4/main_interface.cpp
View file @
b63140fa
...
@@ -222,7 +222,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
...
@@ -222,7 +222,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
if
(
settings
->
value
(
"playlist-visible"
,
0
).
toInt
()
)
togglePlaylist
();
if
(
settings
->
value
(
"playlist-visible"
,
0
).
toInt
()
)
togglePlaylist
();
settings
->
endGroup
();
settings
->
endGroup
();
/* Final sizing and showing */
/* Final sizing and showing */
setMinimumWidth
(
__MAX
(
controls
->
sizeHint
().
width
(),
setMinimumWidth
(
__MAX
(
controls
->
sizeHint
().
width
(),
menuBar
()
->
sizeHint
().
width
()
)
);
menuBar
()
->
sizeHint
().
width
()
)
);
...
@@ -248,11 +247,14 @@ MainInterface::~MainInterface()
...
@@ -248,11 +247,14 @@ MainInterface::~MainInterface()
msg_Dbg
(
p_intf
,
"Destroying the main interface"
);
msg_Dbg
(
p_intf
,
"Destroying the main interface"
);
if
(
playlistWidget
)
if
(
playlistWidget
)
playlistWidget
->
savingSettings
();
{
if
(
!
isDocked
()
)
QVLCTools
::
saveWidgetPosition
(
p_intf
,
"Playlist"
,
playlistWidget
);
}
settings
->
beginGroup
(
"MainWindow"
);
settings
->
beginGroup
(
"MainWindow"
);
// settings->setValue( "playlist-floats", (int)(dockPL->isFloating())
);
settings
->
setValue
(
"pl-dock-status"
,
(
int
)
i_pl_dock
);
settings
->
setValue
(
"playlist-visible"
,
(
int
)
playlistVisible
);
settings
->
setValue
(
"playlist-visible"
,
(
int
)
playlistVisible
);
settings
->
setValue
(
"adv-controls"
,
settings
->
setValue
(
"adv-controls"
,
getControlsVisibilityStatus
()
&
CONTROLS_ADVANCED
);
getControlsVisibilityStatus
()
&
CONTROLS_ADVANCED
);
...
@@ -586,8 +588,6 @@ void MainInterface::toggleFSC()
...
@@ -586,8 +588,6 @@ void MainInterface::toggleFSC()
QApplication
::
postEvent
(
fullscreenControls
,
static_cast
<
QEvent
*>
(
eShow
)
);
QApplication
::
postEvent
(
fullscreenControls
,
static_cast
<
QEvent
*>
(
eShow
)
);
}
}
//FIXME remove me at the end...
void
MainInterface
::
debug
()
void
MainInterface
::
debug
()
{
{
#ifndef NDEBUG
#ifndef NDEBUG
...
@@ -733,46 +733,36 @@ int MainInterface::controlVideo( void *p_window, int i_query, va_list args )
...
@@ -733,46 +733,36 @@ int MainInterface::controlVideo( void *p_window, int i_query, va_list args )
**/
**/
void
MainInterface
::
togglePlaylist
()
void
MainInterface
::
togglePlaylist
()
{
{
THEDP
->
playlistDialog
();
#if 0
/* CREATION
/* CREATION
If no playlist exist, then create one and attach it to the DockPL*/
If no playlist exist, then create one and attach it to the DockPL*/
if
(
!
playlistWidget
)
if
(
!
playlistWidget
)
{
{
playlistWidget = new PlaylistWidget( p_intf, settings, dockPL );
playlistWidget
=
new
PlaylistWidget
(
p_intf
,
this
);
/* Add it to the parent DockWidget */
dockPL->setWidget( playlistWidget );
/* Add the dock to the main Interface */
i_pl_dock
=
(
pl_dock_e
)
getSettings
()
addDockWidget( Qt::BottomDockWidgetArea, dockPL );
->
value
(
"pl-dock-status"
,
PL_UNDOCKED
).
toInt
();
if
(
i_pl_dock
==
PL_UNDOCKED
)
{
playlistWidget
->
setWindowFlags
(
Qt
::
Window
);
/* Make the playlist floating is requested. Default is not. */
QVLCTools
::
restoreWidgetPosition
(
p_intf
,
"Playlist"
,
settings->beginGroup( "MainWindow" );
playlistWidget
,
QSize
(
600
,
300
)
);
if( settings->value( "playlist-floats", 1 ).toInt() )
}
else
{
{
msg_Dbg( p_intf, "we don't want the playlist inside");
mainLayout
->
insertWidget
(
4
,
playlistWidget
);
dockPL->setFloating( true );
}
}
settings->endGroup();
settings->beginGroup( "playlist" );
dockPL->move( settings->value( "pos", QPoint( 0,0 ) ).toPoint() );
QSize newSize = settings->value( "size", QSize( 400, 300 ) ).toSize();
if( newSize.isValid() )
dockPL->resize( newSize );
settings->endGroup();
dockPL->show();
playlistVisible
=
true
;
playlistVisible
=
true
;
playlistWidget
->
show
();
}
}
else
else
{
{
/* toggle the visibility of the playlist */
/* toggle the visibility of the playlist */
TOGGLEV(
dockPL
);
TOGGLEV
(
playlistWidget
);
resize
(
sizeHint
()
);
resize
(
sizeHint
()
);
playlistVisible
=
!
playlistVisible
;
playlistVisible
=
!
playlistVisible
;
}
}
#endif
}
}
/* Function called from the menu to undock the playlist */
/* Function called from the menu to undock the playlist */
...
@@ -782,6 +772,10 @@ void MainInterface::undockPlaylist()
...
@@ -782,6 +772,10 @@ void MainInterface::undockPlaylist()
adjustSize
();
adjustSize
();
}
}
void
MainInterface
::
dockPlaylist
(
pl_dock_e
i_pos
)
{
}
void
MainInterface
::
toggleMinimalView
()
void
MainInterface
::
toggleMinimalView
()
{
{
/* HACK for minimalView, see menus.cpp */
/* HACK for minimalView, see menus.cpp */
...
...
modules/gui/qt4/main_interface.hpp
View file @
b63140fa
...
@@ -51,12 +51,19 @@ class QMenu;
...
@@ -51,12 +51,19 @@ class QMenu;
class
QSize
;
class
QSize
;
//class QDockWidet;
//class QDockWidet;
enum
{
enum
{
CONTROLS_HIDDEN
=
0x0
,
CONTROLS_HIDDEN
=
0x0
,
CONTROLS_VISIBLE
=
0x1
,
CONTROLS_VISIBLE
=
0x1
,
CONTROLS_ADVANCED
=
0x2
CONTROLS_ADVANCED
=
0x2
};
};
typedef
enum
pl_dock_e
{
PL_UNDOCKED
,
PL_BOTTOM
,
PL_RIGHT
,
PL_LEFT
}
pl_dock_e
;
class
MainInterface
:
public
QVLCMW
class
MainInterface
:
public
QVLCMW
{
{
Q_OBJECT
;
Q_OBJECT
;
...
@@ -114,12 +121,10 @@ private:
...
@@ -114,12 +121,10 @@ private:
/* Video */
/* Video */
VideoWidget
*
videoWidget
;
VideoWidget
*
videoWidget
;
// QSize savedVideoSize;
BackgroundWidget
*
bgWidget
;
BackgroundWidget
*
bgWidget
;
VisualSelector
*
visualSelector
;
VisualSelector
*
visualSelector
;
PlaylistWidget
*
playlistWidget
;
PlaylistWidget
*
playlistWidget
;
// QDockWidget *dockPL;
bool
videoIsActive
;
///< Having a video now / THEMIM->hasV
bool
videoIsActive
;
///< Having a video now / THEMIM->hasV
bool
videoEmbeddedFlag
;
///< Want an external Video Window
bool
videoEmbeddedFlag
;
///< Want an external Video Window
...
@@ -129,6 +134,8 @@ private:
...
@@ -129,6 +134,8 @@ private:
bool
b_remainingTime
;
/* Show elapsed or remaining time */
bool
b_remainingTime
;
/* Show elapsed or remaining time */
bool
bgWasVisible
;
bool
bgWasVisible
;
int
i_visualmode
;
///< Visual Mode
int
i_visualmode
;
///< Visual Mode
pl_dock_e
i_pl_dock
;
bool
isDocked
()
{
return
(
i_pl_dock
!=
PL_UNDOCKED
);
}
input_thread_t
*
p_input
;
///< Main input associated to the playlist
input_thread_t
*
p_input
;
///< Main input associated to the playlist
...
@@ -143,6 +150,7 @@ private:
...
@@ -143,6 +150,7 @@ private:
public
slots
:
public
slots
:
void
undockPlaylist
();
void
undockPlaylist
();
void
dockPlaylist
(
pl_dock_e
i_pos
=
PL_BOTTOM
);
void
toggleMinimalView
();
void
toggleMinimalView
();
void
togglePlaylist
();
void
togglePlaylist
();
void
toggleUpdateSystrayMenu
();
void
toggleUpdateSystrayMenu
();
...
...
modules/gui/qt4/ui/sout.ui
View file @
b63140fa
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<x>0</x>
<x>0</x>
<y>0</y>
<y>0</y>
<width>644</width>
<width>644</width>
<height>7
84
</height>
<height>7
99
</height>
</rect>
</rect>
</property>
</property>
<property name="windowTitle" >
<property name="windowTitle" >
...
@@ -489,6 +489,9 @@
...
@@ -489,6 +489,9 @@
<property name="wordWrap" >
<property name="wordWrap" >
<bool>true</bool>
<bool>true</bool>
</property>
</property>
<property name="buddy" >
<cstring>UDPOutput</cstring>
</property>
</widget>
</widget>
</item>
</item>
<item row="5" column="1" >
<item row="5" column="1" >
...
@@ -542,8 +545,8 @@
...
@@ -542,8 +545,8 @@
<rect>
<rect>
<x>0</x>
<x>0</x>
<y>0</y>
<y>0</y>
<width>62
4
</width>
<width>62
8
</width>
<height>1
29
</height>
<height>1
35
</height>
</rect>
</rect>
</property>
</property>
<attribute name="title" >
<attribute name="title" >
...
...
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