7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qabstractitemview.h>
20 Q_PROPERTY(
bool firstSectionMovable READ isFirstSectionMovable WRITE setFirstSectionMovable)
21 Q_PROPERTY(
bool showSortIndicator READ isSortIndicatorShown WRITE setSortIndicatorShown)
22 Q_PROPERTY(
bool highlightSections READ highlightSections WRITE setHighlightSections)
23 Q_PROPERTY(
bool stretchLastSection READ stretchLastSection WRITE setStretchLastSection)
24 Q_PROPERTY(
bool cascadingSectionResizes READ cascadingSectionResizes
25 WRITE setCascadingSectionResizes)
26 Q_PROPERTY(
int defaultSectionSize READ defaultSectionSize WRITE setDefaultSectionSize
27 RESET resetDefaultSectionSize)
28 Q_PROPERTY(
int minimumSectionSize READ minimumSectionSize WRITE setMinimumSectionSize)
29 Q_PROPERTY(
int maximumSectionSize READ maximumSectionSize WRITE setMaximumSectionSize)
30 Q_PROPERTY(Qt::Alignment defaultAlignment READ defaultAlignment WRITE setDefaultAlignment)
31 Q_PROPERTY(
bool sortIndicatorClearable READ isSortIndicatorClearable
32 WRITE setSortIndicatorClearable NOTIFY sortIndicatorClearableChanged)
54 QSize sizeHint()
const override;
55 void setVisible(
bool v)
override;
56 int sectionSizeHint(
int logicalIndex)
const;
58 int visualIndexAt(
int position)
const;
59 int logicalIndexAt(
int position)
const;
61 inline int logicalIndexAt(
int x,
int y)
const;
62 inline int logicalIndexAt(
const QPoint &
pos)
const;
64 int sectionSize(
int logicalIndex)
const;
65 int sectionPosition(
int logicalIndex)
const;
66 int sectionViewportPosition(
int logicalIndex)
const;
68 void moveSection(
int from,
int to);
69 void swapSections(
int first,
int second);
70 void resizeSection(
int logicalIndex,
int size);
73 bool isSectionHidden(
int logicalIndex)
const;
74 void setSectionHidden(
int logicalIndex,
bool hide);
75 int hiddenSectionCount()
const;
77 inline void hideSection(
int logicalIndex);
78 inline void showSection(
int logicalIndex);
81 int visualIndex(
int logicalIndex)
const;
82 int logicalIndex(
int visualIndex)
const;
84 void setSectionsMovable(
bool movable);
85 bool sectionsMovable()
const;
86 void setFirstSectionMovable(
bool movable);
87 bool isFirstSectionMovable()
const;
89 void setSectionsClickable(
bool clickable);
90 bool sectionsClickable()
const;
92 void setHighlightSections(
bool highlight);
93 bool highlightSections()
const;
95 ResizeMode sectionResizeMode(
int logicalIndex)
const;
96 void setSectionResizeMode(ResizeMode
mode);
97 void setSectionResizeMode(
int logicalIndex, ResizeMode
mode);
99 void setResizeContentsPrecision(
int precision);
100 int resizeContentsPrecision()
const;
102 int stretchSectionCount()
const;
104 void setSortIndicatorShown(
bool show);
105 bool isSortIndicatorShown()
const;
108 int sortIndicatorSection()
const;
111 void setSortIndicatorClearable(
bool clearable);
112 bool isSortIndicatorClearable()
const;
114 bool stretchLastSection()
const;
115 void setStretchLastSection(
bool stretch);
117 bool cascadingSectionResizes()
const;
118 void setCascadingSectionResizes(
bool enable);
120 int defaultSectionSize()
const;
121 void setDefaultSectionSize(
int size);
122 void resetDefaultSectionSize();
124 int minimumSectionSize()
const;
125 void setMinimumSectionSize(
int size);
126 int maximumSectionSize()
const;
127 void setMaximumSectionSize(
int size);
129 Qt::Alignment defaultAlignment()
const;
130 void setDefaultAlignment(Qt::Alignment
alignment);
133 bool sectionsMoved()
const;
134 bool sectionsHidden()
const;
136#ifndef QT_NO_DATASTREAM
141 void reset()
override;
144 void setOffset(
int offset);
145 void setOffsetToSectionPosition(
int visualIndex);
146 void setOffsetToLastSection();
147 void headerDataChanged(
Qt::Orientation orientation,
int logicalFirst,
int logicalLast);
150 void sectionMoved(
int logicalIndex,
int oldVisualIndex,
int newVisualIndex);
163 void updateSection(
int logicalIndex);
164 void resizeSections();
165 void sectionsInserted(
const QModelIndex &
parent,
int logicalFirst,
int logicalLast);
166 void sectionsAboutToBeRemoved(
const QModelIndex &
parent,
int logicalFirst,
int logicalLast);
172 void initializeSections();
173 void initializeSections(
int start,
int end);
185 virtual QSize sectionSizeFromContents(
int logicalIndex)
const;
190 void scrollContentsBy(
int dx,
int dy)
override;
216 Q_PRIVATE_SLOT(d_func(),
void _q_sectionsAboutToBeMoved(
const QModelIndex &sourceParent,
int logicalStart,
int logicalEnd,
const QModelIndex &destinationParent,
int logicalDestination))
217 Q_PRIVATE_SLOT(d_func(),
void _q_sectionsMoved(
const QModelIndex &sourceParent,
int logicalStart,
int logicalEnd,
const QModelIndex &destinationParent,
int logicalDestination))
LayoutChangeHint
This enum describes the way the model changes layout.
The QAbstractItemView class provides the basic functionality for item view classes.
virtual QRect visualRect(const QModelIndex &index) const =0
Returns the rectangle on the viewport occupied by the item at index.
virtual QRegion visualRegionForSelection(const QItemSelection &selection) const =0
Returns the region from the viewport of the items in the given selection.
virtual void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)=0
Applies the selection flags to the items in or touched by the rectangle, rect.
virtual int verticalOffset() const =0
Returns the vertical offset of the view.
virtual void reset()
Reset the internal state of the view.
void mouseReleaseEvent(QMouseEvent *event) override
This function is called with the given event when a mouse button is released, after a mouse press eve...
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList< int > &roles=QList< int >())
This slot is called when items with the given roles are changed in the model.
bool viewportEvent(QEvent *event) override
This function is used to handle tool tips, and What's This? mode, if the given event is a QEvent::Too...
virtual void setModel(QAbstractItemModel *model)
Sets the model for the view to present.
virtual void doItemsLayout()
virtual void scrollTo(const QModelIndex &index, ScrollHint hint=EnsureVisible)=0
Scrolls the view if necessary to ensure that the item at index is visible.
virtual int horizontalOffset() const =0
Returns the horizontal offset of the view.
CursorAction
This enum describes the different ways to navigate between items,.
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...
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
This slot is called when a new item becomes the current item.
ScrollHint
\value EnsureVisible Scroll to ensure that the item is visible.
void mousePressEvent(QMouseEvent *event) override
This function is called with the given event when a mouse button is pressed while the cursor is insid...
virtual void rowsInserted(const QModelIndex &parent, int start, int end)
This slot is called when rows are inserted.
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...
void mouseMoveEvent(QMouseEvent *event) override
This function is called with the given event when a mouse move event is sent to the widget.
virtual QModelIndex indexAt(const QPoint &point) const =0
Returns the model index of the item at the viewport coordinates point.
void mouseDoubleClickEvent(QMouseEvent *event) override
This function is called with the given event when a mouse button is double clicked inside the widget.
virtual void updateGeometries()
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
\inmodule QtCore\reentrant
constexpr int x() const noexcept
Returns the x coordinate of this point.
constexpr int y() const noexcept
Returns the y coordinate of this point.
\inmodule QtCore\reentrant
The QRegion class specifies a clip region for a painter.
\variable QStyleOptionFocusRect::backgroundColor
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.
Combined button and popup list for selecting options.
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLenum GLuint GLintptr offset
GLfixed GLfixed GLint GLint order
GLenum GLint GLint * precision
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define QT_REQUIRE_CONFIG(feature)
QSqlQueryModel * model
[16]
QItemSelection * selection
[0]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent