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
c93ea88c
Commit
c93ea88c
authored
Mar 23, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: EPG: add channels line background
parent
0bf8724d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
modules/gui/qt4/components/epg/EPGItem.cpp
modules/gui/qt4/components/epg/EPGItem.cpp
+6
-1
modules/gui/qt4/components/epg/EPGItem.hpp
modules/gui/qt4/components/epg/EPGItem.hpp
+1
-0
modules/gui/qt4/components/epg/EPGView.cpp
modules/gui/qt4/components/epg/EPGView.cpp
+11
-1
modules/gui/qt4/components/epg/EPGView.hpp
modules/gui/qt4/components/epg/EPGView.hpp
+10
-0
No files found.
modules/gui/qt4/components/epg/EPGItem.cpp
View file @
c93ea88c
...
...
@@ -191,7 +191,12 @@ void EPGItem::updatePos()
void
EPGItem
::
hoverEnterEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
event
->
accept
();
update
();
scene
()
->
update
();
}
void
EPGItem
::
hoverLeaveEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
/* required to redraw our background without flaws */
hoverEnterEvent
(
event
);
}
void
EPGItem
::
focusInEvent
(
QFocusEvent
*
event
)
...
...
modules/gui/qt4/components/epg/EPGItem.hpp
View file @
c93ea88c
...
...
@@ -59,6 +59,7 @@ public:
protected:
virtual
void
focusInEvent
(
QFocusEvent
*
event
);
virtual
void
hoverEnterEvent
(
QGraphicsSceneHoverEvent
*
);
virtual
void
hoverLeaveEvent
(
QGraphicsSceneHoverEvent
*
);
private:
EPGView
*
m_view
;
...
...
modules/gui/qt4/components/epg/EPGView.cpp
View file @
c93ea88c
...
...
@@ -31,6 +31,16 @@
#include <QtDebug>
#include <QGraphicsTextItem>
EPGGraphicsScene
::
EPGGraphicsScene
(
QObject
*
parent
)
:
QGraphicsScene
(
parent
)
{}
void
EPGGraphicsScene
::
drawBackground
(
QPainter
*
painter
,
const
QRectF
&
rect
)
{
painter
->
setPen
(
QPen
(
QColor
(
224
,
224
,
224
)
)
);
for
(
int
y
=
rect
.
top
()
+
TRACKS_HEIGHT
;
y
<
rect
.
bottom
()
;
y
+=
TRACKS_HEIGHT
)
painter
->
drawLine
(
QLineF
(
rect
.
left
(),
y
,
rect
.
right
(),
y
)
);
}
EPGView
::
EPGView
(
QWidget
*
parent
)
:
QGraphicsView
(
parent
)
{
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
@@ -39,7 +49,7 @@ EPGView::EPGView( QWidget *parent ) : QGraphicsView( parent )
m_startTime
=
QDateTime
::
currentDateTime
();
QGraphicsScene
*
EPGscene
=
new
Q
GraphicsScene
(
this
);
EPGGraphicsScene
*
EPGscene
=
new
EPG
GraphicsScene
(
this
);
setScene
(
EPGscene
);
}
...
...
modules/gui/qt4/components/epg/EPGView.hpp
View file @
c93ea88c
...
...
@@ -27,6 +27,7 @@
#include "EPGItem.hpp"
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QList>
#include <QMap>
#include <QMutex>
...
...
@@ -37,6 +38,15 @@
typedef
QMap
<
QDateTime
,
EPGItem
*>
EPGEventByTimeQMap
;
typedef
QMap
<
QString
,
EPGEventByTimeQMap
*
>
EPGTimeMapByChannelQMap
;
class
EPGGraphicsScene
:
public
QGraphicsScene
{
Q_OBJECT
public:
explicit
EPGGraphicsScene
(
QObject
*
parent
=
0
);
protected:
void
drawBackground
(
QPainter
*
,
const
QRectF
&
);
};
class
EPGView
:
public
QGraphicsView
{
Q_OBJECT
...
...
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