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
a8bf1141
Commit
a8bf1141
authored
Oct 07, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: export PLModel in the main struct
parent
c98e449b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.cpp
+1
-1
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/playlist_model.hpp
+13
-0
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+4
-0
modules/gui/qt4/qt4.hpp
modules/gui/qt4/qt4.hpp
+6
-3
No files found.
modules/gui/qt4/components/playlist/playlist.cpp
View file @
a8bf1141
...
@@ -94,7 +94,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
...
@@ -94,7 +94,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
setMinimumWidth
(
400
);
setMinimumWidth
(
400
);
PLModel
*
model
=
new
PLModel
(
p_playlist
,
p_intf
,
p_root
,
this
);
PLModel
*
model
=
PLModel
::
getPLModel
(
p_intf
);
#ifdef MEDIA_LIBRARY
#ifdef MEDIA_LIBRARY
MLModel
*
mlmodel
=
new
MLModel
(
p_intf
,
this
);
MLModel
*
mlmodel
=
new
MLModel
(
p_intf
,
this
);
mainView
=
new
StandardPLPanel
(
this
,
p_intf
,
p_root
,
selector
,
model
,
mlmodel
);
mainView
=
new
StandardPLPanel
(
this
,
p_intf
,
p_root
,
selector
,
model
,
mlmodel
);
...
...
modules/gui/qt4/components/playlist/playlist_model.hpp
View file @
a8bf1141
...
@@ -56,6 +56,19 @@ public:
...
@@ -56,6 +56,19 @@ public:
playlist_item_t
*
,
QObject
*
parent
=
0
);
playlist_item_t
*
,
QObject
*
parent
=
0
);
virtual
~
PLModel
();
virtual
~
PLModel
();
static
PLModel
*
getPLModel
(
intf_thread_t
*
p_intf
)
{
if
(
!
p_intf
->
p_sys
->
pl_model
)
{
playlist_Lock
(
THEPL
);
playlist_item_t
*
p_root
=
THEPL
->
p_playing
;
playlist_Unlock
(
THEPL
);
p_intf
->
p_sys
->
pl_model
=
new
PLModel
(
THEPL
,
p_intf
,
p_root
,
NULL
);
}
return
p_intf
->
p_sys
->
pl_model
;
}
/*** QModel subclassing ***/
/*** QModel subclassing ***/
/* Data structure */
/* Data structure */
...
...
modules/gui/qt4/qt4.cpp
View file @
a8bf1141
...
@@ -356,6 +356,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
...
@@ -356,6 +356,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
=
new
intf_sys_t
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
=
new
intf_sys_t
;
p_intf
->
p_sys
->
b_isDialogProvider
=
isDialogProvider
;
p_intf
->
p_sys
->
b_isDialogProvider
=
isDialogProvider
;
p_sys
->
p_mi
=
NULL
;
p_sys
->
p_mi
=
NULL
;
p_sys
->
pl_model
=
NULL
;
/* */
/* */
vlc_sem_init
(
&
ready
,
0
);
vlc_sem_init
(
&
ready
,
0
);
...
@@ -555,6 +556,9 @@ static void *Thread( void *obj )
...
@@ -555,6 +556,9 @@ static void *Thread( void *obj )
/* Delete the configuration. Application has to be deleted after that. */
/* Delete the configuration. Application has to be deleted after that. */
delete
p_intf
->
p_sys
->
mainSettings
;
delete
p_intf
->
p_sys
->
mainSettings
;
/* */
delete
p_intf
->
p_sys
->
pl_model
;
/* Destroy the MainInputManager */
/* Destroy the MainInputManager */
MainInputManager
::
killInstance
();
MainInputManager
::
killInstance
();
...
...
modules/gui/qt4/qt4.hpp
View file @
a8bf1141
...
@@ -53,22 +53,25 @@ class QVLCApp;
...
@@ -53,22 +53,25 @@ class QVLCApp;
class
QMenu
;
class
QMenu
;
class
MainInterface
;
class
MainInterface
;
class
QSettings
;
class
QSettings
;
class
PLModel
;
struct
intf_sys_t
struct
intf_sys_t
{
{
vlc_thread_t
thread
;
vlc_thread_t
thread
;
QVLCApp
*
p_app
;
/* Main Qt Application */
QVLCApp
*
p_app
;
/* Main Qt Application */
MainInterface
*
p_mi
;
/* Main Interface, NULL if DialogProvider Mode */
MainInterface
*
p_mi
;
/* Main Interface, NULL if DialogProvider Mode */
QSettings
*
mainSettings
;
/* Qt State settings not messing main VLC ones */
QSettings
*
mainSettings
;
/* Qt State settings not messing main VLC ones */
bool
b_isDialogProvider
;
/* Qt mode or Skins mode */
PLModel
*
pl_model
;
int
i_screenHeight
;
/* Detection of Small screens */
QString
filepath
;
/* Last path used in dialogs */
QString
filepath
;
/* Last path used in dialogs */
int
i_screenHeight
;
/* Detection of Small screens */
bool
b_isDialogProvider
;
/* Qt mode or Skins mode */
#ifdef WIN32
#ifdef WIN32
bool
disable_volume_keys
;
bool
disable_volume_keys
;
#endif
#endif
...
...
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