コード例 #1
0
void DownloadItemViewModel::doSettingsPropertyChanged(const ComponentModel::PropertyChangedSignalArgs& args)
{
    if (args.property() == "state" && !m_settings.isNull())
    {
         if (m_settings->state() == DownloadSettingsViewModel::Done)
         {
             MediaDownloadList downloadList = m_settings->downloadList();

             if (downloadList.count() > 0)
             {
                 setState(None);
                 initialize(downloadList.at(0));
                 emit parsed(downloadList);
             }
             else
             {
                 setState(Error);
             }

             m_settings.clear();
         }
         else if (m_settings->state() == DownloadSettingsViewModel::Error)
         {
             setState(Error);
             m_settings.clear();
         }
    }
}
コード例 #2
0
void MediaItemView::propertyChanged(const ComponentModel::PropertyChangedSignalArgs& args)
{
    if (args.property() == "state")
    {
        updateState();
    }
}