mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-18 04:38:29 +00:00
* Fix focus and screen reader on Dialog #LINQT-2197 * Fix dialer accessibility #LINQT-2204 * Add accessibility to voicemail button #LINQT-2200 *Add list annoncement on magicsearch suggestions #LINQT-2205 * Fix accessibility on contact lists #LINQT-2206 * Fix screen reader does not say values on combobox #LINQT-2195 * Fix focus when close modal #LINQT-2220 * Focus end call button when accepting a call #LINQT-2223
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
/*
|
|
* Copyright (c) 2010-2025 Belledonne Communications SARL.
|
|
*
|
|
* This file is part of linphone-desktop
|
|
* (see https://www.linphone.org).
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QQuickItem>
|
|
|
|
class FocusNavigator : public QObject {
|
|
Q_OBJECT
|
|
Q_PROPERTY(QQuickItem* lastFocusItem READ getLastFocusItem NOTIFY lastFocusItemChanged)
|
|
|
|
public:
|
|
explicit FocusNavigator(QObject *parent = nullptr);
|
|
Q_INVOKABLE bool doesLastFocusWasKeyboard();
|
|
Q_INVOKABLE QQuickItem *getLastFocusItem();
|
|
|
|
protected:
|
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
|
|
|
signals:
|
|
void focusChanged(QQuickItem *item, bool keyboardFocus);
|
|
void lastFocusItemChanged();
|
|
|
|
private:
|
|
bool mLastFocusWasKeyboard = false;
|
|
QQuickItem *mLastFocusItem = nullptr;
|
|
void onFocusObjectChanged(QObject *obj);
|
|
};
|