MythTV
master
|
#include <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 } |
Signals | |
void | sendToServer (const QString &someText) |
Public Member Functions | |
~LCD () override | |
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 func, 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 (const QString &channum="", const QString &title="", const QString &subtitle="") |
void | setChannelProgress (const QString &time, float value) |
void | switchToMenu (QList< LCDMenuItem > &menuItems, const QString &app_name="", bool popMenu=true) |
void | switchToGeneric (QList< LCDTextItem > &textItems) |
void | setGenericProgress (float value) |
Update the generic progress bar. More... | |
void | setGenericBusy () |
Update the generic screen to display a busy spinner. More... | |
void | setMusicProgress (const QString &time, float value) |
void | setMusicRepeat (int repeat) |
Set music player's repeat properties. More... | |
void | setMusicShuffle (int shuffle) |
Set music player's shuffle properties. More... | |
void | switchToVolume (const QString &app_name) |
void | setVolumeLevel (float value) |
void | switchToNothing () |
void | shutdown () |
void | setupLEDs (int(*LedMaskFunc)(void)) |
void | stopAll (void) |
int | getLCDHeight (void) const |
int | getLCDWidth (void) const |
void | resetServer (void) |
Static Public Member Functions | |
static LCD * | Get (void) |
static void | SetupLCD (void) |
Protected Member Functions | |
LCD () | |
Static Protected Attributes | |
static bool | m_serverUnavailable = false |
static LCD * | m_lcd = nullptr |
static bool | m_enabled = false |
Private Slots | |
void | restartConnection () |
void | outputLEDs () |
void | sendToServerSlot (const QString &someText) |
void | ReadyRead (void) |
void | Disconnected (void) |
Private Member Functions | |
void | init () |
void | handleKeyPress (const QString &keyPressed) |
void | describeServer () |
Static Private Member Functions | |
static bool | startLCDServer (void) |
static QString | quotedString (const QString &string) |
Private Attributes | |
QTcpSocket * | m_socket {nullptr} |
QRecursiveMutex | m_socketLock |
QString | m_hostname {"localhost"} |
uint | m_port {6545} |
bool | m_connected {false} |
QTimer * | m_retryTimer {nullptr} |
QTimer * | m_ledTimer {nullptr} |
QString | m_sendBuffer |
QString | m_lastCommand |
int | m_lcdWidth {0} |
int | m_lcdHeight {0} |
bool | m_lcdReady {false} |
bool | m_lcdShowTime {false} |
bool | m_lcdShowMenu {false} |
bool | m_lcdShowGeneric {false} |
bool | m_lcdShowMusic {false} |
bool | m_lcdShowChannel {false} |
bool | m_lcdShowVolume {false} |
bool | m_lcdShowRecStatus {false} |
bool | m_lcdBacklightOn {false} |
bool | m_lcdHeartbeatOn {false} |
int | m_lcdPopupTime {0} |
QString | m_lcdShowMusicItems |
QString | m_lcdKeyString |
int | m_lcdLedMask {0} |
int(* | m_getLEDMask )(void) |
Friends | |
class | TestLcdDevice |
Definition at line 173 of file lcddevice.h.
anonymous enum |
Enumerator | |
---|---|
MUSIC_REPEAT_NONE | |
MUSIC_REPEAT_TRACK | |
MUSIC_REPEAT_ALL |
Definition at line 188 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 194 of file lcddevice.h.
|
protected |
Definition at line 44 of file lcddevice.cpp.
Referenced by Get().
|
override |
Definition at line 717 of file lcddevice.cpp.
|
static |
Definition at line 69 of file lcddevice.cpp.
Referenced by MusicCommon::customEvent(), TV::HandleLCDTimerEvent(), TV::HandleLCDVolumeTimerEvent(), AvFormatDecoder::InitVideoCodec(), main(), MusicCommon::MusicCommon(), mythplugin_config(), VideoPlayerCommand::Play(), TV::Playback(), reloadTheme(), Ripper::RipComplete(), CDRipperThread::ripTrack(), CDRipperThread::run(), runMenu(), MusicCommon::seek(), MusicCommon::setTrackOnLCD(), AvFormatDecoder::SetupAudioStream(), SetupLCD(), TV::ShowLCDChannelInfo(), TV::ShowLCDDVDInfo(), MusicCommon::stopAll(), MythUIButtonList::updateLCD(), MusicCommon::updateRepeatMode(), MusicCommon::updateShuffleMode(), TV::VolumeChange(), AvFormatDecoder::~AvFormatDecoder(), MiniPlayer::~MiniPlayer(), MusicCommon::~MusicCommon(), RipStatus::~RipStatus(), TV::~TV(), and ZMMiniPlayer::~ZMMiniPlayer().
|
static |
Definition at line 76 of file lcddevice.cpp.
Referenced by main(), and reloadTheme().
bool LCD::connectToHost | ( | const QString & | hostname, |
unsigned int | port | ||
) |
Definition at line 107 of file lcddevice.cpp.
Referenced by restartConnection(), and SetupLCD().
void LCD::switchToTime | ( | ) |
Definition at line 559 of file lcddevice.cpp.
void LCD::setSpeakerLEDs | ( | enum LCDSpeakerSet | speaker, |
bool | on | ||
) |
Definition at line 387 of file lcddevice.cpp.
void LCD::setAudioFormatLEDs | ( | enum LCDAudioFormatSet | acodec, |
bool | on | ||
) |
Definition at line 397 of file lcddevice.cpp.
void LCD::setVideoFormatLEDs | ( | enum LCDVideoFormatSet | vcodec, |
bool | on | ||
) |
Definition at line 409 of file lcddevice.cpp.
void LCD::setVideoSrcLEDs | ( | enum LCDVideoSourceSet | vsrc, |
bool | on | ||
) |
Definition at line 421 of file lcddevice.cpp.
void LCD::setFunctionLEDs | ( | enum LCDFunctionSet | func, |
bool | on | ||
) |
Definition at line 431 of file lcddevice.cpp.
Referenced by VideoPlayerCommand::Play().
void LCD::setTunerLEDs | ( | enum LCDTunerSet | tuner, |
bool | on | ||
) |
Definition at line 457 of file lcddevice.cpp.
void LCD::setVariousLEDs | ( | enum LCDVariousFlags | various, |
bool | on | ||
) |
Definition at line 441 of file lcddevice.cpp.
void LCD::switchToMusic | ( | const QString & | artist, |
const QString & | album, | ||
const QString & | track | ||
) |
Definition at line 569 of file lcddevice.cpp.
Referenced by MusicCommon::setTrackOnLCD().
void LCD::switchToChannel | ( | const QString & | channum = "" , |
const QString & | title = "" , |
||
const QString & | subtitle = "" |
||
) |
Definition at line 581 of file lcddevice.cpp.
Referenced by TV::HandleLCDVolumeTimerEvent(), TV::ShowLCDChannelInfo(), and TV::ShowLCDDVDInfo().
void LCD::setChannelProgress | ( | const QString & | time, |
float | value | ||
) |
Definition at line 467 of file lcddevice.cpp.
Referenced by TV::HandleLCDTimerEvent().
void LCD::switchToMenu | ( | QList< LCDMenuItem > & | menuItems, |
const QString & | app_name = "" , |
||
bool | popMenu = true |
||
) |
Definition at line 594 of file lcddevice.cpp.
Referenced by MythUIButtonList::updateLCD().
void LCD::switchToGeneric | ( | QList< LCDTextItem > & | textItems | ) |
Definition at line 635 of file lcddevice.cpp.
void LCD::setGenericProgress | ( | float | value | ) |
Update the generic progress bar.
generic_progress | a value between 0 and 1.0 |
Definition at line 477 of file lcddevice.cpp.
void LCD::setGenericBusy | ( | ) |
Update the generic screen to display a busy spinner.
Definition at line 486 of file lcddevice.cpp.
void LCD::setMusicProgress | ( | const QString & | time, |
float | value | ||
) |
Definition at line 494 of file lcddevice.cpp.
void LCD::setMusicRepeat | ( | int | repeat | ) |
Set music player's repeat properties.
repeat | the state of repeat |
Definition at line 512 of file lcddevice.cpp.
void LCD::setMusicShuffle | ( | int | shuffle | ) |
Set music player's shuffle properties.
shuffle | the state of shuffle |
Definition at line 504 of file lcddevice.cpp.
void LCD::switchToVolume | ( | const QString & | app_name | ) |
Definition at line 672 of file lcddevice.cpp.
void LCD::setVolumeLevel | ( | float | value | ) |
Definition at line 520 of file lcddevice.cpp.
void LCD::switchToNothing | ( | ) |
Definition at line 682 of file lcddevice.cpp.
void LCD::shutdown | ( | ) |
Definition at line 692 of file lcddevice.cpp.
void LCD::setupLEDs | ( | int(*)(void) | LedMaskFunc | ) |
Definition at line 534 of file lcddevice.cpp.
void LCD::stopAll | ( | void | ) |
Definition at line 377 of file lcddevice.cpp.
|
inline |
Definition at line 296 of file lcddevice.h.
Referenced by MythUIButtonList::updateLCD().
|
inline |
Definition at line 297 of file lcddevice.h.
Referenced by TV::HandleLCDTimerEvent().
void LCD::resetServer | ( | void | ) |
Definition at line 705 of file lcddevice.cpp.
|
privateslot |
Definition at line 244 of file lcddevice.cpp.
Referenced by LCD().
|
privateslot |
Definition at line 542 of file lcddevice.cpp.
Referenced by LCD().
|
privateslot |
Definition at line 187 of file lcddevice.cpp.
Referenced by LCD().
|
signal |
Referenced by init(), LCD(), outputLEDs(), resetServer(), setAudioFormatLEDs(), setChannelProgress(), setFunctionLEDs(), setGenericBusy(), setGenericProgress(), setMusicProgress(), setMusicRepeat(), setMusicShuffle(), setSpeakerLEDs(), setTunerLEDs(), setVariousLEDs(), setVideoFormatLEDs(), setVideoSrcLEDs(), setVolumeLevel(), stopAll(), switchToChannel(), switchToGeneric(), switchToMenu(), switchToMusic(), switchToNothing(), switchToTime(), and switchToVolume().
|
staticprivate |
Definition at line 741 of file lcddevice.cpp.
Referenced by connectToHost().
|
private |
Definition at line 346 of file lcddevice.cpp.
Referenced by ReadyRead().
|
private |
Definition at line 323 of file lcddevice.cpp.
Referenced by ReadyRead().
|
staticprivate |
Definition at line 732 of file lcddevice.cpp.
Referenced by setChannelProgress(), setMusicProgress(), switchToChannel(), switchToGeneric(), switchToMenu(), switchToMusic(), and switchToVolume().
|
private |
|
privateslot |
Definition at line 255 of file lcddevice.cpp.
Referenced by connectToHost().
|
privateslot |
Definition at line 372 of file lcddevice.cpp.
Referenced by connectToHost().
|
friend |
Definition at line 176 of file lcddevice.h.
Definition at line 181 of file lcddevice.h.
Referenced by connectToHost(), Get(), restartConnection(), and SetupLCD().
|
staticprotected |
Definition at line 182 of file lcddevice.h.
Referenced by Get(), SetupLCD(), and ~LCD().
Definition at line 183 of file lcddevice.h.
Referenced by connectToHost(), Get(), and SetupLCD().
|
private |
Definition at line 322 of file lcddevice.h.
Referenced by connectToHost(), ReadyRead(), sendToServerSlot(), shutdown(), and ~LCD().
|
private |
Definition at line 326 of file lcddevice.h.
Referenced by connectToHost(), ReadyRead(), resetServer(), sendToServerSlot(), and shutdown().
|
private |
Definition at line 328 of file lcddevice.h.
Referenced by connectToHost(), and restartConnection().
|
private |
Definition at line 329 of file lcddevice.h.
Referenced by connectToHost(), and restartConnection().
Definition at line 330 of file lcddevice.h.
Referenced by connectToHost(), Disconnected(), init(), restartConnection(), sendToServerSlot(), and shutdown().
|
private |
Definition at line 332 of file lcddevice.h.
Referenced by init(), LCD(), and sendToServerSlot().
|
private |
Definition at line 333 of file lcddevice.h.
Referenced by LCD(), and setupLEDs().
|
private |
Definition at line 335 of file lcddevice.h.
Referenced by init(), LCD(), and sendToServerSlot().
|
private |
Definition at line 336 of file lcddevice.h.
Referenced by LCD(), ReadyRead(), and sendToServerSlot().
|
private |
Definition at line 338 of file lcddevice.h.
Referenced by ReadyRead().
|
private |
Definition at line 339 of file lcddevice.h.
Referenced by ReadyRead().
Definition at line 341 of file lcddevice.h.
Referenced by connectToHost(), init(), resetServer(), restartConnection(), sendToServerSlot(), setAudioFormatLEDs(), setChannelProgress(), setFunctionLEDs(), setGenericBusy(), setGenericProgress(), setMusicProgress(), setMusicRepeat(), setMusicShuffle(), setSpeakerLEDs(), setTunerLEDs(), setVariousLEDs(), setVideoFormatLEDs(), setVideoSrcLEDs(), setVolumeLevel(), shutdown(), stopAll(), switchToChannel(), switchToGeneric(), switchToMenu(), switchToMusic(), switchToNothing(), switchToTime(), switchToVolume(), and ~LCD().
Definition at line 343 of file lcddevice.h.
Referenced by init().
Definition at line 344 of file lcddevice.h.
Referenced by init(), and switchToMenu().
Definition at line 345 of file lcddevice.h.
Referenced by init(), setGenericBusy(), setGenericProgress(), and switchToGeneric().
Definition at line 346 of file lcddevice.h.
Referenced by init(), setMusicProgress(), setMusicRepeat(), setMusicShuffle(), and switchToMusic().
Definition at line 347 of file lcddevice.h.
Referenced by init(), setChannelProgress(), and switchToChannel().
Definition at line 348 of file lcddevice.h.
Referenced by init(), setVolumeLevel(), and switchToVolume().
Definition at line 349 of file lcddevice.h.
Referenced by init().
Definition at line 350 of file lcddevice.h.
Definition at line 351 of file lcddevice.h.
|
private |
Definition at line 352 of file lcddevice.h.
|
private |
Definition at line 353 of file lcddevice.h.
Referenced by LCD().
|
private |
Definition at line 354 of file lcddevice.h.
Referenced by handleKeyPress(), init(), and LCD().
|
private |
Definition at line 356 of file lcddevice.h.
Referenced by setAudioFormatLEDs(), setFunctionLEDs(), setSpeakerLEDs(), setTunerLEDs(), setVariousLEDs(), setVideoFormatLEDs(), and setVideoSrcLEDs().
|
inlineprivate |
Definition at line 358 of file lcddevice.h.
Referenced by outputLEDs(), and setupLEDs().