Add custom hotkeys. (#2340)
Co-authored-by: LosFarmosCTL <80157503+LosFarmosCTL@users.noreply.github.com> Co-authored-by: Paweł <zneix@zneix.eu> Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com> Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "BaseSettings.hpp"
|
||||
#include "BaseTheme.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "controllers/hotkeys/HotkeyController.hpp"
|
||||
#include "widgets/BaseWindow.hpp"
|
||||
|
||||
#include <QChildEvent>
|
||||
@@ -25,6 +27,16 @@ BaseWidget::BaseWidget(QWidget *parent, Qt::WindowFlags f)
|
||||
this->update();
|
||||
});
|
||||
}
|
||||
void BaseWidget::clearShortcuts()
|
||||
{
|
||||
for (auto shortcut : this->shortcuts_)
|
||||
{
|
||||
shortcut->setKey(QKeySequence());
|
||||
shortcut->removeEventFilter(this);
|
||||
shortcut->deleteLater();
|
||||
}
|
||||
this->shortcuts_.clear();
|
||||
}
|
||||
|
||||
float BaseWidget::scale() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user