Eneboo - Documentación para desarrolladores
Métodos públicos | Atributos públicos estáticos | Métodos protegidos | Amigas
Referencia de la Clase QListBoxItem

The QListBoxItem class is the base class of all list box items. Más...

#include <qlistbox.h>

Diagrama de herencias de QListBoxItem
CompletionItem CompletionItem EditableListBoxItem QFileDialogPrivate::MCItem QListBoxPixmap QListBoxPixmap QListBoxText QListBoxText

Lista de todos los miembros.

Métodos públicos

 QListBoxItem (QListBox *listbox=0)
 QListBoxItem (QListBox *listbox, QListBoxItem *after)
virtual ~QListBoxItem ()
virtual QString text () const
virtual const QPixmappixmap () const
virtual int height (const QListBox *) const
virtual int width (const QListBox *) const
bool isSelected () const
bool isCurrent () const
bool selected () const
bool current () const
QListBoxlistBox () const
void setSelectable (bool b)
bool isSelectable () const
QListBoxItemnext () const
QListBoxItemprev () const
virtual int rtti () const
 QListBoxItem (QListBox *listbox=0)
 QListBoxItem (QListBox *listbox, QListBoxItem *after)
virtual ~QListBoxItem ()
virtual QString text () const
virtual const QPixmappixmap () const
virtual int height (const QListBox *) const
virtual int width (const QListBox *) const
bool isSelected () const
bool isCurrent () const
bool selected () const
bool current () const
QListBoxlistBox () const
void setSelectable (bool b)
bool isSelectable () const
QListBoxItemnext () const
QListBoxItemprev () const
virtual int rtti () const

Atributos públicos estáticos

static int RTTI = 0

Métodos protegidos

virtual void paint (QPainter *)=0
virtual void setText (const QString &text)
void setCustomHighlighting (bool)
virtual void paint (QPainter *)=0
virtual void setText (const QString &text)
void setCustomHighlighting (bool)

Amigas

class QListBox
class QListBoxPrivate
class QComboBox
class QComboBoxPopupItem

Descripción detallada

The QListBoxItem class is the base class of all list box items.

This class is an abstract base class used for all list box items. If you need to insert customized items into a QListBox you must inherit this class and reimplement paint(), height() and width().

Ver también:
QListBox

Documentación del constructor y destructor

QListBoxItem::QListBoxItem ( QListBox listbox = 0)

Constructs an empty list box item in the list box listbox.

QListBoxItem::QListBoxItem ( QListBox listbox,
QListBoxItem after 
)

Constructs an empty list box item in the list box listbox and inserts it after the item after or at the beginning if after is 0.

QListBoxItem::~QListBoxItem ( ) [virtual]

Destroys the list box item.

QListBoxItem::QListBoxItem ( QListBox listbox = 0)
QListBoxItem::QListBoxItem ( QListBox listbox,
QListBoxItem after 
)
virtual QListBoxItem::~QListBoxItem ( ) [virtual]

Documentación de las funciones miembro

bool QListBoxItem::current ( ) const [inline]
bool QListBoxItem::current ( ) const [inline]
int QListBoxItem::height ( const QListBox lb) const [virtual]

Implement this function to return the height of your item. The lb parameter is the same as listBox() and is provided for convenience and compatibility.

The default implementation returns {QApplication::globalStrut()}'s height.

Ver también:
paint(), width()

Reimplementado en CompletionItem, QListBoxText, QListBoxPixmap, QFileDialogPrivate::MCItem, QListBoxText, QListBoxPixmap y CompletionItem.

virtual int QListBoxItem::height ( const QListBox ) const [virtual]
bool QListBoxItem::isCurrent ( ) const
bool QListBoxItem::isCurrent ( ) const

Returns TRUE if the item is the current item; otherwise returns FALSE.

Ver también:
QListBox::currentItem(), QListBox::item(), isSelected()
bool QListBoxItem::isSelectable ( ) const

Returns TRUE if this item is selectable (the default); otherwise returns FALSE.

Ver también:
setSelectable()
bool QListBoxItem::isSelectable ( ) const
bool QListBoxItem::isSelected ( ) const [inline]

Returns TRUE if the item is selected; otherwise returns FALSE.

Ver también:
QListBox::isSelected(), isCurrent()
bool QListBoxItem::isSelected ( ) const [inline]
QListBox * QListBoxItem::listBox ( ) const

Returns a pointer to the list box containing this item.

QListBox* QListBoxItem::listBox ( ) const
QListBoxItem * QListBoxItem::next ( ) const

Returns the item that comes after this in the list box. If this is the last item, 0 is returned.

Ver también:
prev()
QListBoxItem* QListBoxItem::next ( ) const
virtual void QListBoxItem::paint ( QPainter ) [protected, pure virtual]
void QListBoxItem::paint ( QPainter p) [protected, pure virtual]

Implement this function to draw your item. The painter, p, is already open for painting.

Ver también:
height(), width()

Implementado en CompletionItem, QListBoxText, QListBoxPixmap, QFileDialogPrivate::MCItem, QListBoxText, QListBoxPixmap, BoldListBoxText y CompletionItem.

virtual const QPixmap* QListBoxItem::pixmap ( ) const [virtual]
const QPixmap * QListBoxItem::pixmap ( ) const [virtual]

Returns the pixmap associated with the item, or 0 if there isn't one.

The default implementation returns 0.

Reimplementado en QListBoxPixmap, QFileDialogPrivate::MCItem y QListBoxPixmap.

QListBoxItem * QListBoxItem::prev ( ) const

Returns the item which comes before this in the list box. If this is the first item, 0 is returned.

Ver también:
next()
QListBoxItem* QListBoxItem::prev ( ) const
int QListBoxItem::rtti ( ) const [virtual]

Returns 0.

Make your derived classes return their own values for rtti(), and you can distinguish between listbox items. You should use values greater than 1000 preferably a large random number, to allow for extensions to this class.

Reimplementado en QListBoxText, QListBoxPixmap, QListBoxText y QListBoxPixmap.

virtual int QListBoxItem::rtti ( ) const [virtual]
bool QListBoxItem::selected ( ) const [inline]
bool QListBoxItem::selected ( ) const [inline]
void QListBoxItem::setCustomHighlighting ( bool  b) [protected]

Defines whether the list box item is responsible for drawing itself in a highlighted state when being selected.

If b is FALSE (the default), the list box will draw some default highlight indicator before calling paint().

Ver también:
selected(), paint()
void QListBoxItem::setCustomHighlighting ( bool  ) [protected]
void QListBoxItem::setSelectable ( bool  b)
void QListBoxItem::setSelectable ( bool  b)

If b is TRUE (the default) then this item can be selected by the user; otherwise this item cannot be selected by the user.

Ver también:
isSelectable()
virtual void QListBoxItem::setText ( const QString text) [inline, protected, virtual]

Reimplementado en EditableListBoxItem.

void QListBoxItem::setText ( const QString text) [inline, protected, virtual]

Sets the text of the QListBoxItem to text. This text is also used for sorting. The text is not shown unless explicitly drawn in paint().

Ver también:
text()

Reimplementado en EditableListBoxItem.

virtual QString QListBoxItem::text ( ) const [virtual]
QString QListBoxItem::text ( ) const [virtual]

Returns the text of the item. This text is also used for sorting.

Ver también:
setText()

Reimplementado en CompletionItem, QFileDialogPrivate::MCItem y CompletionItem.

int QListBoxItem::width ( const QListBox lb) const [virtual]

Reimplement this function to return the width of your item. The lb parameter is the same as listBox() and is provided for convenience and compatibility.

The default implementation returns {QApplication::globalStrut()}'s width.

Ver también:
paint(), height()

Reimplementado en CompletionItem, QListBoxText, QListBoxPixmap, QFileDialogPrivate::MCItem, QListBoxText, QListBoxPixmap y CompletionItem.

virtual int QListBoxItem::width ( const QListBox ) const [virtual]

Documentación de las funciones relacionadas y clases amigas

QComboBox [friend]
QListBox [friend]
QListBoxPrivate [friend]

Documentación de los datos miembro

static int QListBoxItem::RTTI = 0 [static]

Reimplementado en QListBoxText y QListBoxPixmap.


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'