⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qiconview.3qt

📁 Trolltech公司发布的基于C++图形开发环境
💻 3QT
📖 第 1 页 / 共 3 页
字号:
Returns a pointer to the first item which could be found that contains \fItext,\fR or 0 if no such item could be found..SH "QIconViewItem* QIconView::findLastVisibleItem ( const QRect & r ) const"Finds the last item which is visible in the rectangle \fIr\fR in contents coordinates. If no items are visible at all, 0 is returned..SH "QIconViewItem * QIconView::firstItem () const"Returns a pointer to the first item fo the iconview, or 0, if there are no items in the iconview..SH "void QIconView::focusInEvent ( QFocusEvent * e ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..SH "void QIconView::focusOutEvent ( QFocusEvent * ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..SH "int QIconView::gridX () const"Returns the horizontal grid..PPSee also QIconView::setGridX()..SH "int QIconView::gridY () const"Returns the vertical grid..PPSee also QIconView::setGridY()..SH "int QIconView::index ( const QIconViewItem * item ) const"Returns the index of \fIitem\fR or -1 if \fIitem\fR doesn't exist in this icon view..SH "void QIconView::insertInGrid ( QIconViewItem * item ) \fC[virtual protected]\fR"Inserts an item in the grid of the iconview. You should never need to call this manually..SH "void QIconView::insertItem ( QIconViewItem * item, QIconViewItem * after = 0L ) \fC[virtual]\fR"Inserts the iconview item \fIitem\fR after \fIafter.\fR If \fIafter\fR is 0, \fIitem\fR is appended..PPYou should never need to call this method yourself, you should rather do.PP.nf.br    (void) new QIconViewItem( iconview, "This is the text of the item", pixmap );.fi.PPThis does everything required for inserting an item..SH "void QIconView::invertSelection () \fC[virtual]\fR"Inverts the selection. Works only in Multi and Extended selection mode..SH "void QIconView::itemRenamed ( QIconViewItem * item ) \fC[signal]\fR"If the \fIitem\fR has been renamed (e.g. by in-place renaming), this signal is emitted..SH "void QIconView::itemRenamed ( QIconViewItem * item, const QString & name ) \fC[signal]\fR"If the \fIitem\fR has been renamed (e.g. by in-place renaming), this signal is emitted. \fIname\fR is the new text (name) of the item..SH "QBrush QIconView::itemTextBackground () const"Returns the brush which is used to draw the background of an item text.PPSee also setItemTextBackground()..SH "QIconView::ItemTextPos QIconView::itemTextPos() const"Returns the position, at which the text of the items are drawn..PPSee also QIconView::setItemTextPos()..SH "bool QIconView::itemsMovable () const"Returns TRUE, if the user is allowed to move items around in the iconview, else FALSE;.PPSee also QIconView::setItemsMovable()..SH "void QIconView::keyPressEvent ( QKeyEvent * e ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..SH "QIconViewItem * QIconView::lastItem () const"Returns a pointer to the last item fo the iconview, or 0, if there are no items in the iconview..SH "QIconViewItem * QIconView::makeRowLayout ( QIconViewItem * begin, int & y ) \fC[protected]\fR"Lays out a row of icons (in Arrangement == TopToBottom this is a column). Starts laying out with the item \fIbegin. y\fR is the starting coordinate. Returns the last item of the row and sets the new starting coordinate to \fIy.\fR.PPThis function may be made private in a future version of Qt. We recommend not calling it..SH "int QIconView::maxItemTextLength () const"Returns the maximum length (in characters), which the text of an icon may have..PPSee also QIconView::setMaxItemTextLength()..SH "int QIconView::maxItemWidth () const"Returns the maximum width (in pixels), which an item may have..PPSee also QIconView::setMaxItemWidth()..SH "QSize QIconView::minimumSizeHint () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QIconView::mouseButtonClicked ( int button, QIconViewItem * item, const QPoint & pos ) \fC[signal]\fR"This signal is emitted when the user clicked (pressed + released) with any mouse button on either and item (then \fIitem\fR is the item under the mouse cursor) or somewhere else (then \fIitem\fR is 0). \fIbutton\fR is the number of the mouse button which the user clicked, and \fIpos\fR the position of the mouse cursor..SH "void QIconView::mouseButtonPressed ( int button, QIconViewItem * item, const QPoint & pos ) \fC[signal]\fR"This signal is emitted when the user pressed with any mouse button on either and item (then \fIitem\fR is the item under the mouse cursor) or somewhere else (then \fIitem\fR is 0). \fIbutton\fR is the number of the mouse button which the user pressed, and \fIpos\fR the position of the mouse cursor..SH "void QIconView::moved () \fC[signal]\fR"This signal is emitted after successfully dropping an (or some) item(s) of the iconview somewhere and if they should be removed now..SH "void QIconView::onItem ( QIconViewItem * i ) \fC[signal]\fR"This signal is emitted, when the user moves the mouse cursor onto an item. It磗 only emitted once per item..SH "void QIconView::onViewport () \fC[signal]\fR"This signal is emitted, when the user moves the mouse cursor, which was on an item away from the item onto the viewport..SH "void QIconView::pressed ( QIconViewItem * item ) \fC[signal]\fR"This signal is emitted when the user pressed with any mouse button on either and item (then \fIitem\fR is the item under the mouse cursor) or somewhere else (then \fIitem\fR is 0)..SH "void QIconView::pressed ( QIconViewItem * item, const QPoint & pos ) \fC[signal]\fR"This signal is emitted when the user pressed with any mouse button on either and item (then \fIitem\fR is the item under the mouse cursor) or somewhere else (then \fIitem\fR is 0). \fIpos\fR the position of the mouse cursor..SH "void QIconView::repaintItem ( QIconViewItem * item ) \fC[virtual]\fR"Repaints the \fIitem.\fR.SH "void QIconView::resizeEvent ( QResizeEvent * e ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..SH "QIconView::ResizeMode QIconView::resizeMode() const"Returns the resize mode of the iconview..PPSee also QIconView::setResizeMode()..SH "void QIconView::returnPressed ( QIconViewItem * item ) \fC[signal]\fR"This signal is emitted, if the user pressed the return or enter button. \fIitem\fR is the item which was current while return or enter was pressed..SH "void QIconView::rightButtonClicked ( QIconViewItem * item, const QPoint & pos ) \fC[signal]\fR"This signal is emitted when the user clicked (pressed + released) with the right mouse button on either and item (then \fIitem\fR is the item under the mouse cursor) or somewhere else (then \fIitem\fR is 0). \fIpos\fR the position of the mouse cursor..SH "void QIconView::rightButtonPressed ( QIconViewItem * item, const QPoint & pos ) \fC[signal]\fR"This signal is emitted when the user pressed with the right mouse button on either and item (then \fIitem\fR is the item under the mouse cursor) or somewhere else (then \fIitem\fR is 0). \fIpos\fR the position of the mouse cursor..SH "void QIconView::selectAll ( bool select ) \fC[virtual]\fR"If \fIselect\fR is TRUE, all items get selected, else all get unselected. This works only in the selection modes Multi and Extended. In Single and NoSelection mode the selection of the current item is just set to \fIselect.\fR.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 signal is emitted when the selection has been changed. \fIitem\fR is the new selected item. This signal is only emitted in single selection mode..SH "QIconView::SelectionMode QIconView::selectionMode() const"Returns the selection mode of the iconview. The initial mode is \fCSingle.\fR.PPSee also setSelectionMode()..SH "void QIconView::setArrangement ( Arrangement am )"Sets the arrangement mode of the iconview to \fIam,\fR which must be one of \fCLeftToRight\fR and TopToBottom..PPSee also Arrangement..SH "void QIconView::setAutoArrange ( bool b ) \fC[virtual]\fR"If \fIb\fR is TRUE, all items are re-arranged in the grid if a new one is inserted. Else, the best fitting place for the new item is searched and the other ones are not touched..PPThis setting only applies if the iconview is visible. If you insert items and the iconview is not visible, the icons are reordered when it gets visible..SH "void QIconView::setContentsPos ( int x, int y ) \fC[virtual slot]\fR"Reimplemented for internal reasons; the API is not affected..SH "void QIconView::setCurrentItem ( QIconViewItem * item ) \fC[virtual]\fR"Makes \fIitem\fR the new current item of the iconview..SH "void QIconView::setFont ( const QFont & f ) \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..SH "void QIconView::setGridX ( int rx ) \fC[virtual]\fR"Sets the horizontal grid to \fIrx.\fR If \fIrx\fR is -1, there is no horizontal grid used for arranging items..SH "void QIconView::setGridY ( int ry ) \fC[virtual]\fR"Sets the vertical grid to \fIry.\fR If \fIry\fR is -1, there is no vertical grid used for arranging items..SH "void QIconView::setItemTextBackground ( const QBrush & brush ) \fC[virtual]\fR"Sets the \fIbrush,\fR which should be used when drawing the background of an item text. By default, this brush is set to NoBrush, which means no extra brush is used for drawing the item text background (just the normal iconview background)..SH "void QIconView::setItemTextPos ( ItemTextPos pos )"Sets the position, where the text of the items is drawn. This can be Bottom or Right..SH "void QIconView::setItemsMovable ( bool b ) \fC[virtual]\fR"If \fIb\fR is TRUE, the user is allowed to move items around in the iconview. if \fIb\fR is FALSE, the user is not allowed to do that..SH "void QIconView::setMaxItemTextLength ( int w ) \fC[virtual]\fR"Sets the maximum length (in characters), which an item text may have..SH "void QIconView::setMaxItemWidth ( int w ) \fC[virtual]\fR"Sets the maximum width, which an item may have. If a gridX() is set, this value is ignored, and the gridX() value is used..SH "void QIconView::setPalette ( const QPalette & p ) \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..SH "void QIconView::setResizeMode ( ResizeMode rm )"Sets the resize mode of the iconview to \fIrm,\fR which must be one of \fCFixed\fR and Adjust..PPSee also ResizeMode..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 \fCSingle,\fR \fIitem\fR is selected, and the item which was selected is unselected..PPIf \fIs\fR is TRUE and QIconView::selectionMode() is \fCExtended,\fR \fIitem\fR is selected. If \fIcb\fR is TRUE, the other items of the iconview are not touched. If \fIcb\fR is FALSE (the default) all other items are unselected..PPIf \fIs\fR is TRUE and QIconView::selectionMode() is \fCMulti\fR \fIitem\fR is selected..PPNote that \fIcb\fR is used only if QIconView::selectionMode() is \fCExtended.\fR \fIcb\fR defaults to FALSE..PPAll items whose selection status change repaint themselves..SH "void QIconView::setSelectionMode ( SelectionMode m )"Sets the selection mode of the iconview to \fIm,\fR which may be one of \fCSingle\fR (the default), \fCExtended, Multi\fR or \fCNoSelection.\fR.PPSee also selectionMode()..PPExamples:.(liconview/main.cpp.)l.SH "void QIconView::setShowToolTips ( bool b ) \fC[virtual]\fR"If wordWrapIconText() is FALSE, it happens that an item text is truncated because it's too large for one line. If you specify TRUE for \fIb\fR here and the user moves the mouse onto the item a tooltip with the whole item text is shown. If you pass \fIFALSE\fR here this feature is switched off..PPSee also setWordWrapIconText()..SH "void QIconView::setSorting ( bool sort, bool ascending = TRUE )"If \fIsort\fR is TRUE, new items are inserted sorted. The sort direction is specified using \fIascending.\fR.PPInserting items sorted only works when re-arranging items is set to TRUE as well (using QIconView::setAutoArrange())..PPSee also QIconView::setAutoArrange() and QIconView::autoArrange()..SH "void QIconView::setSpacing ( int sp ) \fC[virtual]\fR"Sets the space between iconview items to \fIsp.\fR.SH "void QIconView::setWordWrapIconText ( bool b ) \fC[virtual]\fR"If the width of an item text is larger than the maximal item width, there are two possibilities how the QIconView can deal with this. Either it does a word wrap of the item text, so that it uses multiple lines. Or it truncates the item text so that it shrinks to the maximal item width and appends three dots "..." to the displayed text to indicate that not the full text is displayed..PPIf you set \fIb\fR to TRUE, a word wrap is done, else the text is displayed truncated..PPNOTE: Both possibilities just change the way how the text is displayed, they do NOT modify the item text itslef..PPSee also setShowToolTips()..SH "void QIconView::showEvent ( QShowEvent * ) \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..SH "bool QIconView::showToolTips () const"Returns TRUE if a tooltip is shown for truncated item texts and FALSE otherwise..PPSee also setShowToolTips() and setWordWrapIconText()..SH "QSize QIconView::sizeHint () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPExamples:.(liconview/main.cpp.)l.PPReimplemented from QWidget..SH "QSizePolicy QIconView::sizePolicy () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QIconView::slotUpdate () \fC[virtual protected slot]\fR"Because of efficiency, the iconview is not redrawn immediately after inserting a new item, but with a very small delay using a QTimer. The result of this is, that if lots of items are inserted in a short time (e.g. in a loop), the iconview is not redrawn after each inserted item, but after inserting all of them, which makes the operation much faster and flicker-free..SH "void QIconView::sort ( bool ascending = TRUE ) \fC[virtual]\fR"Sorts the items of the listview and re-arranges them afterwards. If \fIascending\fR is TRUE, the items are sorted in increasing order, else in decreasing order. For sorting QIconViewItem::compare() is used. The default sort direction is set to the sort direction you set here..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, FALSE means descending. This sort direction has only a meaning if re-sorting and re-arranging of new inserted items is enabled..PPSee also QIconView::setSorting() and QIconView::setAutoArrange()..SH "bool QIconView::sorting () const"Returns TRUE if new items are inserted sorted, else FALSE..PPSee also QIconView::setSorting()..SH "int QIconView::spacing () const"Returns the spacing between iconview items..SH "void QIconView::startDrag () \fC[virtual protected]\fR"Starts a drag..SH "void QIconView::styleChange ( QStyle & old ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QIconView::takeItem ( QIconViewItem * item ) \fC[virtual]\fR"Takes the iconview item \fIitem\fR out of the iconview and causes an update of the screen display. The item is not deleted. You should normally not need to call this function, as QIconViewItem::~QIconViewItem() calls it. The normal way to delete an item is \fCdelete.\fR.SH "bool QIconView::wordWrapIconText () const"Returns TRUE, if an item text which needs too much space (to the width) is displayed word wrapped, or FALSE if it gets displayed truncated..PPSee also setWordWrapIconText() and setShowToolTips()..SH "void QIconView::emitRenamed ( QIconViewItem * item ) \fC[protected]\fR"For internal use only..SH "void QIconView::updateContents () \fC[virtual slot]\fR"For internal use only..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 make our job much simpler. Thank you..PIn case of content or formattting problems with this manual page, pleasereport them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qiconview.3qt) and the Qtversion (2.3.10).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -