コード例 #1
0
ファイル: ConcertWidget.cpp プロジェクト: boccman/MediaElch
/**
 * @brief Sets the current concert, tells the concert to load data and images and updates widgets contents
 * @param concert Current concert
 */
void ConcertWidget::setConcert(Concert *concert)
{
    qDebug() << "Entered, concert=" << concert->name();
    concert->loadData(Manager::instance()->mediaCenterInterfaceConcert());
    m_concert = concert;
    updateConcertInfo();
    if (concert->downloadsInProgress())
        setDisabledTrue();
    else
        setEnabledTrue();
}
コード例 #2
0
ファイル: ConcertWidget.cpp プロジェクト: googl1/MediaElch
/**
 * @brief Sets the current concert, tells the concert to load data and images and updates widgets contents
 * @param concert Current concert
 */
void ConcertWidget::setConcert(Concert *concert)
{
    qDebug() << "Entered, concert=" << concert->name();
    concert->loadData(Manager::instance()->mediaCenterInterfaceConcert());
    m_concert = concert;
    if (!concert->streamDetailsLoaded() && Settings::instance()->autoLoadStreamDetails()) {
        concert->loadStreamDetailsFromFile();
        if (concert->streamDetailsLoaded() && concert->streamDetails()->videoDetails().value("durationinseconds").toInt() != 0)
            concert->setRuntime(qFloor(concert->streamDetails()->videoDetails().value("durationinseconds").toInt()/60));
    }
    updateConcertInfo();
    if (concert->downloadsInProgress())
        setDisabledTrue();
    else
        setEnabledTrue();
}