mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Library: add a shortcut to focus search line
The Ctrl+F shortcut gives focus to a search bar in many applications. In this case it allows to search the library without touching a mouse. YACReaderMacOSXSearchLineEdit::setFocus() will have to be implemented to make the shortcut work on macOS.
This commit is contained in:
@ -12,6 +12,7 @@ class YACReaderMacOSXSearchLineEdit : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
YACReaderMacOSXSearchLineEdit();
|
||||
void setFocus(Qt::FocusReason reason);
|
||||
void *getNSTextField();
|
||||
|
||||
public slots:
|
||||
|
@ -316,6 +316,12 @@ YACReaderMacOSXSearchLineEdit::YACReaderMacOSXSearchLineEdit()
|
||||
nstextfield = searchEdit;
|
||||
}
|
||||
|
||||
void YACReaderMacOSXSearchLineEdit::setFocus(Qt::FocusReason reason)
|
||||
{
|
||||
Q_UNUSED(reason)
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
void *YACReaderMacOSXSearchLineEdit::getNSTextField()
|
||||
{
|
||||
return nstextfield;
|
||||
|
Reference in New Issue
Block a user