Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
32cdbfa3
Commit
32cdbfa3
authored
Dec 31, 2007
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add artChanged signal to inputmanager and change backgroundwidget to use
it.
parent
4251cd0a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
13 deletions
+20
-13
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+6
-12
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+1
-1
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+11
-0
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+2
-0
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
32cdbfa3
...
...
@@ -117,7 +117,7 @@ void VideoWidget::release( void *p_win )
/**********************************************************************
* Background Widget. Show a simple image background. Currently,
* it's a
static
cone.
* it's a
lbum art if present or
cone.
**********************************************************************/
#define ICON_SIZE 128
#define MAX_BG_SIZE 400
...
...
@@ -153,8 +153,7 @@ BackgroundWidget::BackgroundWidget( intf_thread_t *_p_i ) :
backgroundLayout
->
setColumnStretch
(
0
,
1
);
backgroundLayout
->
setColumnStretch
(
2
,
1
);
CONNECT
(
THEMIM
,
inputChanged
(
input_thread_t
*
),
this
,
update
(
input_thread_t
*
)
);
CONNECT
(
THEMIM
->
getIM
(),
artChanged
(
QString
),
this
,
update
(
QString
)
);
resize
(
300
,
150
);
}
...
...
@@ -162,9 +161,9 @@ BackgroundWidget::~BackgroundWidget()
{
}
void
BackgroundWidget
::
update
(
input_thread_t
*
p_input
)
void
BackgroundWidget
::
update
(
QString
url
)
{
if
(
!
p_input
||
p_input
->
b_dead
)
if
(
url
.
isNull
()
)
{
if
(
QDate
::
currentDate
().
dayOfYear
()
>=
354
)
label
->
setPixmap
(
QPixmap
(
":/vlc128-christmas.png"
)
);
...
...
@@ -173,11 +172,7 @@ void BackgroundWidget::update( input_thread_t *p_input )
return
;
}
vlc_object_yield
(
p_input
);
char
*
psz_arturl
=
input_item_GetArtURL
(
input_GetItem
(
p_input
)
);
vlc_object_release
(
p_input
);
QString
arturl
=
qfu
(
psz_arturl
).
replace
(
"file://"
,
QString
(
""
)
);
QString
arturl
=
url
.
replace
(
"file://"
,
QString
(
""
)
);
if
(
arturl
.
isNull
()
)
{
if
(
QDate
::
currentDate
().
dayOfYear
()
>=
354
)
...
...
@@ -188,9 +183,8 @@ void BackgroundWidget::update( input_thread_t *p_input )
else
{
label
->
setPixmap
(
QPixmap
(
arturl
)
);
msg_Dbg
(
p_intf
,
"changing input b_need_update done
%s"
,
psz_arturl
);
msg_Dbg
(
p_intf
,
"changing input b_need_update done
"
);
}
free
(
psz_arturl
);
}
void
BackgroundWidget
::
contextMenuEvent
(
QContextMenuEvent
*
event
)
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
32cdbfa3
...
...
@@ -85,7 +85,7 @@ private:
public
slots
:
void
toggle
(){
TOGGLEV
(
this
);
}
void
update
(
input_thread_t
*
);
void
update
(
QString
);
};
class
VisualSelector
:
public
QFrame
...
...
modules/gui/qt4/input_manager.cpp
View file @
32cdbfa3
...
...
@@ -96,6 +96,7 @@ void InputManager::update()
i_old_playing_status
=
0
;
emit
statusChanged
(
END_S
);
// see vlc_input.h, input_state_e enum
delInput
();
emit
artChanged
(
""
);
return
;
}
...
...
@@ -183,6 +184,16 @@ void InputManager::update()
i_old_playing_status
=
val
.
i_int
;
emit
statusChanged
(
val
.
i_int
==
PAUSE_S
?
PAUSE_S
:
PLAYING_S
);
}
QString
url
;
char
*
psz_art
=
input_item_GetArtURL
(
input_GetItem
(
p_input
)
);
url
.
sprintf
(
"%s"
,
psz_art
);
free
(
psz_art
);
if
(
artUrl
!=
url
)
{
emit
artChanged
(
url
);
artUrl
=
url
;
}
}
void
InputManager
::
sliderUpdate
(
float
new_pos
)
...
...
modules/gui/qt4/input_manager.hpp
View file @
32cdbfa3
...
...
@@ -46,6 +46,7 @@ private:
input_thread_t
*
p_input
;
int
i_old_playing_status
;
QString
old_name
;
QString
artUrl
;
int
i_rate
;
public
slots
:
void
togglePlayPause
();
...
...
@@ -76,6 +77,7 @@ signals:
#endif
/// Play/pause status
void
statusChanged
(
int
);
void
artChanged
(
QString
);
};
class
MainInputManager
:
public
QObject
...
...
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