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();
|
emit deleteFile();
|
||||||
} else if (keyEvent->key() == Qt::Key_F5) {
|
} else if (keyEvent->key() == Qt::Key_F5) {
|
||||||
emit refresh();
|
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) {
|
} else if (keyEvent->key() >= Qt::Key_A && keyEvent->key() <= Qt::Key_Z) {
|
||||||
// Handle select
|
// Handle select
|
||||||
// KeyboardSearchManager::self()->addKeys(keyEvent->text());
|
// KeyboardSearchManager::self()->addKeys(keyEvent->text());
|
||||||
|
|
|
@ -44,6 +44,7 @@ signals:
|
||||||
void selectAll();
|
void selectAll();
|
||||||
void backspace();
|
void backspace();
|
||||||
void deleteFile();
|
void deleteFile();
|
||||||
|
void showHidden();
|
||||||
void keyPressed(const QString &text);
|
void keyPressed(const QString &text);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -137,6 +137,9 @@ Item {
|
||||||
onKeyPressed: {
|
onKeyPressed: {
|
||||||
dirModel.keyboardSearch(text)
|
dirModel.keyboardSearch(text)
|
||||||
}
|
}
|
||||||
|
onShowHidden: {
|
||||||
|
dirModel.showHiddenFiles = !dirModel.showHiddenFiles
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
|
|
@ -397,6 +397,9 @@ Item {
|
||||||
onKeyPressed: {
|
onKeyPressed: {
|
||||||
dirModel.keyboardSearch(text)
|
dirModel.keyboardSearch(text)
|
||||||
}
|
}
|
||||||
|
onShowHidden: {
|
||||||
|
dirModel.showHiddenFiles = !dirModel.showHiddenFiles
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openUrl(url) {
|
function openUrl(url) {
|
||||||
|
|
Loading…
Reference in a new issue