Disabled Accessibility on SheetTableView

This commit is contained in:
Adrian Popescu
2023-02-01 17:32:26 -05:00
committed by Chris Hennes
parent c71e551556
commit 3f3a548b22
4 changed files with 179 additions and 33 deletions

View File

@@ -0,0 +1,85 @@
/***************************************************************************
* Copyright (c) 2023 Adrian Popescu *
* <adrian-constantin.popescu@outlook.com> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library 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 Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <QAction>
# include <QApplication>
# include <QClipboard>
# include <QKeyEvent>
# include <QMessageBox>
# include <QMenu>
# include <QMimeData>
#endif
#include "SheetTableViewAccessibleInterface.h"
namespace SpreadsheetGui {
SheetTableViewAccessibleInterface::SheetTableViewAccessibleInterface(
SpreadsheetGui::SheetTableView* w)
: QAccessibleWidget(w)
{
}
QString SheetTableViewAccessibleInterface::text(QAccessible::Text t) const
{
if (t == QAccessible::Help)
return QString::fromLatin1("Implement me");
return QAccessibleWidget::text(t);
}
QAccessibleInterface* SheetTableViewAccessibleInterface::childAt(int x, int y) const
{
return (QAccessibleInterface*)this;
}
int SheetTableViewAccessibleInterface::indexOfChild(const QAccessibleInterface*) const
{
return 0;
}
int SheetTableViewAccessibleInterface::childCount() const
{
return 0;
}
QAccessibleInterface* SheetTableViewAccessibleInterface::focusChild() const
{
return (QAccessibleInterface*)this;
}
QAccessibleInterface* SheetTableViewAccessibleInterface::child(int index) const
{
return (QAccessibleInterface*)this;
}
QAccessibleInterface* SheetTableViewAccessibleInterface::ifactory(const QString& key, QObject* o)
{
if (key == QString::fromUtf8("SpreadsheetGui::SheetTableView"))
return new SheetTableViewAccessibleInterface(
static_cast<SpreadsheetGui::SheetTableView*>(o));
return 0;
}
}