AppletInterface::AppletInterface(AbstractJsAppletScript *parent) : QObject(parent), m_appletScriptEngine(parent), m_actionSignals(0) { connect(this, SIGNAL(releaseVisualFocus()), applet(), SIGNAL(releaseVisualFocus())); connect(this, SIGNAL(configNeedsSaving()), applet(), SIGNAL(configNeedsSaving())); connect(applet(), SIGNAL(immutabilityChanged(Plasma::ImmutabilityType)), this, SIGNAL(immutableChanged())); connect(applet(), SIGNAL(newStatus(Plasma::ItemStatus)), this, SIGNAL(statusChanged())); connect(m_appletScriptEngine, SIGNAL(formFactorChanged()), this, SIGNAL(formFactorChanged())); connect(m_appletScriptEngine, SIGNAL(locationChanged()), this, SIGNAL(locationChanged())); connect(m_appletScriptEngine, SIGNAL(contextChanged()), this, SIGNAL(contextChanged())); }
void HsQMLContextControl::doWindowChanged(QQuickWindow* win) { if (mWindow) { QObject::disconnect(mWindow, 0, this, 0); } mWindow = win; if (mWindow) { QObject::connect( mWindow, SIGNAL(sceneGraphInitialized()), this, SLOT(doSceneGraphInit())); mOriginal = mWindow->requestedFormat(); mCurrent = mWindow->openglContext() ? mWindow->openglContext()->format() : mWindow->format(); } else { mOriginal = QSurfaceFormat(); mCurrent = QSurfaceFormat(); } contextChanged(); if ((mMajorVersion >=0) || (mMinorVersion >= 0) || (mContextType != TypeUnset) || (mContextProfile != ProfileUnset) || !mDeprecatedFunctionsSet) { controlContext(); } }
void QQmlAndroidContextual::setContext(QQmlAndroidContext *context) { if (m_context != context) { m_context = context; propagateContext(); emit contextChanged(); } }
void QQuickShortcut::setContext(Qt::ShortcutContext context) { if (context == m_context) return; grabShortcut(m_shortcut, context); m_context = context; emit contextChanged(); }
void DeclarativeAppletScript::constraintsEvent(Plasma::Types::Constraints constraints) { if (constraints & Plasma::Types::FormFactorConstraint) { emit formFactorChanged(); } if (constraints & Plasma::Types::LocationConstraint) { emit locationChanged(); } if (constraints & Plasma::Types::ContextConstraint) { emit contextChanged(); } }
PIRIntervalometerForm::PIRIntervalometerForm( MainWindow *mw) : QWidget(0), ui(new Ui::PIRIntervalometerForm), intervalTimer(0), mainWindow(mw) { ui->setupUi(this); connect( mainWindow, SIGNAL(contextChanged()), this, SLOT(on_quitPushButton_clicked())); }
/*! Constructs the collection data model. */ MpCollectionDataModel::MpCollectionDataModel( MpMpxCollectionData *data, MpPlaybackData *playbackData, QObject *parent ) : QAbstractListModel(parent), mCollectionData(data), mPlaybackData(playbackData), mRowCount(0), mAlbumIndexOffset(0), mHiddenItemIndex(-1), mCollectionLayout(ECollectionListView) { TX_ENTRY connect( mCollectionData, SIGNAL(contextChanged(TCollectionContext)), this, SLOT(setContext(TCollectionContext)) ); connect( mCollectionData, SIGNAL(dataChanged()), this, SLOT(reloadData()) ); connect( mCollectionData, SIGNAL(dataChanged(int, int)), this, SLOT(reloadData(int, int)) ); mAlbumArtManager = new MpCollectionAlbumArtManager(mCollectionData); connect( mAlbumArtManager, SIGNAL(albumArtReady(int)), this, SLOT(updateAlbumArt(int)) ); if ( mPlaybackData ) { connect( mPlaybackData, SIGNAL(fileCorrupted(int)), this, SLOT(fileCorrupted(int)) ); } TX_EXIT }
/*! Initializes the collection view. Allocates all resources needed by the view. */ void MpCollectionView::initializeView() { TX_ENTRY mWindow = mainWindow(); // Create softkey actions mSoftKeyQuit = new HbAction( Hb::QuitNaviAction, this ); connect( mSoftKeyQuit, SIGNAL( triggered() ), this, SLOT( back() ) ); mSoftKeyBack = new HbAction( Hb::BackNaviAction, this ); connect( mSoftKeyBack, SIGNAL( triggered() ), this, SLOT( back() ) ); mMpEngine = MpEngineFactory::sharedEngine(); connect( mMpEngine, SIGNAL( collectionPlaylistOpened() ), this, SLOT( startPlaybackView() ) ); connect( mMpEngine, SIGNAL( playlistSaved( bool ) ), this, SLOT( playlistSaved( bool ) ) ); connect( mMpEngine, SIGNAL( songsDeleted( bool ) ), this, SLOT( songsDeleted( bool ) ) ); connect( mMpEngine, SIGNAL( playlistsRenamed( bool ) ), this, SLOT( playlistsRenamed( bool ) ) ); connect( mMpEngine, SIGNAL( isolatedCollectionOpened( MpMpxCollectionData* ) ), this, SLOT( handleIsolatedCollectionOpened( MpMpxCollectionData* ) ) ); mCollectionData = mMpEngine->collectionData(); qRegisterMetaType<TCollectionContext>("TCollectionContext"); connect( mCollectionData, SIGNAL( contextChanged( TCollectionContext ) ), this, SLOT( setContext( TCollectionContext ) ), Qt::QueuedConnection ); mCollectionDataModel = new MpCollectionDataModel( mCollectionData , mMpEngine->playbackData()); connect( mCollectionDataModel, SIGNAL( dataReloaded() ), this, SLOT( containerDataChanged() ) ); mDocumentLoader = new MpCollectionDocumentLoader(); bool ok = false; mDocumentLoader->load( MUSIC_COLLECTION_DOCML, &ok ); if ( ok ) { QGraphicsWidget *widget; widget = mDocumentLoader->findWidget( QString( "nowPlaying" ) ); mNowPlayingBanner = qobject_cast<MpNowPlayingWidget*>( widget ); if ( mViewMode == MpCommon::FetchView ) { // Banner is not needed since playback is stopped when returning // from playback preview. Disable the banner from updating. mNowPlayingBanner->setEnabled( false ); attachNowPlayingBanner( false ); } else { connect( mNowPlayingBanner, SIGNAL( clicked() ), this, SLOT( startPlaybackView() ) ); connect( mNowPlayingBanner, SIGNAL( playbackAttachmentChanged( bool ) ), this, SLOT( attachNowPlayingBanner( bool ) ) ); attachNowPlayingBanner( mNowPlayingBanner->isBannerAttached() ); } widget = mDocumentLoader->findWidget( QString( "mainContainer" ) ); mMainContainer = qobject_cast<HbWidget*>( widget ); setWidget( mMainContainer ); HbEffect::add( QStringList() << CONTAINER_EFFECT_GROUP << CONTAINER_EFFECT_GROUP << CONTAINER_EFFECT_GROUP << CONTAINER_EFFECT_GROUP, QStringList() << SHOW_EFFECT_RESOURCE_NAME << HIDE_EFFECT_RESOURCE_NAME << SHOW_BACK_EFFECT_RESOURCE_NAME << HIDE_BACK_EFFECT_RESOURCE_NAME, QStringList() << SHOW_EFFECT << HIDE_EFFECT << SHOW_BACK_EFFECT << HIDE_BACK_EFFECT); } else {
void HsQMLContextControl::doSceneGraphInit() { mCurrent = mWindow->openglContext()->format(); contextChanged(); }