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