void LLEmbeddedBrowserWindow::navigateErrorPage( int http_status_code )
{
	LLEmbeddedBrowserWindowEvent event(getWindowId());
	event.setIntValue( http_status_code );

	d->mEventEmitter.update(&LLEmbeddedBrowserWindowObserver::onNavigateErrorPage, event);
}
void LLEmbeddedBrowserWindow::cookieChanged(const std::string &cookie, const std::string &url, bool dead)
{
	LLEmbeddedBrowserWindowEvent event(getWindowId());
	event.setEventUri(url);
	event.setStringValue(cookie);
	event.setIntValue((int)dead);

	d->mEventEmitter.update(&LLEmbeddedBrowserWindowObserver::onCookieChanged, event);
}
void LLEmbeddedBrowserWindow::cookieChanged(const std::string &cookie, const std::string &url, bool dead)
{
	LLEmbeddedBrowserWindowEvent llevent(
			getWindowId(),
			url,
			cookie,
			((int)dead));
	d->mEventEmitter.update(&LLEmbeddedBrowserWindowObserver::onCookieChanged, llevent);
}
Example #4
0
void LorrisProgrammer::showProgressDialog(const QString& text, QObject *sender)
{
    Q_ASSERT(!m_progress_dialog);

    m_progress_dialog = new ProgressDialog(sWorkTabMgr.getWindow(getWindowId())->winId(), text, this);
    m_progress_dialog->open();

    if(sender)
    {
        connect(sender, SIGNAL(updateProgressDialog(int)),    this, SLOT(updateProgressDialog(int)));
        connect(sender, SIGNAL(updateProgressLabel(QString)), this, SLOT(updateProgressLabel(QString)));
        connect(m_progress_dialog, SIGNAL(canceled()), sender, SLOT(cancelRequested()));
    }
}
std::string LLEmbeddedBrowserWindow::requestFilePicker()
{
	std::string filename_chosen;
	
	LLEmbeddedBrowserWindowEvent event(getWindowId());
	event.setEventUri(getCurrentUri());
	event.setStringValue("*.png;*.jpg");
		
	// If there's at least one observer registered, call it with the event.
	LLEmbeddedBrowserWindowPrivate::Emitter::iterator i = d->mEventEmitter.begin();
	if(i != d->mEventEmitter.end())
	{
		filename_chosen = (*i)->onRequestFilePicker(event);
	}
	
	return filename_chosen;
}
bool SelectiveWindowEventDispatcher::isForCurrentWindow(const SDL_Event& event) {
    auto current = window.lock();
    return current && event.window.windowID == current->getWindowId();
}