58 #include <private/qtabbar_p.h> 59 #include <QAbstractScrollArea> 60 #include <QScrollArea> 64 #ifndef QT_NO_ACCESSIBILITY 70 #ifndef QT_NO_ITEMVIEWS 100 : row(index), view(aView), m_header(isHeader)
109 #ifndef QT_NO_TABLEVIEW 110 }
else if (
const QTableView *tv = qobject_cast<const QTableView*>(
view)) {
111 header = tv->horizontalHeader();
113 #ifndef QT_NO_TREEVIEW 114 }
else if (
const QTreeView *tv = qobject_cast<const QTreeView*>(
view)) {
115 header = tv->header();
125 #ifndef QT_NO_TABLEVIEW 127 header = tv->verticalHeader();
137 for (
int i = 0; i < header->
count(); ++i) {
161 int w = vheader->
width();
162 int h = header->height();
169 int w = header->sectionSize(logical);
170 r.
setRect(header->sectionViewportPosition(logical), 0, w, header->height());
178 for (
int i = 0; i < colCount; ++i)
184 int logicalRow =
row.
row();
185 int h = vheader->sectionSize(logicalRow);
186 re.
setRect(0, vheader->sectionViewportPosition(logicalRow), vheader->width(), h);
193 int logicalRow =
row.
row();
194 int h = vheader->sectionSize(logicalRow);
195 r.
setRect(0, vheader->sectionViewportPosition(logicalRow), vheader->width(), h);
276 }
else if (t ==
Value) {
277 #ifndef QT_NO_TREEVIEW 278 if (qobject_cast<const QTreeView*>(
view)) {
287 #ifndef QT_NO_TREEVIEW 288 if (child == 0 && qobject_cast<const QTreeView*>(
view)) {
305 int totalSiblings = 0;
306 for (
int i = 0 ; i < rowCount; ++i) {
311 itemIndex = totalSiblings;
318 #endif // QT_NO_TREEVIEW 321 if (child == 0 &&
children().count() >= 1)
383 return kids.
at(child - 1);
412 count = header->count() - header->hiddenSectionCount();
416 #ifndef QT_NO_TABLEVIEW 417 if (qobject_cast<const QTableView*>(
view)) {
427 if (!iface || iface->
role(0) !=
Row)
439 int otherChild)
const 441 if (!child && !otherChild && other->
object() ==
view)
443 if (!child && !otherChild && other ==
this)
445 if (!child && otherChild && other ==
this)
447 if (child && otherChild && other ==
this)
465 QAccessible::Relation rel)
498 }
else if (index > 1) {
544 return index ? kids.
indexOf(idx) + 1 : 0; }
555 #ifndef QT_NO_TREEVIEW 556 }
else if (qobject_cast<const QTreeView*>(
view)) {
564 #ifndef QT_NO_LISTVIEW 565 }
else if (qobject_cast<const QListView*>(
view)) {
568 #ifndef QT_NO_TABLEVIEW 569 }
else if (qobject_cast<const QTableView *>(
view)) {
593 globalRect = parent->
rect(0);
604 if (!vheader->isVisible())
621 Qt::ItemFlags flags = idx.
flags();
715 #ifndef QT_NO_LISTVIEW 718 #ifndef QT_NO_TREEVIEW 721 #ifndef QT_NO_TABLEVIEW 724 if (start.isValid()) {
726 }
else if (m_view && m_view->model()) {
733 for (
int i = 0; i < count; ++i) {
735 if (m_current.isValid()) {
737 #ifndef QT_NO_TREEVIEW 738 if (tree && m_current.model()->hasChildren(m_current) && tree->isExpanded(m_current)) {
739 m_current = m_current.child(0, 0);
743 int row = m_current.
row();
748 while (row + 1 >= m->
rowCount(par)) {
750 if (m_current.isValid()) {
751 row = m_current.
row();
760 if (m_current.isValid())
761 m_current = m_current.sibling(row + 1, 0);
764 }
while (isHidden());
766 return m_current.isValid();
771 #ifndef QT_NO_LISTVIEW 773 return list->isRowHidden(m_current.row());
775 #ifndef QT_NO_TREEVIEW 777 return tree->isRowHidden(m_current.row(), m_current.parent());
779 #ifndef QT_NO_TABLEVIEW 781 return table->isRowHidden(m_current.row());
795 #ifndef QT_NO_TREEVIEW 798 #ifndef QT_NO_LISTVIEW 801 #ifndef QT_NO_TABLEVIEW 818 #ifndef QT_NO_TABLEVIEW 820 header = tv->horizontalHeader();
822 #ifndef QT_NO_TREEVIEW 824 header = tv->header();
834 #ifndef QT_NO_TABLEVIEW 836 header = tv->verticalHeader();
847 #ifndef QT_NO_TREEVIEW 848 }
else if (qobject_cast<const QTreeView*>(
itemView())) {
851 #ifndef QT_NO_LISTVIEW 852 }
else if (qobject_cast<const QListView*>(
itemView())) {
860 #ifndef QT_NO_TREEVIEW 861 }
else if (qobject_cast<const QTreeView*>(
itemView())) {
862 return (role ==
Tree);
864 #ifndef QT_NO_LISTVIEW 865 }
else if (qobject_cast<const QListView*>(
itemView())) {
866 return (role ==
List);
870 return (role ==
Table);
877 Q_ASSERT(qobject_cast<const QAbstractItemView *>(view));
928 #ifndef QT_NO_TREEVIEW 930 entry = tree->visualIndex(index) + 1;
932 #ifndef QT_NO_LISTVIEW 934 entry = list->visualIndex(index) + 1;
936 #ifndef QT_NO_TABLEVIEW 938 entry = table->visualIndex(index) + 1;
975 return item.
text(t, 1);
1008 int vscrollWidth = 0;
1011 vscrollWidth = sb->
width();
1013 int hscrollHeight = 0;
1016 hscrollHeight = sb->
height();
1021 r.
adjust(vscrollWidth, 0, 0, -hscrollHeight);
1023 r.
adjust(0, 0, -vscrollWidth, -hscrollHeight);
1039 int headerWidth = (header && header->
isVisible()) ? header->
width() : 0;
1041 int headerHeight= (header && header->
isVisible()) ? header->
height() : 0;
1043 r.
adjust(0, -headerHeight, headerWidth, 0);
1045 r.
adjust(-headerWidth, -headerHeight, 0, 0);
1057 if (
rect(i).contains(p))
1070 #ifndef QT_NO_TABLEVIEW 1071 if (qobject_cast<QTableView *>(view))
1074 #ifndef QT_NO_LISTVIEW 1075 if (qobject_cast<QListView *>(view))
1096 if (queryViewPort) {
1106 st |= item.
state(0);
1126 if (relation ==
Ancestor && index == 1) {
1129 }
else if (relation ==
Child && index >= 1) {
1144 }
else if (relation ==
Sibling && index >= 1) {
1194 #ifndef QT_NO_TREEVIEW 1198 #ifndef QT_NO_TABLEVIEW 1247 #ifndef QT_NO_TABLEVIEW 1260 return int(childIndex / columnCount);
1268 int maxCount =
qMin(selRows.
count(), maxRows);
1270 for (
int i = 0; i < maxCount; ++i)
1281 int maxCount =
qMin(selColumns.
count(), maxColumns);
1283 for (
int i = 0; i < maxCount; ++i)
1335 int *cSpan,
bool *isSelect)
1339 *rSpan =
rowSpan(*row, *column);
1382 ?
QRect(zero.
x() + sectionPos, zero.
y(), sectionSize, h->
height())
1383 :
QRect(zero.
x(), zero.
y() + sectionPos, h->
width(), sectionSize);
1405 str =
event.value();
1410 str =
event.value();
1433 int section = child - 1;
1434 if (
header()->isSectionHidden(section))
1439 if (
header()->isMovable())
1442 if (!
header()->isClickable())
1446 #endif // QT_NO_ITEMVIEWS 1448 #ifndef QT_NO_TABBAR 1477 if (child <=
tabBar()->count())
1480 if (child -
tabBar()->count() == 1)
1481 return tabBarPrivate->
leftB;
1482 if (child -
tabBar()->count() == 2)
1483 return tabBarPrivate->
rightB;
1491 if (!child || !
tabBar()->isVisible())
1496 if (child <=
tabBar()->count()) {
1517 if (child >
tabBar()->count()) {
1530 else if (
tabBar()->currentIndex() != -1)
1548 if (child >
tabBar()->count())
1585 if (child > tb->
count()) {
1619 if ((action == 1) && (child <=
tabBar()->count())) {
1621 }
else if (action == 0) {
1622 if (child <=
tabBar()->count())
1629 if ((action == 1) && (child <=
tabBar()->count())) {
1631 }
else if (action == 0) {
1632 if (child <=
tabBar()->count())
1645 if (!child || (child >
tabBar()->count()))
1656 if ((action == 1) && (child <=
tabBar()->count()) &&
tabBar()->tabsClosable()) {
1663 if (child >
tabBar()->count()) {
1670 if (!
tabBar()->isTabEnabled(child - 1))
1688 if (!child || !on || extend || child >
tabBar()->count())
1691 if (!
tabBar()->isTabEnabled(child - 1))
1706 if (
tabBar()->currentIndex() != -1)
1711 #endif // QT_NO_TABBAR 1713 #ifndef QT_NO_COMBOBOX 1794 return *target ? 0 : -1;
1801 return *target ? 0 : -1;
1844 if (child->
object() == viewParent)
1856 #ifndef Q_WS_X11 // on Linux we use relations for this, name is text (fall through to Value) 1869 #ifndef QT_NO_SHORTCUT 1910 if (
comboBox()->view()->isVisible()) {
1927 #endif // QT_NO_COMBOBOX 1934 for (
int i = 0; i < list->
count(); ++i) {
1941 #ifndef QT_NO_SCROLLAREA 1946 Q_ASSERT(qobject_cast<QAbstractScrollArea *>(widget));
1954 if (child < 1 || child > children.
count())
1957 if (!childInterface)
1959 QString string = childInterface->
text(textType, 0);
1960 delete childInterface;
1973 if (child < 1 || child > children.
count())
1976 if (!childInterface)
1978 childInterface->
setText(textType, 0, text);
1979 delete childInterface;
1987 if (child < 1 || child > children.
count())
1990 if (!childInterface)
1993 delete childInterface;
2009 if (!child || !child->
object())
2032 if (relation ==
Child ||
2033 relation ==
Left || relation ==
Up || relation ==
Right || relation ==
Down) {
2035 if (entry < 0 || entry > children.
count())
2041 entryWidget = children.
at(entry - 1);
2051 targetWidget = children.
at(entry - 1);
2056 switch (entryElement) {
2080 switch (entryElement) {
2103 switch (entryElement) {
2117 switch (entryElement) {
2135 if (qobject_cast<const QScrollBar *>(targetWidget))
2138 return *target ? 0: -1;
2148 if (child < 1 || child > children.
count())
2150 const QWidget *childWidget = children.
at(child - 1);
2165 for (
int i = 0; i < children.
count(); ++i) {
2194 children.
append(viewport);
2198 if (horizontalScrollBar && horizontalScrollBar->
isVisible()) {
2204 if (verticalScrollBar && verticalScrollBar->
isVisible()) {
2210 if (cornerWidget && cornerWidget->
isVisible())
2211 children.
append(cornerWidget);
2245 Q_ASSERT(qobject_cast<QScrollArea *>(widget));
2247 #endif // QT_NO_SCROLLAREA 2251 #endif // QT_NO_ACCESSIBILITY
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QVariant class acts like a union for the most common Qt data types.
QModelIndexList selectedRows(int column=0) const
Returns the indexes in the given column for the rows where all columns are selected.
T qobject_cast(QObject *object)
int columnIndex(int childIndex)
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of columns for the children of the given parent.
int rowSpan(int row, int column)
int row() const
Returns the row this persistent model index refers to.
QString text(Text t, int child) const
Returns the value of the text property t of the object, or of the object's child if child is not 0...
The QItemSelectionModel class keeps track of a view's selected items.
bool isNull() const
Returns true if the rectangle is a null rectangle, otherwise returns false.
int childAt(int x, int y) const
Returns the 1-based index of the child that contains the screen coordinates (x, y).
SubControl
This enum describes the available sub controls.
QString text_helper(int child) const
QRect rect(int child) const
Reimplemented Function
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
int selectedColumnCount()
#define QT_END_NAMESPACE
This macro expands to.
int childCount() const
Returns the number of children that belong to this object.
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
QString actionText(int action, Text t, int child) const
Returns the text property t of the action action supported by the object, or of the object's child if...
int indexOfChild(const QAccessibleInterface *child) const
Reimplemented Function
QModelIndex sibling(int row, int column) const
Returns the sibling at row and column.
int navigate(RelationFlag rel, int entry, QAccessibleInterface **target) const
Reimplemented Function
State state(int child) const
Reimplemented Function
#define it(className, varName)
virtual bool isIndexHidden(const QModelIndex &index) const =0
Returns true if the item referred to by the given index is hidden in the view, otherwise returns fals...
virtual QRect visualRect(const QModelIndex &index) const =0
Returns the rectangle on the viewport occupied by the item at index.
bool isColumnSelected(int column, const QModelIndex &parent) const
Returns true if all items are selected in the column with the given parent.
virtual QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget=0) const =0
Returns the rectangle containing the specified subControl of the given complex control (with the styl...
QObject * object() const
Returns a pointer to the QObject this interface implementation provides information for...
virtual State state(int child) const =0
Returns the current state of the object, or of the object's child if child is not 0...
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
QAccessibleTabBar(QWidget *w)
Constructs a QAccessibleTabBar object for w.
bool isTabEnabled(int index) const
Returns true if the tab at position index is enabled; otherwise returns false.
Role
This enum defines the role of an accessible object.
int childAt(int x, int y) const
Reimplemented Function
QAccessibleInterface * rowHeader()
State state(int child) const
Returns the current state of the object, or of the object's child if child is not 0...
bool doAction(int action, int child, const QVariantList ¶ms)
Reimplemented Function
int columnSpan(int row, int column)
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
const QItemSelection selection() const
Returns the selection ranges stored in the selection model.
QRect translated(int dx, int dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
int width() const
Returns the width of the rectangle.
QVector< int > selection() const
Returns a (possibly empty) list of indexes of the items selected in the list box. ...
void setCurrentIndex(int index)
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
void selectColumn(int column)
Role role(int child) const
Reimplemented Function
int count(const T &t) const
Returns the number of occurrences of value in the list.
The QTabBar class provides a tab bar, e.g.
QAccessibleComboBox(QWidget *w)
Constructs a QAccessibleComboBox object for w.
QAbstractButton * button(int child) const
QTabBar * tabBar() const
Returns the QTabBar.
int height() const
Returns the height of the rectangle.
QModelIndex sibling(int row, int column) const
Returns the sibling at row and column or an invalid QModelIndex if there is no sibling at this positi...
The QString class provides a Unicode character string.
virtual QObject * object() const =0
Returns a pointer to the QObject this interface implementation provides information for...
QModelIndex childIndex(int child) const
int rowIndex(int childIndex)
QObject * object() const
Returns a pointer to the QObject this interface implementation provides information for...
bool doAction(int action, int child, const QVariantList ¶ms)
Reimplemented Function
The QObject class is the base class of all Qt objects.
void setText(Text t, int child, const QString &text)
Sets the text property t of the object, or of the object's child if child is not 0, to text.
virtual QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)=0
Returns a QModelIndex object pointing to the next object in the view, based on the given cursorAction...
QObject * object() const
Returns a pointer to the QObject this interface implementation provides information for...
QModelIndex parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
QWidget * indexWidget(const QModelIndex &index) const
Returns the widget for the item at the given index.
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Returns the data for the given role and section in the header with the specified orientation.
QAccessibleInterface * columnHeader()
void setText(Text t, int child, const QString &text)
Sets the text property t of the object, or of the object's child if child is not 0, to text.
SelectionMode selectionMode
which selection mode the view operates in
bool tabsClosable
Whether or not a tab bar should place close buttons on each tab.
QList< QModelIndex > children() const
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
void setText(Text t, int child, const QString &text)
Sets the text property t of the object, or of the object's child if child is not 0, to text.
int logicalFromChild(QHeaderView *header, int child) const
int indexOfChild(const QAccessibleInterface *iface) const
Returns the 1-based index of the object child in this object's children list, or -1 if child is not a...
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
QString actionText(int action, Text t, int child) const
Returns the text property t of the action action supported by the object, or of the object's child if...
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
Returns the index of the item in the model specified by the given row, column and parent index...
static QString toString(Register *reg, int type, bool *ok=0)
void append(const T &t)
Inserts value at the end of the list.
QString text(Text t, int child) const
Reimplemented Function
#define QT_BEGIN_NAMESPACE
This macro expands to.
static QAbstractItemView::CursorAction toCursorAction(Relation rel)
bool setSelected(int child, bool on, bool extend)
Selects the item with index child if on is true; otherwise unselects it.
int childCount() const
Reimplemented Function
friend class QAccessibleItemView
int indexOfChild(const QAccessibleInterface *) const
Returns the 1-based index of the object child in this object's children list, or -1 if child is not a...
QRect rect(int child) const
Returns the geometry of the object, or of the object's child if child is not 0.
int childCount() const
Reimplemented Function
The QAccessibleEvent class is used to query addition accessibility information about complex widgets...
bool isValidChildRole(QAccessible::Role role) const
bool isValid() const
Returns true if all the data necessary to use this interface implementation is valid (e...
QAccessibleInterface * caption()
virtual int navigate(RelationFlag relation, int index, QAccessibleInterface **iface) const =0
Navigates from this object to an object that has a relationship relation to this object, and returns the respective object in target.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QItemSelectionModel * selectionModel() const
Returns the current selection model.
bool isSelected(const QModelIndex &index) const
Returns true if the given model item index is selected.
RelationFlag
This enum type defines bit flags that can be combined to indicate the relationship between two access...
The QTreeView class provides a default model/view implementation of a tree view.
QString text
the line edit's text
void initFrom(const QWidget *w)
const QAbstractItemModel * model() const
Returns the model that the index belongs to.
static bool setData(const QByteArray &data, STGMEDIUM *pmedium)
int row() const
Returns the row this model index refers to.
State state(int child) const
Returns the current state of the object, or of the object's child if child is not 0...
Method
This enum describes the possible types of methods that can be invoked on an accessible object...
QModelIndex current() const
const T & at(int i) const
Returns the item at index position i in the list.
int userActionCount(int child) const
Reimplemented Function
const QAbstractItemModel * model() const
Returns a pointer to the model containing the item that this index refers to.
void adjust(int x1, int y1, int x2, int y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
int navigate(RelationFlag relation, int index, QAccessibleInterface **iface) const
Navigates from this object to an object that has a relationship relation to this object, and returns the respective object in target.
The QComboBox widget is a combined button and popup list.
QModelIndex parent() const
Returns the parent QModelIndex for this persistent index, or an invalid QModelIndex if it has no pare...
void setCurrentIndex(const QModelIndex &index)
Sets the current item to be the item at index.
QPointer< QAbstractItemView > view
QRect rect(int child) const
Reimplemented Function
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
QAccessibleItemView(QWidget *w)
int navigate(RelationFlag relation, int index, QAccessibleInterface **iface) const
Navigates from this object to an object that has a relationship relation to this object, and returns the respective object in target.
int entryFromIndex(const QModelIndex &index) const
QModelIndex currentIndex() const
Returns the model index of the current item.
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
int userActionCount(int child) const
Returns the number of custom actions of the object, or of the object's child if child is not 0...
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const =0
Returns the data stored under the given role for the item referred to by the index.
QModelIndex currentIndex() const
Returns the model item index for the current item, or an invalid index if there is no current item...
The State element defines configurations of objects and properties.
QHeaderView * verticalHeader() const
QAbstractItemView * itemView() const
bool isValid() const
Returns true if all the data necessary to use this interface implementation is valid (e...
bool isColumnSelected(int column)
The QTableView class provides a default model/view implementation of a table view.
QString text(Text t, int child) const
Reimplemented Function
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
bool contains(const QPoint &p, bool proper=false) const
Returns true if the given point is inside or on the edge of the rectangle, otherwise returns false...
QString actionText(int action, Text t, int child) const
Reimplemented Function
static QWidget * parentWidget(const QWidget *w)
The QAbstractItemModel class provides the abstract interface for item model classes.
virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
Sets the data for the given role and section in the header with the specified orientation to the valu...
Qt::ItemFlags flags() const
Returns the flags for the item referred to by the index.
static QAccessibleInterface * queryAccessibleInterface(QObject *)
If a QAccessibleInterface implementation exists for the given object, this function returns a pointer...
QModelIndex child(int row, int column) const
Returns the child of the model index that is stored in the given row and column.
The Row item arranges its children horizontally.
Relation relationTo(int child, const QAccessibleInterface *other, int otherChild) const
Returns the relationship between this object's \a child and the \a other object's \a otherChild...
bool doAction(int action, int child, const QVariantList ¶ms=QVariantList())
Asks the object, or the object's child if child is not 0, to execute action using the parameters...
virtual Role role(int child) const =0
Returns the role of the object, or of the object's child if child is not 0.
The QAbstractItemView class provides the basic functionality for item view classes.
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
QHeaderView * verticalHeader() const
bool isSelected(int row, int column)
The QItemSelection class manages information about selected items in a model.
The QListView class provides a list or icon view onto a model.
Role role(int child) const
Returns the role of the object, or of the object's child if child is not 0.
int navigate(RelationFlag relation, int entry, QAccessibleInterface **target) const
Reimplemented Function
The QKeySequence class encapsulates a key sequence as used by shortcuts.
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
int count
the number of tabs in the tab bar
QModelIndexList selectedColumns(int row=0) const
Returns the indexes in the given row for columns where all rows are selected.
int y() const
Returns the y-coordinate of the rectangle's top edge.
The QAccessibleInterface class defines an interface that exposes information about accessible objects...
State state(int child) const
Reimplemented Function
virtual void select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
Selects the model item index using the specified command, and emits selectionChanged().
virtual void showPopup()
Displays the list of items in the combobox.
QString rowDescription(int row)
int childCount() const
Returns the number of children that belong to this object.
QAbstractItemView * view() const
Returns the list view used for the combobox popup.
int x() const
Returns the x-coordinate of the rectangle's left edge.
void setRect(int x, int y, int w, int h)
Sets the coordinates of the rectangle's top-left corner to ({x}, {y}), and its size to the given widt...
#define st(var, type, card)
The QPoint class defines a point in the plane using integer precision.
The QModelIndex class is used to locate data in a data model.
QModelIndex index(int row, int column) const
Qt::ItemFlags flags() const
Returns the flags for the item referred to by the index.
ModelIndexIterator(QAbstractItemView *view, const QModelIndex &start=QModelIndex())
virtual QString text(Text t, int child) const =0
Returns the value of the text property t of the object, or of the object's child if child is not 0...
The QStyleOptionComboBox class is used to describe the parameter for drawing a combobox.
Role role(int child) const
Returns the role of the object, or of the object's child if child is not 0.
QString objectName() const
QAbstractItemView * m_view
QString text(Text t, int child) const
Returns the value of the text property t of the object, or of the object's child if child is not 0...
The QRect class defines a rectangle in the plane using integer precision.
int y() const
Returns the y coordinate of this point.
QRect tabRect(int index) const
Returns the visual rectangle of the tab at position index, or a null rectangle if index is out of ran...
virtual QRect rect(int child) const =0
Returns the geometry of the object, or of the object's child if child is not 0.
void tabCloseRequested(int index)
This signal is emitted when the close button on a tab is clicked.
void unselectRow(int row)
Role role(int child) const
Reimplemented Function
QHeaderView * horizontalHeader() const
QString currentText
the current text
QAccessibleItemRow(QAbstractItemView *view, const QModelIndex &index=QModelIndex(), bool isHeader=false)
QComboBox * comboBox() const
Returns the combobox.
bool isValid() const
Returns true if all the data necessary to use this interface implementation is valid (e...
bool intersects(const QRect &r) const
Returns true if this rectangle intersects with the given rectangle (i.
CursorAction
This enum describes the different ways to navigate between items,.
int x() const
Returns the x coordinate of this point.
QRect rect(int child) const
Returns the geometry of the object, or of the object's child if child is not 0.
void unselectColumn(int column)
void cellAtIndex(int index, int *row, int *column, int *rowSpan, int *columnSpan, bool *isSelected)
QLineEdit * lineEdit() const
Returns the line edit used to edit items in the combobox, or 0 if there is no line edit...
virtual void hidePopup()
Hides the list of items in the combobox if it is currently visible and resets the internal state...
int selectedColumns(int maxColumns, QList< int > *columns)
QHeaderView * horizontalHeader() const
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
QAccessibleInterface * accessibleAt(int row, int column)
QModelIndex rootIndex() const
Returns the model index of the model's root item.
QAbstractItemModel * model() const
Returns the model that this view is presenting.
void translate(int dx, int dy)
Moves the rectangle dx along the x axis and dy along the y axis, relative to the current position...
int childAt(int x, int y) const
Returns the 1-based index of the child that contains the screen coordinates (x, y).
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
QAccessibleInterface * summary()
QPersistentModelIndex row
QString columnDescription(int column)
int selectedRows(int maxRows, QList< int > *rows)
int currentIndex
the index of the tab bar's visible tab
QModelIndex childIndex(int child) const
virtual void setText(Text t, int child, const QString &text)=0
Sets the text property t of the object, or of the object's child if child is not 0, to text.
bool isRowSelected(int row, const QModelIndex &parent) const
Returns true if all items are selected in the row with the given parent.
bool isRowSelected(int row)
The Text item allows you to add formatted text to a scene.
bool isValid() const
Returns true if this persistent model index is valid; otherwise returns false.
void removeAt(int i)
Removes the item at index position i.