Library: allow configuring a shortcut to focus comics view

Focusing the current comics view allows to use keyboard arrow keys to
choose among the visible comics.

The shortcut for this new action should not be a single character
without modifiers because it won't work when the search line has focus.

The Qt::FocusReason parameter in ComicsView::focusComicsNavigation()
allows to reuse this function for other keyboard navigation features.
For instance the search line can transfer focus to comics navigation
when the user presses Return or Enter key. In this case
Qt::OtherFocusReason can be used (an application-specific reason).
This commit is contained in:
Igor Kushnir
2019-05-22 14:12:31 +03:00
parent 81e40dabec
commit 8a54100804
12 changed files with 40 additions and 0 deletions

View File

@ -34,6 +34,7 @@ public:
QSize sizeHint();
QByteArray getMimeDataFromSelection();
void updateCurrentComicView() override;
void focusComicsNavigation(Qt::FocusReason reason) override;
public slots:
//ComicsView