mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 08:34:08 +00:00
Merge pull request #1017 from vedgy/add-scan-popup-article-view-focus-shortcut
Add a shortcut to focus scan popup's article view
This commit is contained in:
commit
61ee894ff7
|
@ -136,12 +136,12 @@ public slots:
|
|||
/// Goes forward in history
|
||||
void forward();
|
||||
|
||||
public:
|
||||
|
||||
/// Takes the focus to the view
|
||||
void focus()
|
||||
{ ui.definition->setFocus( Qt::ShortcutFocusReason ); }
|
||||
|
||||
public:
|
||||
|
||||
/// Reloads the view
|
||||
void reload()
|
||||
{ ui.definition->reload(); }
|
||||
|
|
|
@ -229,6 +229,11 @@ ScanPopup::ScanPopup( QWidget * parent,
|
|||
connect( &focusTranslateLineAction, SIGNAL( triggered() ),
|
||||
this, SLOT( focusTranslateLine() ) );
|
||||
|
||||
QAction * const focusArticleViewAction = new QAction( this );
|
||||
focusArticleViewAction->setShortcutContext( Qt::WidgetWithChildrenShortcut );
|
||||
focusArticleViewAction->setShortcut( QKeySequence( "Ctrl+N" ) );
|
||||
addAction( focusArticleViewAction );
|
||||
connect( focusArticleViewAction, SIGNAL( triggered() ), definition, SLOT( focus() ) );
|
||||
|
||||
switchExpandModeAction.setShortcuts( QList< QKeySequence >() <<
|
||||
QKeySequence( Qt::CTRL + Qt::Key_8 ) <<
|
||||
|
|
Loading…
Reference in a new issue