Qt 4.8
Public Functions | Private Functions | Properties | Friends | List of all members
QListViewItem Class Reference

#include <qlistview_p.h>

Public Functions

int height () const
 
void invalidate ()
 
bool isValid () const
 
void move (const QPoint &position)
 
bool operator!= (const QListViewItem &other) const
 
bool operator== (const QListViewItem &other) const
 
 QListViewItem ()
 
 QListViewItem (const QListViewItem &other)
 
 QListViewItem (QRect r, int i)
 
void resize (const QSize &size)
 
int width () const
 

Private Functions

QRect rect () const
 

Properties

short h
 
int indexHint
 
uint visited
 
short w
 
int x
 
int y
 

Friends

class QIconModeViewBase
 
class QListModeViewBase
 
class QListViewPrivate
 

Detailed Description

Definition at line 67 of file qlistview_p.h.

Constructors and Destructors

◆ QListViewItem() [1/3]

QListViewItem::QListViewItem ( )
inline

Definition at line 73 of file qlistview_p.h.

74  : x(-1), y(-1), w(0), h(0), indexHint(-1), visited(0xffff) {}

◆ QListViewItem() [2/3]

QListViewItem::QListViewItem ( const QListViewItem other)
inline

Definition at line 75 of file qlistview_p.h.

76  : x(other.x), y(other.y), w(other.w), h(other.h),
77  indexHint(other.indexHint), visited(other.visited) {}

◆ QListViewItem() [3/3]

QListViewItem::QListViewItem ( QRect  r,
int  i 
)
inline

Definition at line 78 of file qlistview_p.h.

79  : x(r.x()), y(r.y()), w(qMin(r.width(), SHRT_MAX)), h(qMin(r.height(), SHRT_MAX)),
80  indexHint(i), visited(0xffff) {}
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252

Functions

◆ height()

int QListViewItem::height ( ) const
inline

Definition at line 95 of file qlistview_p.h.

Referenced by QListModeViewBase::setRowCount().

95 { return h; }

◆ invalidate()

void QListViewItem::invalidate ( )
inline

Definition at line 88 of file qlistview_p.h.

Referenced by QIconModeViewBase::doDynamicLayout().

89  { x = -1; y = -1; w = 0; h = 0; }

◆ isValid()

bool QListViewItem::isValid ( ) const
inline

Definition at line 86 of file qlistview_p.h.

Referenced by QIconModeViewBase::addLeaf(), and QIconModeViewBase::itemIndex().

87  { return rect().isValid() && (indexHint > -1); }
QRect rect() const
Definition: qlistview_p.h:97
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
Definition: qrect.h:237

◆ move()

void QListViewItem::move ( const QPoint position)
inline

Definition at line 92 of file qlistview_p.h.

Referenced by QIconModeViewBase::moveItem().

93  { x = position.x(); y = position.y(); }
int y() const
Returns the y coordinate of this point.
Definition: qpoint.h:131
int x() const
Returns the x coordinate of this point.
Definition: qpoint.h:128

◆ operator!=()

bool QListViewItem::operator!= ( const QListViewItem other) const
inline

Definition at line 84 of file qlistview_p.h.

85  { return !(*this == other); }

◆ operator==()

bool QListViewItem::operator== ( const QListViewItem other) const
inline

Definition at line 81 of file qlistview_p.h.

81  {
82  return (x == other.x && y == other.y && w == other.w && h == other.h &&
83  indexHint == other.indexHint); }

◆ rect()

QRect QListViewItem::rect ( ) const
inlineprivate

◆ resize()

void QListViewItem::resize ( const QSize size)
inline

Definition at line 90 of file qlistview_p.h.

91  { w = qMin(size.width(), SHRT_MAX); h = qMin(size.height(), SHRT_MAX); }
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
int width() const
Returns the width.
Definition: qsize.h:126
int height() const
Returns the height.
Definition: qsize.h:129

◆ width()

int QListViewItem::width ( ) const
inline

Definition at line 94 of file qlistview_p.h.

94 { return w; }

Friends and Related Functions

◆ QIconModeViewBase

friend class QIconModeViewBase
friend

Definition at line 71 of file qlistview_p.h.

◆ QListModeViewBase

friend class QListModeViewBase
friend

Definition at line 70 of file qlistview_p.h.

◆ QListViewPrivate

friend class QListViewPrivate
friend

Definition at line 69 of file qlistview_p.h.

Properties

◆ h

short QListViewItem::h
private

◆ indexHint

int QListViewItem::indexHint
mutableprivate

◆ visited

uint QListViewItem::visited
private

Definition at line 102 of file qlistview_p.h.

Referenced by QIconModeViewBase::addLeaf().

◆ w

short QListViewItem::w
private

◆ x

int QListViewItem::x
private

◆ y

int QListViewItem::y
private

The documentation for this class was generated from the following file: