mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
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:
parent
7285f24a29
commit
63b4f9b2f0
25 changed files with 235 additions and 107 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "tab_deck_editor.h"
|
||||
|
||||
#include "abstractclient.h"
|
||||
#include "carddatabasemodel.h"
|
||||
#include "cardframe.h"
|
||||
|
|
@ -16,6 +17,7 @@
|
|||
#include "settingscache.h"
|
||||
#include "tab_supervisor.h"
|
||||
#include "tappedout_interface.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
|
|
@ -28,6 +30,7 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <QHeaderView>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QMenu>
|
||||
#include <QMenuBar>
|
||||
#include <QMessageBox>
|
||||
|
|
@ -50,7 +53,7 @@ void SearchLineEdit::keyPressEvent(QKeyEvent *event)
|
|||
{
|
||||
if (treeView && ((event->key() == Qt::Key_Up) || (event->key() == Qt::Key_Down)))
|
||||
QCoreApplication::sendEvent(treeView, event);
|
||||
QLineEdit::keyPressEvent(event);
|
||||
LineEditUnfocusable::keyPressEvent(event);
|
||||
}
|
||||
|
||||
void TabDeckEditor::createDeckDock()
|
||||
|
|
@ -79,7 +82,7 @@ void TabDeckEditor::createDeckDock()
|
|||
|
||||
nameLabel = new QLabel();
|
||||
nameLabel->setObjectName("nameLabel");
|
||||
nameEdit = new QLineEdit;
|
||||
nameEdit = new LineEditUnfocusable;
|
||||
nameEdit->setObjectName("nameEdit");
|
||||
nameLabel->setBuddy(nameEdit);
|
||||
connect(nameEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateName(const QString &)));
|
||||
|
|
@ -121,7 +124,7 @@ void TabDeckEditor::createDeckDock()
|
|||
auto *hashSizePolicy = new QSizePolicy();
|
||||
hashSizePolicy->setHorizontalPolicy(QSizePolicy::Fixed);
|
||||
hashLabel1->setSizePolicy(*hashSizePolicy);
|
||||
hashLabel = new QLineEdit;
|
||||
hashLabel = new LineEditUnfocusable;
|
||||
hashLabel->setObjectName("hashLabel");
|
||||
hashLabel->setReadOnly(true);
|
||||
hashLabel->setFrame(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue