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
16967781
Commit
16967781
authored
Jun 20, 2010
by
Adrien Maglo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt/EPG: Set the EPGView start time correctly.
parent
0c55b2d8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
10 deletions
+20
-10
modules/gui/qt4/components/epg/EPGView.cpp
modules/gui/qt4/components/epg/EPGView.cpp
+17
-5
modules/gui/qt4/components/epg/EPGView.hpp
modules/gui/qt4/components/epg/EPGView.hpp
+1
-1
modules/gui/qt4/components/epg/EPGWidget.cpp
modules/gui/qt4/components/epg/EPGWidget.cpp
+2
-4
No files found.
modules/gui/qt4/components/epg/EPGView.cpp
View file @
16967781
...
...
@@ -52,21 +52,33 @@ void EPGView::setScale( double scaleFactor )
setMatrix
(
matrix
);
}
void
EPGView
::
setStartTime
(
const
QDateTime
&
startTime
)
void
EPGView
::
updateStartTime
(
)
{
QList
<
QGraphicsItem
*>
itemList
=
items
();
m_startTime
=
startTime
;
/* Set the new start time. */
for
(
int
i
=
0
;
i
<
itemList
.
count
();
++
i
)
{
EPGItem
*
item
=
qgraphicsitem_cast
<
EPGItem
*>
(
itemList
.
at
(
i
)
);
if
(
!
item
)
continue
;
if
(
i
==
0
)
m_startTime
=
item
->
start
();
if
(
item
->
start
()
<
m_startTime
)
m_startTime
=
item
->
start
();
}
/* Update the position of all items. */
for
(
int
i
=
0
;
i
<
itemList
.
count
();
++
i
)
{
EPGItem
*
item
=
qgraphicsitem_cast
<
EPGItem
*>
(
itemList
.
at
(
i
)
);
if
(
!
item
)
continue
;
if
(
!
item
)
continue
;
item
->
updatePos
();
}
// Our start time
has changed
emit
startTimeChanged
(
startTime
);
// Our start time
may have changed.
emit
startTimeChanged
(
m_
startTime
);
}
const
QDateTime
&
EPGView
::
startTime
()
...
...
modules/gui/qt4/components/epg/EPGView.hpp
View file @
16967781
...
...
@@ -41,7 +41,7 @@ public:
void
setScale
(
double
scaleFactor
);
void
setStartTime
(
const
QDateTime
&
startTime
);
void
updateStartTime
(
);
const
QDateTime
&
startTime
();
void
addEvent
(
EPGEvent
*
event
);
...
...
modules/gui/qt4/components/epg/EPGWidget.cpp
View file @
16967781
...
...
@@ -108,9 +108,6 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
if
(
!
alreadyIn
)
{
m_events
.
insert
(
channelName
,
item
);
if
(
item
->
start
<
m_epgView
->
startTime
()
)
m_epgView
->
setStartTime
(
item
->
start
);
m_epgView
->
addEvent
(
item
);
}
else
...
...
@@ -135,7 +132,8 @@ void EPGWidget::updateEPG( vlc_epg_t **pp_epg, int i_epg )
++
i
;
}
// Update the global duration
// Update the global duration
and start time.
m_epgView
->
updateDuration
();
m_epgView
->
updateStartTime
();
}
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