trayicon: click action handler

This commit is contained in:
mappu 2018-10-02 20:11:38 +13:00
parent b9a2e8cde3
commit 4b97762631

View File

@ -118,6 +118,11 @@ void TrayIcon::onGotPulseCardInfo(const pa_card_info& cardInfo, int eol)
}
profileAction->setData(cardInfo.profiles[i].name);
int cardIndex = cardInfo.index;
connect(profileAction, &QAction::triggered, [=]() {
this->pulse.SetCardProfile(cardIndex, profileAction->data().toString().toUtf8().data());
});
cardMenu->addAction(profileAction);
}