OSDTypeTeletext Class Reference

#include <osdtypeteletext.h>

Inheritance diagram for OSDTypeTeletext:

OSDType TeletextViewer

List of all members.


Detailed Description

Definition at line 120 of file osdtypeteletext.h.


Public Member Functions

 OSDTypeTeletext (const QString &name, TTFFont *font, QRect displayrect, float wmult, float hmult, OSD *osd)
 OSDTypeTeletext (const OSDTypeTeletext &other)
virtual ~OSDTypeTeletext ()
void Reinit (float wmult, float hmult)
void Draw (OSDSurface *surface, int fade, int maxfade, int xoff, int yoff)
void KeyPress (uint key)
 What to do if a key is pressed.
void SetPage (int page, int subpage)
void SetDisplaying (bool display)
void Reset (void)
 Resets the teletext data cache.
void AddPageHeader (int page, int subpage, const uint8_t *buf, int vbimode, int lang, int flags)
void AddTeletextData (int magazine, int row, const uint8_t *buf, int vbimode)

Private Member Functions

void SetForegroundColor (int color) const
 Set the font color to the given color.
void SetBackgroundColor (int color) const
void DrawBackground (OSDSurface *surface, int x, int y) const
 draws background in the color set in SetBackgroundColor().
void DrawRect (OSDSurface *surface, const QRect) const
void DrawCharacter (OSDSurface *surface, int x, int y, QChar ch, int doubleheight=0) const
 Draws a character at posistion x, y.
void DrawMosaic (OSDSurface *surface, int x, int y, int code, int doubleheight) const
void DrawLine (OSDSurface *surface, const uint8_t *page, uint row, int lang) const
void DrawHeader (OSDSurface *surface, const uint8_t *page, int lang) const
void DrawStatus (OSDSurface *surface) const
void DrawPage (OSDSurface *surface) const
void NewsFlash (void)
void PageUpdated (int page, int subpage)
 Updates the page, if given pagenumber is the same as the current shown page.
void HeaderUpdated (uint8_t *page, int lang)
const TeletextSubPageFindSubPage (int page, int subpage, int dir=0) const
TeletextSubPageFindSubPage (int page, int subpage, int dir=0)
const TeletextPageFindPage (int page, int dir=0) const
TeletextPageFindPage (int page, int dir=0)
const TeletextSubPageFindSubPageInternal (int, int, int) const
 Finds the given page.
const TeletextPageFindPageInternal (int, int) const

Private Attributes

QMutex m_lock
QRect m_displayrect
QRect m_unbiasedrect
OSDTypeBoxm_box
int m_tt_colspace
int m_tt_rowspace
int m_fetchpage
int m_fetchsubpage
TTFFontm_font
uint8_t m_bgcolor_y
uint8_t m_bgcolor_u
uint8_t m_bgcolor_v
uint8_t m_bgcolor_a
int m_curpage
int m_cursubpage
bool m_curpage_showheader
bool m_curpage_issubtitle
int m_pageinput [3]
bool m_transparent
bool m_revealHidden
bool m_displaying
OSDm_osd
uint8_t m_header [40]
bool m_header_changed
bool m_page_changed
bool m_osd_changed
TeletextMagazine m_magazines [8]
unsigned char m_bitswap [256]

Static Private Attributes

static const QColor kColorBlack = QColor( 0, 0, 0)
static const QColor kColorRed = QColor(255, 0, 0)
static const QColor kColorGreen = QColor( 0,255, 0)
static const QColor kColorYellow = QColor(255,255, 0)
static const QColor kColorBlue = QColor( 0, 0,255)
static const QColor kColorMagenta = QColor(255, 0,255)
static const QColor kColorCyan = QColor( 0,255,255)
static const QColor kColorWhite = QColor(255,255,255)
static const int kTeletextColumns = 40
static const int kTeletextRows = 26

Friends

class OSDUpdateLocker
QColor color_tt2qt (int ttcolor)

Constructor & Destructor Documentation

OSDTypeTeletext::OSDTypeTeletext ( const QString &  name,
TTFFont font,
QRect  displayrect,
float  wmult,
float  hmult,
OSD osd 
)

Definition at line 44 of file osdtypeteletext.cpp.

OSDTypeTeletext::OSDTypeTeletext ( const OSDTypeTeletext other  )  [inline]

Definition at line 130 of file osdtypeteletext.h.

virtual OSDTypeTeletext::~OSDTypeTeletext (  )  [inline, virtual]

Definition at line 132 of file osdtypeteletext.h.


Member Function Documentation

void OSDTypeTeletext::Reinit ( float  wmult,
float  hmult 
) [virtual]

Implements OSDType.

Definition at line 1127 of file osdtypeteletext.cpp.

void OSDTypeTeletext::Draw ( OSDSurface surface,
int  fade,
int  maxfade,
int  xoff,
int  yoff 
) [virtual]

Implements OSDType.

Definition at line 1136 of file osdtypeteletext.cpp.

void OSDTypeTeletext::KeyPress ( uint  key  )  [virtual]

What to do if a key is pressed.

Parameters:
key pressed key
See also:
TTKey

Reimplemented from TeletextViewer.

Definition at line 481 of file osdtypeteletext.cpp.

void OSDTypeTeletext::SetPage ( int  page,
int  subpage 
) [virtual]

Reimplemented from TeletextViewer.

Definition at line 667 of file osdtypeteletext.cpp.

void OSDTypeTeletext::SetDisplaying ( bool  display  )  [inline, virtual]

Reimplemented from TeletextViewer.

Definition at line 142 of file osdtypeteletext.h.

void OSDTypeTeletext::Reset ( void   )  [virtual]

Resets the teletext data cache.

Implements TeletextViewer.

Definition at line 91 of file osdtypeteletext.cpp.

Referenced by OSDTypeTeletext().

void OSDTypeTeletext::AddPageHeader ( int  page,
int  subpage,
const uint8_t *  buf,
int  vbimode,
int  lang,
int  flags 
) [virtual]

Implements TeletextViewer.

void OSDTypeTeletext::AddTeletextData ( int  magazine,
int  row,
const uint8_t *  buf,
int  vbimode 
) [virtual]

Implements TeletextViewer.

void OSDTypeTeletext::SetForegroundColor ( int  color  )  const [private]

Set the font color to the given color.

NOTE: kTTColorTransparent does not do anything!

See also:
TTColor

Definition at line 708 of file osdtypeteletext.cpp.

Referenced by DrawStatus().

void OSDTypeTeletext::SetBackgroundColor ( int  color  )  const [private]

Definition at line 720 of file osdtypeteletext.cpp.

Referenced by DrawStatus().

void OSDTypeTeletext::DrawBackground ( OSDSurface surface,
int  x,
int  y 
) const [private]

draws background in the color set in SetBackgroundColor().

Parameters:
x X position (40 cols)
y Y position (25 rows)

Definition at line 744 of file osdtypeteletext.cpp.

Referenced by DrawStatus().

void OSDTypeTeletext::DrawRect ( OSDSurface surface,
const   QRect 
) const [private]

Definition at line 758 of file osdtypeteletext.cpp.

Referenced by DrawBackground(), and DrawMosaic().

void OSDTypeTeletext::DrawCharacter ( OSDSurface surface,
int  x,
int  y,
QChar  ch,
int  doubleheight = 0 
) const [private]

Draws a character at posistion x, y.

Parameters:
x X position (40 cols)
y Y position (25 rows)
ch Character
doubleheight if different to 0, draw doubleheighted character

Definition at line 807 of file osdtypeteletext.cpp.

Referenced by DrawStatus().

void OSDTypeTeletext::DrawMosaic ( OSDSurface surface,
int  x,
int  y,
int  code,
int  doubleheight 
) const [private]

Definition at line 835 of file osdtypeteletext.cpp.

void OSDTypeTeletext::DrawLine ( OSDSurface surface,
const uint8_t *  page,
uint  row,
int  lang 
) const [private]

Referenced by DrawPage().

void OSDTypeTeletext::DrawHeader ( OSDSurface surface,
const uint8_t *  page,
int  lang 
) const [private]

Referenced by DrawPage().

void OSDTypeTeletext::DrawStatus ( OSDSurface surface  )  const [private]

Definition at line 1145 of file osdtypeteletext.cpp.

void OSDTypeTeletext::DrawPage ( OSDSurface surface  )  const [private]

Definition at line 1087 of file osdtypeteletext.cpp.

Referenced by Draw().

void OSDTypeTeletext::NewsFlash ( void   )  [inline, private]

Definition at line 169 of file osdtypeteletext.h.

void OSDTypeTeletext::PageUpdated ( int  page,
int  subpage 
) [private]

Updates the page, if given pagenumber is the same as the current shown page.

Definition at line 314 of file osdtypeteletext.cpp.

Referenced by KeyPress(), and SetPage().

void OSDTypeTeletext::HeaderUpdated ( uint8_t *  page,
int  lang 
) [private]

const TeletextSubPage* OSDTypeTeletext::FindSubPage ( int  page,
int  subpage,
int  dir = 0 
) const [inline, private]

Definition at line 173 of file osdtypeteletext.h.

Referenced by DrawPage(), DrawStatus(), and KeyPress().

TeletextSubPage* OSDTypeTeletext::FindSubPage ( int  page,
int  subpage,
int  dir = 0 
) [inline, private]

Definition at line 175 of file osdtypeteletext.h.

const TeletextPage* OSDTypeTeletext::FindPage ( int  page,
int  dir = 0 
) const [inline, private]

Definition at line 178 of file osdtypeteletext.h.

Referenced by DrawStatus(), and KeyPress().

TeletextPage* OSDTypeTeletext::FindPage ( int  page,
int  dir = 0 
) [inline, private]

Definition at line 180 of file osdtypeteletext.h.

const TeletextSubPage * OSDTypeTeletext::FindSubPageInternal ( int  page,
int  subpage,
int  direction 
) const [private]

Finds the given page.

Parameters:
page Page number
subpage Subpage number (if set to -1, find the first subpage)
direction find page before or after the given page (only if Subpage is not -1)
Returns:
TeletextSubPage (NULL if not found)

Definition at line 418 of file osdtypeteletext.cpp.

Referenced by FindSubPage().

const TeletextPage * OSDTypeTeletext::FindPageInternal ( int  page,
int  direction 
) const [private]

Definition at line 365 of file osdtypeteletext.cpp.

Referenced by FindPage().


Friends And Related Function Documentation

friend class OSDUpdateLocker [friend]

Definition at line 125 of file osdtypeteletext.h.

QColor color_tt2qt ( int  ttcolor  )  [friend]

Definition at line 683 of file osdtypeteletext.cpp.

Referenced by SetBackgroundColor(), and SetForegroundColor().


Member Data Documentation

QMutex OSDTypeTeletext::m_lock [private]

Reimplemented from OSDType.

Definition at line 187 of file osdtypeteletext.h.

Referenced by Draw(), KeyPress(), Reinit(), Reset(), and SetPage().

Definition at line 188 of file osdtypeteletext.h.

Referenced by DrawBackground(), DrawCharacter(), DrawMosaic(), OSDTypeTeletext(), and Reinit().

Definition at line 189 of file osdtypeteletext.h.

Referenced by OSDTypeTeletext(), and Reinit().

Definition at line 191 of file osdtypeteletext.h.

Definition at line 193 of file osdtypeteletext.h.

Referenced by DrawBackground(), DrawCharacter(), DrawMosaic(), and Reinit().

Definition at line 194 of file osdtypeteletext.h.

Referenced by DrawBackground(), DrawCharacter(), DrawMosaic(), and Reinit().

Definition at line 197 of file osdtypeteletext.h.

Definition at line 198 of file osdtypeteletext.h.

TTFFont* OSDTypeTeletext::m_font [mutable, private]

Definition at line 201 of file osdtypeteletext.h.

Referenced by DrawCharacter(), and SetForegroundColor().

uint8_t OSDTypeTeletext::m_bgcolor_y [mutable, private]

Definition at line 204 of file osdtypeteletext.h.

Referenced by DrawRect(), and SetBackgroundColor().

uint8_t OSDTypeTeletext::m_bgcolor_u [mutable, private]

Definition at line 205 of file osdtypeteletext.h.

Referenced by DrawRect(), and SetBackgroundColor().

uint8_t OSDTypeTeletext::m_bgcolor_v [mutable, private]

Definition at line 206 of file osdtypeteletext.h.

Referenced by DrawRect(), and SetBackgroundColor().

uint8_t OSDTypeTeletext::m_bgcolor_a [mutable, private]

Definition at line 207 of file osdtypeteletext.h.

Referenced by DrawRect(), and SetBackgroundColor().

int OSDTypeTeletext::m_curpage [mutable, private]

Definition at line 210 of file osdtypeteletext.h.

Referenced by DrawPage(), DrawStatus(), KeyPress(), PageUpdated(), Reset(), and SetPage().

int OSDTypeTeletext::m_cursubpage [mutable, private]

Definition at line 211 of file osdtypeteletext.h.

Referenced by DrawPage(), DrawStatus(), KeyPress(), PageUpdated(), Reset(), and SetPage().

Definition at line 212 of file osdtypeteletext.h.

Referenced by DrawPage(), KeyPress(), and Reset().

Definition at line 213 of file osdtypeteletext.h.

Referenced by DrawPage().

int OSDTypeTeletext::m_pageinput[3] [private]

Definition at line 215 of file osdtypeteletext.h.

Referenced by DrawStatus(), KeyPress(), Reset(), and SetPage().

Definition at line 217 of file osdtypeteletext.h.

Referenced by DrawStatus(), and KeyPress().

Definition at line 218 of file osdtypeteletext.h.

Referenced by KeyPress().

Definition at line 220 of file osdtypeteletext.h.

Referenced by DrawPage(), PageUpdated(), and SetDisplaying().

Definition at line 222 of file osdtypeteletext.h.

Referenced by OSDUpdateLocker::~OSDUpdateLocker().

uint8_t OSDTypeTeletext::m_header[40] [private]

Definition at line 223 of file osdtypeteletext.h.

Referenced by DrawPage(), and Reset().

Definition at line 224 of file osdtypeteletext.h.

Referenced by DrawPage().

Definition at line 225 of file osdtypeteletext.h.

Referenced by DrawPage(), and PageUpdated().

Definition at line 226 of file osdtypeteletext.h.

Referenced by PageUpdated(), and OSDUpdateLocker::~OSDUpdateLocker().

Definition at line 228 of file osdtypeteletext.h.

Referenced by FindPageInternal(), FindSubPageInternal(), and Reset().

unsigned char OSDTypeTeletext::m_bitswap[256] [private]

Definition at line 229 of file osdtypeteletext.h.

Referenced by OSDTypeTeletext().

const QColor OSDTypeTeletext::kColorBlack = QColor( 0, 0, 0) [static, private]

Definition at line 231 of file osdtypeteletext.h.

Referenced by color_tt2qt().

const QColor OSDTypeTeletext::kColorRed = QColor(255, 0, 0) [static, private]

Definition at line 232 of file osdtypeteletext.h.

Referenced by color_tt2qt().

const QColor OSDTypeTeletext::kColorGreen = QColor( 0,255, 0) [static, private]

Definition at line 233 of file osdtypeteletext.h.

Referenced by color_tt2qt().

const QColor OSDTypeTeletext::kColorYellow = QColor(255,255, 0) [static, private]

Definition at line 234 of file osdtypeteletext.h.

Referenced by color_tt2qt().

const QColor OSDTypeTeletext::kColorBlue = QColor( 0, 0,255) [static, private]

Definition at line 235 of file osdtypeteletext.h.

Referenced by color_tt2qt().

const QColor OSDTypeTeletext::kColorMagenta = QColor(255, 0,255) [static, private]

Definition at line 236 of file osdtypeteletext.h.

Referenced by color_tt2qt().

const QColor OSDTypeTeletext::kColorCyan = QColor( 0,255,255) [static, private]

Definition at line 237 of file osdtypeteletext.h.

Referenced by color_tt2qt().

const QColor OSDTypeTeletext::kColorWhite = QColor(255,255,255) [static, private]

Definition at line 238 of file osdtypeteletext.h.

Referenced by color_tt2qt().

const int OSDTypeTeletext::kTeletextColumns = 40 [static, private]

Definition at line 239 of file osdtypeteletext.h.

Referenced by Reinit().

const int OSDTypeTeletext::kTeletextRows = 26 [static, private]

Definition at line 240 of file osdtypeteletext.h.


The documentation for this class was generated from the following files:

Generated on Sat Dec 18 05:16:09 2010 for MythTV by  doxygen 1.5.5