7#if QT_CONFIG(tableview)
10#if QT_CONFIG(listview)
13#if QT_CONFIG(treeview)
15#include <private/qtreeview_p.h>
17#include <private/qwidget_p.h>
19#if QT_CONFIG(accessibility)
37 return qobject_cast<QAbstractItemView*>(
object());
44 int vHeader = verticalHeader() ? 1 : 0;
45 int hHeader = horizontalHeader() ? 1 : 0;
46 return (
index.row() + hHeader)*(
index.model()->columnCount() + vHeader) + (
index.column() + vHeader);
49QAccessibleTable::QAccessibleTable(
QWidget *
w)
50 : QAccessibleObject(
w)
54#if QT_CONFIG(tableview)
55 if (qobject_cast<const QTableView*>(
view())) {
56 m_role = QAccessible::Table;
59#if QT_CONFIG(treeview)
60 if (qobject_cast<const QTreeView*>(
view())) {
61 m_role = QAccessible::Tree;
64#if QT_CONFIG(listview)
65 if (qobject_cast<const QListView*>(
view())) {
66 m_role = QAccessible::List;
71 m_role = QAccessible::Table;
75bool QAccessibleTable::isValid()
const
80QAccessibleTable::~QAccessibleTable()
82 for (QAccessible::Id
id :
std::as_const(childToId))
86QHeaderView *QAccessibleTable::horizontalHeader()
const
90#if QT_CONFIG(tableview)
91 }
else if (
const QTableView *tv = qobject_cast<const QTableView*>(
view())) {
92 header = tv->horizontalHeader();
94#if QT_CONFIG(treeview)
95 }
else if (
const QTreeView *tv = qobject_cast<const QTreeView*>(
view())) {
102QHeaderView *QAccessibleTable::verticalHeader()
const
106#if QT_CONFIG(tableview)
107 }
else if (
const QTableView *tv = qobject_cast<const QTableView*>(
view())) {
108 header = tv->verticalHeader();
114QAccessibleInterface *QAccessibleTable::cellAt(
int row,
int column)
const
118 Q_ASSERT(role() != QAccessible::Tree);
121 qWarning() <<
"QAccessibleTable::cellAt: invalid index: " <<
index <<
" for " <<
view();
127QAccessibleInterface *QAccessibleTable::caption()
const
139int QAccessibleTable::columnCount()
const
143 return view()->model()->columnCount();
146int QAccessibleTable::rowCount()
const
150 return view()->model()->rowCount();
153int QAccessibleTable::selectedCellCount()
const
155 if (!
view()->selectionModel())
157 return view()->selectionModel()->selectedIndexes().size();
160int QAccessibleTable::selectedColumnCount()
const
162 if (!
view()->selectionModel())
164 return view()->selectionModel()->selectedColumns().size();
167int QAccessibleTable::selectedRowCount()
const
169 if (!
view()->selectionModel())
171 return view()->selectionModel()->selectedRows().size();
174QString QAccessibleTable::rowDescription(
int row)
const
184 if (!
view()->selectionModel())
193QList<int> QAccessibleTable::selectedColumns()
const
195 if (!
view()->selectionModel())
206QList<int> QAccessibleTable::selectedRows()
const
208 if (!
view()->selectionModel())
219QAccessibleInterface *QAccessibleTable::summary()
const
224bool QAccessibleTable::isColumnSelected(
int column)
const
226 if (!
view()->selectionModel())
231bool QAccessibleTable::isRowSelected(
int row)
const
233 if (!
view()->selectionModel())
238bool QAccessibleTable::selectRow(
int row)
247 switch (
view()->selectionMode()) {
253 view()->clearSelection();
256 if ((!
row || !
view()->selectionModel()->isRowSelected(
row - 1,
view()->rootIndex()))
257 && !
view()->selectionModel()->isRowSelected(
row + 1,
view()->rootIndex()))
258 view()->clearSelection();
268bool QAccessibleTable::selectColumn(
int column)
277 switch (
view()->selectionMode()) {
286 && !
view()->selectionModel()->isColumnSelected(
column + 1,
view()->rootIndex()))
287 view()->clearSelection();
297bool QAccessibleTable::unselectRow(
int row)
303 if (!
index.isValid())
308 switch (
view()->selectionMode()) {
312 if (selectedRowCount() == 1)
316 if (selectedRowCount() == 1)
319 if ((!
row ||
view()->selectionModel()->isRowSelected(
row - 1,
view()->rootIndex()))
320 &&
view()->selectionModel()->isRowSelected(
row + 1,
view()->rootIndex())) {
333bool QAccessibleTable::unselectColumn(
int column)
339 if (!
index.isValid())
344 switch (
view()->selectionMode()) {
348 if (selectedColumnCount() == 1)
352 if (selectedColumnCount() == 1)
356 &&
view()->selectionModel()->isColumnSelected(
column + 1,
view()->rootIndex())) {
369int QAccessibleTable::selectedItemCount()
const
371 return selectedCellCount();
376 return selectedCells();
379bool QAccessibleTable::isSelected(QAccessibleInterface *childCell)
const
381 if (!childCell || childCell->parent() !=
this) {
382 qWarning() <<
"QAccessibleTable::isSelected: Accessible interface must be a direct child of the table interface.";
386 const QAccessibleTableCellInterface *cell = childCell->tableCellInterface();
388 return cell->isSelected();
393bool QAccessibleTable::select(QAccessibleInterface *childCell)
395 if (!childCell || childCell->parent() !=
this) {
396 qWarning() <<
"QAccessibleTable::select: Accessible interface must be a direct child of the table interface.";
400 if (!childCell->tableCellInterface()) {
401 qWarning() <<
"QAccessibleTable::select: Accessible interface doesn't implement table cell interface.";
405 if (childCell->role() == QAccessible::Cell || childCell->role() == QAccessible::ListItem || childCell->role() == QAccessible::TreeItem) {
406 QAccessibleTableCell* cell =
static_cast<QAccessibleTableCell*
>(childCell);
414bool QAccessibleTable::unselect(QAccessibleInterface *childCell)
416 if (!childCell || childCell->parent() !=
this) {
417 qWarning() <<
"QAccessibleTable::select: Accessible interface must be a direct child of the table interface.";
421 if (!childCell->tableCellInterface()) {
422 qWarning() <<
"QAccessibleTable::unselect: Accessible interface doesn't implement table cell interface.";
426 if (childCell->role() == QAccessible::Cell || childCell->role() == QAccessible::ListItem || childCell->role() == QAccessible::TreeItem) {
427 QAccessibleTableCell* cell =
static_cast<QAccessibleTableCell*
>(childCell);
428 cell->unselectCell();
435bool QAccessibleTable::selectAll()
441bool QAccessibleTable::clear()
443 view()->selectionModel()->clearSelection();
448QAccessible::Role QAccessibleTable::role()
const
456 const auto *
w =
view();
459 state.invisible =
true;
461 state.focusable =
true;
463 state.focused =
true;
465 state.disabled =
true;
468 state.movable =
true;
469 if (
w->minimumSize() !=
w->maximumSize())
470 state.sizeable =
true;
471 if (
w->isActiveWindow())
478QAccessibleInterface *QAccessibleTable::childAt(
int x,
int y)
const
485 if (
index.isValid()) {
491QAccessibleInterface *QAccessibleTable::focusChild()
const
494 if (!
index.isValid())
500int QAccessibleTable::childCount()
const
504 int vHeader = verticalHeader() ? 1 : 0;
505 int hHeader = horizontalHeader() ? 1 : 0;
506 return (
view()->
model()->rowCount()+hHeader) * (
view()->model()->columnCount()+vHeader);
509int QAccessibleTable::indexOfChild(
const QAccessibleInterface *iface)
const
518 if (
iface->role() == QAccessible::Cell ||
iface->role() == QAccessible::ListItem) {
519 const QAccessibleTableCell* cell =
static_cast<const QAccessibleTableCell*
>(
iface);
520 return logicalIndex(cell->m_index);
521 }
else if (
iface->role() == QAccessible::ColumnHeader){
522 const QAccessibleTableHeaderCell* cell =
static_cast<const QAccessibleTableHeaderCell*
>(
iface);
523 return cell->index + (verticalHeader() ? 1 : 0);
524 }
else if (
iface->role() == QAccessible::RowHeader){
525 const QAccessibleTableHeaderCell* cell =
static_cast<const QAccessibleTableHeaderCell*
>(
iface);
526 return (cell->index + 1) * (
view()->model()->columnCount() + 1);
527 }
else if (
iface->role() == QAccessible::Pane) {
530 qWarning() <<
"WARNING QAccessibleTable::indexOfChild Fix my children..."
531 <<
iface->role() <<
iface->text(QAccessible::Name);
537QString QAccessibleTable::text(QAccessible::Text
t)
const
539 if (
t == QAccessible::Description)
540 return view()->accessibleDescription();
541 return view()->accessibleName();
544QRect QAccessibleTable::rect()
const
552QAccessibleInterface *QAccessibleTable::parent()
const
558 return QAccessible::queryAccessibleInterface(
view()->
parent());
560 return QAccessible::queryAccessibleInterface(
qApp);
563QAccessibleInterface *QAccessibleTable::child(
int logicalIndex)
const
568 auto id = childToId.constFind(logicalIndex);
569 if (
id != childToId.constEnd())
570 return QAccessible::accessibleInterface(
id.
value());
572 int vHeader = verticalHeader() ? 1 : 0;
573 int hHeader = horizontalHeader() ? 1 : 0;
575 int columns =
view()->model()->columnCount() + vHeader;
577 int row = logicalIndex / columns;
578 int column = logicalIndex % columns;
580 QAccessibleInterface *
iface =
nullptr;
584 if (hHeader &&
row == 0) {
585 iface =
new QAccessibleTableCornerButton(
view());
592 if (!iface && hHeader) {
608 QAccessible::registerAccessibleInterface(iface);
609 childToId.insert(logicalIndex, QAccessible::uniqueId(iface));
613void *QAccessibleTable::interface_cast(QAccessible::InterfaceType
t)
615 if (
t == QAccessible::SelectionInterface)
616 return static_cast<QAccessibleSelectionInterface*
>(
this);
617 if (
t == QAccessible::TableInterface)
618 return static_cast<QAccessibleTableInterface*
>(
this);
622void QAccessibleTable::modelChange(QAccessibleTableModelChangeEvent *
event)
625 if (childToId.isEmpty())
628 switch (
event->modelChangeType()) {
629 case QAccessibleTableModelChangeEvent::ModelReset:
630 for (QAccessible::Id
id :
std::as_const(childToId))
636 case QAccessibleTableModelChangeEvent::RowsInserted:
637 case QAccessibleTableModelChangeEvent::ColumnsInserted: {
638 int newRows =
event->lastRow() -
event->firstRow() + 1;
639 int newColumns =
event->lastColumn() -
event->firstColumn() + 1;
642 ChildCache::ConstIterator
iter = childToId.constBegin();
644 while (
iter != childToId.constEnd()) {
645 QAccessible::Id
id =
iter.value();
646 QAccessibleInterface *
iface = QAccessible::accessibleInterface(
id);
648 if (
event->modelChangeType() == QAccessibleTableModelChangeEvent::RowsInserted
649 &&
iface->role() == QAccessible::RowHeader) {
650 QAccessibleTableHeaderCell *cell =
static_cast<QAccessibleTableHeaderCell*
>(
iface);
651 if (cell->index >=
event->firstRow()) {
652 cell->index += newRows;
654 }
else if (
event->modelChangeType() == QAccessibleTableModelChangeEvent::ColumnsInserted
655 &&
iface->role() == QAccessible::ColumnHeader) {
656 QAccessibleTableHeaderCell *cell =
static_cast<QAccessibleTableHeaderCell*
>(
iface);
657 if (cell->index >=
event->firstColumn()) {
658 cell->index += newColumns;
661 if (indexOfChild(iface) >= 0) {
662 newCache.insert(indexOfChild(iface),
id);
667 QAccessible::deleteAccessibleInterface(
id);
671 childToId = newCache;
675 case QAccessibleTableModelChangeEvent::ColumnsRemoved:
676 case QAccessibleTableModelChangeEvent::RowsRemoved: {
677 int deletedColumns =
event->lastColumn() -
event->firstColumn() + 1;
678 int deletedRows =
event->lastRow() -
event->firstRow() + 1;
680 ChildCache::ConstIterator
iter = childToId.constBegin();
681 while (
iter != childToId.constEnd()) {
682 QAccessible::Id
id =
iter.value();
683 QAccessibleInterface *
iface = QAccessible::accessibleInterface(
id);
685 if (
iface->role() == QAccessible::Cell ||
iface->role() == QAccessible::ListItem) {
687 QAccessibleTableCell *cell =
static_cast<QAccessibleTableCell*
>(
iface->tableCellInterface());
689 if (cell->m_index.isValid())
690 newCache.insert(indexOfChild(cell),
id);
692 QAccessible::deleteAccessibleInterface(
id);
693 }
else if (
event->modelChangeType() == QAccessibleTableModelChangeEvent::RowsRemoved
694 &&
iface->role() == QAccessible::RowHeader) {
695 QAccessibleTableHeaderCell *cell =
static_cast<QAccessibleTableHeaderCell*
>(
iface);
696 if (cell->index <
event->firstRow()) {
697 newCache.insert(indexOfChild(cell),
id);
698 }
else if (cell->index >
event->lastRow()) {
699 cell->index -= deletedRows;
700 newCache.insert(indexOfChild(cell),
id);
702 QAccessible::deleteAccessibleInterface(
id);
704 }
else if (
event->modelChangeType() == QAccessibleTableModelChangeEvent::ColumnsRemoved
705 &&
iface->role() == QAccessible::ColumnHeader) {
706 QAccessibleTableHeaderCell *cell =
static_cast<QAccessibleTableHeaderCell*
>(
iface);
707 if (cell->index <
event->firstColumn()) {
708 newCache.insert(indexOfChild(cell),
id);
709 }
else if (cell->index >
event->lastColumn()) {
710 cell->index -= deletedColumns;
711 newCache.insert(indexOfChild(cell),
id);
713 QAccessible::deleteAccessibleInterface(
id);
718 childToId = newCache;
722 case QAccessibleTableModelChangeEvent::DataChanged:
728#if QT_CONFIG(treeview)
737 const QTreeView *treeView = qobject_cast<const QTreeView*>(
view());
738 if (
Q_UNLIKELY(
row < 0 || column < 0 || treeView->d_func()->viewItems.size() <=
row)) {
739 qWarning() <<
"QAccessibleTree::indexFromLogical: invalid index: " <<
row <<
column <<
" for " << treeView;
742 QModelIndex modelIndex = treeView->d_func()->viewItems.at(
row).index;
750QAccessibleInterface *QAccessibleTree::childAt(
int x,
int y)
const
758 if (!
index.isValid())
761 const QTreeView *treeView = qobject_cast<const QTreeView*>(
view());
762 int row = treeView->d_func()->viewIndex(
index) + (horizontalHeader() ? 1 : 0);
769QAccessibleInterface *QAccessibleTree::focusChild()
const
772 if (!
index.isValid())
775 const QTreeView *treeView = qobject_cast<const QTreeView*>(
view());
776 int row = treeView->d_func()->viewIndex(
index) + (horizontalHeader() ? 1 : 0);
783int QAccessibleTree::childCount()
const
785 const QTreeView *treeView = qobject_cast<const QTreeView*>(
view());
790 int hHeader = horizontalHeader() ? 1 : 0;
791 return (treeView->d_func()->viewItems.size() + hHeader)*
view()->model()->columnCount();
794QAccessibleInterface *QAccessibleTree::child(
int logicalIndex)
const
799 QAccessibleInterface *
iface =
nullptr;
800 int index = logicalIndex;
802 if (horizontalHeader()) {
816 iface =
new QAccessibleTableCell(
view(), modelIndex, cellRole());
818 QAccessible::registerAccessibleInterface(iface);
823int QAccessibleTree::rowCount()
const
825 const QTreeView *treeView = qobject_cast<const QTreeView*>(
view());
827 return treeView->d_func()->viewItems.size();
830int QAccessibleTree::indexOfChild(
const QAccessibleInterface *iface)
const
838 if (
iface->role() == QAccessible::TreeItem) {
839 const QAccessibleTableCell* cell =
static_cast<const QAccessibleTableCell*
>(
iface);
840 const QTreeView *treeView = qobject_cast<const QTreeView*>(
view());
842 int row = treeView->d_func()->viewIndex(cell->m_index) + (horizontalHeader() ? 1 : 0);
843 int column = cell->m_index.column();
847 }
else if (
iface->role() == QAccessible::ColumnHeader){
848 const QAccessibleTableHeaderCell* cell =
static_cast<const QAccessibleTableHeaderCell*
>(
iface);
851 qWarning() <<
"WARNING QAccessibleTable::indexOfChild invalid child"
852 <<
iface->role() <<
iface->text(QAccessible::Name);
858QAccessibleInterface *QAccessibleTree::cellAt(
int row,
int column)
const
865 const QTreeView *treeView = qobject_cast<const QTreeView*>(
view());
867 int logicalIndex = treeView->d_func()->accessibleTable2Index(
index);
869 return child(logicalIndex);
872QString QAccessibleTree::rowDescription(
int)
const
877bool QAccessibleTree::isRowSelected(
int row)
const
879 if (!
view()->selectionModel())
882 return view()->selectionModel()->isRowSelected(
index.row(),
index.parent());
885bool QAccessibleTree::selectRow(
int row)
887 if (!
view()->selectionModel())
894 switch (
view()->selectionMode()) {
900 view()->clearSelection();
903 if ((!
row || !
view()->selectionModel()->isRowSelected(
row - 1,
view()->rootIndex()))
904 && !
view()->selectionModel()->isRowSelected(
row + 1,
view()->rootIndex()))
905 view()->clearSelection();
920 :
view(view_), m_index(index_), m_role(role_)
923 qWarning() <<
"QAccessibleTableCell::QAccessibleTableCell with invalid index: " << index_;
926void *QAccessibleTableCell::interface_cast(QAccessible::InterfaceType
t)
928 if (
t == QAccessible::TableCellInterface)
929 return static_cast<QAccessibleTableCellInterface*
>(
this);
930 if (
t == QAccessible::ActionInterface)
931 return static_cast<QAccessibleActionInterface*
>(
this);
935int QAccessibleTableCell::columnExtent()
const {
return 1; }
936int QAccessibleTableCell::rowExtent()
const {
return 1; }
941 if (verticalHeader()) {
951 if (horizontalHeader()) {
958QHeaderView *QAccessibleTableCell::horizontalHeader()
const
963#if QT_CONFIG(tableview)
964 }
else if (
const QTableView *tv = qobject_cast<const QTableView*>(
view)) {
965 header = tv->horizontalHeader();
967#if QT_CONFIG(treeview)
968 }
else if (
const QTreeView *tv = qobject_cast<const QTreeView*>(
view)) {
976QHeaderView *QAccessibleTableCell::verticalHeader()
const
979#if QT_CONFIG(tableview)
981 header = tv->verticalHeader();
986int QAccessibleTableCell::columnIndex()
const
990 return m_index.column();
993int QAccessibleTableCell::rowIndex()
const
997#if QT_CONFIG(treeview)
998 if (role() == QAccessible::TreeItem) {
999 const QTreeView *treeView = qobject_cast<const QTreeView*>(
view);
1001 int row = treeView->d_func()->viewIndex(m_index);
1005 return m_index.row();
1008bool QAccessibleTableCell::isSelected()
const
1012 return view->selectionModel()->isSelected(m_index);
1015QStringList QAccessibleTableCell::actionNames()
const
1018 names << toggleAction();
1022void QAccessibleTableCell::doAction(
const QString& actionName)
1024 if (actionName == toggleAction()) {
1025#if defined(Q_OS_ANDROID)
1026 QAccessibleInterface *parentInterface =
parent();
1027 while (parentInterface){
1028 if (parentInterface->role() == QAccessible::ComboBox) {
1030 parentInterface->actionInterface()->doAction(pressAction());
1033 parentInterface = parentInterface->parent();
1051void QAccessibleTableCell::selectCell()
1059 QAccessibleTableInterface *cellTable =
table()->tableInterface();
1061 switch (
view->selectionBehavior()) {
1066 cellTable->selectColumn(m_index.column());
1070 cellTable->selectRow(m_index.row());
1075 view->clearSelection();
1081void QAccessibleTableCell::unselectCell()
1089 QAccessibleTableInterface *cellTable =
table()->tableInterface();
1091 switch (
view->selectionBehavior()) {
1096 cellTable->unselectColumn(m_index.column());
1100 cellTable->unselectRow(m_index.row());
1108 && (
view->selectionModel()->selectedIndexes().size() <= 1))
1114QAccessibleInterface *QAccessibleTableCell::table()
const
1116 return QAccessible::queryAccessibleInterface(
view);
1119QAccessible::Role QAccessibleTableCell::role()
const
1133 st.invisible =
true;
1135 if (
view->selectionModel()->isSelected(m_index))
1137 if (
view->selectionModel()->currentIndex() == m_index)
1144 Qt::ItemFlags
flags = m_index.flags();
1146 st.checkable =
true;
1148 st.selectable =
true;
1149 st.focusable =
true;
1151 st.multiSelectable =
true;
1153 st.extSelectable =
true;
1155#if QT_CONFIG(treeview)
1156 if (m_role == QAccessible::TreeItem) {
1157 const QTreeView *treeView = qobject_cast<const QTreeView*>(
view);
1159 st.expandable =
true;
1168QRect QAccessibleTableCell::rect()
const
1173 r =
view->visualRect(m_index);
1182QString QAccessibleTableCell::text(QAccessible::Text
t)
const
1189 case QAccessible::Name:
1191 if (
value.isEmpty())
1194 case QAccessible::Description:
1203void QAccessibleTableCell::setText(QAccessible::Text ,
const QString &
text)
1207 view->model()->setData(m_index,
text);
1210bool QAccessibleTableCell::isValid()
const
1213 &&
view->model() && m_index.isValid();
1216QAccessibleInterface *QAccessibleTableCell::parent()
const
1218 return QAccessible::queryAccessibleInterface(
view);
1221QAccessibleInterface *QAccessibleTableCell::child(
int)
const
1227 :
view(view_),
index(index_), orientation(orientation_)
1232QAccessible::Role QAccessibleTableHeaderCell::role()
const
1235 return QAccessible::ColumnHeader;
1236 return QAccessible::RowHeader;
1244 s.disabled = !
h->isEnabled();
1249QRect QAccessibleTableHeaderCell::rect()
const
1253#if QT_CONFIG(tableview)
1254 }
else if (
const QTableView *tv = qobject_cast<const QTableView*>(
view)) {
1256 header = tv->horizontalHeader();
1258 header = tv->verticalHeader();
1261#if QT_CONFIG(treeview)
1262 }
else if (
const QTreeView *tv = qobject_cast<const QTreeView*>(
view)) {
1276QString QAccessibleTableHeaderCell::text(QAccessible::Text
t)
const
1281 case QAccessible::Name:
1283 if (
value.isEmpty())
1286 case QAccessible::Description:
1295void QAccessibleTableHeaderCell::setText(QAccessible::Text,
const QString &)
1300bool QAccessibleTableHeaderCell::isValid()
const
1307QAccessibleInterface *QAccessibleTableHeaderCell::parent()
const
1309 return QAccessible::queryAccessibleInterface(
view);
1312QAccessibleInterface *QAccessibleTableHeaderCell::child(
int)
const
1317QHeaderView *QAccessibleTableHeaderCell::headerView()
const
1321#if QT_CONFIG(tableview)
1322 }
else if (
const QTableView *tv = qobject_cast<const QTableView*>(
view)) {
1324 header = tv->horizontalHeader();
1326 header = tv->verticalHeader();
1329#if QT_CONFIG(treeview)
1330 }
else if (
const QTreeView *tv = qobject_cast<const QTreeView*>(
view)) {
virtual Q_INVOKABLE bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Returns {true} if parent has any children; otherwise returns {false}.
The QAbstractItemView class provides the basic functionality for item view classes.
SelectionMode
This enum indicates how the view responds to user selections:
QAbstractItemModel * model() const
Returns the model that this view is presenting.
The QAccessible class provides enums and static functions related to accessibility.
qsizetype size() const noexcept
void reserve(qsizetype size)
void append(parameter_type t)
constexpr int row() const noexcept
Returns the row this model index refers to.
QModelIndex parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
constexpr bool isValid() const noexcept
Returns {true} if this model index is valid; otherwise returns {false}.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
bool intersects(const QRect &r) const noexcept
Returns true if this rectangle intersects with the given rectangle (i.e., there is at least one pixel...
constexpr void translate(int dx, int dy) noexcept
Moves the rectangle dx along the x axis and dy along the y axis, relative to the current position.
QVariant data(const QModelIndex &item, int role=Qt::DisplayRole) const override
Returns the value for the specified item and role.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Returns the header data for the given role in the section of the header with the specified orientatio...
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QTableView class provides a default model/view implementation of a table view.
The QTreeView class provides a default model/view implementation of a tree view.
bool isExpanded(const QModelIndex &index) const
Returns true if the model item index is expanded; otherwise returns false.
void * data()
Returns a pointer to the contained object as a generic void* that can be written to.
bool isValid() const
Returns true if the storage type of this variant is not QMetaType::UnknownType; otherwise returns fal...
int toInt(bool *ok=nullptr) const
Returns the variant as an int if the variant has userType() \l QMetaType::Int, \l QMetaType::Bool,...
QString toString() const
Returns the variant as a QString if the variant has a userType() including, but not limited to:
list append(new Employee("Blackpool", "Stephen"))
Combined button and popup list for selecting options.
constexpr QBindableInterface iface
@ AccessibleDescriptionRole
Q_CORE_EXPORT int qstrcmp(const char *str1, const char *str2)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
static QString header(const QString &name)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLfloat GLfloat GLfloat GLfloat h
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row
GLenum GLenum GLsizei void * table
const char className[16]
[1]
QSqlQueryModel * model
[16]
obj metaObject() -> className()
QItemSelection * selection
[0]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent