Eneboo - Documentación para desarrolladores
|
The QListBoxItem class is the base class of all list box items. Más...
#include <qlistbox.h>
Métodos públicos | |
QListBoxItem (QListBox *listbox=0) | |
QListBoxItem (QListBox *listbox, QListBoxItem *after) | |
virtual | ~QListBoxItem () |
virtual QString | text () const |
virtual const QPixmap * | pixmap () 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 |
QListBox * | listBox () const |
void | setSelectable (bool b) |
bool | isSelectable () const |
QListBoxItem * | next () const |
QListBoxItem * | prev () const |
virtual int | rtti () const |
QListBoxItem (QListBox *listbox=0) | |
QListBoxItem (QListBox *listbox, QListBoxItem *after) | |
virtual | ~QListBoxItem () |
virtual QString | text () const |
virtual const QPixmap * | pixmap () 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 |
QListBox * | listBox () const |
void | setSelectable (bool b) |
bool | isSelectable () const |
QListBoxItem * | next () const |
QListBoxItem * | prev () 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 |
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().
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] |
bool QListBoxItem::current | ( | ) | const [inline] |
bool QListBoxItem::current | ( | ) | const [inline] |
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.
Reimplementado en CompletionItem, QListBoxText, QListBoxPixmap, QFileDialogPrivate::MCItem, QListBoxText, QListBoxPixmap y CompletionItem.
Reimplementado en CompletionItem, QListBoxText, QListBoxPixmap, QFileDialogPrivate::MCItem, QListBoxText, QListBoxPixmap y CompletionItem.
bool QListBoxItem::isCurrent | ( | ) | const |
bool QListBoxItem::isCurrent | ( | ) | const |
Returns TRUE if the item is the current item; otherwise returns FALSE.
bool QListBoxItem::isSelectable | ( | ) | const |
Returns TRUE if this item is selectable (the default); otherwise returns FALSE.
bool QListBoxItem::isSelectable | ( | ) | const |
bool QListBoxItem::isSelected | ( | ) | const [inline] |
Returns TRUE if the item is selected; otherwise returns FALSE.
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.
QListBoxItem* QListBoxItem::next | ( | ) | const |
virtual void QListBoxItem::paint | ( | QPainter * | ) | [protected, pure virtual] |
Implementado en CompletionItem, QListBoxText, QListBoxPixmap, QFileDialogPrivate::MCItem, QListBoxText, QListBoxPixmap, BoldListBoxText y CompletionItem.
void QListBoxItem::paint | ( | QPainter * | p | ) | [protected, pure virtual] |
Implement this function to draw your item. The painter, p, is already open for painting.
Implementado en CompletionItem, QListBoxText, QListBoxPixmap, QFileDialogPrivate::MCItem, QListBoxText, QListBoxPixmap, BoldListBoxText y CompletionItem.
virtual const QPixmap* QListBoxItem::pixmap | ( | ) | const [virtual] |
Reimplementado en QListBoxPixmap, QFileDialogPrivate::MCItem y QListBoxPixmap.
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.
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] |
Reimplementado en QListBoxText, QListBoxPixmap, QListBoxText y QListBoxPixmap.
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().
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.
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().
Reimplementado en EditableListBoxItem.
virtual QString QListBoxItem::text | ( | ) | const [virtual] |
Reimplementado en CompletionItem, QFileDialogPrivate::MCItem y CompletionItem.
QString QListBoxItem::text | ( | ) | const [virtual] |
Returns the text of the item. This text is also used for sorting.
Reimplementado en CompletionItem, QFileDialogPrivate::MCItem y CompletionItem.
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.
Reimplementado en CompletionItem, QListBoxText, QListBoxPixmap, QFileDialogPrivate::MCItem, QListBoxText, QListBoxPixmap y CompletionItem.
Reimplementado en CompletionItem, QListBoxText, QListBoxPixmap, QFileDialogPrivate::MCItem, QListBoxText, QListBoxPixmap y CompletionItem.
QComboBox [friend] |
QComboBoxPopupItem [friend] |
QListBox [friend] |
QListBoxPrivate [friend] |
static int QListBoxItem::RTTI = 0 [static] |
Reimplementado en QListBoxText y QListBoxPixmap.