forked from mumble-voip/mumble
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX(a11y): Make plugin config accessible
- Loading branch information
Showing
6 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2024 The Mumble Developers. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license | ||
// that can be found in the LICENSE file at the root of the | ||
// Mumble source tree or at <https://www.mumble.info/LICENSE>. | ||
|
||
#include "MultiColumnTreeWidget.h" | ||
|
||
#include <algorithm> | ||
|
||
#include <QDebug> | ||
|
||
MultiColumnTreeWidget::MultiColumnTreeWidget(QWidget *parent) : QTreeWidget(parent) { | ||
} | ||
|
||
QModelIndex MultiColumnTreeWidget::moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) { | ||
QModelIndex mi = QTreeWidget::moveCursor(cursorAction, modifiers); | ||
|
||
if (cursorAction == QAbstractItemView::MoveLeft) { | ||
mi = model()->index(mi.row(), std::max(0, mi.column() - 1)); | ||
} | ||
|
||
if (cursorAction == QAbstractItemView::MoveRight) { | ||
mi = model()->index(mi.row(), std::min(model()->columnCount() - 1, mi.column() + 1)); | ||
} | ||
|
||
if (cursorAction == QAbstractItemView::MoveUp || cursorAction == QAbstractItemView::MoveDown) { | ||
mi = model()->index(mi.row(), 0); | ||
} | ||
|
||
qDebug() << cursorAction << " - " << modifiers << " = " << mi; | ||
|
||
return mi; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2024 The Mumble Developers. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license | ||
// that can be found in the LICENSE file at the root of the | ||
// Mumble source tree or at <https://www.mumble.info/LICENSE>. | ||
|
||
#ifndef MUMBLE_MUMBLE_WIDGETS_MULTICOLUMNTREEWIDGET_H_ | ||
#define MUMBLE_MUMBLE_WIDGETS_MULTICOLUMNTREEWIDGET_H_ | ||
|
||
#include <QTreeWidget> | ||
#include <QModelIndex> | ||
#include <QAbstractItemView> | ||
|
||
class MultiColumnTreeWidget : public QTreeWidget { | ||
Q_OBJECT; | ||
|
||
public: | ||
MultiColumnTreeWidget(QWidget *parent = nullptr); | ||
|
||
QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override; | ||
}; | ||
|
||
#endif |