Logo Search packages:      
Sourcecode: kmess version File versions  Download package

void NowListeningClient::setEnabled ( bool  enable  ) 

Enable or disable the update interval timer.

Definition at line 85 of file nowlisteningclient.cpp.

References slotUpdate().

{
  if( enable )
  {
    if( ! timer_.isActive() )
    {
      // Reset the fields to avoid problems when the "now listening information" is
      // re-enabled.
      artist_ = "";
      album_ = "";
      track_ = "";
      playing_ = false;

      // Query directly so the GUI is up to date
      slotUpdate();

      // check every 8 seconds
      timer_.start( 8000 );
    }
  }
  else
  {
    // Emit a null changedSong signal to clean the GUI
    emit changedSong( QString(), QString(), QString(), false );
    timer_.stop();
  }
}


Generated by  Doxygen 1.6.0   Back to index