28 #include <QGraphicsLayout>
59 this,
SLOT(_q_modelDestroyed()));
92 "AbstractItemView::setModel",
93 "A model should return the exact same index "
94 "(including its internal id/pointer) when asked for it twice in a row.");
96 "AbstractItemView::setModel",
97 "The parent of a top level index should be invalid");
267 if (!newCurrentIndex.
isValid()) {
383 if (
item &&
item->size().height() > 1) {
384 itemH =
item->size().height();
385 }
else if (
item &&
item->preferredHeight() > 1) {
386 itemH =
item->preferredHeight();
393 (
qAbs(dy) < itemH) && (vpy-dy <= 0)) {
400 for (
int i = 0;
i<itemsInContainer; ++
i) {
406 qreal diff = vPos-startRow*itemH;
small capitals from c petite p scientific i
[1]
virtual void addItem(const QModelIndex &index)
virtual int itemCount() const
virtual void setListItemCaching(const bool enabled, const int index)=0
virtual void removeItem(const QModelIndex &index)
virtual AbstractViewItem * itemAt(const int row) const
virtual void setItemView(AbstractItemView *view)
virtual void setItemPrototype(AbstractViewItem *ptype)
virtual QModelIndex nextIndex(const QModelIndex &index) const
virtual void setItemPrototype(AbstractViewItem *prototype)
virtual QAbstractItemModel * model() const
virtual void rowsRemoved(const QModelIndex &parent, int start, int end)
virtual QModelIndex previousIndex(const QModelIndex &index) const
void refreshContainerGeometry()
virtual bool event(QEvent *e)
QAbstractItemModel * m_model
virtual void scrollContentsBy(qreal dx, qreal dy)
AbstractItemContainer * m_container
void setSelectionModel(QItemSelectionModel *smodel)
virtual void setRootIndex(const QModelIndex &index)
virtual void currentSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
virtual void rowsInserted(const QModelIndex &parent, int start, int end)
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
AbstractItemView(QGraphicsWidget *parent=nullptr)
virtual void setModel(QAbstractItemModel *model, AbstractViewItem *prototype)
virtual void setContainer(AbstractItemContainer *container)
virtual void rowsAboutToBeRemoved(const QModelIndex &index, int start, int end)
virtual int indexCount() const
virtual bool listItemCaching() const =0
void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags selectionFlag=QItemSelectionModel::NoUpdate)
virtual void layoutChanged()
virtual void modelDestroyed()
QItemSelectionModel * m_selectionModel
virtual void currentIndexChanged(const QModelIndex ¤t, const QModelIndex &previous)
QPersistentModelIndex m_rootIndex
QPersistentModelIndex m_currentIndex
virtual void rowsAboutToBeInserted(const QModelIndex &index, int start, int end)
virtual ~AbstractItemView()
void setModelIndex(const QModelIndex &index)
The QAbstractItemModel class provides the abstract interface for item model classes.
virtual Q_INVOKABLE int rowCount(const QModelIndex &parent=QModelIndex()) const =0
virtual Q_INVOKABLE QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
The QEvent class is the base class of all event classes. Event objects contain event parameters.
@ ItemClipsChildrenToShape
void setPos(const QPointF &pos)
void setParentItem(QGraphicsItem *parent)
void setFlag(GraphicsItemFlag flag, bool enabled=true)
QRectF contentsRect() const
qreal preferredHeight() const
QPointF pos
the position of the item
qreal y
the y position of the item
QGraphicsObject * parent
the parent of the item
The QItemSelection class manages information about selected items in a model.
virtual void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
QAbstractItemModel * model
The QModelIndex class is used to locate data in a data model.
constexpr int row() const noexcept
QModelIndex parent() const
constexpr bool isValid() const noexcept
void installEventFilter(QObject *filterObj)
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
void destroyed(QObject *=nullptr)
constexpr qreal x() const noexcept
constexpr qreal y() const noexcept
constexpr qreal height() const noexcept
constexpr qreal height() const noexcept
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
#define Q_ASSERT_X(cond, x, msg)
QSqlQueryModel * model
[16]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent