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

📄 qscrollview.3qt

📁 tmark1.11:用于生成QT/EMBEDDED应用工程的Markfile文件
💻 3QT
📖 第 1 页 / 共 3 页
字号:
Scrolls the content so that the point (x, y) is visible with at least the given pixel margins (if possible, otherwise centered)..SH "bool QScrollView::eventFilter ( QObject * obj, QEvent * e ) \fC[virtual protected]\fR"This event filter ensures the scrollbars are updated when a single contents widget is resized, shown, hidden, or destroyed, and passes mouse events to the QScrollView..PPReimplemented from QObject..SH "bool QScrollView::focusNextPrevChild ( bool next ) \fC[virtual protected]\fR"Override so that traversal moves among child widgets, even if they are not visible, scrolling to make them so..PPReimplemented from QWidget..SH "void QScrollView::frameChanged () \fC[virtual protected]\fR"An override - ensures scrollbars are correct size when frame style changes..PPReimplemented from QFrame..SH "QScrollBar* QScrollView::horizontalScrollBar () const"Returns the component horizontal scrollbar. It is made available to allow accelerators, autoscrolling, etc., and to allow changing of arrow scroll rates: bar->setSteps( rate, bar->pageStep() )..PPIt should not be otherwise manipulated..PPThis function never returns 0..SH "int QScrollView::leftMargin () const \fC[protected]\fR"Returns the current left margin..PPSee also: setMargins()..SH "QSize QScrollView::minimumSizeHint () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QScrollView::moveChild ( QWidget * child, int x, int y ) \fC[virtual]\fR"Repositions \fIchild\fR to (\fIx, y).\fR This functions the same as addChild()..SH "void QScrollView::removeChild ( QObject * child ) \fC[virtual]\fR"Just an override to keep QObject::removeChild() accessible..PPReimplemented from QObject..SH "void QScrollView::removeChild ( QWidget * child )"Removes a child from the scrolled area. Note that this happens automatically if the child is deleted..SH "void QScrollView::repaintContents ( int x, int y, int w, int h, bool erase=TRUE )"Calls repaint() on rectangle defined by \fIx, y, w, h,\fR translated appropriately. If the rectangle in not visible, nothing is repainted..PPSee also: updateContents()..SH "void QScrollView::resize ( const QSize & s )"An override - ensures scrollbars are correct size upon resize..PPExamples:.(lqiconview/main.cpp dirview/main.cpp.)l.SH "void QScrollView::resize ( int w, int h )"An override - ensures scrollbars are correct size upon resize..SH "void QScrollView::resizeContents ( int w, int h ) \fC[virtual slot]\fR"Set the size of the contents area to \fIw\fR pixels wide and \fIh\fR pixels high, and updates the viewport accordingly..SH "void QScrollView::resizeEvent ( QResizeEvent * event ) \fC[virtual protected]\fR"An override - ensures scrollbars are correct size upon resize..PPReimplemented from QWidget..SH "QScrollView::ResizePolicy QScrollView::resizePolicy() const"Returns the currently set ResizePolicy..PPSee also: setResizePolicy() and ResizePolicy..SH "int QScrollView::rightMargin () const \fC[protected]\fR"Returns the current right margin..PPSee also: setMargins()..SH "void QScrollView::scrollBy ( int dx, int dy ) \fC[slot]\fR"Scrolls the content by \fIx\fR to the left and \fIy\fR upwards..SH "void QScrollView::setContentsPos ( int x, int y ) \fC[virtual slot]\fR"Scrolls the content so that the point (x, y) is in the top-left corner..SH "void QScrollView::setCornerWidget ( QWidget * corner ) \fC[virtual]\fR"Sets the widget in the corner between the two scrollbars..PPYou will probably also want to set at least one of the scrollbar modes to AlwaysOn..PPPassing 0 shows no widget in the corner..PPAny previous corner widget is hidden..PPYou may call setCornerWidget() with the same widget at different times..PPAll widgets set here will be deleted by the QScrollView when it destructs unless you separately reparent the widget after setting some other corner widget (or 0)..PPAny \fInewly\fR set widget should have no current parent..PPBy default, no corner widget is present..PPSee also: setVScrollBarMode() and setHScrollBarMode()..PPExamples:.(lscrollview/scrollview.cpp.)l.SH "void QScrollView::setHBarGeometry ( QScrollBar & hbar, int x, int y, int w, int h ) \fC[virtual protected]\fR"Called when the horizontal scrollbar geometry changes. This is provided as a protected function so that subclasses can do interesting things like providing extra buttons in some of the space normally used by the scrollbars..PPThe default implementation simply gives all the space to \fIhbar.\fR.PPSee also: setVBarGeometry()..SH "void QScrollView::setHScrollBarMode ( ScrollBarMode mode ) \fC[virtual]\fR"Sets the mode for the horizontal scrollbar..TP\fCAuto\fR (the default) shows a scrollbar when the content is too wide to fit..TP\fCAlwaysOff\fR never shows a scrollbar..TP\fCAlwaysOn\fR always shows a scrollbar..PPSee also: hScrollBarMode() and setVScrollBarMode()..PPExamples:.(lscrollview/scrollview.cpp.)l.SH "void QScrollView::setMargins ( int left, int top, int right, int bottom ) \fC[virtual protected]\fR"Sets the margins around the scrolling area. This is useful for applications such as spreadsheets with `locked' rows and columns. The marginal space is \fIinside\fR the frameRect() and is left blank - override drawContents() or put widgets in the unused area..PPBy default all margins are zero..PPSee also: frameChanged()..SH "void QScrollView::setResizePolicy ( ResizePolicy r ) \fC[virtual]\fR"Sets the resize policy to \fIr.\fR.PPSee also: resizePolicy() and ResizePolicy..SH "void QScrollView::setVBarGeometry ( QScrollBar & vbar, int x, int y, int w, int h ) \fC[virtual protected]\fR"Called when the vertical scrollbar geometry changes. This is provided as a protected function so that subclasses can do interesting things like providing extra buttons in some of the space normally used by the scrollbars..PPThe default implementation simply gives all the space to \fIvbar.\fR.PPSee also: setHBarGeometry()..SH "void QScrollView::setVScrollBarMode ( ScrollBarMode mode ) \fC[virtual]\fR"Sets the mode for the vertical scrollbar..TP\fCAuto\fR (the default) shows a scrollbar when the content is too tall to fit..TP\fCAlwaysOff\fR never shows a scrollbar..TP\fCAlwaysOn\fR always shows a scrollbar..PPSee also: vScrollBarMode() and setHScrollBarMode()..PPExamples:.(lscrollview/scrollview.cpp.)l.SH "void QScrollView::show () \fC[virtual]\fR"An override - ensures scrollbars are correct size upon showing..PPExamples:.(lqiconview/main.cpp.)l.PPReimplemented from QWidget..SH "void QScrollView::showChild ( QWidget * child, bool y=TRUE )"\fBThis function is obsolete.\fR It is provided to keep old programs working. We strongly advise against using it in new code..PPSets the visibility of \fIchild.\fR Equivalent to QWidget::show() or QWidget::hide()..SH "QSizePolicy QScrollView::sizePolicy () const \fC[virtual]\fR"Specifies that this widget can use additional space, and that it can survive on less than sizeHint()..PPReimplemented from QWidget..SH "int QScrollView::topMargin () const \fC[protected]\fR"Returns the current top margin..PPSee also: setMargins()..SH "void QScrollView::updateContents ( int x, int y, int w, int h )"Calls update() on rectangle defined by \fIx, y, w, h,\fR translated appropriately. If the rectangle in not visible, nothing is repainted..PPSee also: repaintContents()..SH "void QScrollView::updateScrollBars () \fC[slot]\fR"Updates scrollbars - all possibilities considered. You should never need to call this in your code..SH "QScrollBar* QScrollView::verticalScrollBar () const"Returns the component vertical scrollbar. It is made available to allow accelerators, autoscrolling, etc., and to allow changing of arrow scroll rates: bar->setSteps( rate, bar->pageStep() )..PPIt should not be otherwise manipulated..PPThis function never returns 0..SH "QWidget* QScrollView::viewport () const"Returns the viewport widget of the scrollview. This is the widget containing the contents widget or which is the drawing area..PPExamples:.(lscrollview/scrollview.cpp.)l.SH "void QScrollView::viewportDragEnterEvent ( QDragEnterEvent * e ) \fC[virtual protected]\fR"To provide simple processing of events on the contents, this method receives all drag enter events sent to the viewport..PPThe default implementation translates the event and calls contentsDragEnterEvent()..PPSee also: QWidget::dragEnterEvent()..SH "void QScrollView::viewportDragLeaveEvent ( QDragLeaveEvent * e ) \fC[virtual protected]\fR"To provide simple processing of events on the contents, this method receives all drag leave events sent to the viewport..PPThe default implementation calls contentsDragLeaveEvent()..PPSee also: QWidget::dragLeaveEvent()..SH "void QScrollView::viewportDragMoveEvent ( QDragMoveEvent * e ) \fC[virtual protected]\fR"To provide simple processing of events on the contents, this method receives all drag move events sent to the viewport..PPThe default implementation translates the event and calls contentsDragMoveEvent()..PPSee also: QWidget::dragMoveEvent()..SH "void QScrollView::viewportDropEvent ( QDropEvent * e ) \fC[virtual protected]\fR"To provide simple processing of events on the contents, this method receives all drop events sent to the viewport..PPThe default implementation translates the event and calls contentsDropEvent()..PPSee also: QWidget::dropEvent()..SH "void QScrollView::viewportMouseDoubleClickEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"To provide simple processing of events on the contents, this method receives all mouse double click events sent to the viewport..PPThe default implementation translates the event and calls contentsMouseDoubleClickEvent()..PPSee also: QWidget::mouseDoubleClickEvent()..PPReimplemented in QListBox..SH "void QScrollView::viewportMouseMoveEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"To provide simple processing of events on the contents, this method receives all mouse move events sent to the viewport..PPThe default implementation translates the event and calls contentsMouseMoveEvent()..PPSee also: QWidget::mouseMoveEvent()..PPReimplemented in QTextBrowser, QListBox and QTextView..SH "void QScrollView::viewportMousePressEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"To provide simple processing of events on the contents, this method receives all mouse press events sent to the viewport..PPThe default implementation translates the event and calls contentsMousePressEvent()..PPSee also: contentsMousePressEvent() and QWidget::mousePressEvent()..PPReimplemented in QTextView, QListBox and QTextBrowser..SH "void QScrollView::viewportMouseReleaseEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"To provide simple processing of events on the contents, this method receives all mouse release events sent to the viewport..PPThe default implementation translates the event and calls contentsMouseReleaseEvent()..PPSee also: QWidget::mouseReleaseEvent()..PPReimplemented in QTextView, QListBox and QTextBrowser..SH "void QScrollView::viewportPaintEvent ( QPaintEvent * pe ) \fC[virtual protected]\fR"This is a low-level painting routine that draws the viewport contents. Override this if drawContentsOffset() is too high-level. (for example, if you don't want to open a QPainter on the viewport)..PPReimplemented in QListBox..SH "void QScrollView::viewportResizeEvent ( QResizeEvent * ) \fC[virtual protected]\fR"To provide simple processing of events on the contents, this method receives all resize events sent to the viewport..PPSee also: QWidget::resizeEvent()..PPReimplemented in QTextView..SH "QSize QScrollView::viewportSize ( int x, int y ) const"Returns the viewport size for size (\fIx, y).\fR.PPThe viewport size depends on \fIx,y\fR (the size of the contents), the size of this widget, the modes of the horizontal and vertical scroll bars..PPThis function permits widgets that can trade vertical and horizontal space for each other to control scroll bar appearance better. For example, a word processor or web browser can control the width of the right margin accurately, whether there needs to be a vertical scroll bar or not..SH "QPoint QScrollView::viewportToContents ( const QPoint & vp )"Returns the point on the viewport \fIvp\fR translated to a point in the contents..SH "void QScrollView::viewportToContents ( int vx, int vy, int & x, int & y )"Translates a point (\fIvx, vy)\fR on the viewport() widget to a point (\fIx, y)\fR in the contents..SH "void QScrollView::viewportWheelEvent ( QWheelEvent * e ) \fC[virtual protected]\fR"To provide simple processing of events on the contents, this method receives all wheel events sent to the viewport..PPThe default implementation translates the event and calls contentsWheelEvent()..PPSee also: QWidget::wheelEvent()..SH "int QScrollView::visibleHeight () const"Returns the vertical amount of the content that is visible..SH "int QScrollView::visibleWidth () const"Returns the horizontal amount of the content that is visible..SH "void QScrollView::wheelEvent ( QWheelEvent * e ) \fC[virtual protected]\fR"An override - pass wheel events to the vertical scrollbar..PPReimplemented from QWidget..SH "SEE ALSO".BR http://www.troll.no/qt/qscrollview.html.SH COPYRIGHTCopyright 1992-1999 Troll Tech AS.  See the license file included inthe distribution for a complete license statement..SH AUTHORGenerated automatically from the source code.

⌨️ 快捷键说明

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