Ejemplo n.º 1
0
void TestKHTML::openUrl()
{
    QLineEdit *edit = m_combo->lineEdit();
    if (!edit)
        return;

    QString url = edit->text();
    KUrl parsedUrl(url);
    m_part->openUrl(parsedUrl);
}
Ejemplo n.º 2
0
void GLImageHttpDrawable::setUrl(const QString& url)
{
	m_url = url;
	if(url.isEmpty())
		return;
		
	QUrl parsedUrl(url);
	//qDebug() << "GLImageHttpDrawable::setUrl: URL Sceme:"<<parsedUrl.scheme();
	if(parsedUrl.scheme() == "raw")
	{
		qDebug() << "GLImageHttpDrawable::setUrl: Connecting to RAW host: "<<parsedUrl;
		
		releaseVideoReceiver();
		
		m_rx = VideoReceiver::getReceiver(parsedUrl.host(), parsedUrl.port());
		if(m_rx)
		{
			m_rx->registerConsumer(this);
			connect(m_rx, SIGNAL(frameReady()), this, SLOT(videoRxFrameReady()));
		}
		
		qDebug() << "GLImageHttpDrawable::setUrl: Got receiver:"<<m_rx;
		emit videoReceiverChanged(m_rx);
		m_pollDvizTimer.stop();
		m_pollImageTimer.stop();
		
		// Pull in first frame if one is available
		videoRxFrameReady();
	}
	else
	//if(liveStatus())
	{
		releaseVideoReceiver();
		
		qDebug() << "GLImageHttpDrawable::setUrl: Connecting to HTTP host: "<<parsedUrl;
		if(m_pollDviz)
			initDvizPoll();
		else
			initImagePoll();
	}
}
Ejemplo n.º 3
0
void GLImageHttpDrawable::setPollDviz(bool flag)
{
	m_pollDviz = flag;
	
	if(!liveStatus())
	{
		// If not live, only do one poll
		if(flag)
			initDvizPoll();
		else
			initImagePoll();
	}
	else
	{
		QUrl parsedUrl(m_url);
		if(parsedUrl.scheme() == "raw")
		{
			//qDebug() << "GLImageHttpDrawable::setPollDviz: RAW host, stopping poll timers";
			m_pollDvizTimer.stop();
			m_pollImageTimer.stop();
			setUrl(m_url);
		}
		else
		if(flag)
		{
			//qDebug() << "GLImageHttpDrawable::setPollDviz: true flag, starting dviz, stopping image";
			m_pollDvizTimer.start();
			m_pollImageTimer.stop();
		}
		else
		{
			//qDebug() << "GLImageHttpDrawable::setPollDviz: false flag, stopping dviz, starting image";
			m_pollDvizTimer.stop();
			m_pollImageTimer.start();
		}
	}
}
Ejemplo n.º 4
0
void TestKHTML::openUrl(const QString &url)
{
    kDebug() << "url: " << url;
    KUrl parsedUrl(url);
    m_part->openUrl(parsedUrl);
}