/*! \brief Connect the panel to a text editor */ void QPanel::attach(QEditor *e) { if ( m_editor ) { disconnect( m_editor->document(), SIGNAL( formatsChanged() ), this, SLOT ( update() ) ); disconnect( m_editor->document(), SIGNAL( contentsChanged() ), this, SLOT ( update() ) ); disconnect( m_editor->verticalScrollBar(), SIGNAL( valueChanged(int) ), this, SLOT ( update() ) ); } editorChange(e); m_editor = e; setParent(e); if ( m_editor ) { connect(m_editor->document(), SIGNAL( formatsChanged() ), this, SLOT ( update() ) ); connect(m_editor->document(), SIGNAL( contentsChanged() ), this, SLOT ( update() ) ); connect(m_editor->verticalScrollBar(), SIGNAL( valueChanged(int) ), this, SLOT ( update() ) ); } }
void PlaybinSession::readySession() { d->playbin = gst_element_factory_make("playbin", NULL); if (d->playbin != 0) { // Pre-set video element, even if no video d->sinkWidget = new VideoWidget; connect( d->sinkWidget->videoSurface(), SIGNAL(formatsChanged()), this, SLOT(updateSinkFormat()) ); connect( d->sinkWidget->videoSurface(), SIGNAL(updateRequested()), this, SLOT(repaintLastFrame()) ); g_object_set(G_OBJECT(d->playbin), "video-sink", d->sinkWidget->element(), NULL); // Sort out messages d->bus = gst_element_get_bus(d->playbin); d->busHelper = new BusHelper(d->bus, this); connect(d->busHelper, SIGNAL(message(Message)), SLOT(busMessage(Message))); // Initial volume g_object_get(G_OBJECT(d->playbin), "volume", &d->volume, NULL); // URI for media g_object_set(G_OBJECT(d->playbin), "uri", d->url.toString().toLocal8Bit().constData(), NULL); } }