Add keyboard shorcuts to focus and unfocus chat (#3898)

* Added keyboard shorcuts to focus and unfocus chat

* Fixed format

* Changed the Esc behavior to work on any QLineEdit in the main Window and ignore shortcut conflicts

* Fixed a conflict with shortcuts

* Configurable unfocus shortcut and format fixes

* minor style fix
This commit is contained in:
Xenos6666 2020-03-17 02:48:05 +01:00 committed by GitHub
parent 7285f24a29
commit 63b4f9b2f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 235 additions and 107 deletions

View file

@ -1,13 +1,13 @@
#ifndef WINDOW_DECKEDITOR_H
#define WINDOW_DECKEDITOR_H
#include "carddatabase.h"
#include "customlineedit.h"
#include "keysignals.h"
#include "tab.h"
#include <QAbstractItemModel>
#include <QDir>
#include <QLineEdit>
#include "carddatabase.h"
class CardDatabaseModel;
class CardDatabaseDisplayModel;
@ -27,7 +27,7 @@ class QVBoxLayout;
class QPushButton;
class QDockWidget;
class SearchLineEdit : public QLineEdit
class SearchLineEdit : public LineEditUnfocusable
{
private:
QTreeView *treeView;
@ -36,7 +36,7 @@ protected:
void keyPressEvent(QKeyEvent *event) override;
public:
SearchLineEdit() : QLineEdit(), treeView(nullptr)
SearchLineEdit() : LineEditUnfocusable(), treeView(nullptr)
{
}
void setTreeView(QTreeView *_treeView)
@ -117,11 +117,11 @@ private:
KeySignals searchKeySignals;
QLabel *nameLabel;
QLineEdit *nameEdit;
LineEditUnfocusable *nameEdit;
QLabel *commentsLabel;
QTextEdit *commentsEdit;
QLabel *hashLabel1;
QLineEdit *hashLabel;
LineEditUnfocusable *hashLabel;
FilterTreeModel *filterModel;
QTreeView *filterView;
KeySignals filterViewKeySignals;