MythTV  0.25-pre
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Slots | Private Member Functions | Private Attributes
LCD Class Reference

#include <lcddevice.h>

Inheritance diagram for LCD:
MythSocketCBs

List of all members.

Public Types

enum  { MUSIC_REPEAT_NONE = 0, MUSIC_REPEAT_TRACK = 1, MUSIC_REPEAT_ALL = 2 }
enum  {
  MUSIC_SHUFFLE_NONE = 0, MUSIC_SHUFFLE_RAND = 1, MUSIC_SHUFFLE_SMART = 2, MUSIC_SHUFFLE_ALBUM = 3,
  MUSIC_SHUFFLE_ARTIST = 4
}

Public Member Functions

 ~LCD ()
bool connectToHost (const QString &hostname, unsigned int port)
void switchToTime ()
void setSpeakerLEDs (enum LCDSpeakerSet speaker, bool on)
void setAudioFormatLEDs (enum LCDAudioFormatSet acodec, bool on)
void setVideoFormatLEDs (enum LCDVideoFormatSet vcodec, bool on)
void setVideoSrcLEDs (enum LCDVideoSourceSet vsrc, bool on)
void setFunctionLEDs (enum LCDFunctionSet video, bool on)
void setTunerLEDs (enum LCDTunerSet tuner, bool on)
void setVariousLEDs (enum LCDVariousFlags various, bool on)
void switchToMusic (const QString &artist, const QString &album, const QString &track)
void switchToChannel (QString channum="", QString title="", QString subtitle="")
void setChannelProgress (const QString &time, float percentViewed)
void switchToMenu (QList< LCDMenuItem > &menuItems, QString app_name="", bool popMenu=true)
void switchToGeneric (QList< LCDTextItem > &textItems)
void setGenericProgress (float generic_progress)
 Update the generic progress bar.
void setGenericBusy ()
 Update the generic screen to display a busy spinner.
void setMusicProgress (QString time, float generic_progress)
void setMusicRepeat (int repeat)
 Set music player's repeat properties.
void setMusicShuffle (int shuffle)
 Set music player's shuffle properties.
void switchToVolume (QString app_name)
void setVolumeLevel (float volume_level)
void switchToNothing ()
void shutdown ()
void setupLEDs (int(*LedMaskFunc)(void))
void stopAll (void)
uint getLCDHeight (void)
uint getLCDWidth (void)
void resetServer (void)

Static Public Member Functions

static LCDGet (void)
static void SetupLCD (void)

Protected Member Functions

 LCD ()

Static Protected Attributes

static bool m_server_unavailable = false
static LCDm_lcd = NULL
static bool m_enabled = false

Private Slots

void restartConnection ()
void outputLEDs ()

Private Member Functions

bool startLCDServer (void)
void sendToServer (const QString &someText)
void init ()
void handleKeyPress (QString key)
QString quotedString (const QString &s)
void describeServer ()
void connected (MythSocket *sock)
void connectionClosed (MythSocket *sock)
void readyRead (MythSocket *sock)
void connectionFailed (MythSocket *sock)

Private Attributes

MythSocketsocket
QMutex socketLock
QString hostname
uint port
bool bConnected
QTimer * retryTimer
QTimer * LEDTimer
QString send_buffer
QString last_command
int lcd_width
int lcd_height
bool lcd_ready
bool lcd_showtime
bool lcd_showmenu
bool lcd_showgeneric
bool lcd_showmusic
bool lcd_showchannel
bool lcd_showvolume
bool lcd_showrecstatus
bool lcd_backlighton
bool lcd_heartbeaton
int lcd_popuptime
QString lcd_showmusic_items
QString lcd_keystring
int lcd_ledmask
int(* GetLEDMask )(void)

Detailed Description

Definition at line 172 of file lcddevice.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
MUSIC_REPEAT_NONE 
MUSIC_REPEAT_TRACK 
MUSIC_REPEAT_ALL 

Definition at line 186 of file lcddevice.h.

anonymous enum
Enumerator:
MUSIC_SHUFFLE_NONE 
MUSIC_SHUFFLE_RAND 
MUSIC_SHUFFLE_SMART 
MUSIC_SHUFFLE_ALBUM 
MUSIC_SHUFFLE_ARTIST 

Definition at line 192 of file lcddevice.h.


Constructor & Destructor Documentation

LCD::LCD ( ) [protected]

Definition at line 37 of file lcddevice.cpp.

Referenced by Get().

LCD::~LCD ( )

Definition at line 730 of file lcddevice.cpp.


Member Function Documentation

LCD * LCD::Get ( void  ) [static]
void LCD::SetupLCD ( void  ) [static]

Definition at line 89 of file lcddevice.cpp.

Referenced by main(), and reloadTheme().

bool LCD::connectToHost ( const QString &  hostname,
unsigned int  port 
)

Definition at line 121 of file lcddevice.cpp.

Referenced by restartConnection(), and SetupLCD().

Definition at line 571 of file lcddevice.cpp.

Referenced by MythProgressDialog::Close(), and ImageView::UpdateLCD().

void LCD::setSpeakerLEDs ( enum LCDSpeakerSet  speaker,
bool  on 
)

Definition at line 399 of file lcddevice.cpp.

Definition at line 409 of file lcddevice.cpp.

Definition at line 421 of file lcddevice.cpp.

Definition at line 433 of file lcddevice.cpp.

void LCD::setFunctionLEDs ( enum LCDFunctionSet  video,
bool  on 
)

Definition at line 443 of file lcddevice.cpp.

Referenced by VideoPlayerCommand::Play(), and ImageView::UpdateLCD().

void LCD::setTunerLEDs ( enum LCDTunerSet  tuner,
bool  on 
)

Definition at line 469 of file lcddevice.cpp.

void LCD::setVariousLEDs ( enum LCDVariousFlags  various,
bool  on 
)

Definition at line 453 of file lcddevice.cpp.

void LCD::switchToMusic ( const QString &  artist,
const QString &  album,
const QString &  track 
)

Definition at line 581 of file lcddevice.cpp.

Referenced by MusicCommon::setTrackOnLCD().

void LCD::switchToChannel ( QString  channum = "",
QString  title = "",
QString  subtitle = "" 
)
void LCD::setChannelProgress ( const QString &  time,
float  percentViewed 
)

Definition at line 479 of file lcddevice.cpp.

Referenced by TV::HandleLCDTimerEvent().

void LCD::switchToMenu ( QList< LCDMenuItem > &  menuItems,
QString  app_name = "",
bool  popMenu = true 
)

Definition at line 605 of file lcddevice.cpp.

Referenced by MythUIButtonList::updateLCD().

void LCD::switchToGeneric ( QList< LCDTextItem > &  textItems)

Definition at line 647 of file lcddevice.cpp.

Referenced by ImageView::UpdateLCD().

void LCD::setGenericProgress ( float  generic_progress)

Update the generic progress bar.

Parameters:
generic_progressa value between 0 and 1.0

Definition at line 489 of file lcddevice.cpp.

Update the generic screen to display a busy spinner.

Note:
The LCD busy spinner only 'moves' when this is called instead of the lcdserver just handling it itself.

Definition at line 498 of file lcddevice.cpp.

void LCD::setMusicProgress ( QString  time,
float  generic_progress 
)

Definition at line 506 of file lcddevice.cpp.

Set music player's repeat properties.

Parameters:
repeatthe state of repeat

Definition at line 524 of file lcddevice.cpp.

Set music player's shuffle properties.

Parameters:
shufflethe state of shuffle

Definition at line 516 of file lcddevice.cpp.

void LCD::switchToVolume ( QString  app_name)

Definition at line 685 of file lcddevice.cpp.

void LCD::setVolumeLevel ( float  volume_level)

Definition at line 532 of file lcddevice.cpp.

Definition at line 695 of file lcddevice.cpp.

Referenced by MythProgressDialog::Close().

Definition at line 705 of file lcddevice.cpp.

void LCD::setupLEDs ( int(*)(void LedMaskFunc)

Definition at line 545 of file lcddevice.cpp.

Definition at line 389 of file lcddevice.cpp.

uint LCD::getLCDHeight ( void  ) [inline]

Definition at line 293 of file lcddevice.h.

Referenced by MythUIButtonList::updateLCD().

uint LCD::getLCDWidth ( void  ) [inline]

Definition at line 294 of file lcddevice.h.

Referenced by TV::HandleLCDTimerEvent().

Definition at line 718 of file lcddevice.cpp.

void LCD::restartConnection ( ) [private, slot]

Definition at line 245 of file lcddevice.cpp.

Referenced by LCD().

void LCD::outputLEDs ( ) [private, slot]

Definition at line 553 of file lcddevice.cpp.

Referenced by LCD().

bool LCD::startLCDServer ( void  ) [private]

Definition at line 753 of file lcddevice.cpp.

Referenced by connectToHost().

void LCD::sendToServer ( const QString &  someText) [private]
void LCD::init ( ) [private]

Definition at line 349 of file lcddevice.cpp.

Referenced by readyRead().

void LCD::handleKeyPress ( QString  key) [private]

Definition at line 326 of file lcddevice.cpp.

Referenced by readyRead().

QString LCD::quotedString ( const QString &  s) [private]
void LCD::describeServer ( ) [private]
void LCD::connected ( MythSocket sock) [inline, private, virtual]

Implements MythSocketCBs.

Definition at line 312 of file lcddevice.h.

void LCD::connectionClosed ( MythSocket sock) [private, virtual]

Implements MythSocketCBs.

Definition at line 375 of file lcddevice.cpp.

void LCD::readyRead ( MythSocket sock) [private, virtual]

Implements MythSocketCBs.

Definition at line 256 of file lcddevice.cpp.

void LCD::connectionFailed ( MythSocket sock) [private, virtual]

Implements MythSocketCBs.

Definition at line 381 of file lcddevice.cpp.


Member Data Documentation

bool LCD::m_server_unavailable = false [static, protected]

Definition at line 179 of file lcddevice.h.

Referenced by connectToHost(), Get(), restartConnection(), and SetupLCD().

LCD * LCD::m_lcd = NULL [static, protected]

Definition at line 180 of file lcddevice.h.

Referenced by Get(), SetupLCD(), and ~LCD().

bool LCD::m_enabled = false [static, protected]

Definition at line 181 of file lcddevice.h.

Referenced by connectToHost(), Get(), and SetupLCD().

MythSocket* LCD::socket [private]

Definition at line 317 of file lcddevice.h.

Referenced by connectToHost(), readyRead(), sendToServer(), shutdown(), and ~LCD().

QMutex LCD::socketLock [private]
QString LCD::hostname [private]

Definition at line 319 of file lcddevice.h.

Referenced by connectToHost(), and restartConnection().

uint LCD::port [private]

Definition at line 320 of file lcddevice.h.

Referenced by connectToHost(), and restartConnection().

bool LCD::bConnected [private]
QTimer* LCD::retryTimer [private]

Definition at line 323 of file lcddevice.h.

Referenced by init(), LCD(), and sendToServer().

QTimer* LCD::LEDTimer [private]

Definition at line 324 of file lcddevice.h.

Referenced by LCD(), and setupLEDs().

QString LCD::send_buffer [private]

Definition at line 326 of file lcddevice.h.

Referenced by init(), LCD(), and sendToServer().

QString LCD::last_command [private]

Definition at line 327 of file lcddevice.h.

Referenced by LCD(), readyRead(), and sendToServer().

int LCD::lcd_width [private]

Definition at line 329 of file lcddevice.h.

Referenced by readyRead().

int LCD::lcd_height [private]

Definition at line 330 of file lcddevice.h.

Referenced by readyRead().

bool LCD::lcd_ready [private]

Definition at line 334 of file lcddevice.h.

Referenced by init().

Definition at line 335 of file lcddevice.h.

Referenced by init(), and switchToMenu().

Definition at line 336 of file lcddevice.h.

Referenced by init(), setGenericBusy(), setGenericProgress(), and switchToGeneric().

Definition at line 337 of file lcddevice.h.

Referenced by init(), setMusicProgress(), setMusicRepeat(), setMusicShuffle(), and switchToMusic().

Definition at line 338 of file lcddevice.h.

Referenced by init(), setChannelProgress(), and switchToChannel().

Definition at line 339 of file lcddevice.h.

Referenced by init(), setVolumeLevel(), and switchToVolume().

Definition at line 340 of file lcddevice.h.

Referenced by init().

Definition at line 341 of file lcddevice.h.

Definition at line 342 of file lcddevice.h.

Definition at line 343 of file lcddevice.h.

QString LCD::lcd_showmusic_items [private]

Definition at line 344 of file lcddevice.h.

Referenced by LCD().

QString LCD::lcd_keystring [private]

Definition at line 345 of file lcddevice.h.

Referenced by handleKeyPress(), init(), and LCD().

int LCD::lcd_ledmask [private]
int(* LCD::GetLEDMask)(void) [private]

Definition at line 349 of file lcddevice.h.

Referenced by outputLEDs(), and setupLEDs().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends