Skip to content
Permalink
Browse files

Merge PR #2419: MainWindow, CustomElements: implement proper Backtab/…

…Shift-Tab behavior for MainWindow::qteChat.
  • Loading branch information...
mkrautz committed Jul 16, 2016
2 parents 10abf36 + 90d9cec commit be4ae5b269f00f0e4081a0aedc8e06493e31fecb
Showing with 12 additions and 0 deletions.
  1. +3 −0 src/mumble/CustomElements.cpp
  2. +1 −0 src/mumble/CustomElements.h
  3. +7 −0 src/mumble/MainWindow.cpp
  4. +1 −0 src/mumble/MainWindow.h
@@ -163,6 +163,9 @@ bool ChatbarTextEdit::event(QEvent *evt) {
if (kev->key() == Qt::Key_Tab) {
emit tabPressed();
return true;
} else if (kev->key() == Qt::Key_Backtab) {
emit backtabPressed();
return true;
} else if (kev->key() == Qt::Key_Space && kev->modifiers() == Qt::ControlModifier) {
emit ctrlSpacePressed();
return true;
@@ -59,6 +59,7 @@ class ChatbarTextEdit : public QTextEdit {
unsigned int completeAtCursor();
signals:
void tabPressed(void);
void backtabPressed(void);
void ctrlSpacePressed(void);
void entered(QString);
public slots:
@@ -1823,6 +1823,13 @@ void MainWindow::on_qteChat_tabPressed() {
qteChat->completeAtCursor();
}

/// Handles Backtab/Shift-Tab for qteChat, which allows
/// users to move focus to the previous widget in
/// MainWindow.
void MainWindow::on_qteChat_backtabPressed() {
focusPreviousChild();
}

/**
* Controlls ctrl space username completion and selection for the chatbar.
* @see ChatbarLineEdit::completeAtCursor()
@@ -240,6 +240,7 @@ class MainWindow : public QMainWindow, public MessageHandler, public Ui::MainWin
void on_qaHelpVersionCheck_triggered();
void on_qaQuit_triggered();
void on_qteChat_tabPressed();
void on_qteChat_backtabPressed();
void on_qteChat_ctrlSpacePressed();
void on_qtvUsers_customContextMenuRequested(const QPoint &mpos);
void on_qteLog_customContextMenuRequested(const QPoint &pos);

0 comments on commit be4ae5b

Please sign in to comment.
You can’t perform that action at this time.