LCD Class Reference

#include <lcddevice.h>

Inheritance diagram for LCD:

MythSocketCBs

List of all members.


Detailed Description

Definition at line 103 of file lcddevice.h.


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 switchToMusic (const QString &artist, const QString &album, const QString &track)
void setLevels (int numbLevels, float *values)
void switchToChannel (QString channum="", QString title="", QString subtitle="")
void setChannelProgress (float percentViewed)
void switchToMenu (QPtrList< LCDMenuItem > *menuItems, QString app_name="", bool popMenu=true)
void switchToGeneric (QPtrList< 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 class LCDGet (void)
static void SetupLCD (void)

Protected Member Functions

 LCD ()

Static Protected Attributes

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

Private Slots

void restartConnection ()
void outputLEDs ()

Private Member Functions

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(* GetLEDMask )(void)

Member Enumeration Documentation

anonymous enum

Enumerator:
MUSIC_REPEAT_NONE 
MUSIC_REPEAT_TRACK 
MUSIC_REPEAT_ALL 

Definition at line 117 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 123 of file lcddevice.h.


Constructor & Destructor Documentation

LCD::LCD (  )  [protected]

Definition at line 39 of file lcddevice.cpp.

LCD::~LCD (  ) 

Definition at line 668 of file lcddevice.cpp.


Member Function Documentation

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

void LCD::SetupLCD ( void   )  [static]

Definition at line 89 of file lcddevice.cpp.

Referenced by main(), reloadTheme(), and WelcomeDialog::WelcomeDialog().

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

Definition at line 117 of file lcddevice.cpp.

Referenced by restartConnection(), and SetupLCD().

void LCD::switchToTime (  ) 

Definition at line 492 of file lcddevice.cpp.

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

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

void LCD::setLevels ( int  numbLevels,
float *  values 
)

Definition at line 685 of file lcddevice.cpp.

void LCD::switchToChannel ( QString  channum = "",
QString  title = "",
QString  subtitle = "" 
)

Definition at line 518 of file lcddevice.cpp.

Referenced by TV::ShowLCDChannelInfo(), and TV::ShowLCDDVDInfo().

void LCD::setChannelProgress ( float  percentViewed  ) 

Definition at line 406 of file lcddevice.cpp.

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

void LCD::switchToGeneric ( QPtrList< LCDTextItem > *  textItems  ) 

Definition at line 576 of file lcddevice.cpp.

Referenced by ImageView::UpdateLCD().

void LCD::setGenericProgress ( float  generic_progress  ) 

Update the generic progress bar.

Parameters:
generic_progress a value between 0 and 1.0

Definition at line 415 of file lcddevice.cpp.

void LCD::setGenericBusy (  ) 

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 424 of file lcddevice.cpp.

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

Definition at line 432 of file lcddevice.cpp.

void LCD::setMusicRepeat ( int  repeat  ) 

Set music player's repeat properties.

Parameters:
repeat the state of repeat

Definition at line 450 of file lcddevice.cpp.

void LCD::setMusicShuffle ( int  shuffle  ) 

Set music player's shuffle properties.

Parameters:
shuffle the state of shuffle

Definition at line 442 of file lcddevice.cpp.

void LCD::switchToVolume ( QString  app_name  ) 

Definition at line 615 of file lcddevice.cpp.

void LCD::setVolumeLevel ( float  volume_level  ) 

Definition at line 458 of file lcddevice.cpp.

void LCD::switchToNothing (  ) 

Definition at line 627 of file lcddevice.cpp.

Referenced by MythProgressDialog::Close().

void LCD::shutdown (  ) 

Definition at line 639 of file lcddevice.cpp.

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

Definition at line 471 of file lcddevice.cpp.

void LCD::stopAll ( void   ) 

Definition at line 394 of file lcddevice.cpp.

uint LCD::getLCDHeight ( void   )  [inline]

Definition at line 217 of file lcddevice.h.

uint LCD::getLCDWidth ( void   )  [inline]

Definition at line 218 of file lcddevice.h.

void LCD::resetServer ( void   ) 

Definition at line 654 of file lcddevice.cpp.

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

Definition at line 252 of file lcddevice.cpp.

Referenced by LCD().

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

Definition at line 478 of file lcddevice.cpp.

Referenced by LCD().

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

void LCD::init (  )  [private]

Definition at line 355 of file lcddevice.cpp.

Referenced by readyRead().

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

Definition at line 333 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 235 of file lcddevice.h.

Referenced by TV::IsTunable().

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

Implements MythSocketCBs.

Definition at line 381 of file lcddevice.cpp.

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

Implements MythSocketCBs.

Definition at line 263 of file lcddevice.cpp.

Referenced by LCDProcClient::LCDProcClient().

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

Implements MythSocketCBs.

Definition at line 387 of file lcddevice.cpp.


Member Data Documentation

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

Definition at line 110 of file lcddevice.h.

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

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

Definition at line 111 of file lcddevice.h.

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

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

Definition at line 112 of file lcddevice.h.

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

MythSocket* LCD::socket [private]

Definition at line 240 of file lcddevice.h.

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

QMutex LCD::socketLock [private]

QString LCD::hostname [private]

Definition at line 242 of file lcddevice.h.

uint LCD::port [private]

Definition at line 243 of file lcddevice.h.

Referenced by connectToHost(), and restartConnection().

bool LCD::bConnected [private]

QTimer* LCD::retryTimer [private]

Definition at line 246 of file lcddevice.h.

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

QTimer* LCD::LEDTimer [private]

Definition at line 247 of file lcddevice.h.

Referenced by LCD(), and setupLEDs().

QString LCD::send_buffer [private]

Definition at line 249 of file lcddevice.h.

Referenced by init(), and sendToServer().

QString LCD::last_command [private]

Definition at line 250 of file lcddevice.h.

Referenced by readyRead(), and sendToServer().

int LCD::lcd_width [private]

Definition at line 252 of file lcddevice.h.

Referenced by getLCDWidth(), and readyRead().

int LCD::lcd_height [private]

Definition at line 253 of file lcddevice.h.

Referenced by getLCDHeight(), and readyRead().

bool LCD::lcd_ready [private]

Definition at line 257 of file lcddevice.h.

Referenced by init(), and switchToTime().

Definition at line 258 of file lcddevice.h.

Referenced by init(), and switchToMenu().

Definition at line 259 of file lcddevice.h.

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

Definition at line 260 of file lcddevice.h.

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

Definition at line 261 of file lcddevice.h.

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

Definition at line 262 of file lcddevice.h.

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

Definition at line 263 of file lcddevice.h.

Referenced by init().

Definition at line 264 of file lcddevice.h.

Definition at line 265 of file lcddevice.h.

int LCD::lcd_popuptime [private]

Definition at line 266 of file lcddevice.h.

QString LCD::lcd_showmusic_items [private]

Definition at line 267 of file lcddevice.h.

QString LCD::lcd_keystring [private]

Definition at line 268 of file lcddevice.h.

Referenced by handleKeyPress(), and init().

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

Referenced by outputLEDs(), and setupLEDs().


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

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