mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 13:24:05 +00:00
6.2: currentIndexChanged signal is changed.
This commit is contained in:
parent
7b5511a7bd
commit
23d833fbb8
|
@ -677,11 +677,11 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
||||||
connect( ui.showReference, SIGNAL( triggered() ),
|
connect( ui.showReference, SIGNAL( triggered() ),
|
||||||
this, SLOT( showGDHelp() ) );
|
this, SLOT( showGDHelp() ) );
|
||||||
|
|
||||||
connect( groupListInDock, SIGNAL( currentIndexChanged( QString const & ) ),
|
connect( groupListInDock, &GroupComboBox::currentIndexChanged,
|
||||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
this, &MainWindow::currentGroupChanged );
|
||||||
|
|
||||||
connect( groupListInToolbar, SIGNAL( currentIndexChanged( QString const & ) ),
|
connect( groupListInToolbar, &GroupComboBox::currentIndexChanged,
|
||||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
this, &MainWindow::currentGroupChanged );
|
||||||
|
|
||||||
connect( ui.translateLine, SIGNAL( textChanged( QString const & ) ),
|
connect( ui.translateLine, SIGNAL( textChanged( QString const & ) ),
|
||||||
this, SLOT( translateInputChanged( QString const & ) ) );
|
this, SLOT( translateInputChanged( QString const & ) ) );
|
||||||
|
@ -1391,8 +1391,8 @@ void MainWindow::updateGroupList()
|
||||||
|
|
||||||
// currentIndexChanged() signal is very trigger-happy. To avoid triggering
|
// currentIndexChanged() signal is very trigger-happy. To avoid triggering
|
||||||
// it, we disconnect it while we're clearing and filling back groups.
|
// it, we disconnect it while we're clearing and filling back groups.
|
||||||
disconnect( groupList, SIGNAL( currentIndexChanged( QString const & ) ),
|
disconnect( groupList, &GroupComboBox::currentIndexChanged,
|
||||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
this, &MainWindow::currentGroupChanged );
|
||||||
|
|
||||||
groupInstances.clear();
|
groupInstances.clear();
|
||||||
|
|
||||||
|
@ -1437,8 +1437,8 @@ void MainWindow::updateGroupList()
|
||||||
view.reload();
|
view.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
connect( groupList, SIGNAL( currentIndexChanged( QString const & ) ),
|
connect( groupList, &GroupComboBox::currentIndexChanged,
|
||||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
this, &MainWindow::currentGroupChanged );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateDictionaryBar()
|
void MainWindow::updateDictionaryBar()
|
||||||
|
@ -2255,7 +2255,7 @@ void MainWindow::editPreferences()
|
||||||
ftsIndexing.doIndexing();
|
ftsIndexing.doIndexing();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::currentGroupChanged( QString const & )
|
void MainWindow::currentGroupChanged( int )
|
||||||
{
|
{
|
||||||
cfg.lastMainGroupId = groupList->getCurrentGroup();
|
cfg.lastMainGroupId = groupList->getCurrentGroup();
|
||||||
Instances::Group const * igrp = groupInstances.findGroup( cfg.lastMainGroupId );
|
Instances::Group const * igrp = groupInstances.findGroup( cfg.lastMainGroupId );
|
||||||
|
@ -3740,8 +3740,8 @@ void MainWindow::applyWordsZoomLevel()
|
||||||
|
|
||||||
if ( groupList->font().pointSize() != ps )
|
if ( groupList->font().pointSize() != ps )
|
||||||
{
|
{
|
||||||
disconnect( groupList, SIGNAL( currentIndexChanged( QString const & ) ),
|
disconnect( groupList, &GroupComboBox::currentIndexChanged,
|
||||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
this, &MainWindow::currentGroupChanged );
|
||||||
int n = groupList->currentIndex();
|
int n = groupList->currentIndex();
|
||||||
groupList->clear();
|
groupList->clear();
|
||||||
groupList->setFont( font );
|
groupList->setFont( font );
|
||||||
|
|
|
@ -377,7 +377,7 @@ private slots:
|
||||||
void editCurrentGroup();
|
void editCurrentGroup();
|
||||||
void editPreferences();
|
void editPreferences();
|
||||||
|
|
||||||
void currentGroupChanged( QString const & );
|
void currentGroupChanged( int );
|
||||||
void translateInputChanged( QString const & );
|
void translateInputChanged( QString const & );
|
||||||
void translateInputFinished( bool checkModifiers = true );
|
void translateInputFinished( bool checkModifiers = true );
|
||||||
|
|
||||||
|
|
|
@ -254,8 +254,8 @@ ScanPopup::ScanPopup( QWidget * parent,
|
||||||
connect( &switchExpandModeAction, SIGNAL( triggered() ),
|
connect( &switchExpandModeAction, SIGNAL( triggered() ),
|
||||||
this, SLOT(switchExpandOptionalPartsMode() ) );
|
this, SLOT(switchExpandOptionalPartsMode() ) );
|
||||||
|
|
||||||
connect( ui.groupList, SIGNAL( currentIndexChanged( QString const & ) ),
|
connect( ui.groupList, &QComboBox::currentIndexChanged,
|
||||||
this, SLOT( currentGroupChanged( QString const & ) ) );
|
this, &ScanPopup::currentGroupChanged);
|
||||||
|
|
||||||
connect( &wordFinder, SIGNAL( finished() ),
|
connect( &wordFinder, SIGNAL( finished() ),
|
||||||
this, SLOT( prefixMatchFinished() ) );
|
this, SLOT( prefixMatchFinished() ) );
|
||||||
|
@ -717,8 +717,7 @@ QString ScanPopup::elideInputWord()
|
||||||
QString const & inputWord = inputPhrase.phrase;
|
QString const & inputWord = inputPhrase.phrase;
|
||||||
return inputWord.size() > 32 ? inputWord.mid( 0, 32 ) + "..." : inputWord;
|
return inputWord.size() > 32 ? inputWord.mid( 0, 32 ) + "..." : inputWord;
|
||||||
}
|
}
|
||||||
|
void ScanPopup::currentGroupChanged( int )
|
||||||
void ScanPopup::currentGroupChanged( QString const & )
|
|
||||||
{
|
{
|
||||||
cfg.lastPopupGroupId = ui.groupList->getCurrentGroup();
|
cfg.lastPopupGroupId = ui.groupList->getCurrentGroup();
|
||||||
Instances::Group const * igrp = groups.findGroup( cfg.lastPopupGroupId );
|
Instances::Group const * igrp = groups.findGroup( cfg.lastPopupGroupId );
|
||||||
|
|
|
@ -194,7 +194,7 @@ private:
|
||||||
private slots:
|
private slots:
|
||||||
void clipboardChanged( QClipboard::Mode );
|
void clipboardChanged( QClipboard::Mode );
|
||||||
void mouseHovered( QString const & , bool forcePopup);
|
void mouseHovered( QString const & , bool forcePopup);
|
||||||
void currentGroupChanged( QString const & );
|
void currentGroupChanged( int );
|
||||||
void prefixMatchFinished();
|
void prefixMatchFinished();
|
||||||
void on_pronounceButton_clicked();
|
void on_pronounceButton_clicked();
|
||||||
void pinButtonClicked( bool checked );
|
void pinButtonClicked( bool checked );
|
||||||
|
|
Loading…
Reference in a new issue