]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/epg/EPGRuler.hpp
Initial commit for EPG class for EPG Viewing
[vlc] / modules / gui / qt4 / components / epg / EPGRuler.hpp
1 /*****************************************************************************
2  * EPGRuler.h: EPGRuler
3  ****************************************************************************
4  * Copyright © 2009-2010 VideoLAN
5  * $Id$
6  *
7  * Authors: Ludovic Fauvet <etix@l0cal.com>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef EPGRULER_H
25 #define EPGRULER_H
26
27 #include <QWidget>
28 #include <QDateTime>
29
30 class EPGRuler : public QWidget
31 {
32     Q_OBJECT
33
34 public:
35     EPGRuler( QWidget* parent = 0 );
36     virtual ~EPGRuler() { }
37
38 public slots:
39     void setScale( double scale );
40     void setStartTime( const QDateTime& startTime );
41     void setDuration( int duration );
42     void setOffset( int offset );
43
44 protected:
45     virtual void paintEvent( QPaintEvent *event );
46
47 private:
48     qreal m_scale;
49     int m_duration;
50     int m_offset;
51     QDateTime m_startTime;
52 };
53
54 #endif // EPGRULER_H