📄 qiconview.3qt
字号:
This signal is emitted when the user presses the right mouse button. If \fIitem\fR is non-null, the cursor is on \fIitem\fR. If \fIitem\fR is null, the mouse cursor isn't on any item..PP\fIpos\fR is the position of the mouse cursor in the global coordinate system (QMouseEvent::globalPos())..SH "void QIconView::selectAll ( bool select )\fC [virtual]\fR"In Multi and Extended modes, this function sets all items to be selected if \fIselect\fR is TRUE, and to be unselected if \fIselect\fR is FALSE..PPIn Single and NoSelection modes, this function only changes the selection status of currentItem()..SH "void QIconView::selectionChanged ()\fC [signal]\fR"This signal is emitted when the selection has been changed. It's emitted in each selection mode..SH "void QIconView::selectionChanged ( QIconViewItem * item )\fC [signal]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPThis signal is emitted when the selection changes. \fIitem\fR is the newly selected item. This signal is emitted only in single selection mode..SH "SelectionMode QIconView::selectionMode () const"Returns the selection mode of the icon view. See the "selectionMode" property for details..SH "void QIconView::setArrangement ( Arrangement am )\fC [virtual]\fR"Sets the arrangement mode of the icon view to \fIam\fR. See the "arrangement" property for details..SH "void QIconView::setAutoArrange ( bool b )\fC [virtual]\fR"Sets whether the icon view rearranges its items when a new item is inserted to \fIb\fR. See the "autoArrange" property for details..SH "void QIconView::setCurrentItem ( QIconViewItem * item )\fC [virtual]\fR"Makes \fIitem\fR the new current item of the icon view..SH "void QIconView::setGridX ( int rx )\fC [virtual]\fR"Sets the horizontal grid of the icon view to \fIrx\fR. See the "gridX" property for details..SH "void QIconView::setGridY ( int ry )\fC [virtual]\fR"Sets the vertical grid of the icon view to \fIry\fR. See the "gridY" property for details..SH "void QIconView::setItemTextBackground ( const QBrush & b )\fC [virtual]\fR"Sets the brush that should be used when drawing the background of an item's text to \fIb\fR. See the "itemTextBackground" property for details..SH "void QIconView::setItemTextPos ( ItemTextPos pos )\fC [virtual]\fR"Sets the position where the text of each item is drawn to \fIpos\fR. See the "itemTextPos" property for details..SH "void QIconView::setItemsMovable ( bool b )\fC [virtual]\fR"Sets whether the user is allowed to move items around in the icon view to \fIb\fR. See the "itemsMovable" property for details..SH "void QIconView::setMaxItemTextLength ( int w )\fC [virtual]\fR"Sets the maximum length (in characters) that an item's text may have to \fIw\fR. See the "maxItemTextLength" property for details..SH "void QIconView::setMaxItemWidth ( int w )\fC [virtual]\fR"Sets the maximum width that an item may have to \fIw\fR. See the "maxItemWidth" property for details..SH "void QIconView::setResizeMode ( ResizeMode am )\fC [virtual]\fR"Sets the resize mode of the icon view to \fIam\fR. See the "resizeMode" property for details..SH "void QIconView::setSelected ( QIconViewItem * item, bool s, bool cb = FALSE )\fC [virtual]\fR"Selects or unselects \fIitem\fR depending on \fIs\fR, and may also unselect other items, depending on QIconView::selectionMode() and \fIcb\fR..PPIf \fIs\fR is FALSE, \fIitem\fR is unselected..PPIf \fIs\fR is TRUE and QIconView::selectionMode() is Single, \fIitem\fR is selected, and the item which was selected is unselected..PPIf \fIs\fR is TRUE and QIconView::selectionMode() is Extended, \fIitem\fR is selected. If \fIcb\fR is TRUE, the selection state of the icon view's other items is left unchanged. If \fIcb\fR is FALSE (the default) all other items are unselected..PPIf \fIs\fR is TRUE and QIconView::selectionMode() is Multi \fIitem\fR is selected..PPNote that \fIcb\fR is used only if QIconView::selectionMode() is Extended. \fIcb\fR defaults to FALSE..PPAll items whose selection status is changed repaint themselves..SH "void QIconView::setSelectionMode ( SelectionMode m )\fC [virtual]\fR"Sets the selection mode of the icon view to \fIm\fR. See the "selectionMode" property for details..SH "void QIconView::setShowToolTips ( bool b )\fC [virtual]\fR"Sets whether the icon view will display a tool tip with the complete text for any truncated item text to \fIb\fR. See the "showToolTips" property for details..SH "void QIconView::setSorting ( bool sort, bool ascending = TRUE )"If \fIsort\fR is TRUE, this function sets the icon view to sort items when a new item is inserted. If \fIsort\fR is FALSE, the icon view will not be sorted..PPNote that autoArrange() has to be TRUE for sorting to take place..PPIf \fIascending\fR is TRUE, items are sorted in ascending order. If \fIascending\fR is FALSE, items are sorted in descending order..PPQIconViewItem::compare() is used to compare pairs of items. The sorting is based on the item's keys; these default to the item's text unless specifically set to something else..PPSee also QIconView::autoArrange, QIconView::autoArrange, sortDirection, sort() and QIconViewItem::setKey()..SH "void QIconView::setSpacing ( int sp )\fC [virtual]\fR"Sets the space in pixels between icon view items to \fIsp\fR. See the "spacing" property for details..SH "void QIconView::setWordWrapIconText ( bool b )\fC [virtual]\fR"Sets whether the item text will be word-wrapped if it is too long to \fIb\fR. See the "wordWrapIconText" property for details..SH "bool QIconView::showToolTips () const"Returns TRUE if the icon view will display a tool tip with the complete text for any truncated item text; otherwise returns FALSE. See the "showToolTips" property for details..SH "void QIconView::slotUpdate ()\fC [virtual protected slot]\fR"This slot is used for a slightly-delayed update..PPThe icon view is not redrawn immediately after inserting a new item but after a very small delay using a QTimer. This means that when many items are inserted in a loop the icon view is probably redrawn only once at the end of the loop. This makes the insertions both flicker-free and faster..SH "void QIconView::sort ( bool ascending = TRUE )\fC [virtual]\fR"Sorts and rearranges all items in the icon view. If \fIascending\fR is TRUE, the items are sorted in increasing order, otherwise they are sorted in decreasing order..PPQIconViewItem::compare() is used to compare pairs of items. The sorting is based on the item's keys; these default to the item's text unless specifically set to something else..PPNote that this function sets the sort order to \fIascending\fR..PPSee also QIconViewItem::key(), QIconViewItem::setKey(), QIconViewItem::compare(), QIconView::setSorting() and QIconView::sortDirection..SH "bool QIconView::sortDirection () const"Returns TRUE if the sort direction for inserting new items is ascending;; otherwise returns FALSE. See the "sortDirection" property for details..SH "bool QIconView::sorting () const"Returns TRUE if the icon view sorts on insertion; otherwise returns FALSE. See the "sorting" property for details..SH "int QIconView::spacing () const"Returns the space in pixels between icon view items. See the "spacing" property for details..SH "void QIconView::startDrag ()\fC [virtual protected]\fR"Starts a drag..SH "void QIconView::takeItem ( QIconViewItem * item )\fC [virtual]\fR"Takes the icon view item \fIitem\fR out of the icon view and causes an update of the screen display. The item is not deleted. You should normally not need to call this function because QIconViewItem::~QIconViewItem() calls it. The normal way to delete an item is to delete it..SH "bool QIconView::wordWrapIconText () const"Returns TRUE if the item text will be word-wrapped if it is too long; otherwise returns FALSE. See the "wordWrapIconText" property for details..SS "Property Documentation".SH "Arrangement arrangement"This property holds the arrangement mode of the icon view..PPThis can be LeftToRight or TopToBottom. The default is LeftToRight..PPSet this property's value with setArrangement() and get this property's value with arrangement()..SH "bool autoArrange"This property holds whether the icon view rearranges its items when a new item is inserted..PPThe default is set to TRUE..PPNote that if the icon view is not visible at the time of insertion, QIconView defers all position-related work until it's shown and then calls arrangeItemsInGrid()..PPSet this property's value with setAutoArrange() and get this property's value with autoArrange()..SH "uint count"This property holds the number of items in the icon view..PPGet this property's value with count()..SH "int gridX"This property holds the horizontal grid of the icon view..PPIf the value is -1, (the default), QIconView computes suitable column widths based on the icon view's contents..PPNote that setting a grid width overrides setMaxItemWidth()..PPSet this property's value with setGridX() and get this property's value with gridX()..SH "int gridY"This property holds the vertical grid of the icon view..PPIf the value is -1, (the default), QIconView computes suitable column heights based on the icon view's contents..PPSet this property's value with setGridY() and get this property's value with gridY()..SH "QBrush itemTextBackground"This property holds the brush that should be used when drawing the background of an item's text..PPBy default this brush is set to NoBrush, meaning that only the normal icon view background is used..PPSet this property's value with setItemTextBackground() and get this property's value with itemTextBackground()..SH "ItemTextPos itemTextPos"This property holds the position where the text of each item is drawn..PPValid values are Bottom or Right. The default is Bottom..PPSet this property's value with setItemTextPos() and get this property's value with itemTextPos()..SH "bool itemsMovable"This property holds whether the user is allowed to move items around in the icon view..PPThe default is TRUE..PPSet this property's value with setItemsMovable() and get this property's value with itemsMovable()..SH "int maxItemTextLength"This property holds the maximum length (in characters) that an item's text may have..PPThe default is 255 characters..PPSet this property's value with setMaxItemTextLength() and get this property's value with maxItemTextLength()..SH "int maxItemWidth"This property holds the maximum width that an item may have..PPThe default is 100 pixels..PPNote that if the gridX() value is set QIconView will ignore this property..PPSet this property's value with setMaxItemWidth() and get this property's value with maxItemWidth()..SH "ResizeMode resizeMode"This property holds the resize mode of the icon view..PPThis can be Fixed or Adjust. The default is Fixed..PPSet this property's value with setResizeMode() and get this property's value with resizeMode()..SH "SelectionMode selectionMode"This property holds the selection mode of the icon view..PPThis can be Single (the default), Extended, Multi or NoSelection..PPSet this property's value with setSelectionMode() and get this property's value with selectionMode()..SH "bool showToolTips"This property holds whether the icon view will display a tool tip with the complete text for any truncated item text..PPThe default is TRUE. Note that this has no effect if setWordWrapIconText() is TRUE, as it is by default..PPSet this property's value with setShowToolTips() and get this property's value with showToolTips()..SH "bool sortDirection"This property holds whether the sort direction for inserting new items is ascending;..PPThe default is TRUE (i.e. ascending). This sort direction only has meaning if sorting() and autoArrange() are both TRUE..PPTo set the sort direction, use setSorting().PPGet this property's value with sortDirection()..SH "bool sorting"This property holds whether the icon view sorts on insertion..PPThe default is FALSE, i.e. no sorting on insertion..PPTo set the soring, use setSorting()..PPGet this property's value with sorting()..SH "int spacing"This property holds the space in pixels between icon view items..PPThe default is 5 pixels..PPNegative values for spacing are illegal..PPSet this property's value with setSpacing() and get this property's value with spacing()..SH "bool wordWrapIconText"This property holds whether the item text will be word-wrapped if it is too long..PPThe default is TRUE..PPIf this property is FALSE, icon text that is too long is truncated, and an ellipsis (...) appended to indicate that truncation has occurred..PPSet this property's value with setWordWrapIconText() and get this property's value with wordWrapIconText()..SH "SEE ALSO".BR http://doc.trolltech.com/qiconview.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qiconview.3qt) and the Qtversion (3.0.0).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -