swaymux/Keys/NextOutputKeyListener.h

33 lines
776 B
C
Raw Normal View History

//
// Created by grimmauld on 09.03.24.
//
#ifndef SWAYMUX_NEXTOUTPUTKEYLISTENER_H
#define SWAYMUX_NEXTOUTPUTKEYLISTENER_H
class NextOutputKeyListener : public JumpOutputKeyListener {
public:
explicit NextOutputKeyListener(SwayTreeModel *swayTreeModel, QTreeView *treeView) : JumpOutputKeyListener(
swayTreeModel, treeView) {};
const std::string getDescription() override {
return "Jump focus to output below";
}
const std::string getKeyText() override {
return "Page Down";
}
[[nodiscard]] bool canAcceptKey(int key) const override {
return key == Qt::Key_PageDown;
}
int getOffset(const SwayTreeNode *selected) const override {
return 1;
}
};
#endif //SWAYMUX_NEXTOUTPUTKEYLISTENER_H