raDIYo 0.4
SWRaDIYoMainWidget Class Reference
Inheritance diagram for SWRaDIYoMainWidget:
SWRaDIYoBaseWidget

Public Types

enum  SWControlType {
  SWCLOCKCONTROL = 0 , SWSENDERCONTROL , SWSONGSCONTROL , SWUSBCONTROL ,
  SWPLAYERCONTROL , SWSETUPCONTROL , SWALARMCONTROL , SWSHUTDOWNCONTROL ,
  SWCONTROLSSIZE
}
 
typedef QVector< SWAbstractControl * > SWControlVec
 

Public Slots

void onIdleTimeOut ()
 ??? More...
 
void onIDTriggered (int id)
 onIDTriggered More...
 
void onSenderButtonClicked ()
 swapControls More...
 
void onSenderValueChanged (int value)
 onSenderValueChanged More...
 
void onVolumeButtonClicked ()
 onVolumeButtonClicked() wechselt zwischen Play- und Standby-Mode More...
 
void onVolumeValueChanged (int value)
 onVolumeValueChanged More...
 
void onEntryActivated (SWPlayableItem item)
 

Public Member Functions

 SWRaDIYoMainWidget (QWidget *parent=nullptr)
 SWRaDIYoMainWidget –doku begins here —. More...
 
virtual ~SWRaDIYoMainWidget ()
 ~SWRaDIYoMainWidget Destructor. More...
 
QSettings & settings ()
 
void togglePlayMode ()
 startPlaying: von aussen und von innen More...
 
- Public Member Functions inherited from SWRaDIYoBaseWidget
 SWRaDIYoBaseWidget (QWidget *parent=nullptr)
 

Static Public Attributes

static constexpr const char * SWPLAYBUTTONNSTYLE = ":/data/radiyo.playbutton.css"
 
static constexpr const char * SWPAUSEBUTTONNSTYLE = ":/data/radiyo.pausebutton.css"
 
static constexpr const char * SWTITLELABELSTYLE = ":/data/radiyo.titlelabel.css"
 

Protected Member Functions

SWAbstractControlcurrentControl ()
 
void setupDials ()
 
void onShutDown ()
 onShutDown More...
 
void setAlarm ()
 setAlarm More...
 
void swapControls (int newID)
 
void loadSettings ()
 loadSettings: die Einstellungen laden (fonts etc.) More...
 
void saveSettings ()
 saveSettings More...
 

Protected Attributes

QSettings _settings
 
QString _buttonPlayCss
 
QString _buttonPauseCss
 
QString _titleCss
 
bool _playerActive = false
 
QTimer _idleTimer
 
SWButtonGroup _radioButtons
 
SWDialDialog _dialDialog
 
SWPlayableItem _nowPlaying
 
SWControlVec _controls
 
int _currentCtrlID
 
int _lastControlID
 
SWSenderControl_senderControl = nullptr
 
SWSongsControl_songsControl = nullptr
 
SWPlayerControl_playerControl = nullptr
 
int _senderDialValue = -1
 
int _volumeDialValue = -1
 

Static Protected Attributes

static const int RADIYO_SMALL_X = 480
 
static const int RADIYO_SMALL_Y = 320
 
static const int RADIYO_LARGE_X = 800
 
static const int RADIYO_LARGE_Y = 480
 

Detailed Description

Definition at line 43 of file swradiyomainwidget.h.

Member Typedef Documentation

◆ SWControlVec

typedef QVector<SWAbstractControl*> SWRaDIYoMainWidget::SWControlVec

Definition at line 72 of file swradiyomainwidget.h.

Member Enumeration Documentation

◆ SWControlType

enum SWRaDIYoMainWidget::SWControlType

Definition at line 50 of file swradiyomainwidget.h.

Constructor & Destructor Documentation

◆ SWRaDIYoMainWidget()

SWRaDIYoMainWidget::SWRaDIYoMainWidget ( QWidget *  parent = nullptr)

SWRaDIYoMainWidget –doku begins here —.

Parameters
parent

contains copy-writen material from qt example code:

See also
shaped clock example
embedded/flipdigits example

Basic setup

Not-aus

Setup Controls: 'RaDIYo' Buttons Reihenfolge beachten, die iost wichtig für die button-asuwahl per dial

Alle Controls, schön vorsortiert.

Setup Controls: Volume

startup

Definition at line 73 of file swradiyomainwidget.cpp.

◆ ~SWRaDIYoMainWidget()

SWRaDIYoMainWidget::~SWRaDIYoMainWidget ( )
virtual

~SWRaDIYoMainWidget Destructor.

Definition at line 194 of file swradiyomainwidget.cpp.

Member Function Documentation

◆ currentControl()

SWAbstractControl & SWRaDIYoMainWidget::currentControl ( )
inlineprotected

Definition at line 100 of file swradiyomainwidget.h.

◆ loadSettings()

void SWRaDIYoMainWidget::loadSettings ( )
protected

loadSettings: die Einstellungen laden (fonts etc.)

Dss ist die Bildschirmgröße des Raspi 7 inch displays

Definition at line 487 of file swradiyomainwidget.cpp.

◆ onEntryActivated

void SWRaDIYoMainWidget::onEntryActivated ( SWPlayableItem  item)
slot

Definition at line 423 of file swradiyomainwidget.cpp.

◆ onIdleTimeOut

void SWRaDIYoMainWidget::onIdleTimeOut ( )
slot

???

Definition at line 236 of file swradiyomainwidget.cpp.

◆ onIDTriggered

void SWRaDIYoMainWidget::onIDTriggered ( int  newID)
slot

onIDTriggered

Parameters
newID

play button geklickt

Definition at line 269 of file swradiyomainwidget.cpp.

◆ onSenderButtonClicked

void SWRaDIYoMainWidget::onSenderButtonClicked ( )
slot

swapControls

Parameters
newID

et. al: Die Buttons schalten ein / aus bzw. die Auswahl (Volume/Playlistentry/Uhrzeit weiter Die Dials wählen wenn möglich (Volume/...) Falls es nix zu wählen gibt (Clock), dann wird beim drehen weitergeschaltet als wäre der Button gedrückt worden.

Definition at line 353 of file swradiyomainwidget.cpp.

◆ onSenderValueChanged

void SWRaDIYoMainWidget::onSenderValueChanged ( int  value)
slot

onSenderValueChanged

Parameters
value

Definition at line 366 of file swradiyomainwidget.cpp.

◆ onShutDown()

void SWRaDIYoMainWidget::onShutDown ( )
protected

onShutDown

Todo:

implementation

shutdown der hardware -> use linux 'sudo kill me'

Definition at line 544 of file swradiyomainwidget.cpp.

◆ onVolumeButtonClicked

void SWRaDIYoMainWidget::onVolumeButtonClicked ( )
slot

onVolumeButtonClicked() wechselt zwischen Play- und Standby-Mode

KISS: Wir halten uns an die Logik des Autoradios: Der rechte Dial-Button und der Screen-Button 'play' schaltet immer nur On/Off, drehen steuert nur die Lautstärke. Das aktuelle Control wird aus, das Spectrum-Display wird eingeblendet.

Definition at line 394 of file swradiyomainwidget.cpp.

◆ onVolumeValueChanged

void SWRaDIYoMainWidget::onVolumeValueChanged ( int  value)
slot

onVolumeValueChanged

Parameters
value

Definition at line 408 of file swradiyomainwidget.cpp.

◆ saveSettings()

void SWRaDIYoMainWidget::saveSettings ( )
protected

saveSettings

Todo:
implementation

Definition at line 532 of file swradiyomainwidget.cpp.

◆ setAlarm()

void SWRaDIYoMainWidget::setAlarm ( )
protected

setAlarm

Todo:
implementation

Definition at line 522 of file swradiyomainwidget.cpp.

◆ settings()

QSettings & SWRaDIYoMainWidget::settings ( )

Definition at line 229 of file swradiyomainwidget.cpp.

◆ setupDials()

void SWRaDIYoMainWidget::setupDials ( )
protected

Setup Controls: Fake Dials

Definition at line 201 of file swradiyomainwidget.cpp.

◆ swapControls()

void SWRaDIYoMainWidget::swapControls ( int  newID)
protected

Definition at line 244 of file swradiyomainwidget.cpp.

◆ togglePlayMode()

void SWRaDIYoMainWidget::togglePlayMode ( )

startPlaying: von aussen und von innen

Parameters
title<
urlText
startnow

Definition at line 448 of file swradiyomainwidget.cpp.

Member Data Documentation

◆ _buttonPauseCss

QString SWRaDIYoMainWidget::_buttonPauseCss
protected

Definition at line 123 of file swradiyomainwidget.h.

◆ _buttonPlayCss

QString SWRaDIYoMainWidget::_buttonPlayCss
protected

Definition at line 123 of file swradiyomainwidget.h.

◆ _controls

SWControlVec SWRaDIYoMainWidget::_controls
protected

Definition at line 132 of file swradiyomainwidget.h.

◆ _currentCtrlID

int SWRaDIYoMainWidget::_currentCtrlID
protected

Definition at line 133 of file swradiyomainwidget.h.

◆ _dialDialog

SWDialDialog SWRaDIYoMainWidget::_dialDialog
protected

Definition at line 129 of file swradiyomainwidget.h.

◆ _idleTimer

QTimer SWRaDIYoMainWidget::_idleTimer
protected

Definition at line 127 of file swradiyomainwidget.h.

◆ _lastControlID

int SWRaDIYoMainWidget::_lastControlID
protected

Definition at line 134 of file swradiyomainwidget.h.

◆ _nowPlaying

SWPlayableItem SWRaDIYoMainWidget::_nowPlaying
protected

Definition at line 130 of file swradiyomainwidget.h.

◆ _playerActive

bool SWRaDIYoMainWidget::_playerActive = false
protected

Definition at line 125 of file swradiyomainwidget.h.

◆ _playerControl

SWPlayerControl* SWRaDIYoMainWidget::_playerControl = nullptr
protected

Definition at line 138 of file swradiyomainwidget.h.

◆ _radioButtons

SWButtonGroup SWRaDIYoMainWidget::_radioButtons
protected

Definition at line 128 of file swradiyomainwidget.h.

◆ _senderControl

SWSenderControl* SWRaDIYoMainWidget::_senderControl = nullptr
protected

Definition at line 136 of file swradiyomainwidget.h.

◆ _senderDialValue

int SWRaDIYoMainWidget::_senderDialValue = -1
protected

Definition at line 140 of file swradiyomainwidget.h.

◆ _settings

QSettings SWRaDIYoMainWidget::_settings
protected

Definition at line 121 of file swradiyomainwidget.h.

◆ _songsControl

SWSongsControl* SWRaDIYoMainWidget::_songsControl = nullptr
protected

Definition at line 137 of file swradiyomainwidget.h.

◆ _titleCss

QString SWRaDIYoMainWidget::_titleCss
protected

Definition at line 124 of file swradiyomainwidget.h.

◆ _volumeDialValue

int SWRaDIYoMainWidget::_volumeDialValue = -1
protected

Definition at line 141 of file swradiyomainwidget.h.

◆ RADIYO_LARGE_X

const int SWRaDIYoMainWidget::RADIYO_LARGE_X = 800
staticprotected

Definition at line 118 of file swradiyomainwidget.h.

◆ RADIYO_LARGE_Y

const int SWRaDIYoMainWidget::RADIYO_LARGE_Y = 480
staticprotected

Definition at line 119 of file swradiyomainwidget.h.

◆ RADIYO_SMALL_X

const int SWRaDIYoMainWidget::RADIYO_SMALL_X = 480
staticprotected

Definition at line 116 of file swradiyomainwidget.h.

◆ RADIYO_SMALL_Y

const int SWRaDIYoMainWidget::RADIYO_SMALL_Y = 320
staticprotected

Definition at line 117 of file swradiyomainwidget.h.

◆ SWPAUSEBUTTONNSTYLE

constexpr const char* SWRaDIYoMainWidget::SWPAUSEBUTTONNSTYLE = ":/data/radiyo.pausebutton.css"
staticconstexpr

Definition at line 69 of file swradiyomainwidget.h.

◆ SWPLAYBUTTONNSTYLE

constexpr const char* SWRaDIYoMainWidget::SWPLAYBUTTONNSTYLE = ":/data/radiyo.playbutton.css"
staticconstexpr

Definition at line 68 of file swradiyomainwidget.h.

◆ SWTITLELABELSTYLE

constexpr const char* SWRaDIYoMainWidget::SWTITLELABELSTYLE = ":/data/radiyo.titlelabel.css"
staticconstexpr

Definition at line 70 of file swradiyomainwidget.h.


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