KnotsPlayer::KnotsPlayer( QObject *parent ) : QObject( parent ) , _status( Stopped ) , _tickPeriod( KOneSecond ) , _tickCount( 0 ) , _properties( 0 ) { _properties = new KnotsPlayerProperties; _propertiesUpdateTimer = new QTimer(); _backlightTimer = new QTimer(); Knots::instance().setPlayer( this ); _propertiesUpdateTimer->setSingleShot(false); connect(_propertiesUpdateTimer, SIGNAL(timeout()), this, SLOT( updateTimeout())); connect(_backlightTimer, SIGNAL(timeout()), this, SLOT(onBacklightTimer())); connect( _properties, SIGNAL(propertiesUpdated()), this, SLOT(networkPropertiesUpdated())); connect( &Knots::instance().serverConnection(), SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*))); connect( this, SIGNAL(stateChanged(KnotsPlayer::PlayingState)), Knots::instance().mainWindow(), SLOT(onPlayerStateChange(KnotsPlayer::PlayingState))); #if defined(Q_WS_MAEMO_5) _ossoContext = osso_initialize("QtKnots","1.0",true, 0); #endif }
void QDBusPlatformMenu::syncMenuItem(QPlatformMenuItem *menuItem) { QDBusPlatformMenuItem *item = static_cast<QDBusPlatformMenuItem *>(menuItem); // if a submenu was added to this item, we need to connect to its signals if (item->menu()) syncSubMenu(static_cast<const QDBusPlatformMenu *>(item->menu())); // TODO keep around copies of the QDBusMenuLayoutItems so they can be updated? // or eliminate them by putting dbus streaming operators in this class instead? // or somehow tell the dbusmenu client that something has changed, so it will ask for properties again QDBusMenuItemList updated; QDBusMenuItemKeysList removed; updated << QDBusMenuItem(item); qCDebug(qLcMenu) << updated; emit propertiesUpdated(updated, removed); }