缩略图增加删除快捷键功能
This commit is contained in:
parent
a3abedfaa3
commit
e969ef3073
|
@ -2965,7 +2965,7 @@ void HGImgThumb::keyPressEvent(QKeyEvent *e)
|
|||
if (e->key() != Qt::Key_Left && e->key() != Qt::Key_Right
|
||||
&& e->key() != Qt::Key_Up && e->key() != Qt::Key_Down
|
||||
&& e->key() != Qt::Key_Home && e->key() != Qt::Key_End
|
||||
&& e->key() != Qt::Key_A)
|
||||
&& e->key() != Qt::Key_A && e->key() != Qt::Key_Delete)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -3365,6 +3365,10 @@ void HGImgThumb::keyPressEvent(QKeyEvent *e)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (e->key() == Qt::Key_Delete)
|
||||
{
|
||||
emit keyDeleteDown();
|
||||
}
|
||||
|
||||
if (-1 != m_curItemIndex)
|
||||
{
|
||||
|
|
|
@ -78,6 +78,7 @@ public:
|
|||
void notify_mouse_leave(void);
|
||||
|
||||
signals:
|
||||
void keyDeleteDown();
|
||||
void currItemChanged(int index);
|
||||
void itemDoubleClicked(int index);
|
||||
void itemCountChanged(int count);
|
||||
|
|
|
@ -234,6 +234,7 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent)
|
|||
connect(m_view, SIGNAL(mousePos(int, int)), this, SLOT(on_viewerMousePos(int, int)));
|
||||
connect(m_view, SIGNAL(drop(const QObject*, const QStringList &)), this, SLOT(on_viewerDrop(const QObject*, const QStringList &)));
|
||||
connect(m_view, SIGNAL(doubleClicked()), this, SLOT(on_viewerDblClick()));
|
||||
connect(m_thumb, SIGNAL(keyDeleteDown()), this, SLOT(on_keyDeleteDown()));
|
||||
connect(m_thumb, SIGNAL(itemCountChanged(int)), this, SLOT(on_itemCountChanged(int)));
|
||||
connect(m_thumb, SIGNAL(itemSelectingChanged()), this, SLOT(on_itemSelectingChanged()));
|
||||
connect(m_thumb, SIGNAL(currItemChanged(int)), this, SLOT(on_currItemChanged(int)));
|
||||
|
@ -682,6 +683,11 @@ void MainWindow::on_m_acquireIntoCfg_changed(QString schemeName)
|
|||
dlg.setConfig(selectedCfgName);
|
||||
}
|
||||
|
||||
void MainWindow::on_keyDeleteDown()
|
||||
{
|
||||
on_act_deleteFile_triggered();
|
||||
}
|
||||
|
||||
void MainWindow::on_itemCountChanged(int count)
|
||||
{
|
||||
m_wndStatusBar->setPageInfo(count, m_currIndex);
|
||||
|
|
|
@ -100,6 +100,7 @@ private slots:
|
|||
void on_AcquireInto2();
|
||||
void on_reloadAcquireIntoCfg();
|
||||
void on_m_acquireIntoCfg_changed(QString schemeName);
|
||||
void on_keyDeleteDown();
|
||||
void on_itemCountChanged(int count);
|
||||
void on_itemSelectingChanged();
|
||||
void on_currItemChanged(int index);
|
||||
|
|
Loading…
Reference in New Issue