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:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <QShortcut>
|
||||
#include <QWidget>
|
||||
#include <boost/optional.hpp>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
@@ -40,11 +41,19 @@ protected:
|
||||
|
||||
virtual void scaleChangedEvent(float newScale);
|
||||
virtual void themeChangedEvent();
|
||||
[[deprecated("addShortcuts called without overriding it")]] virtual void
|
||||
addShortcuts()
|
||||
{
|
||||
}
|
||||
|
||||
void setScale(float value);
|
||||
|
||||
Theme *theme;
|
||||
|
||||
std::vector<QShortcut *> shortcuts_;
|
||||
void clearShortcuts();
|
||||
pajlada::Signals::SignalHolder signalHolder_;
|
||||
|
||||
private:
|
||||
float scale_{1.f};
|
||||
boost::optional<float> overrideScale_;
|
||||
@@ -52,8 +61,6 @@ private:
|
||||
|
||||
std::vector<BaseWidget *> widgets_;
|
||||
|
||||
pajlada::Signals::SignalHolder signalHolder_;
|
||||
|
||||
friend class BaseWindow;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user