29 #include <QGraphicsLayout>
41 m_bufferSize(bufferSize),
146 item->setTwoColumns(m_twoColumns);
178 item->setModelIndex(newIndex);
185 item->setModelIndex(newIndex);
229 if (fullyVisible && viewRect.
contains(itemRectBoundingRect))
231 else if (viewRect.
intersects(itemRectBoundingRect))
252 if (!
index.isValid())
262 if (!
index.isValid())
265 insertItem(0,
index);
272 int firstVisible = 0;
303 item->setTwoColumns(m_twoColumns);
306 item->updateItemContents();
314 int &lastVisibleBufferIndex,
316 bool fullyVisible)
const
321 firstVisibleBufferIndex = -1;
322 lastVisibleBufferIndex = -1;
327 if (firstVisibleBufferIndex == -1)
328 firstVisibleBufferIndex =
i;
329 lastVisibleBufferIndex =
i;
331 else if ( lastVisibleBufferIndex != -1 )
small capitals from c petite p scientific i
[1]
QList< AbstractViewItem * > m_items
AbstractViewItem * m_prototype
virtual void addItem(const QModelIndex &index)
virtual void removeItemFromVisibleLayout(AbstractViewItem *item)=0
void setSubtreeCacheEnabled(const bool enabled)
virtual int itemCount() const
virtual void addItemToVisibleLayout(int index, AbstractViewItem *item)=0
AbstractViewItem * firstItem()
virtual bool event(QEvent *e)
virtual bool eventFilter(QObject *obj, QEvent *event)
AbstractItemContainer(int bufferSize, QGraphicsWidget *parent=0)
bool itemVisibleInView(AbstractViewItem *item, const QRectF &viewRect, bool fullyVisible=true) const
virtual void adjustVisibleContainerSize(const QSizeF &size)=0
virtual void removeItem(const QModelIndex &index)
virtual AbstractViewItem * itemAt(const int row) const
virtual void setItemView(AbstractItemView *view)
virtual ~AbstractItemContainer()
virtual int maxItemCountInItemBuffer() const
AbstractItemView * m_itemView
AbstractViewItem * prototype()
virtual void setTwoColumns(const bool enabled)
void findFirstAndLastVisibleBufferIndex(int &firstVisibleBufferIndex, int &lastVisibleBufferIndex, const QRectF &viewRect, bool fullyVisible) const
AbstractViewItem * findItemByIndex(const QModelIndex &index) const
virtual void setItemPrototype(AbstractViewItem *ptype)
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
virtual QModelIndex nextIndex(const QModelIndex &index) const
virtual QAbstractItemModel * model() const
virtual void setListItemCaching(bool enabled)=0
virtual QModelIndex previousIndex(const QModelIndex &index) const
void refreshContainerGeometry()
virtual void scrollContentsBy(qreal dx, qreal dy)
virtual int indexCount() const
virtual bool listItemCaching() const =0
virtual void setSubtreeCacheEnabled(bool enabled)
virtual void updateItemContents()
virtual AbstractViewItem * newItemInstance()=0
virtual void themeChange()
QModelIndex modelIndex() const
virtual void setTwoColumns(const bool enabled)=0
The QEvent class is the base class of all event classes. Event objects contain event parameters.
QPointF mapToItem(const QGraphicsItem *item, const QPointF &point) const
virtual QRectF boundingRect() const =0
void setParentItem(QGraphicsItem *parent)
bool enabled
whether the item is enabled or not
QPointF pos
the position of the item
iterator insert(qsizetype i, parameter_type t)
bool removeOne(const AT &t)
const_reference at(qsizetype i) const noexcept
qsizetype count() const noexcept
void prepend(rvalue_ref t)
void append(parameter_type t)
The QModelIndex class is used to locate data in a data model.
constexpr int row() const noexcept
constexpr bool isValid() const noexcept
The QObject class is the base class of all Qt objects.
void installEventFilter(QObject *filterObj)
virtual bool eventFilter(QObject *watched, QEvent *event)
The QRectF class defines a finite rectangle in the plane using floating point precision.
constexpr bool isEmpty() const noexcept
bool contains(const QRectF &r) const noexcept
bool intersects(const QRectF &r) const noexcept
constexpr bool isValid() const noexcept
The QSizeF class defines the size of a two-dimensional object using floating point precision.
constexpr void setWidth(qreal w) noexcept
constexpr qreal width() const noexcept
The QVariant class acts like a union for the most common Qt data types.
qDeleteAll(list.begin(), list.end())
EGLOutputLayerEXT EGLint EGLAttrib value
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLenum GLenum GLsizei count
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLenum GLsizei void * row
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent