void squeezeLiteGui::refreshScreenSettings(void) { emit VolumeChange(QVariant(m_playerInfo->GetDeviceVolume())); emit playStatus(QVariant(m_playerInfo->GetDeviceMode())); emit shuffleStatus(QVariant(m_playerInfo->GetShuffleMode())); emit repeatStatus(QVariant(m_playerInfo->GetRepeatMode())); emit songDuration(QVariant(m_playerInfo->GetTrackDuration())); emit progress(QVariant(m_playerInfo->GetTrackPlaytime())); }
void MotionBase::statusChange(bool p_stat) { qDebug() << "MB: Got statChange:" << p_stat; ui->muteButton->setEnabled( ! p_stat); ui->easeButton->setEnabled( ! p_stat); ui->resButton->setEnabled( ! p_stat); emit playStatus(p_stat); }
void squeezeLiteGui::setupInterfaceConnections(void) { DEBUGF("Initialize Interface Connections"); QQuickItem *v = rootObject(); // interface signals to application connect(v,SIGNAL(play(int)), this,SLOT(playState(int))); connect(v,SIGNAL(nextTrack()), this,SLOT(nextTrackClicked())); connect(v,SIGNAL(prevTrack()), this,SLOT(prevTrackClicked())); connect(v,SIGNAL(volUp()), this,SLOT(volUp())); connect(v,SIGNAL(volDown()), this,SLOT(volDown())); connect(v,SIGNAL(setVolume(int)), this,SLOT(setVolume(int))); connect(v,SIGNAL(controlClicked(QString)), this,SLOT(controlViewClicked(QString))); connect(v,SIGNAL(shuffle(int)), this,SLOT(shuffleState(int))); connect(v,SIGNAL(repeat(int)), this,SLOT(repeatState(int))); // connect(v,SIGNAL(playButtonClicked()),this,SLOT(playPauseToggle())); // application signals to interface connect(this,SIGNAL(playlistIndexChange(QVariant)), v, SLOT(setControlViewListIndex(QVariant))); connect(this,SIGNAL(updateAlbumCover(QVariant)), v,SLOT(updateAlbumCover(QVariant))); connect(this,SIGNAL(playStatus(QVariant)), v, SLOT(updatePlayMode(QVariant))); connect(this,SIGNAL(VolumeChange(QVariant)), v,SLOT(setMainVolume(QVariant))); connect(this,SIGNAL(songDuration(QVariant)), v,SLOT(setSongDuration(QVariant))); connect(this,SIGNAL(progress(QVariant)), v,SLOT(updateProgress(QVariant))); connect(m_playerInfo,SIGNAL(PlayingTime(QVariant,QVariant)), v,SLOT(setupSongTimes(QVariant,QVariant))); connect(m_playerInfo,SIGNAL(TimeText(QVariant)),v,SLOT(setTimeText(QVariant))); connect(m_playerInfo,SIGNAL(NewSong()),this,SLOT(NewSong())); connect(&m_tick,SIGNAL(timeout()),m_playerInfo,SLOT(tick())); m_tick.start(1000); /* * messages from device that need to be connected to slots void playlistIndexChange(QVariant newidx); void NewSong(int newPlayListIndex); void NewPlaylist(void); void Mute(bool); void VolumeChange(int); void ModeChange(QString); */ }