void ObjectPropertiesView::watchCreated(QDeclarativeDebugWatch *watch)
{

    if (watch->objectDebugId() == m_object.debugId()
            && qobject_cast<QDeclarativeDebugPropertyWatch*>(watch)) {
        connect(watch, SIGNAL(stateChanged(QDeclarativeDebugWatch::State)), SLOT(watchStateChanged()));
        setWatched(qobject_cast<QDeclarativeDebugPropertyWatch*>(watch)->name(), true);
    }
}
void ObjectPropertiesView::watchStateChanged()
{
    QDeclarativeDebugWatch *watch = qobject_cast<QDeclarativeDebugWatch*>(sender());

    if (watch->objectDebugId() == m_object.debugId()
            && qobject_cast<QDeclarativeDebugPropertyWatch*>(watch)
            && watch->state() == QDeclarativeDebugWatch::Inactive) {
        setWatched(qobject_cast<QDeclarativeDebugPropertyWatch*>(watch)->name(), false);
    }
}
Beispiel #3
0
	FileWatcher::FileWatcher (DocumentTab *tab)
	: QObject (tab)
	, Tab_ (tab)
	, IsScheduled_ (false)
	{
		connect (tab,
				SIGNAL (fileLoaded (QString)),
				this,
				SLOT (setWatched (QString)));

		connect (&Watcher_,
				SIGNAL (fileChanged (QString)),
				this,
				SLOT (handleFileChanged (QString)));
	}