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
959a473d
Commit
959a473d
authored
Sep 22, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement dock/undock for the playlist
parent
e45f26dd
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
9 deletions
+57
-9
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+12
-0
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+2
-0
modules/gui/qt4/dialogs/playlist.cpp
modules/gui/qt4/dialogs/playlist.cpp
+13
-2
modules/gui/qt4/dialogs/playlist.hpp
modules/gui/qt4/dialogs/playlist.hpp
+6
-1
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+19
-5
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+3
-1
modules/gui/qt4/qt4.hpp
modules/gui/qt4/qt4.hpp
+2
-0
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
959a473d
...
...
@@ -182,6 +182,8 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_intf ) : QFrame(NULL),
QPushButton
*
undockButton
=
new
QPushButton
(
"UN"
,
this
);
undockButton
->
setMaximumWidth
(
25
);
BUTTONACT
(
undockButton
,
undock
()
);
undockButton
->
setToolTip
(
qtr
(
"Undock playlist for main interface"
)
);
QPushButton
*
sourcesButton
=
new
QPushButton
(
"Sources"
,
this
);
sourcesButton
->
setToolTip
(
qtr
(
"Select additional stream sources"
)
);
...
...
@@ -214,6 +216,16 @@ PlaylistWidget::~PlaylistWidget()
{
}
void
PlaylistWidget
::
undock
()
{
hide
();
THEDP
->
playlistDialog
();
deleteLater
();
QEvent
*
event
=
new
QEvent
(
(
QEvent
::
Type
)(
PLUndockEvent_Type
)
);
QApplication
::
postEvent
(
p_intf
->
p_sys
->
p_mi
,
event
);
}
QSize
PlaylistWidget
::
sizeHint
()
const
{
fprintf
(
stderr
,
"PL Size %ix%i
\n
"
,
widgetSize
.
width
(),
widgetSize
.
height
()
);
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
959a473d
...
...
@@ -106,6 +106,8 @@ private:
PLSelector
*
selector
;
PLPanel
*
rightPanel
;
intf_thread_t
*
p_intf
;
private
slots
:
void
undock
();
};
#endif
modules/gui/qt4/dialogs/playlist.cpp
View file @
959a473d
...
...
@@ -22,16 +22,19 @@
******************************************************************************/
#include "dialogs/playlist.hpp"
#include "util/qvlcframe.hpp"
#include "qt4.hpp"
#include "main_interface.hpp"
#include "util/qvlcframe.hpp"
#include "components/playlist/panels.hpp"
#include "components/playlist/selector.hpp"
#include "dialogs_provider.hpp"
#include <QHBoxLayout>
#include <QSignalMapper>
#include <QMenu>
#include <QAction>
#include <QMenuBar>
#include "dialogs_provider.hpp"
PlaylistDialog
*
PlaylistDialog
::
instance
=
NULL
;
...
...
@@ -91,6 +94,7 @@ void PlaylistDialog::createPlMenuBar( QMenuBar *bar, intf_thread_t *p_intf )
manageMenu
->
addMenu
(
subML
);
manageMenu
->
addAction
(
"Open playlist file"
,
THEDP
,
SLOT
(
openPlaylist
()
));
manageMenu
->
addAction
(
"Dock playlist"
,
this
,
SLOT
(
dock
()
)
);
bar
->
addMenu
(
manageMenu
);
bar
->
addMenu
(
SDMenu
()
);
}
...
...
@@ -134,6 +138,13 @@ QMenu *PlaylistDialog::SDMenu()
return
menu
;
}
void
PlaylistDialog
::
dock
()
{
hide
();
QEvent
*
event
=
new
QEvent
(
(
QEvent
::
Type
)(
PLDockEvent_Type
)
);
QApplication
::
postEvent
(
p_intf
->
p_sys
->
p_mi
,
event
);
}
void
PlaylistDialog
::
SDMenuAction
(
QString
data
)
{
char
*
psz_sd
=
data
.
toUtf8
().
data
();
...
...
modules/gui/qt4/dialogs/playlist.hpp
View file @
959a473d
...
...
@@ -39,7 +39,11 @@ public:
if
(
!
instance
)
instance
=
new
PlaylistDialog
(
p_intf
);
return
instance
;
}
static
void
killInstance
()
{
if
(
instance
)
delete
instance
;
}
static
void
killInstance
()
{
if
(
instance
)
delete
instance
;
instance
=
NULL
;
}
virtual
~
PlaylistDialog
();
private:
...
...
@@ -52,6 +56,7 @@ private:
PLSelector
*
selector
;
PLPanel
*
rightPanel
;
private
slots
:
void
dock
();
void
SDMenuAction
(
QString
);
};
...
...
modules/gui/qt4/main_interface.cpp
View file @
959a473d
...
...
@@ -375,8 +375,7 @@ void MainInterface::visual()
/* Stop any currently running visualization */
visualSelector
->
hide
();
}
calculateInterfaceSize
();
resize
(
mainSize
);
doComponentsUpdate
();
}
void
MainInterface
::
playlist
()
...
...
@@ -426,9 +425,7 @@ void MainInterface::playlist()
}
if
(
VISIBLE
(
bgWidget
)
)
bgWidget
->
hide
();
}
calculateInterfaceSize
();
resize
(
mainSize
);
doComponentsUpdate
();
}
/* Video widget cannot do this synchronously as it runs in another thread */
...
...
@@ -439,6 +436,23 @@ void MainInterface::doComponentsUpdate()
resize
(
mainSize
);
}
void
MainInterface
::
customEvent
(
QEvent
*
event
)
{
if
(
event
->
type
()
==
PLUndockEvent_Type
)
{
ui
.
vboxLayout
->
removeWidget
(
playlistWidget
);
playlistWidget
=
NULL
;
playlistEmbeddedFlag
=
false
;
doComponentsUpdate
();
}
else
if
(
event
->
type
()
==
PLDockEvent_Type
)
{
PlaylistDialog
::
killInstance
();
playlistEmbeddedFlag
=
true
;
playlist
();
}
}
/************************************************************************
* Other stuff
************************************************************************/
...
...
modules/gui/qt4/main_interface.hpp
View file @
959a473d
...
...
@@ -34,7 +34,7 @@ class QSettings;
class
QCloseEvent
;
class
QKeyEvent
;
class
QLabel
;
class
QEvent
;
class
InputManager
;
class
InputSlider
;
class
VideoWidget
;
...
...
@@ -86,6 +86,8 @@ private:
QLabel
*
timeLabel
;
QLabel
*
nameLabel
;
void
customEvent
(
QEvent
*
);
private
slots
:
void
setStatus
(
int
);
void
setName
(
QString
);
...
...
modules/gui/qt4/qt4.hpp
View file @
959a473d
...
...
@@ -63,6 +63,8 @@ struct intf_sys_t
#define ON_TIMEOUT( act ) CONNECT( THEDP->fixed_timer, timeout(), this, act )
static
int
DialogEvent_Type
=
QEvent
::
User
+
1
;
static
int
PLUndockEvent_Type
=
QEvent
::
User
+
2
;
static
int
PLDockEvent_Type
=
QEvent
::
User
+
3
;
class
DialogEvent
:
public
QEvent
{
...
...
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