Add shortcut key for ShowHiddenFiles
This commit is contained in:
parent
d091f6f9a2
commit
08e58c66b6
4 changed files with 9 additions and 0 deletions
|
@ -68,6 +68,8 @@ bool ShortCut::eventFilter(QObject *obj, QEvent *e)
|
|||
emit deleteFile();
|
||||
} else if (keyEvent->key() == Qt::Key_F5) {
|
||||
emit refresh();
|
||||
} else if (keyEvent->key() == Qt::Key_H && keyEvent->modifiers() & Qt::ControlModifier) {
|
||||
emit showHidden();
|
||||
} else if (keyEvent->key() >= Qt::Key_A && keyEvent->key() <= Qt::Key_Z) {
|
||||
// Handle select
|
||||
// KeyboardSearchManager::self()->addKeys(keyEvent->text());
|
||||
|
|
|
@ -44,6 +44,7 @@ signals:
|
|||
void selectAll();
|
||||
void backspace();
|
||||
void deleteFile();
|
||||
void showHidden();
|
||||
void keyPressed(const QString &text);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -137,6 +137,9 @@ Item {
|
|||
onKeyPressed: {
|
||||
dirModel.keyboardSearch(text)
|
||||
}
|
||||
onShowHidden: {
|
||||
dirModel.showHiddenFiles = !dirModel.showHiddenFiles
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
|
|
|
@ -397,6 +397,9 @@ Item {
|
|||
onKeyPressed: {
|
||||
dirModel.keyboardSearch(text)
|
||||
}
|
||||
onShowHidden: {
|
||||
dirModel.showHiddenFiles = !dirModel.showHiddenFiles
|
||||
}
|
||||
}
|
||||
|
||||
function openUrl(url) {
|
||||
|
|
Loading…
Reference in a new issue