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),
...
@@ -182,6 +182,8 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_intf ) : QFrame(NULL),
QPushButton
*
undockButton
=
new
QPushButton
(
"UN"
,
this
);
QPushButton
*
undockButton
=
new
QPushButton
(
"UN"
,
this
);
undockButton
->
setMaximumWidth
(
25
);
undockButton
->
setMaximumWidth
(
25
);
BUTTONACT
(
undockButton
,
undock
()
);
undockButton
->
setToolTip
(
qtr
(
"Undock playlist for main interface"
)
);
undockButton
->
setToolTip
(
qtr
(
"Undock playlist for main interface"
)
);
QPushButton
*
sourcesButton
=
new
QPushButton
(
"Sources"
,
this
);
QPushButton
*
sourcesButton
=
new
QPushButton
(
"Sources"
,
this
);
sourcesButton
->
setToolTip
(
qtr
(
"Select additional stream sources"
)
);
sourcesButton
->
setToolTip
(
qtr
(
"Select additional stream sources"
)
);
...
@@ -214,6 +216,16 @@ PlaylistWidget::~PlaylistWidget()
...
@@ -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
QSize
PlaylistWidget
::
sizeHint
()
const
{
{
fprintf
(
stderr
,
"PL Size %ix%i
\n
"
,
widgetSize
.
width
(),
widgetSize
.
height
()
);
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:
...
@@ -106,6 +106,8 @@ private:
PLSelector
*
selector
;
PLSelector
*
selector
;
PLPanel
*
rightPanel
;
PLPanel
*
rightPanel
;
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
private
slots
:
void
undock
();
};
};
#endif
#endif
modules/gui/qt4/dialogs/playlist.cpp
View file @
959a473d
...
@@ -22,16 +22,19 @@
...
@@ -22,16 +22,19 @@
******************************************************************************/
******************************************************************************/
#include "dialogs/playlist.hpp"
#include "dialogs/playlist.hpp"
#include "util/qvlcframe.hpp"
#include "qt4.hpp"
#include "qt4.hpp"
#include "main_interface.hpp"
#include "util/qvlcframe.hpp"
#include "components/playlist/panels.hpp"
#include "components/playlist/panels.hpp"
#include "components/playlist/selector.hpp"
#include "components/playlist/selector.hpp"
#include "dialogs_provider.hpp"
#include <QHBoxLayout>
#include <QHBoxLayout>
#include <QSignalMapper>
#include <QSignalMapper>
#include <QMenu>
#include <QMenu>
#include <QAction>
#include <QAction>
#include <QMenuBar>
#include <QMenuBar>
#include "dialogs_provider.hpp"
PlaylistDialog
*
PlaylistDialog
::
instance
=
NULL
;
PlaylistDialog
*
PlaylistDialog
::
instance
=
NULL
;
...
@@ -91,6 +94,7 @@ void PlaylistDialog::createPlMenuBar( QMenuBar *bar, intf_thread_t *p_intf )
...
@@ -91,6 +94,7 @@ void PlaylistDialog::createPlMenuBar( QMenuBar *bar, intf_thread_t *p_intf )
manageMenu
->
addMenu
(
subML
);
manageMenu
->
addMenu
(
subML
);
manageMenu
->
addAction
(
"Open playlist file"
,
THEDP
,
SLOT
(
openPlaylist
()
));
manageMenu
->
addAction
(
"Open playlist file"
,
THEDP
,
SLOT
(
openPlaylist
()
));
manageMenu
->
addAction
(
"Dock playlist"
,
this
,
SLOT
(
dock
()
)
);
bar
->
addMenu
(
manageMenu
);
bar
->
addMenu
(
manageMenu
);
bar
->
addMenu
(
SDMenu
()
);
bar
->
addMenu
(
SDMenu
()
);
}
}
...
@@ -134,6 +138,13 @@ QMenu *PlaylistDialog::SDMenu()
...
@@ -134,6 +138,13 @@ QMenu *PlaylistDialog::SDMenu()
return
menu
;
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
)
void
PlaylistDialog
::
SDMenuAction
(
QString
data
)
{
{
char
*
psz_sd
=
data
.
toUtf8
().
data
();
char
*
psz_sd
=
data
.
toUtf8
().
data
();
...
...
modules/gui/qt4/dialogs/playlist.hpp
View file @
959a473d
...
@@ -39,7 +39,11 @@ public:
...
@@ -39,7 +39,11 @@ public:
if
(
!
instance
)
instance
=
new
PlaylistDialog
(
p_intf
);
if
(
!
instance
)
instance
=
new
PlaylistDialog
(
p_intf
);
return
instance
;
return
instance
;
}
}
static
void
killInstance
()
{
if
(
instance
)
delete
instance
;
}
static
void
killInstance
()
{
if
(
instance
)
delete
instance
;
instance
=
NULL
;
}
virtual
~
PlaylistDialog
();
virtual
~
PlaylistDialog
();
private:
private:
...
@@ -52,6 +56,7 @@ private:
...
@@ -52,6 +56,7 @@ private:
PLSelector
*
selector
;
PLSelector
*
selector
;
PLPanel
*
rightPanel
;
PLPanel
*
rightPanel
;
private
slots
:
private
slots
:
void
dock
();
void
SDMenuAction
(
QString
);
void
SDMenuAction
(
QString
);
};
};
...
...
modules/gui/qt4/main_interface.cpp
View file @
959a473d
...
@@ -375,8 +375,7 @@ void MainInterface::visual()
...
@@ -375,8 +375,7 @@ void MainInterface::visual()
/* Stop any currently running visualization */
/* Stop any currently running visualization */
visualSelector
->
hide
();
visualSelector
->
hide
();
}
}
calculateInterfaceSize
();
doComponentsUpdate
();
resize
(
mainSize
);
}
}
void
MainInterface
::
playlist
()
void
MainInterface
::
playlist
()
...
@@ -426,9 +425,7 @@ void MainInterface::playlist()
...
@@ -426,9 +425,7 @@ void MainInterface::playlist()
}
}
if
(
VISIBLE
(
bgWidget
)
)
bgWidget
->
hide
();
if
(
VISIBLE
(
bgWidget
)
)
bgWidget
->
hide
();
}
}
doComponentsUpdate
();
calculateInterfaceSize
();
resize
(
mainSize
);
}
}
/* Video widget cannot do this synchronously as it runs in another thread */
/* Video widget cannot do this synchronously as it runs in another thread */
...
@@ -439,6 +436,23 @@ void MainInterface::doComponentsUpdate()
...
@@ -439,6 +436,23 @@ void MainInterface::doComponentsUpdate()
resize
(
mainSize
);
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
* Other stuff
************************************************************************/
************************************************************************/
...
...
modules/gui/qt4/main_interface.hpp
View file @
959a473d
...
@@ -34,7 +34,7 @@ class QSettings;
...
@@ -34,7 +34,7 @@ class QSettings;
class
QCloseEvent
;
class
QCloseEvent
;
class
QKeyEvent
;
class
QKeyEvent
;
class
QLabel
;
class
QLabel
;
class
QEvent
;
class
InputManager
;
class
InputManager
;
class
InputSlider
;
class
InputSlider
;
class
VideoWidget
;
class
VideoWidget
;
...
@@ -86,6 +86,8 @@ private:
...
@@ -86,6 +86,8 @@ private:
QLabel
*
timeLabel
;
QLabel
*
timeLabel
;
QLabel
*
nameLabel
;
QLabel
*
nameLabel
;
void
customEvent
(
QEvent
*
);
private
slots
:
private
slots
:
void
setStatus
(
int
);
void
setStatus
(
int
);
void
setName
(
QString
);
void
setName
(
QString
);
...
...
modules/gui/qt4/qt4.hpp
View file @
959a473d
...
@@ -63,6 +63,8 @@ struct intf_sys_t
...
@@ -63,6 +63,8 @@ struct intf_sys_t
#define ON_TIMEOUT( act ) CONNECT( THEDP->fixed_timer, timeout(), this, act )
#define ON_TIMEOUT( act ) CONNECT( THEDP->fixed_timer, timeout(), this, act )
static
int
DialogEvent_Type
=
QEvent
::
User
+
1
;
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
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