[Backend] Add toggle stats.
This commit is contained in:
parent
c492c57f82
commit
d1606274cc
|
@ -163,7 +163,6 @@ MpvPlayerBackend::on_update(void* ctx)
|
|||
emit self->onUpdate();
|
||||
}
|
||||
|
||||
// connected to onUpdate(); signal makes sure it runs on the GUI thread
|
||||
void
|
||||
MpvPlayerBackend::doUpdate()
|
||||
{
|
||||
|
@ -322,6 +321,12 @@ MpvPlayerBackend::toggleOnTop()
|
|||
AlwaysOnTop(window()->winId(), onTop);
|
||||
}
|
||||
|
||||
void
|
||||
MpvPlayerBackend::toggleStats()
|
||||
{
|
||||
command(QVariantList() << "script-binding" << "stats/display-stats-toggle");
|
||||
}
|
||||
|
||||
void
|
||||
MpvPlayerBackend::addSpeed(const QVariant& speed)
|
||||
{
|
||||
|
|
|
@ -37,6 +37,7 @@ public slots:
|
|||
void prevPlaylistItem();
|
||||
void nextPlaylistItem();
|
||||
void toggleOnTop();
|
||||
void toggleStats();
|
||||
void updateDurationStringText();
|
||||
QVariant getTracks() const;
|
||||
void updatePrev(const QVariant& val);
|
||||
|
|
|
@ -665,8 +665,7 @@ ApplicationWindow {
|
|||
Action {
|
||||
text: translate.getTranslation("STATS", i18n.language)
|
||||
onTriggered: {
|
||||
player.command(
|
||||
["script-binding", "stats/display-stats-toggle"])
|
||||
player.toggleStats()
|
||||
}
|
||||
shortcut: keybinds.statsForNerds
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue