void MusicHotKeyManager::connectParentObject(QObject *object)
{
    for(int i=0; i<8; ++i)
    {
        m_hotkeys << (new QxtGlobalShortcut(object));
    }

    connect(m_hotkeys[0], SIGNAL(activated()), object, SLOT(musicStatePlay()));
    connect(m_hotkeys[1], SIGNAL(activated()), object, SLOT(musicPlayPrevious()));
    connect(m_hotkeys[2], SIGNAL(activated()), object, SLOT(musicPlayNext()));
    connect(m_hotkeys[3], SIGNAL(activated()), object, SLOT(musicActionVolumePlus()));
    connect(m_hotkeys[4], SIGNAL(activated()), object, SLOT(musicActionVolumeSub()));
    connect(m_hotkeys[5], SIGNAL(activated()), object, SLOT(musicSetting()));
    connect(m_hotkeys[6], SIGNAL(activated()), object, SLOT(musicImportSongs()));
    connect(m_hotkeys[7], SIGNAL(activated()), object, SLOT(musicVolumeMute()));

    setDefaultKey();
}
Esempio n. 2
0
const Key&
IdentityImpl::setDefaultKey(const uint8_t* key, size_t keyLen, const Name& keyName)
{
  addKey(key, keyLen, keyName);
  return setDefaultKey(keyName);
}
Esempio n. 3
0
Key&
Identity::setDefaultKey(const PublicKey& publicKey, const name::Component& keyId)
{
  const Key& keyEntry = addKey(publicKey, keyId);
  return setDefaultKey(keyEntry.getKeyId());
}