예제 #1
0
ExtractorLocator::ExtractorLocator(Vrui::LocatorTool* sLocatorTool,Visualizer* sApplication,Extractor::Algorithm* sExtractor,const Misc::ConfigurationFileSection* cfg)
    :BaseLocator(sLocatorTool,sApplication),Extractor(sExtractor),
     settingsDialog(extractor->createSettingsDialog(Vrui::getWidgetManager())),
     busyDialog(createBusyDialog(extractor->getName())),
     locator(application->dataSet->getLocator()),
     dragging(false),
     lastSeedRequestID(0),
     completionPercentage(0.0f),completionPercentageUpdated(false)
{
    /* Set the algorithm's busy function: */
    extractor->setBusyFunction(Misc::createFunctionCall(this,&ExtractorLocator::busyFunction));

#ifdef VISUALIZER_USE_COLLABORATION
    if(application->sharedVisualizationClient!=0)
    {
        /* Register this locator with the shared visualization client: */
        application->sharedVisualizationClient->createLocator(this);
    }
#endif

    if(settingsDialog!=0)
    {
        /* Show the algorithm's settings dialog if it has one: */
        Vrui::popupPrimaryWidget(settingsDialog);

        if(cfg!=0)
        {
            /* Read the settings dialog's stored position and size: */
            GLMotif::readTopLevelPosition(settingsDialog,*cfg);
        }
    }
}
예제 #2
0
void EditMetadataDialog::OnSearchListSelection(ArtworkInfo info, VideoArtworkType type)
{
    QString msg = tr("Downloading selected artwork...");
    createBusyDialog(msg);

    MetadataLookup *lookup = new MetadataLookup();
    lookup->SetType(kMetadataVideo);
    if (m_workingMetadata->GetSeason() > 0 ||
            m_workingMetadata->GetEpisode() > 0)
        lookup->SetSubtype(kProbableTelevision);
    else if (m_workingMetadata->GetSubtitle().isEmpty())
        lookup->SetSubtype(kProbableMovie);
    else
        lookup->SetSubtype(kUnknownVideo);
    lookup->SetHost(m_workingMetadata->GetHost());
    lookup->SetAutomatic(true);
    lookup->SetData(qVariantFromValue<VideoArtworkType>(type));

    ArtworkMap downloads;
    downloads.insert(type, info);
    lookup->SetDownloads(downloads);
    lookup->SetAllowOverwrites(true);
    lookup->SetTitle(m_workingMetadata->GetTitle());
    lookup->SetSubtitle(m_workingMetadata->GetSubtitle());
    lookup->SetSeason(m_workingMetadata->GetSeason());
    lookup->SetEpisode(m_workingMetadata->GetEpisode());
    lookup->SetInetref(m_workingMetadata->GetInetRef());

    m_imageDownload->addDownloads(lookup);
}
예제 #3
0
void EditMetadataDialog::FindNetArt(VideoArtworkType type)
{
    QString msg = tr("Searching for available artwork...");
    createBusyDialog(msg);

    MetadataLookup *lookup = new MetadataLookup();
    lookup->SetStep(kLookupSearch);
    lookup->SetType(kMetadataVideo);
    lookup->SetAutomatic(true);
    if (m_workingMetadata->GetSeason() > 0 ||
            m_workingMetadata->GetEpisode() > 0)
        lookup->SetSubtype(kProbableTelevision);
    else if (m_workingMetadata->GetSubtitle().isEmpty())
        lookup->SetSubtype(kProbableMovie);
    else
        lookup->SetSubtype(kUnknownVideo);
    lookup->SetData(qVariantFromValue<VideoArtworkType>(type));

    lookup->SetTitle(m_workingMetadata->GetTitle());
    lookup->SetSubtitle(m_workingMetadata->GetSubtitle());
    lookup->SetSeason(m_workingMetadata->GetSeason());
    lookup->SetEpisode(m_workingMetadata->GetEpisode());
    lookup->SetInetref(m_workingMetadata->GetInetRef());

    m_query->addLookup(lookup);
}
예제 #4
0
void NetTree::updateTrees()
{
    if (m_grabberList.count() == 0)
        return;

    QString title(tr("Updating Site Maps.  This could take a while..."));
    createBusyDialog(title);
    m_gdt->refreshAll();
}
예제 #5
0
void NetTree::updateRSS()
{
    QString title(tr("Updating RSS.  This could take a while..."));
    createBusyDialog(title);

    RSSManager *rssMan = new RSSManager();
    connect(rssMan, SIGNAL(finished()), this,
                   SLOT(doTreeRefresh()));
    rssMan->startTimer();
    rssMan->doUpdate();
}
예제 #6
0
void SearchEditor::loadData()
{
    QString msg = tr("Querying Backend for Internet Content Sources...");
    createBusyDialog(msg);

    m_manager = new QNetworkAccessManager();

    connect(m_manager, SIGNAL(finished(QNetworkReply*)),
                       SLOT(slotLoadedData(void)));

    QUrl url(GetMythXMLURL() + "GetInternetSources");
    m_reply = m_manager->get(QNetworkRequest(url));
}
예제 #7
0
Visualizer::DataLocator::DataLocator(Vrui::LocatorTool* sLocatorTool,Visualizer* sApplication,const char* algorithmName,Visualizer::Algorithm* sExtractor)
	:BaseLocator(sLocatorTool,sApplication),
	 #ifdef __DARWIN__
	 terminate(false),
	 #endif
	 extractor(sExtractor),
	 settingsDialog(extractor->createSettingsDialog(Vrui::getWidgetManager())),
	 busyDialog(createBusyDialog(algorithmName)),
	 locator(application->dataSet->getLocator()),
	 dragging(false),firstExtraction(false),
	 seedTracking(false),
	 seedLocator(0),
	 extracting(false)
	{
	/* Show the algorithm's settings dialog if it has one: */
	if(settingsDialog!=0)
		Vrui::popupPrimaryWidget(settingsDialog,Vrui::getNavigationTransformation().transform(Vrui::getDisplayCenter()));
	
	/* Initialize the extraction thread communications: */
	for(int i=0;i<3;++i)
		trackedElements[i]=0;
	renderIndex=0;
	mostRecentIndex=0;
	
	if(Vrui::isMaster())
		{
		if(extractor->hasSeededCreator()&&extractor->hasIncrementalCreator())
			{
			/* Start the incremental extraction thread: */
			extractorThread.start(this,&Visualizer::DataLocator::incrementalExtractorThreadMethod);
			}
		else
			{
			/* Start the immediate extraction thread: */
			extractorThread.start(this,&Visualizer::DataLocator::immediateExtractorThreadMethod);
			}
		}
	else
		{
		/* Start the slave-side extraction thread: */
		extractorThread.start(this,&Visualizer::DataLocator::slaveExtractorThreadMethod);
		}
	}
예제 #8
0
파일: gameui.cpp 프로젝트: iainlane/mythtv
void GameUI::gameSearch(MythGenericTree *node,
                              bool automode)
{
    if (!node)
        node = m_gameUITree->GetCurrentNode();

    if (!node)
        return;

    RomInfo *metadata = qVariantValue<RomInfo *>(node->GetData());

    if (!metadata)
        return;

    MetadataLookup *lookup = new MetadataLookup();
    lookup->SetStep(kLookupSearch);
    lookup->SetType(kMetadataGame);
    lookup->SetData(qVariantFromValue(node));

    if (automode)
    {
        lookup->SetAutomatic(true);
    }

    lookup->SetTitle(metadata->Gamename());
    lookup->SetInetref(metadata->Inetref());
    if (m_query->isRunning())
        m_query->prependLookup(lookup);
    else
        m_query->addLookup(lookup);

    if (!automode)
    {
        //: %1 is the game name
        QString msg = tr("Fetching details for %1")
                           .arg(metadata->Gamename());
        createBusyDialog(msg);
    }
}