Eneboo - Documentación para desarrolladores
|
The QScrollView widget provides a scrolling area with on-demand scroll bars. Más...
#include <qscrollview.h>
The QScrollView widget provides a scrolling area with on-demand scroll bars.
The QScrollView is a large canvas - potentially larger than the coordinate system normally supported by the underlying window system. This is important because it is quite easy to go beyond these limitations (e.g. many web pages are more than 32000 pixels high). Additionally, the QScrollView can have QWidgets positioned on it that scroll around with the drawn content. These sub-widgets can also have positions outside the normal coordinate range (but they are still limited in size).
To provide content for the widget, inherit from QScrollView, reimplement drawContents() and use resizeContents() to set the size of the viewed area. Use addChild() and moveChild() to position widgets on the view.
To use QScrollView effectively it is important to understand its widget structure in the three styles of use: a single large child widget, a large panning area with some widgets and a large panning area with many widgets.
This enum type is used to control a QScrollView's reaction to resize events.
Default the QScrollView selects one of the other settings automatically when it has to. In this version of Qt, QScrollView changes to Manual
if you resize the contents with resizeContents() and to AutoOne
if a child is added.
Manual the contents stays the size set by resizeContents().
AutoOne if there is only one child widget the contents stays the size of that widget. Otherwise the behavior is undefined.
AutoOneFit if there is only one child widget the contents stays the size of that widget's sizeHint(). If the scrollview is resized larger than the child's sizeHint(), the child will be resized to fit. If there is more than one child, the behavior is undefined.
This enum type describes the various modes of QScrollView's scroll bars.
Auto QScrollView shows a scroll bar when the content is too large to fit and not otherwise. This is the default.
AlwaysOff QScrollView never shows a scroll bar.
AlwaysOn QScrollView always shows a scroll bar.
(The modes for the horizontal and vertical scroll bars are independent.)
Constructs a QScrollView called name with parent parent and widget flags f.
The widget flags WStaticContents
, WNoAutoErase
and WPaintClever
are propagated to the viewport() widget. The other widget flags are propagated to the parent constructor as usual.
QScrollView::~QScrollView | ( | ) |
Destroys the QScrollView. Any children added with addChild() will be deleted.
QScrollView::~QScrollView | ( | ) |
Inserts the widget, child, into the scrolled area positioned at (x, y). The position defaults to (0, 0). If the child is already in the view, it is just moved.
You may want to call enableClipper(TRUE) if you add a large number of widgets.
int QScrollView::bottomMargin | ( | ) | const [protected] |
Returns the bottom margin.
int QScrollView::bottomMargin | ( | ) | const [protected] |
QSize QScrollView::cachedSizeHint | ( | ) | const [protected] |
QSize QScrollView::cachedSizeHint | ( | ) | const [protected] |
Scrolls the content so that the point (x, y) is in the center of visible area.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Scrolls the content so that the point (x, y) is visible with the xmargin and ymargin margins (as fractions of visible the area).
For example: Margin 0.0 allows (x, y) to be on the edge of the visible area. Margin 0.5 ensures that (x, y) is in middle 50% of the visible area. Margin 1.0 ensures that (x, y) is in the center of the the visible area.
Returns TRUE if child is visible. This is equivalent to child->isVisible().
Returns the X position of the given child widget. Use this rather than QWidget::x() for widgets added to the view.
This function returns 0 if child has not been added to the view.
Returns the Y position of the given child widget. Use this rather than QWidget::y() for widgets added to the view.
This function returns 0 if child has not been added to the view.
QWidget* QScrollView::clipper | ( | ) | const |
QWidget * QScrollView::clipper | ( | ) | const |
Returns the clipper widget. Contents in the scrollview are ultimately clipped to be inside the clipper widget.
You should not need to use this function.
void QScrollView::contentsContextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected, virtual] |
This event handler is called whenever the QScrollView receives a contextMenuEvent() in {e}: the mouse position is translated to be a point on the contents.
Reimplementado en FLDataTable, QDataTable, QIconView, QListBox, QListView, QTable, QTextEdit, QIconView, QDataTable, QTable, QListBox, QListView y QTextEdit.
virtual void QScrollView::contentsContextMenuEvent | ( | QContextMenuEvent * | ) | [protected, virtual] |
Reimplementado en FLDataTable, QDataTable, QIconView, QListBox, QListView, QTable, QTextEdit, QIconView, QDataTable, QTable, QListBox, QListView y QTextEdit.
void QScrollView::contentsDragEnterEvent | ( | QDragEnterEvent * | ) | [protected, virtual] |
virtual void QScrollView::contentsDragEnterEvent | ( | QDragEnterEvent * | ) | [protected, virtual] |
void QScrollView::contentsDragLeaveEvent | ( | QDragLeaveEvent * | ) | [protected, virtual] |
This event handler is called whenever the QScrollView receives a dragLeaveEvent(): the drag position is translated to be a point on the contents.
Reimplementado en QIconView, QListView, QTable, QTextEdit, QIconView, QTable, QListView y QTextEdit.
virtual void QScrollView::contentsDragLeaveEvent | ( | QDragLeaveEvent * | ) | [protected, virtual] |
void QScrollView::contentsDragMoveEvent | ( | QDragMoveEvent * | ) | [protected, virtual] |
virtual void QScrollView::contentsDragMoveEvent | ( | QDragMoveEvent * | ) | [protected, virtual] |
void QScrollView::contentsDropEvent | ( | QDropEvent * | ) | [protected, virtual] |
virtual void QScrollView::contentsDropEvent | ( | QDropEvent * | ) | [protected, virtual] |
int QScrollView::contentsHeight | ( | ) | const |
int QScrollView::contentsHeight | ( | ) | const |
void QScrollView::contentsMouseDoubleClickEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler is called whenever the QScrollView receives a mouseDoubleClickEvent(): the click position in e is translated to be a point on the contents.
The default implementation generates a normal mouse press event.
Reimplementado en FLDataTable, QIconView, QListView, QTable, QTextEdit, QIconView, QTable, QListView, QTextEdit, FormDefinitionView y EventList.
virtual void QScrollView::contentsMouseDoubleClickEvent | ( | QMouseEvent * | ) | [protected, virtual] |
void QScrollView::contentsMouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler is called whenever the QScrollView receives a mouseMoveEvent(): the mouse position in e is translated to be a point on the contents.
Reimplementado en VDateInternalMonthPicker, QIconView, QListView, QTable, QTextEdit, QIconView, QTable, QListView y QTextEdit.
virtual void QScrollView::contentsMouseMoveEvent | ( | QMouseEvent * | ) | [protected, virtual] |
void QScrollView::contentsMousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler is called whenever the QScrollView receives a mousePressEvent(): the press position in e is translated to be a point on the contents.
Reimplementado en VDateInternalMonthPicker, VDateTable, QDataTable, QIconView, QListView, QTable, QTextEdit, QIconView, QDataTable, QTable, QListView y QTextEdit.
virtual void QScrollView::contentsMousePressEvent | ( | QMouseEvent * | ) | [protected, virtual] |
Reimplementado en VDateInternalMonthPicker, VDateTable, QDataTable, QIconView, QListView, QTable, QTextEdit, QIconView, QDataTable, QTable, QListView y QTextEdit.
void QScrollView::contentsMouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler is called whenever the QScrollView receives a mouseReleaseEvent(): the release position in e is translated to be a point on the contents.
Reimplementado en VDateInternalMonthPicker, QIconView, QListView, QTable, QTextEdit, QIconView, QTable, QListView y QTextEdit.
virtual void QScrollView::contentsMouseReleaseEvent | ( | QMouseEvent * | ) | [protected, virtual] |
This signal is emitted just before the contents are moved to position (x, y).
Translates a point (x, y) in the contents to a point (vx, vy) on the viewport() widget.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Returns the point p translated to a point on the viewport() widget.
void QScrollView::contentsWheelEvent | ( | QWheelEvent * | e | ) | [protected, virtual] |
This event handler is called whenever the QScrollView receives a wheelEvent() in {e}: the mouse position is translated to be a point on the contents.
virtual void QScrollView::contentsWheelEvent | ( | QWheelEvent * | ) | [protected, virtual] |
int QScrollView::contentsWidth | ( | ) | const |
int QScrollView::contentsWidth | ( | ) | const |
int QScrollView::contentsX | ( | ) | const |
int QScrollView::contentsX | ( | ) | const |
int QScrollView::contentsY | ( | ) | const |
int QScrollView::contentsY | ( | ) | const |
void QScrollView::contextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected, virtual] |
Reimplementado de QWidget.
void QScrollView::contextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive widget context menu events.
The default implementation calls e->ignore(), which rejects the context event. See the QContextMenuEvent documentation for more details.
Reimplementado de QWidget.
QWidget * QScrollView::cornerWidget | ( | ) | const |
Returns the widget in the corner between the two scroll bars.
By default, no corner widget is present.
QWidget* QScrollView::cornerWidget | ( | ) | const |
void QScrollView::disableSizeHintCaching | ( | ) |
void QScrollView::disableSizeHintCaching | ( | ) |
bool QScrollView::dragAutoScroll | ( | ) | const |
bool QScrollView::dragAutoScroll | ( | ) | const |
void QScrollView::drawContents | ( | QPainter * | p, |
int | clipx, | ||
int | clipy, | ||
int | clipw, | ||
int | cliph | ||
) | [protected, virtual] |
Reimplement this function if you are viewing a drawing area rather than a widget.
The function should draw the rectangle (clipx, clipy, clipw, cliph) of the contents using painter p. The clip rectangle is in the scrollview's coordinates.
For example:
{ // Fill a 40000 by 50000 rectangle at (100000,150000) // Calculate the coordinates... int x1 = 100000, y1 = 150000; int x2 = x1+40000-1, y2 = y1+50000-1; // Clip the coordinates so X/Windows will not have problems... if (x1 < clipx) x1=clipx; if (y1 < clipy) y1=clipy; if (x2 > clipx+clipw-1) x2=clipx+clipw-1; if (y2 > clipy+cliph-1) y2=clipy+cliph-1; // Paint using the small coordinates... if ( x2 >= x1 && y2 >= y1 ) p->fillRect(x1, y1, x2-x1+1, y2-y1+1, red); }
The clip rectangle and translation of the painter p is already set appropriately.
Reimplementado en FLPixmapView, QCanvasView, QDataTable, QGridView, QIconView, QTable, QTextEdit, QCanvasView, QIconView, QDataTable, QTable, QGridView, QTextEdit y PixmapView.
virtual void QScrollView::drawContents | ( | QPainter * | , |
int | cx, | ||
int | cy, | ||
int | cw, | ||
int | ch | ||
) | [protected, virtual] |
Reimplementado en FLPixmapView, QCanvasView, QDataTable, QGridView, QIconView, QTable, QTextEdit, QCanvasView, QIconView, QDataTable, QTable, QGridView, QTextEdit y PixmapView.
void QScrollView::drawContentsOffset | ( | QPainter * | p, |
int | offsetx, | ||
int | offsety, | ||
int | clipx, | ||
int | clipy, | ||
int | clipw, | ||
int | cliph | ||
) | [protected, virtual] |
For backward-compatibility only. It is easier to use drawContents(QPainter*,int,int,int,int).
The default implementation translates the painter appropriately and calls drawContents(QPainter*,int,int,int,int). See drawContents() for an explanation of the parameters p, offsetx, offsety, clipx, clipy, clipw and cliph.
Reimplementado en QListView, QListView y HierarchyList.
virtual void QScrollView::drawContentsOffset | ( | QPainter * | , |
int | ox, | ||
int | oy, | ||
int | cx, | ||
int | cy, | ||
int | cw, | ||
int | ch | ||
) | [protected, virtual] |
Reimplementado en QListView, QListView y HierarchyList.
void QScrollView::enableClipper | ( | bool | y | ) |
void QScrollView::enableClipper | ( | bool | y | ) |
When a large numbers of child widgets are in a scrollview, especially if they are close together, the scrolling performance can suffer greatly. If y is TRUE the scrollview will use an extra widget to group child widgets.
Note that you may only call enableClipper() prior to adding widgets.
For a full discussion, see this class's detailed description.
Scrolls the content so that the point (x, y) is visible with at least 50-pixel margins (if possible, otherwise centered).
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Scrolls the content so that the point (x, y) is visible with at least the xmargin and ymargin margins (if possible, otherwise centered).
This event filter ensures the scroll bars are updated when a single contents widget is resized, shown, hidden or destroyed; it passes mouse events to the QScrollView. The event is in e and the object is in obj.
Reimplementado de QObject.
Reimplementado en FLDataTable, Editor, QDataTable, QIconView, QListBox, QListView, QTable, QTextEdit, QIconView, QDataTable, QTable, QListBox, QListView, QTextEdit, Workspace y Editor.
Filters events if this object has been installed as an event filter for the watched object.
In your reimplementation of this function, if you want to filter the event e, out, i.e. stop it being handled further, return TRUE; otherwise return FALSE.
Example:
class MyMainWindow : public QMainWindow { public: MyMainWindow( QWidget *parent = 0, const char *name = 0 ); protected: bool eventFilter( QObject *obj, QEvent *ev ); private: QTextEdit *textEdit; }; MyMainWindow::MyMainWindow( QWidget *parent, const char *name ) : QMainWindow( parent, name ) { textEdit = new QTextEdit( this ); setCentralWidget( textEdit ); textEdit->installEventFilter( this ); } bool MyMainWindow::eventFilter( QObject *obj, QEvent *ev ) { if ( obj == textEdit ) { if ( e->type() == QEvent::KeyPress ) { QKeyEvent *k = (QKeyEvent*)ev; qDebug( "Ate key press %d", k->key() ); return TRUE; } else { return FALSE; } } else { // pass the event on to the parent class return QMainWindow::eventFilter( obj, ev ); } }
Notice in the example above that unhandled events are passed to the base class's eventFilter() function, since the base class might have reimplemented eventFilter() for its own internal purposes.
Reimplementado de QObject.
Reimplementado en FLDataTable, Editor, QDataTable, QIconView, QListBox, QListView, QTable, QTextEdit, QIconView, QDataTable, QTable, QListBox, QListView, QTextEdit, Workspace y Editor.
Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns TRUE if is can find a new widget and FALSE if it can't,
If next is TRUE, this function searches "forwards", if next is FALSE, it searches "backwards".
Sometimes, you will want to reimplement this function. For example, a web browser might reimplement it to move its "current active link" forwards or backwards, and call QWidget::focusNextPrevChild() only when it reaches the last or first link on the "page".
Child widgets call focusNextPrevChild() on their parent widgets, but only the top-level widget decides where to redirect focus. By overriding this method for an object, you thus gain control of focus traversal for all child widgets.
Reimplementado de QWidget.
void QScrollView::fontChange | ( | const QFont & | oldFont | ) | [protected, virtual] |
This virtual function is called from setFont(). oldFont is the previous font; you can get the new font from font().
Reimplement this function if your widget needs to know when its font changes. You will almost certainly need to update the widget using update().
The default implementation updates the widget including its geometry.
Reimplementado de QWidget.
void QScrollView::frameChanged | ( | ) | [protected, virtual] |
Reimplementado de QFrame.
void QScrollView::frameChanged | ( | ) | [protected, virtual] |
bool QScrollView::hasStaticBackground | ( | ) | const |
bool QScrollView::hasStaticBackground | ( | ) | const |
Returns TRUE if QScrollView uses a static background; otherwise returns FALSE.
QScrollBar * QScrollView::horizontalScrollBar | ( | ) | const |
Returns the component horizontal scroll bar. It is made available to allow accelerators, autoscrolling, etc.
It should not be used for other purposes.
This function never returns 0.
QScrollBar* QScrollView::horizontalScrollBar | ( | ) | const |
void QScrollView::horizontalSliderPressed | ( | ) | [signal] |
void QScrollView::horizontalSliderPressed | ( | ) | [signal] |
This signal is emitted whenever the user presses the horizontal slider.
void QScrollView::horizontalSliderReleased | ( | ) | [signal] |
void QScrollView::horizontalSliderReleased | ( | ) | [signal] |
This signal is emitted whenever the user releases the horizontal slider.
ScrollBarMode QScrollView::hScrollBarMode | ( | ) | const |
ScrollBarMode QScrollView::hScrollBarMode | ( | ) | const |
bool QScrollView::isHorizontalSliderPressed | ( | ) |
bool QScrollView::isHorizontalSliderPressed | ( | ) |
Returns TRUE if horizontal slider is pressed by user; otherwise returns FALSE.
bool QScrollView::isVerticalSliderPressed | ( | ) |
bool QScrollView::isVerticalSliderPressed | ( | ) |
Returns TRUE if vertical slider is pressed by user; otherwise returns FALSE.
int QScrollView::leftMargin | ( | ) | const [protected] |
Returns the left margin.
int QScrollView::leftMargin | ( | ) | const [protected] |
QSize QScrollView::minimumSizeHint | ( | ) | const [virtual] |
QSize QScrollView::minimumSizeHint | ( | ) | const [virtual] |
void QScrollView::mouseDoubleClickEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
void QScrollView::mouseDoubleClickEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive mouse double click events for the widget.
The default implementation generates a normal mouse press event.
Note that the widgets gets a mousePressEvent() and a mouseReleaseEvent() before the mouseDoubleClickEvent().
Reimplementado de QWidget.
void QScrollView::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Reimplementado de QWidget.
Reimplementado en QListBox, QWellArray, QColorWell y QListBox.
void QScrollView::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive mouse move events for the widget.
If mouse tracking is switched off, mouse move events only occur if a mouse button is pressed while the mouse is being moved. If mouse tracking is switched on, mouse move events occur even if no mouse button is pressed.
QMouseEvent::pos() reports the position of the mouse cursor, relative to this widget. For press and release events, the position is usually the same as the position of the last mouse move event, but it might be different if the user's hand shakes. This is a feature of the underlying window system, not Qt.
Reimplementado de QWidget.
Reimplementado en QListBox, QWellArray, QColorWell y QListBox.
void QScrollView::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Reimplementado de QWidget.
Reimplementado en QListBox, QWellArray, QColorWell y QListBox.
void QScrollView::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive mouse press events for the widget.
If you create new widgets in the mousePressEvent() the mouseReleaseEvent() may not end up where you expect, depending on the underlying window system (or X11 window manager), the widgets' location and maybe more.
The default implementation implements the closing of popup widgets when you click outside the window. For other widget types it does nothing.
Reimplementado de QWidget.
Reimplementado en QListBox, QWellArray, QColorWell y QListBox.
void QScrollView::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive mouse release events for the widget.
Reimplementado de QWidget.
Reimplementado en QListBox, QWellArray, QColorWell y QListBox.
void QScrollView::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Reimplementado de QWidget.
Reimplementado en QListBox, QWellArray, QColorWell y QListBox.
Repositions the child widget to (x, y). This function is the same as addChild().
void QScrollView::removeChild | ( | QWidget * | child | ) |
Removes the child widget from the scrolled area. Note that this happens automatically if the child is deleted.
void QScrollView::removeChild | ( | QObject * | obj | ) | [virtual] |
Removes the child object obj from the list of children.
Reimplementado de QObject.
void QScrollView::removeChild | ( | QWidget * | child | ) |
Calls repaint() on a rectangle defined by x, y, w, h, translated appropriately. If the rectangle is not visible, nothing is repainted. If erase is TRUE the background is cleared using the background color.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Repaints the contents of rectangle r. If erase is TRUE the background is cleared using the background color.
void QScrollView::repaintContents | ( | bool | erase = TRUE | ) |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Repaints the contents. If erase is TRUE the background is cleared using the background color.
void QScrollView::repaintContents | ( | bool | erase = TRUE | ) |
Sets the size of the contents area to w pixels wide and h pixels high and updates the viewport accordingly.
void QScrollView::resizeEvent | ( | QResizeEvent * | event | ) | [protected, virtual] |
Reimplementado de QFrame.
Reimplementado en QDataTable, QIconView, QListBox, QListView, QTextEdit, QIconView, QDataTable, QListBox, QListView, QTextEdit y PropertyList.
void QScrollView::resizeEvent | ( | QResizeEvent * | e | ) | [protected, virtual] |
Processes the resize event e.
Adjusts the frame rectangle for the resized widget. The frame rectangle is elastic, and the surrounding area is static.
The resulting frame rectangle may be null or invalid. You can use setMinimumSize() to avoid those possibilities.
Nothing is done if the frame rectangle is a null rectangle already.
Reimplementado de QFrame.
Reimplementado en QDataTable, QIconView, QListBox, QListView, QTextEdit, QIconView, QDataTable, QListBox, QListView, QTextEdit y PropertyList.
ResizePolicy QScrollView::resizePolicy | ( | ) | const |
ResizePolicy QScrollView::resizePolicy | ( | ) | const |
int QScrollView::rightMargin | ( | ) | const [protected] |
int QScrollView::rightMargin | ( | ) | const [protected] |
Returns the right margin.
Scrolls the content by dx to the left and dy upwards.
void QScrollView::setCachedSizeHint | ( | const QSize & | sh | ) | const [protected] |
void QScrollView::setCachedSizeHint | ( | const QSize & | sh | ) | const [protected] |
void QScrollView::setCornerWidget | ( | QWidget * | corner | ) | [virtual] |
Sets the widget in the corner between the two scroll bars.
You will probably also want to set at least one of the scroll bar modes to AlwaysOn
.
Passing 0 shows no widget in the corner.
Any previous corner widget is hidden.
You may call setCornerWidget() with the same widget at different times.
All widgets set here will be deleted by the QScrollView when it is destroyed unless you separately reparent the widget after setting some other corner widget (or 0).
Any newly set widget should have no current parent.
By default, no corner widget is present.
virtual void QScrollView::setCornerWidget | ( | QWidget * | ) | [virtual] |
virtual void QScrollView::setDragAutoScroll | ( | bool | b | ) | [virtual] |
void QScrollView::setDragAutoScroll | ( | bool | b | ) | [virtual] |
void QScrollView::setEnabled | ( | bool | enable | ) | [virtual, slot] |
void QScrollView::setEnabled | ( | bool | enable | ) | [virtual, slot] |
virtual void QScrollView::setHBarGeometry | ( | QScrollBar & | hbar, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) | [protected, virtual] |
void QScrollView::setHBarGeometry | ( | QScrollBar & | hbar, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) | [protected, virtual] |
Called when the horizontal scroll bar geometry changes. This is provided as a protected function so that subclasses can do interesting things such as providing extra buttons in some of the space normally used by the scroll bars.
The default implementation simply gives all the space to hbar. The new geometry is given by x, y, w and h.
void QScrollView::setHScrollBarMode | ( | ScrollBarMode | mode | ) | [virtual] |
virtual void QScrollView::setHScrollBarMode | ( | ScrollBarMode | ) | [virtual] |
virtual void QScrollView::setMargins | ( | int | left, |
int | top, | ||
int | right, | ||
int | bottom | ||
) | [protected, virtual] |
Sets the margins around the scrolling area to left, top, right and bottom. This is useful for applications such as spreadsheets with "locked" rows and columns. The marginal space is inside the frameRect() and is left blank; reimplement drawFrame() or put widgets in the unused area.
By default all margins are zero.
void QScrollView::setResizePolicy | ( | ResizePolicy | r | ) | [virtual] |
virtual void QScrollView::setResizePolicy | ( | ResizePolicy | ) | [virtual] |
void QScrollView::setStaticBackground | ( | bool | y | ) |
void QScrollView::setStaticBackground | ( | bool | y | ) |
Sets the scrollview to have a static background if y is TRUE, or a scrolling background if y is FALSE. By default, the background is scrolling.
Be aware that this mode is quite slow, as a full repaint of the visible area has to be triggered on every contents move.
void QScrollView::setVBarGeometry | ( | QScrollBar & | vbar, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) | [protected, virtual] |
Called when the vertical scroll bar geometry changes. This is provided as a protected function so that subclasses can do interesting things such as providing extra buttons in some of the space normally used by the scroll bars.
The default implementation simply gives all the space to vbar. The new geometry is given by x, y, w and h.
virtual void QScrollView::setVBarGeometry | ( | QScrollBar & | vbar, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) | [protected, virtual] |
virtual void QScrollView::setVScrollBarMode | ( | ScrollBarMode | ) | [virtual] |
void QScrollView::setVScrollBarMode | ( | ScrollBarMode | mode | ) | [virtual] |
void QScrollView::show | ( | ) | [virtual] |
Shows the widget and its child widgets.
If its size or position has changed, Qt guarantees that a widget gets move and resize events just before it is shown.
You almost never have to reimplement this function. If you need to change some settings before a widget is shown, use showEvent() instead. If you need to do some delayed initialization use polish().
Reimplementado de QWidget.
void QScrollView::show | ( | ) | [virtual] |
Sets the visibility of child. Equivalent to QWidget::show() or QWidget::hide().
QSize QScrollView::sizeHint | ( | ) | const [virtual] |
Reimplementado de QFrame.
Reimplementado en VDateInternalMonthPicker, VDateTable, QCanvasView, QIconView, QListBox, QListView, QTable, QTextEdit, QCanvasView, QWellArray, QErrorMessageTextView, QIconView, QTable, QListBox, QListView, QTextEdit y PhraseLV.
QSize QScrollView::sizeHint | ( | ) | const [virtual] |
Reimplementado de QFrame.
Reimplementado en VDateInternalMonthPicker, VDateTable, QCanvasView, QIconView, QListBox, QListView, QTable, QTextEdit, QCanvasView, QWellArray, QErrorMessageTextView, QIconView, QTable, QListBox, QListView, QTextEdit y PhraseLV.
void QScrollView::styleChange | ( | QStyle & | old | ) | [virtual] |
void QScrollView::styleChange | ( | QStyle & | old | ) | [virtual] |
int QScrollView::topMargin | ( | ) | const [protected] |
Returns the top margin.
int QScrollView::topMargin | ( | ) | const [protected] |
void QScrollView::updateContents | ( | ) |
Calls update() on a rectangle defined by x, y, w, h, translated appropriately. If the rectangle is not visible, nothing is repainted.
void QScrollView::updateContents | ( | const QRect & | r | ) |
void QScrollView::updateContents | ( | const QRect & | r | ) |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Updates the contents in rectangle r
void QScrollView::updateScrollBars | ( | ) | [slot] |
void QScrollView::updateScrollBars | ( | ) | [slot] |
Updates scroll bars: all possibilities are considered. You should never need to call this in your code.
QScrollBar* QScrollView::verticalScrollBar | ( | ) | const |
QScrollBar * QScrollView::verticalScrollBar | ( | ) | const |
Returns the component vertical scroll bar. It is made available to allow accelerators, autoscrolling, etc.
It should not be used for other purposes.
This function never returns 0.
void QScrollView::verticalSliderPressed | ( | ) | [signal] |
void QScrollView::verticalSliderPressed | ( | ) | [signal] |
This signal is emitted whenever the user presses the vertical slider.
void QScrollView::verticalSliderReleased | ( | ) | [signal] |
void QScrollView::verticalSliderReleased | ( | ) | [signal] |
This signal is emitted whenever the user releases the vertical slider.
QWidget* QScrollView::viewport | ( | ) | const |
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.
virtual void QScrollView::viewportContextMenuEvent | ( | QContextMenuEvent * | ) | [protected, virtual] |
void QScrollView::viewportContextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected, virtual] |
virtual void QScrollView::viewportDragEnterEvent | ( | QDragEnterEvent * | ) | [protected, virtual] |
Reimplementado en PropertyList.
void QScrollView::viewportDragEnterEvent | ( | QDragEnterEvent * | e | ) | [protected, virtual] |
Reimplementado en PropertyList.
void QScrollView::viewportDragLeaveEvent | ( | QDragLeaveEvent * | e | ) | [protected, virtual] |
virtual void QScrollView::viewportDragLeaveEvent | ( | QDragLeaveEvent * | ) | [protected, virtual] |
void QScrollView::viewportDragMoveEvent | ( | QDragMoveEvent * | e | ) | [protected, virtual] |
Reimplementado en PropertyList.
virtual void QScrollView::viewportDragMoveEvent | ( | QDragMoveEvent * | ) | [protected, virtual] |
Reimplementado en PropertyList.
void QScrollView::viewportDropEvent | ( | QDropEvent * | e | ) | [protected, virtual] |
Reimplementado en PropertyList.
virtual void QScrollView::viewportDropEvent | ( | QDropEvent * | ) | [protected, virtual] |
Reimplementado en PropertyList.
void QScrollView::viewportMouseDoubleClickEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
virtual void QScrollView::viewportMouseDoubleClickEvent | ( | QMouseEvent * | ) | [protected, virtual] |
virtual void QScrollView::viewportMouseMoveEvent | ( | QMouseEvent * | ) | [protected, virtual] |
void QScrollView::viewportMouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
void QScrollView::viewportMousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Reimplementado en HierarchyList.
virtual void QScrollView::viewportMousePressEvent | ( | QMouseEvent * | ) | [protected, virtual] |
Reimplementado en HierarchyList.
virtual void QScrollView::viewportMouseReleaseEvent | ( | QMouseEvent * | ) | [protected, virtual] |
Reimplementado en HierarchyList.
void QScrollView::viewportMouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Reimplementado en HierarchyList.
virtual void QScrollView::viewportPaintEvent | ( | QPaintEvent * | ) | [protected, virtual] |
void QScrollView::viewportPaintEvent | ( | QPaintEvent * | pe | ) | [protected, virtual] |
This is a low-level painting routine that draws the viewport contents. Reimplement this if drawContents() is too high-level (for example, if you don't want to open a QPainter on the viewport). The paint event is passed in pe.
virtual void QScrollView::viewportResizeEvent | ( | QResizeEvent * | ) | [protected, virtual] |
Reimplementado en VDateInternalMonthPicker, VDateTable, QListView, QTable, QTextEdit, QTable, QListView, QTextEdit y QwtLegend::PrivateData::LegendView.
void QScrollView::viewportResizeEvent | ( | QResizeEvent * | ) | [protected, virtual] |
To provide simple processing of events on the contents, this function receives all resize events sent to the viewport.
Reimplementado en VDateInternalMonthPicker, VDateTable, QListView, QTable, QTextEdit, QTable, QListView, QTextEdit y QwtLegend::PrivateData::LegendView.
Returns the viewport size for size (x, y).
The viewport size depends on (x, y) (the size of the contents), the size of this widget and the modes of the horizontal and vertical scroll bars.
This 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 or not there needs to be a vertical scroll bar.
Translates a point (vx, vy) on the viewport() widget to a point (x, y) in the contents.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Returns the point on the viewport vp translated to a point in the contents.
virtual void QScrollView::viewportWheelEvent | ( | QWheelEvent * | ) | [protected, virtual] |
void QScrollView::viewportWheelEvent | ( | QWheelEvent * | e | ) | [protected, virtual] |
int QScrollView::visibleHeight | ( | ) | const |
int QScrollView::visibleHeight | ( | ) | const |
int QScrollView::visibleWidth | ( | ) | const |
int QScrollView::visibleWidth | ( | ) | const |
ScrollBarMode QScrollView::vScrollBarMode | ( | ) | const |
ScrollBarMode QScrollView::vScrollBarMode | ( | ) | const |
void QScrollView::wheelEvent | ( | QWheelEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive wheel events for the widget.
If you reimplement this handler, it is very important that you ignore() the event if you do not handle it, so that the widget's parent can interpret it.
The default implementation ignores the event.
Reimplementado de QWidget.
void QScrollView::wheelEvent | ( | QWheelEvent * | e | ) | [protected, virtual] |
Reimplementado de QWidget.
int QScrollView::contentsHeight [read] |
the height of the contents area
int QScrollView::contentsWidth [read] |
the width of the contents area
int QScrollView::contentsX [read] |
the X coordinate of the contents that are at the left edge of the viewport.
int QScrollView::contentsY [read] |
the Y coordinate of the contents that are at the top edge of the viewport.
bool QScrollView::dragAutoScroll [read, write] |
whether autoscrolling in drag move events is enabled
If this property is set to TRUE (the default), the QScrollView automatically scrolls the contents in drag move events if the user moves the cursor close to a border of the view. Of course this works only if the viewport accepts drops. Specifying FALSE disables this autoscroll feature.
ScrollBarMode QScrollView::hScrollBarMode [read, write] |
the mode for the horizontal scroll bar
The default mode is QScrollView::Auto
.
ResizePolicy QScrollView::resizePolicy [read, write] |
int QScrollView::visibleHeight [read] |
the vertical amount of the content that is visible
int QScrollView::visibleWidth [read] |
the horizontal amount of the content that is visible
ScrollBarMode QScrollView::vScrollBarMode [read, write] |
the mode for the vertical scroll bar
The default mode is QScrollView::Auto
.