Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

  • Qt 4.8
  • Qt3SupportLight
  • Q3ListBoxPixmap

Q3ListBoxPixmap Class

TheQ3ListBoxPixmap class provides list box items with a pixmap and optional text.More...

Header:#include <Q3ListBoxPixmap>
Inherits:Q3ListBoxItem

Public Functions

Q3ListBoxPixmap(Q3ListBox * listbox, const QPixmap & pixmap)
Q3ListBoxPixmap(const QPixmap & pixmap)
Q3ListBoxPixmap(Q3ListBox * listbox, const QPixmap & pixmap, Q3ListBoxItem * after)
Q3ListBoxPixmap(Q3ListBox * listbox, const QPixmap & pix, const QString & text)
Q3ListBoxPixmap(const QPixmap & pix, const QString & text)
Q3ListBoxPixmap(Q3ListBox * listbox, const QPixmap & pix, const QString & text, Q3ListBoxItem * after)
~Q3ListBoxPixmap()

Reimplemented Public Functions

virtual intheight(const Q3ListBox * lb) const
virtual const QPixmap *pixmap() const
virtual intrtti() const
virtual intwidth(const Q3ListBox * lb) const

Reimplemented Protected Functions

virtual voidpaint(QPainter * painter)

Detailed Description

TheQ3ListBoxPixmap class provides list box items with a pixmap and optional text.

Items of this class are drawn with the pixmap on the left with the optional text to the right of the pixmap.

See alsoQ3ListBox andQ3ListBoxItem.

Member Function Documentation

Q3ListBoxPixmap::Q3ListBoxPixmap(Q3ListBox * listbox, constQPixmap & pixmap)

Constructs a new list box item in list boxlistbox showing the pixmappixmap.

Q3ListBoxPixmap::Q3ListBoxPixmap(constQPixmap & pixmap)

Constructs a new list box item showing the pixmappixmap.

Q3ListBoxPixmap::Q3ListBoxPixmap(Q3ListBox * listbox, constQPixmap & pixmap,Q3ListBoxItem * after)

Constructs a new list box item in list boxlistbox showing the pixmappixmap. The item gets inserted after the itemafter, or at the beginning ifafter is 0.

Q3ListBoxPixmap::Q3ListBoxPixmap(Q3ListBox * listbox, constQPixmap & pix, constQString & text)

Constructs a new list box item in list boxlistbox showing the pixmappix and the texttext.

Q3ListBoxPixmap::Q3ListBoxPixmap(constQPixmap & pix, constQString & text)

Constructs a new list box item showing the pixmappix and the text totext.

Q3ListBoxPixmap::Q3ListBoxPixmap(Q3ListBox * listbox, constQPixmap & pix, constQString & text,Q3ListBoxItem * after)

Constructs a new list box item in list boxlistbox showing the pixmappix and the stringtext. The item gets inserted after the itemafter, or at the beginning ifafter is 0.

Q3ListBoxPixmap::~Q3ListBoxPixmap()

Destroys the item.

[virtual]int Q3ListBoxPixmap::height(constQ3ListBox * lb) const

Reimplemented fromQ3ListBoxItem::height().

Returns the height of the pixmap in list boxlb.

See alsopaint() andwidth().

[virtual protected]void Q3ListBoxPixmap::paint(QPainter * painter)

Reimplemented fromQ3ListBoxItem::paint().

Draws the pixmap usingpainter.

[virtual]constQPixmap * Q3ListBoxPixmap::pixmap() const

Reimplemented fromQ3ListBoxItem::pixmap().

Returns the pixmap associated with the item.

[virtual]int Q3ListBoxPixmap::rtti() const

Reimplemented fromQ3ListBoxItem::rtti().

Returns 2.

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.

[virtual]int Q3ListBoxPixmap::width(constQ3ListBox * lb) const

Reimplemented fromQ3ListBoxItem::width().

Returns the width of the pixmap plus some margin in list boxlb.

See alsopaint() andheight().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp