Eneboo - Documentación para desarrolladores
|
The QIconViewItem class provides a single item in a QIconView. Más...
#include <qiconview.h>
Métodos públicos | |
QIconViewItem (QIconView *parent) | |
QIconViewItem (QIconView *parent, QIconViewItem *after) | |
QIconViewItem (QIconView *parent, const QString &text) | |
QIconViewItem (QIconView *parent, QIconViewItem *after, const QString &text) | |
QIconViewItem (QIconView *parent, const QString &text, const QPixmap &icon) | |
QIconViewItem (QIconView *parent, QIconViewItem *after, const QString &text, const QPixmap &icon) | |
QIconViewItem (QIconView *parent, const QString &text, const QPicture &picture) | |
QIconViewItem (QIconView *parent, QIconViewItem *after, const QString &text, const QPicture &picture) | |
virtual | ~QIconViewItem () |
virtual void | setRenameEnabled (bool allow) |
virtual void | setDragEnabled (bool allow) |
virtual void | setDropEnabled (bool allow) |
virtual QString | text () const |
virtual QPixmap * | pixmap () const |
virtual QPicture * | picture () const |
virtual QString | key () const |
bool | renameEnabled () const |
bool | dragEnabled () const |
bool | dropEnabled () const |
QIconView * | iconView () const |
QIconViewItem * | prevItem () const |
QIconViewItem * | nextItem () const |
int | index () const |
virtual void | setSelected (bool s, bool cb) |
virtual void | setSelected (bool s) |
virtual void | setSelectable (bool s) |
bool | isSelected () const |
bool | isSelectable () const |
virtual void | repaint () |
virtual bool | move (int x, int y) |
virtual void | moveBy (int dx, int dy) |
virtual bool | move (const QPoint &pnt) |
virtual void | moveBy (const QPoint &pnt) |
QRect | rect () const |
int | x () const |
int | y () const |
int | width () const |
int | height () const |
QSize | size () const |
QPoint | pos () const |
QRect | textRect (bool relative=TRUE) const |
QRect | pixmapRect (bool relative=TRUE) const |
bool | contains (const QPoint &pnt) const |
bool | intersects (const QRect &r) const |
virtual bool | acceptDrop (const QMimeSource *mime) const |
void | rename () |
virtual int | compare (QIconViewItem *i) const |
virtual void | setText (const QString &text) |
virtual void | setPixmap (const QPixmap &icon) |
virtual void | setPicture (const QPicture &icon) |
virtual void | setText (const QString &text, bool recalc, bool redraw=TRUE) |
virtual void | setPixmap (const QPixmap &icon, bool recalc, bool redraw=TRUE) |
virtual void | setKey (const QString &k) |
virtual int | rtti () const |
QIconViewItem (QIconView *parent) | |
QIconViewItem (QIconView *parent, QIconViewItem *after) | |
QIconViewItem (QIconView *parent, const QString &text) | |
QIconViewItem (QIconView *parent, QIconViewItem *after, const QString &text) | |
QIconViewItem (QIconView *parent, const QString &text, const QPixmap &icon) | |
QIconViewItem (QIconView *parent, QIconViewItem *after, const QString &text, const QPixmap &icon) | |
QIconViewItem (QIconView *parent, const QString &text, const QPicture &picture) | |
QIconViewItem (QIconView *parent, QIconViewItem *after, const QString &text, const QPicture &picture) | |
virtual | ~QIconViewItem () |
virtual void | setRenameEnabled (bool allow) |
virtual void | setDragEnabled (bool allow) |
virtual void | setDropEnabled (bool allow) |
virtual QString | text () const |
virtual QPixmap * | pixmap () const |
virtual QPicture * | picture () const |
virtual QString | key () const |
bool | renameEnabled () const |
bool | dragEnabled () const |
bool | dropEnabled () const |
QIconView * | iconView () const |
QIconViewItem * | prevItem () const |
QIconViewItem * | nextItem () const |
int | index () const |
virtual void | setSelected (bool s, bool cb) |
virtual void | setSelected (bool s) |
virtual void | setSelectable (bool s) |
bool | isSelected () const |
bool | isSelectable () const |
virtual void | repaint () |
virtual bool | move (int x, int y) |
virtual void | moveBy (int dx, int dy) |
virtual bool | move (const QPoint &pnt) |
virtual void | moveBy (const QPoint &pnt) |
QRect | rect () const |
int | x () const |
int | y () const |
int | width () const |
int | height () const |
QSize | size () const |
QPoint | pos () const |
QRect | textRect (bool relative=TRUE) const |
QRect | pixmapRect (bool relative=TRUE) const |
bool | contains (const QPoint &pnt) const |
bool | intersects (const QRect &r) const |
virtual bool | acceptDrop (const QMimeSource *mime) const |
void | rename () |
virtual int | compare (QIconViewItem *i) const |
virtual void | setText (const QString &text) |
virtual void | setPixmap (const QPixmap &icon) |
virtual void | setPicture (const QPicture &icon) |
virtual void | setText (const QString &text, bool recalc, bool redraw=TRUE) |
virtual void | setPixmap (const QPixmap &icon, bool recalc, bool redraw=TRUE) |
virtual void | setKey (const QString &k) |
virtual int | rtti () const |
Atributos públicos estáticos | |
static int | RTTI = 0 |
Métodos protegidos | |
virtual void | removeRenameBox () |
virtual void | calcRect (const QString &text_=QString::null) |
virtual void | paintItem (QPainter *p, const QColorGroup &cg) |
virtual void | paintFocus (QPainter *p, const QColorGroup &cg) |
virtual void | dropped (QDropEvent *e, const QValueList< QIconDragItem > &lst) |
virtual void | dragEntered () |
virtual void | dragLeft () |
void | setItemRect (const QRect &r) |
void | setTextRect (const QRect &r) |
void | setPixmapRect (const QRect &r) |
void | calcTmpText () |
QString | tempText () const |
virtual void | removeRenameBox () |
virtual void | calcRect (const QString &text_=QString::null) |
virtual void | paintItem (QPainter *p, const QColorGroup &cg) |
virtual void | paintFocus (QPainter *p, const QColorGroup &cg) |
virtual void | dropped (QDropEvent *e, const QValueList< QIconDragItem > &lst) |
virtual void | dragEntered () |
virtual void | dragLeft () |
void | setItemRect (const QRect &r) |
void | setTextRect (const QRect &r) |
void | setPixmapRect (const QRect &r) |
void | calcTmpText () |
QString | tempText () const |
Amigas | |
class | QIconView |
class | QIconViewToolTip |
class | QIconViewItemLineEdit |
The QIconViewItem class provides a single item in a QIconView.
iconview
A QIconViewItem contains an icon, a string and optionally a sort key, and can display itself in a QIconView. The class is designed to be very similar to QListView and QListBox in use, both via instantiation and subclassing.
The simplest way to create a QIconViewItem and insert it into a QIconView is to construct the item passing the constructor a pointer to the icon view, a string and an icon:
(void) new QIconViewItem( iconView, // A pointer to a QIconView "This is the text of the item", aPixmap );
By default the text of an icon view item may not be edited by the user but calling setRenameEnabled(TRUE) will allow the user to perform in-place editing of the item's text.
When the icon view is deleted all items in it are deleted automatically.
The QIconView::firstItem() and QIconViewItem::nextItem() functions provide a means of iterating over all the items in a QIconView:
QIconViewItem *item; for ( item = iconView->firstItem(); item; item = item->nextItem() ) do_something_with( item );
The item's icon view is available from iconView(), and its position in the icon view from index().
The item's selection status is available from isSelected() and is set and controlled by setSelected() and isSelectable().
The text and icon can be set with setText() and setPixmap() and retrieved with text() and pixmap(). The item's sort key defaults to text() but may be set with setKey() and retrieved with key(). The comparison function, compare() uses key().
Items may be repositioned with move() and moveBy(). An item's geometry is available from rect(), x(), y(), width(), height(), size(), pos(), textRect() and pixmapRect(). You can also test against the position of a point with contains() and intersects().
To remove an item from an icon view, just delete the item. The QIconViewItem destructor removes it cleanly from its icon view.
Because the icon view is designed to use drag-and-drop, the icon view item also has functions for drag-and-drop which may be reimplemented.
pixmap-size-limit Note: Pixmaps with individual dimensions larger than 300 pixels may not be displayed properly, depending on the arrangement in use. For example, pixmaps wider than 300 pixels will not be arranged correctly if the icon view uses a QIconView::TopToBottom arrangement, and pixmaps taller than 300 pixels will not be arranged correctly if the icon view uses a QIconView::LeftToRight arrangement.
QIconViewItem::QIconViewItem | ( | QIconView * | parent | ) |
Constructs a QIconViewItem and inserts it into icon view parent with no text and a default icon.
QIconViewItem::QIconViewItem | ( | QIconView * | parent, |
QIconViewItem * | after | ||
) |
Constructs a QIconViewItem and inserts it into the icon view parent with no text and a default icon, after the icon view item after.
Constructs an icon view item and inserts it into the icon view parent using text as the text and a default icon.
QIconViewItem::QIconViewItem | ( | QIconView * | parent, |
QIconViewItem * | after, | ||
const QString & | text | ||
) |
Constructs an icon view item and inserts it into the icon view parent using text as the text and a default icon, after the icon view item after.
Constructs an icon view item and inserts it into the icon view parent using text as the text and icon as the icon.
QIconViewItem::QIconViewItem | ( | QIconView * | parent, |
QIconViewItem * | after, | ||
const QString & | text, | ||
const QPixmap & | icon | ||
) |
Constructs an icon view item and inserts it into the icon view parent using text as the text and icon as the icon, after the icon view item after.
Constructs an icon view item and inserts it into the icon view parent using text as the text and picture as the icon.
QIconViewItem::QIconViewItem | ( | QIconView * | parent, |
QIconViewItem * | after, | ||
const QString & | text, | ||
const QPicture & | picture | ||
) |
Constructs an icon view item and inserts it into the icon view parent using text as the text and picture as the icon, after the icon view item after.
QIconViewItem::~QIconViewItem | ( | ) | [virtual] |
Destroys the icon view item and tells the parent icon view that the item has been destroyed.
QIconViewItem::QIconViewItem | ( | QIconView * | parent | ) |
QIconViewItem::QIconViewItem | ( | QIconView * | parent, |
QIconViewItem * | after | ||
) |
QIconViewItem::QIconViewItem | ( | QIconView * | parent, |
QIconViewItem * | after, | ||
const QString & | text | ||
) |
QIconViewItem::QIconViewItem | ( | QIconView * | parent, |
QIconViewItem * | after, | ||
const QString & | text, | ||
const QPixmap & | icon | ||
) |
QIconViewItem::QIconViewItem | ( | QIconView * | parent, |
QIconViewItem * | after, | ||
const QString & | text, | ||
const QPicture & | picture | ||
) |
virtual QIconViewItem::~QIconViewItem | ( | ) | [virtual] |
bool QIconViewItem::acceptDrop | ( | const QMimeSource * | mime | ) | const [virtual] |
Returns TRUE if you can drop things with a QMimeSource of mime onto this item; otherwise returns FALSE.
The default implementation always returns FALSE. You must subclass QIconViewItem and reimplement acceptDrop() to accept drops.
virtual bool QIconViewItem::acceptDrop | ( | const QMimeSource * | mime | ) | const [virtual] |
void QIconViewItem::calcRect | ( | const QString & | text_ = QString::null | ) | [protected, virtual] |
This virtual function is responsible for calculating the rectangles returned by rect(), textRect() and pixmapRect(). setRect(), setTextRect() and setPixmapRect() are provided mainly for reimplementations of this function.
text_ is an internal parameter which defaults to QString::null.
virtual void QIconViewItem::calcRect | ( | const QString & | text_ = QString::null | ) | [protected, virtual] |
void QIconViewItem::calcTmpText | ( | ) | [protected] |
void QIconViewItem::calcTmpText | ( | ) | [protected] |
int QIconViewItem::compare | ( | QIconViewItem * | i | ) | const [virtual] |
Compares this icon view item to i. Returns -1 if this item is less than i, 0 if they are equal, and 1 if this icon view item is greater than i.
The default implementation compares the item keys (key()) using QString::localeAwareCompare(). A reimplementation may use different values and a different comparison function. Here is a reimplementation that uses plain Unicode comparison:
int MyIconViewItem::compare( QIconViewItem *i ) const { return key().compare( i->key() ); }
virtual int QIconViewItem::compare | ( | QIconViewItem * | i | ) | const [virtual] |
Returns TRUE if the item contains the point pnt (in contents coordinates); otherwise returns FALSE.
bool QIconViewItem::dragEnabled | ( | ) | const |
bool QIconViewItem::dragEnabled | ( | ) | const |
Returns TRUE if the user is allowed to drag the icon view item; otherwise returns FALSE.
virtual void QIconViewItem::dragEntered | ( | ) | [protected, virtual] |
void QIconViewItem::dragEntered | ( | ) | [protected, virtual] |
This function is called when a drag enters the item's bounding rectangle.
The default implementation does nothing; subclasses may reimplement this function.
void QIconViewItem::dragLeft | ( | ) | [protected, virtual] |
This function is called when a drag leaves the item's bounding rectangle.
The default implementation does nothing; subclasses may reimplement this function.
virtual void QIconViewItem::dragLeft | ( | ) | [protected, virtual] |
bool QIconViewItem::dropEnabled | ( | ) | const |
bool QIconViewItem::dropEnabled | ( | ) | const |
Returns TRUE if the user is allowed to drop something onto the item; otherwise returns FALSE.
void QIconViewItem::dropped | ( | QDropEvent * | e, |
const QValueList< QIconDragItem > & | lst | ||
) | [protected, virtual] |
This function is called when something is dropped on the item. e provides all the information about the drop. If the drag object of the drop was a QIconDrag, lst contains the list of the dropped items. You can get the data by calling QIconDragItem::data() on each item. If the lst is empty, i.e. the drag was not a QIconDrag, you must decode the data in e and work with that.
The default implementation does nothing; subclasses may reimplement this function.
virtual void QIconViewItem::dropped | ( | QDropEvent * | e, |
const QValueList< QIconDragItem > & | lst | ||
) | [protected, virtual] |
int QIconViewItem::height | ( | ) | const |
int QIconViewItem::height | ( | ) | const |
Returns the height of the item.
QIconView* QIconViewItem::iconView | ( | ) | const |
QIconView * QIconViewItem::iconView | ( | ) | const |
Returns a pointer to this item's icon view parent.
int QIconViewItem::index | ( | ) | const |
int QIconViewItem::index | ( | ) | const |
Returns the index of this item in the icon view, or -1 if an error occurred.
Returns TRUE if the item intersects the rectangle r (in contents coordinates); otherwise returns FALSE.
bool QIconViewItem::isSelectable | ( | ) | const |
Returns TRUE if the item is selectable; otherwise returns FALSE.
bool QIconViewItem::isSelectable | ( | ) | const |
bool QIconViewItem::isSelected | ( | ) | const |
Returns TRUE if the item is selected; otherwise returns FALSE.
bool QIconViewItem::isSelected | ( | ) | const |
virtual QString QIconViewItem::key | ( | ) | const [virtual] |
QString QIconViewItem::key | ( | ) | const [virtual] |
Moves the item to position (x, y) in the icon view (these are contents coordinates).
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Moves the item to the point pnt.
virtual void QIconViewItem::moveBy | ( | const QPoint & | pnt | ) | [virtual] |
Moves the item dx pixels in the x-direction and dy pixels in the y-direction.
void QIconViewItem::moveBy | ( | const QPoint & | pnt | ) | [virtual] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Moves the item by the x, y values in point pnt.
QIconViewItem* QIconViewItem::nextItem | ( | ) | const |
QIconViewItem * QIconViewItem::nextItem | ( | ) | const |
Returns a pointer to the next item, or 0 if this is the last item in the icon view.
To find the first item use QIconView::firstItem().
Example:
QIconViewItem *item; for ( item = iconView->firstItem(); item; item = item->nextItem() ) do_something_with( item );
virtual void QIconViewItem::paintFocus | ( | QPainter * | p, |
const QColorGroup & | cg | ||
) | [protected, virtual] |
void QIconViewItem::paintFocus | ( | QPainter * | p, |
const QColorGroup & | cg | ||
) | [protected, virtual] |
Paints the focus rectangle of the item using the painter p and the color group cg.
void QIconViewItem::paintItem | ( | QPainter * | p, |
const QColorGroup & | cg | ||
) | [protected, virtual] |
Paints the item using the painter p and the color group cg. If you want the item to be drawn with a different font or color, reimplement this function, change the values of the color group or the painter's font, and then call the QIconViewItem::paintItem() with the changed values.
virtual void QIconViewItem::paintItem | ( | QPainter * | p, |
const QColorGroup & | cg | ||
) | [protected, virtual] |
QPicture * QIconViewItem::picture | ( | ) | const [virtual] |
Returns the icon of the icon view item if it is a picture, or 0 if it is a pixmap. In the latter case use pixmap() instead. Normally you set the picture of the item with setPicture(), but sometimes it's inconvenient to call setPicture() for every item. So you can subclass QIconViewItem, reimplement this function and return a pointer to the item's picture. If you do this, you must call calcRect() manually each time the size of this picture changes.
virtual QPicture* QIconViewItem::picture | ( | ) | const [virtual] |
QPixmap * QIconViewItem::pixmap | ( | ) | const [virtual] |
Returns the icon of the icon view item if it is a pixmap, or 0 if it is a picture. In the latter case use picture() instead. Normally you set the pixmap of the item with setPixmap(), but sometimes it's inconvenient to call setPixmap() for every item. So you can subclass QIconViewItem, reimplement this function and return a pointer to the item's pixmap. If you do this, you must call calcRect() manually each time the size of this pixmap changes.
virtual QPixmap* QIconViewItem::pixmap | ( | ) | const [virtual] |
Returns the bounding rectangle of the item's icon.
If relative is TRUE, (the default), the rectangle is relative to the origin of the item's rectangle. If relative is FALSE, the returned rectangle is relative to the origin of the icon view's contents coordinate system.
QPoint QIconViewItem::pos | ( | ) | const |
QPoint QIconViewItem::pos | ( | ) | const |
Returns the position of the item (in contents coordinates).
QIconViewItem* QIconViewItem::prevItem | ( | ) | const |
QIconViewItem * QIconViewItem::prevItem | ( | ) | const |
Returns a pointer to the previous item, or 0 if this is the first item in the icon view.
QRect QIconViewItem::rect | ( | ) | const |
QRect QIconViewItem::rect | ( | ) | const |
Returns the bounding rectangle of the item (in contents coordinates).
void QIconViewItem::removeRenameBox | ( | ) | [protected, virtual] |
Removes the editbox that is used for in-place renaming.
virtual void QIconViewItem::removeRenameBox | ( | ) | [protected, virtual] |
void QIconViewItem::rename | ( | ) |
Starts in-place renaming of an icon, if allowed.
This function sets up the icon view so that the user can edit the item text, and then returns. When the user is done, setText() will be called and QIconView::itemRenamed() will be emitted (unless the user canceled, e.g. by pressing the Escape key).
void QIconViewItem::rename | ( | ) |
bool QIconViewItem::renameEnabled | ( | ) | const |
bool QIconViewItem::renameEnabled | ( | ) | const |
Returns TRUE if the item can be renamed by the user with in-place renaming; otherwise returns FALSE.
virtual void QIconViewItem::repaint | ( | ) | [virtual] |
void QIconViewItem::repaint | ( | ) | [virtual] |
Repaints the item.
int QIconViewItem::rtti | ( | ) | const [virtual] |
Returns 0.
Make your derived classes return their own values for rtti(), so that you can distinguish between icon view item types. You should use values greater than 1000, preferably a large random number, to allow for extensions to this class.
Reimplementado en ProjectItem, FormItem, CustomFormItem, SourceFileItem y SourceTemplateItem.
virtual int QIconViewItem::rtti | ( | ) | const [virtual] |
Reimplementado en ProjectItem, FormItem, CustomFormItem, SourceFileItem y SourceTemplateItem.
void QIconViewItem::setDragEnabled | ( | bool | allow | ) | [virtual] |
If allow is TRUE, the icon view permits the user to drag the icon view item either to another position within the icon view or to somewhere outside of it. If allow is FALSE, the item cannot be dragged.
virtual void QIconViewItem::setDragEnabled | ( | bool | allow | ) | [virtual] |
void QIconViewItem::setDropEnabled | ( | bool | allow | ) | [virtual] |
If allow is TRUE, the icon view lets the user drop something on this icon view item.
virtual void QIconViewItem::setDropEnabled | ( | bool | allow | ) | [virtual] |
void QIconViewItem::setItemRect | ( | const QRect & | r | ) | [protected] |
Sets the bounding rectangle of the whole item to r. This function is provided for subclasses which reimplement calcRect(), so that they can set the calculated rectangle. {Any other use is discouraged.}
void QIconViewItem::setItemRect | ( | const QRect & | r | ) | [protected] |
void QIconViewItem::setKey | ( | const QString & | k | ) | [virtual] |
virtual void QIconViewItem::setKey | ( | const QString & | k | ) | [virtual] |
virtual void QIconViewItem::setPicture | ( | const QPicture & | icon | ) | [virtual] |
void QIconViewItem::setPicture | ( | const QPicture & | icon | ) | [virtual] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Sets icon as the item's icon in the icon view. If recalc is TRUE, the icon view's layout is recalculated. If redraw is TRUE (the default), the icon view is repainted.
Note: Pixmaps with individual dimensions larger than 300 pixels may not be displayed properly, depending on the arrangement in use. See the main class documentation for details.
void QIconViewItem::setPixmap | ( | const QPixmap & | icon | ) | [virtual] |
Sets icon as the item's icon in the icon view. This function might be a no-op if you reimplement pixmap().
Note: Pixmaps with individual dimensions larger than 300 pixels may not be displayed properly, depending on the arrangement in use. See the main class documentation for details.
virtual void QIconViewItem::setPixmap | ( | const QPixmap & | icon, |
bool | recalc, | ||
bool | redraw = TRUE |
||
) | [virtual] |
virtual void QIconViewItem::setPixmap | ( | const QPixmap & | icon | ) | [virtual] |
void QIconViewItem::setPixmapRect | ( | const QRect & | r | ) | [protected] |
void QIconViewItem::setPixmapRect | ( | const QRect & | r | ) | [protected] |
Sets the bounding rectangle of the item's icon to r. This function is provided for subclasses which reimplement calcRect(), so that they can set the calculated rectangle. {Any other use is discouraged.}
void QIconViewItem::setRenameEnabled | ( | bool | allow | ) | [virtual] |
If allow is TRUE, the user can rename the icon view item by clicking on the text (or pressing F2) while the item is selected (in-place renaming). If allow is FALSE, in-place renaming is not possible.
virtual void QIconViewItem::setRenameEnabled | ( | bool | allow | ) | [virtual] |
void QIconViewItem::setSelectable | ( | bool | enable | ) | [virtual] |
Sets this item to be selectable if enable is TRUE (the default) or unselectable if enable is FALSE.
The user is unable to select a non-selectable item using either the keyboard or the mouse. (The application programmer can select an item in code regardless of this setting.)
virtual void QIconViewItem::setSelectable | ( | bool | s | ) | [virtual] |
void QIconViewItem::setSelected | ( | bool | s | ) | [virtual] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. This variant is equivalent to calling the other variant with cb set to FALSE.
virtual void QIconViewItem::setSelected | ( | bool | s | ) | [virtual] |
Selects or unselects the item, depending on s; it may also unselect other items, depending on QIconView::selectionMode() and cb.
If s is FALSE, the item is unselected.
If s is TRUE and QIconView::selectionMode() is Single
, the item is selected and the item previously selected is unselected.
If s is TRUE and QIconView::selectionMode() is Extended
, the item is selected. If cb is TRUE, the selection state of the other items is left unchanged. If cb is FALSE (the default) all other items are unselected.
If s is TRUE and QIconView::selectionMode() is Multi
, the item is selected.
Note that cb is used only if QIconView::selectionMode() is Extended
; cb defaults to FALSE.
All items whose selection status changes repaint themselves.
void QIconViewItem::setText | ( | const QString & | text | ) | [virtual] |
virtual void QIconViewItem::setText | ( | const QString & | text | ) | [virtual] |
virtual void QIconViewItem::setText | ( | const QString & | text, |
bool | recalc, | ||
bool | redraw = TRUE |
||
) | [virtual] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Sets text as the text of the icon view item. If recalc is TRUE, the icon view's layout is recalculated. If redraw is TRUE (the default), the icon view is repainted.
void QIconViewItem::setTextRect | ( | const QRect & | r | ) | [protected] |
Sets the bounding rectangle of the item's text to r. This function is provided for subclasses which reimplement calcRect(), so that they can set the calculated rectangle. {Any other use is discouraged.}
void QIconViewItem::setTextRect | ( | const QRect & | r | ) | [protected] |
QSize QIconViewItem::size | ( | ) | const |
QSize QIconViewItem::size | ( | ) | const |
Returns the size of the item.
QString QIconViewItem::tempText | ( | ) | const [protected] |
QString QIconViewItem::tempText | ( | ) | const [protected] |
QString QIconViewItem::text | ( | ) | const [virtual] |
Returns the text of the icon view item. Normally you set the text of the item with setText(), but sometimes it's inconvenient to call setText() for every item; so you can subclass QIconViewItem, reimplement this function, and return the text of the item. If you do this, you must call calcRect() manually each time the text (and therefore its size) changes.
virtual QString QIconViewItem::text | ( | ) | const [virtual] |
Returns the bounding rectangle of the item's text.
If relative is TRUE, (the default), the returned rectangle is relative to the origin of the item's rectangle. If relative is FALSE, the returned rectangle is relative to the origin of the icon view's contents coordinate system.
int QIconViewItem::width | ( | ) | const |
int QIconViewItem::width | ( | ) | const |
Returns the width of the item.
int QIconViewItem::x | ( | ) | const |
Returns the x-coordinate of the item (in contents coordinates).
int QIconViewItem::x | ( | ) | const |
int QIconViewItem::y | ( | ) | const |
int QIconViewItem::y | ( | ) | const |
Returns the y-coordinate of the item (in contents coordinates).
QIconView [friend] |
QIconViewItemLineEdit [friend] |
QIconViewToolTip [friend] |
static int QIconViewItem::RTTI = 0 [static] |