Eneboo - Documentación para desarrolladores
Tipos públicos | Slots públicos | Señales | Métodos públicos | Métodos protegidos | Propiedades
Referencia de la Clase QScrollView

The QScrollView widget provides a scrolling area with on-demand scroll bars. Más...

#include <qscrollview.h>

Diagrama de herencias de QScrollView
QFrame QFrame QWidget QWidget QWidget QWidget QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject FLPixmapView PixmapView QCanvasView QCanvasView QGridView QGridView QIconView QIconView QListBox QListBox QListView QListView QTable QTable QTextEdit QTextEdit QwtLegend::PrivateData::LegendView

Lista de todos los miembros.

Tipos públicos

enum  ResizePolicy {
  Default, Manual, AutoOne, AutoOneFit,
  Default, Manual, AutoOne, AutoOneFit
}
enum  ScrollBarMode {
  Auto, AlwaysOff, AlwaysOn, Auto,
  AlwaysOff, AlwaysOn
}
enum  ResizePolicy {
  Default, Manual, AutoOne, AutoOneFit,
  Default, Manual, AutoOne, AutoOneFit
}
enum  ScrollBarMode {
  Auto, AlwaysOff, AlwaysOn, Auto,
  AlwaysOff, AlwaysOn
}

Slots públicos

virtual void resizeContents (int w, int h)
void scrollBy (int dx, int dy)
virtual void setContentsPos (int x, int y)
void ensureVisible (int x, int y)
void ensureVisible (int x, int y, int xmargin, int ymargin)
void center (int x, int y)
void center (int x, int y, float xmargin, float ymargin)
void updateScrollBars ()
void setEnabled (bool enable)
virtual void resizeContents (int w, int h)
void scrollBy (int dx, int dy)
virtual void setContentsPos (int x, int y)
void ensureVisible (int x, int y)
void ensureVisible (int x, int y, int xmargin, int ymargin)
void center (int x, int y)
void center (int x, int y, float xmargin, float ymargin)
void updateScrollBars ()
void setEnabled (bool enable)

Señales

void contentsMoving (int x, int y)
void horizontalSliderPressed ()
void horizontalSliderReleased ()
void verticalSliderPressed ()
void verticalSliderReleased ()
void contentsMoving (int x, int y)
void horizontalSliderPressed ()
void horizontalSliderReleased ()
void verticalSliderPressed ()
void verticalSliderReleased ()

Métodos públicos

 QScrollView (QWidget *parent=0, const char *name=0, WFlags f=0)
 ~QScrollView ()
virtual void setResizePolicy (ResizePolicy)
ResizePolicy resizePolicy () const
void styleChange (QStyle &)
void removeChild (QWidget *child)
virtual void addChild (QWidget *child, int x=0, int y=0)
virtual void moveChild (QWidget *child, int x, int y)
int childX (QWidget *child)
int childY (QWidget *child)
bool childIsVisible (QWidget *child)
void showChild (QWidget *child, bool yes=TRUE)
ScrollBarMode vScrollBarMode () const
virtual void setVScrollBarMode (ScrollBarMode)
ScrollBarMode hScrollBarMode () const
virtual void setHScrollBarMode (ScrollBarMode)
QWidgetcornerWidget () const
virtual void setCornerWidget (QWidget *)
QScrollBarhorizontalScrollBar () const
QScrollBarverticalScrollBar () const
QWidgetviewport () const
QWidgetclipper () const
int visibleWidth () const
int visibleHeight () const
int contentsWidth () const
int contentsHeight () const
int contentsX () const
int contentsY () const
void resize (int w, int h)
void resize (const QSize &)
void show ()
void updateContents (int x, int y, int w, int h)
void updateContents (const QRect &r)
void updateContents ()
void repaintContents (int x, int y, int w, int h, bool erase=TRUE)
void repaintContents (const QRect &r, bool erase=TRUE)
void repaintContents (bool erase=TRUE)
void contentsToViewport (int x, int y, int &vx, int &vy) const
void viewportToContents (int vx, int vy, int &x, int &y) const
QPoint contentsToViewport (const QPoint &) const
QPoint viewportToContents (const QPoint &) const
void enableClipper (bool y)
void setStaticBackground (bool y)
bool hasStaticBackground () const
QSize viewportSize (int, int) const
QSize sizeHint () const
QSize minimumSizeHint () const
void removeChild (QObject *child)
bool isHorizontalSliderPressed ()
bool isVerticalSliderPressed ()
virtual void setDragAutoScroll (bool b)
bool dragAutoScroll () const
void disableSizeHintCaching ()
 QScrollView (QWidget *parent=0, const char *name=0, WFlags f=0)
 ~QScrollView ()
virtual void setResizePolicy (ResizePolicy)
ResizePolicy resizePolicy () const
void styleChange (QStyle &)
void removeChild (QWidget *child)
virtual void addChild (QWidget *child, int x=0, int y=0)
virtual void moveChild (QWidget *child, int x, int y)
int childX (QWidget *child)
int childY (QWidget *child)
bool childIsVisible (QWidget *child)
void showChild (QWidget *child, bool yes=TRUE)
ScrollBarMode vScrollBarMode () const
virtual void setVScrollBarMode (ScrollBarMode)
ScrollBarMode hScrollBarMode () const
virtual void setHScrollBarMode (ScrollBarMode)
QWidgetcornerWidget () const
virtual void setCornerWidget (QWidget *)
QScrollBarhorizontalScrollBar () const
QScrollBarverticalScrollBar () const
QWidgetviewport () const
QWidgetclipper () const
int visibleWidth () const
int visibleHeight () const
int contentsWidth () const
int contentsHeight () const
int contentsX () const
int contentsY () const
void resize (int w, int h)
void resize (const QSize &)
void show ()
void updateContents (int x, int y, int w, int h)
void updateContents (const QRect &r)
void updateContents ()
void repaintContents (int x, int y, int w, int h, bool erase=TRUE)
void repaintContents (const QRect &r, bool erase=TRUE)
void repaintContents (bool erase=TRUE)
void contentsToViewport (int x, int y, int &vx, int &vy) const
void viewportToContents (int vx, int vy, int &x, int &y) const
QPoint contentsToViewport (const QPoint &) const
QPoint viewportToContents (const QPoint &) const
void enableClipper (bool y)
void setStaticBackground (bool y)
bool hasStaticBackground () const
QSize viewportSize (int, int) const
QSize sizeHint () const
QSize minimumSizeHint () const
void removeChild (QObject *child)
bool isHorizontalSliderPressed ()
bool isVerticalSliderPressed ()
virtual void setDragAutoScroll (bool b)
bool dragAutoScroll () const
void disableSizeHintCaching ()

Métodos protegidos

virtual void drawContents (QPainter *, int cx, int cy, int cw, int ch)
virtual void drawContentsOffset (QPainter *, int ox, int oy, int cx, int cy, int cw, int ch)
virtual void contentsMousePressEvent (QMouseEvent *)
virtual void contentsMouseReleaseEvent (QMouseEvent *)
virtual void contentsMouseDoubleClickEvent (QMouseEvent *)
virtual void contentsMouseMoveEvent (QMouseEvent *)
virtual void contentsDragEnterEvent (QDragEnterEvent *)
virtual void contentsDragMoveEvent (QDragMoveEvent *)
virtual void contentsDragLeaveEvent (QDragLeaveEvent *)
virtual void contentsDropEvent (QDropEvent *)
virtual void contentsWheelEvent (QWheelEvent *)
virtual void contentsContextMenuEvent (QContextMenuEvent *)
virtual void viewportPaintEvent (QPaintEvent *)
virtual void viewportResizeEvent (QResizeEvent *)
virtual void viewportMousePressEvent (QMouseEvent *)
virtual void viewportMouseReleaseEvent (QMouseEvent *)
virtual void viewportMouseDoubleClickEvent (QMouseEvent *)
virtual void viewportMouseMoveEvent (QMouseEvent *)
virtual void viewportDragEnterEvent (QDragEnterEvent *)
virtual void viewportDragMoveEvent (QDragMoveEvent *)
virtual void viewportDragLeaveEvent (QDragLeaveEvent *)
virtual void viewportDropEvent (QDropEvent *)
virtual void viewportWheelEvent (QWheelEvent *)
virtual void viewportContextMenuEvent (QContextMenuEvent *)
void frameChanged ()
virtual void setMargins (int left, int top, int right, int bottom)
int leftMargin () const
int topMargin () const
int rightMargin () const
int bottomMargin () const
bool focusNextPrevChild (bool next)
virtual void setHBarGeometry (QScrollBar &hbar, int x, int y, int w, int h)
virtual void setVBarGeometry (QScrollBar &vbar, int x, int y, int w, int h)
void resizeEvent (QResizeEvent *)
void mousePressEvent (QMouseEvent *)
void mouseReleaseEvent (QMouseEvent *)
void mouseDoubleClickEvent (QMouseEvent *)
void mouseMoveEvent (QMouseEvent *)
void wheelEvent (QWheelEvent *)
void contextMenuEvent (QContextMenuEvent *)
bool eventFilter (QObject *, QEvent *e)
void setCachedSizeHint (const QSize &sh) const
QSize cachedSizeHint () const
void fontChange (const QFont &)
virtual void drawContents (QPainter *, int cx, int cy, int cw, int ch)
virtual void drawContentsOffset (QPainter *, int ox, int oy, int cx, int cy, int cw, int ch)
virtual void contentsMousePressEvent (QMouseEvent *)
virtual void contentsMouseReleaseEvent (QMouseEvent *)
virtual void contentsMouseDoubleClickEvent (QMouseEvent *)
virtual void contentsMouseMoveEvent (QMouseEvent *)
virtual void contentsDragEnterEvent (QDragEnterEvent *)
virtual void contentsDragMoveEvent (QDragMoveEvent *)
virtual void contentsDragLeaveEvent (QDragLeaveEvent *)
virtual void contentsDropEvent (QDropEvent *)
virtual void contentsWheelEvent (QWheelEvent *)
virtual void contentsContextMenuEvent (QContextMenuEvent *)
virtual void viewportPaintEvent (QPaintEvent *)
virtual void viewportResizeEvent (QResizeEvent *)
virtual void viewportMousePressEvent (QMouseEvent *)
virtual void viewportMouseReleaseEvent (QMouseEvent *)
virtual void viewportMouseDoubleClickEvent (QMouseEvent *)
virtual void viewportMouseMoveEvent (QMouseEvent *)
virtual void viewportDragEnterEvent (QDragEnterEvent *)
virtual void viewportDragMoveEvent (QDragMoveEvent *)
virtual void viewportDragLeaveEvent (QDragLeaveEvent *)
virtual void viewportDropEvent (QDropEvent *)
virtual void viewportWheelEvent (QWheelEvent *)
virtual void viewportContextMenuEvent (QContextMenuEvent *)
void frameChanged ()
virtual void setMargins (int left, int top, int right, int bottom)
int leftMargin () const
int topMargin () const
int rightMargin () const
int bottomMargin () const
bool focusNextPrevChild (bool next)
virtual void setHBarGeometry (QScrollBar &hbar, int x, int y, int w, int h)
virtual void setVBarGeometry (QScrollBar &vbar, int x, int y, int w, int h)
void resizeEvent (QResizeEvent *)
void mousePressEvent (QMouseEvent *)
void mouseReleaseEvent (QMouseEvent *)
void mouseDoubleClickEvent (QMouseEvent *)
void mouseMoveEvent (QMouseEvent *)
void wheelEvent (QWheelEvent *)
void contextMenuEvent (QContextMenuEvent *)
bool eventFilter (QObject *, QEvent *e)
void setCachedSizeHint (const QSize &sh) const
QSize cachedSizeHint () const
void fontChange (const QFont &)

Propiedades

ResizePolicy resizePolicy
 the resize policy
ScrollBarMode vScrollBarMode
 the mode for the vertical scroll bar
ScrollBarMode hScrollBarMode
 the mode for the horizontal scroll bar
int visibleWidth
 the horizontal amount of the content that is visible
int visibleHeight
 the vertical amount of the content that is visible
int contentsWidth
 the width of the contents area
int contentsHeight
 the height of the contents area
int contentsX
 the X coordinate of the contents that are at the left edge of the viewport.
int contentsY
 the Y coordinate of the contents that are at the top edge of the viewport.
bool dragAutoScroll
 whether autoscrolling in drag move events is enabled

Descripción detallada

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.


Documentación de las enumeraciones miembro de la clase

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.

Valores de enumeraciones:
Default 
Manual 
AutoOne 
AutoOneFit 
Default 
Manual 
AutoOne 
AutoOneFit 
Valores de enumeraciones:
Default 
Manual 
AutoOne 
AutoOneFit 
Default 
Manual 
AutoOne 
AutoOneFit 
Valores de enumeraciones:
Auto 
AlwaysOff 
AlwaysOn 
Auto 
AlwaysOff 
AlwaysOn 

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.)

Valores de enumeraciones:
Auto 
AlwaysOff 
AlwaysOn 
Auto 
AlwaysOff 
AlwaysOn 

Documentación del constructor y destructor

QScrollView::QScrollView ( QWidget parent = 0,
const char *  name = 0,
WFlags  f = 0 
)

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 ( QWidget parent = 0,
const char *  name = 0,
WFlags  f = 0 
)
QScrollView::~QScrollView ( )

Documentación de las funciones miembro

void QScrollView::addChild ( QWidget child,
int  x = 0,
int  y = 0 
) [virtual]

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.

virtual void QScrollView::addChild ( QWidget child,
int  x = 0,
int  y = 0 
) [virtual]
int QScrollView::bottomMargin ( ) const [protected]

Returns the bottom margin.

Ver también:
setMargins()
int QScrollView::bottomMargin ( ) const [protected]
QSize QScrollView::cachedSizeHint ( ) const [protected]
QSize QScrollView::cachedSizeHint ( ) const [protected]
void QScrollView::center ( int  x,
int  y 
) [slot]
void QScrollView::center ( int  x,
int  y,
float  xmargin,
float  ymargin 
) [slot]
void QScrollView::center ( int  x,
int  y 
) [slot]

Scrolls the content so that the point (x, y) is in the center of visible area.

void QScrollView::center ( int  x,
int  y,
float  xmargin,
float  ymargin 
) [slot]

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.

bool QScrollView::childIsVisible ( QWidget child) [inline]

Returns TRUE if child is visible. This is equivalent to child->isVisible().

bool QScrollView::childIsVisible ( QWidget child) [inline]
int QScrollView::childX ( QWidget child)
int QScrollView::childX ( QWidget child)

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.

int QScrollView::childY ( QWidget child)

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.

int QScrollView::childY ( QWidget child)
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.

Ver también:
visibleWidth(), visibleHeight()
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]
void QScrollView::contentsDragEnterEvent ( QDragEnterEvent ) [protected, virtual]

This event handler is called whenever the QScrollView receives a dragEnterEvent(): the drag position is translated to be a point on the contents.

Reimplementado en QIconView, QListView, QTable, QTextEdit, QIconView, QTable, QListView, QTextEdit y Workspace.

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]

This event handler is called whenever the QScrollView receives a dragMoveEvent(): the drag position is translated to be a point on the contents.

Reimplementado en QIconView, QListView, QTable, QTextEdit, QIconView, QTable, QListView, QTextEdit y Workspace.

virtual void QScrollView::contentsDragMoveEvent ( QDragMoveEvent ) [protected, virtual]
void QScrollView::contentsDropEvent ( QDropEvent ) [protected, virtual]

This event handler is called whenever the QScrollView receives a dropEvent(): the drop position is translated to be a point on the contents.

Reimplementado en QIconView, QListView, QTable, QTextEdit, QIconView, QTable, QListView, QTextEdit y Workspace.

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]
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]
void QScrollView::contentsMoving ( int  x,
int  y 
) [signal]
void QScrollView::contentsMoving ( int  x,
int  y 
) [signal]

This signal is emitted just before the contents are moved to position (x, y).

Ver también:
contentsX(), contentsY()
void QScrollView::contentsToViewport ( int  x,
int  y,
int vx,
int vy 
) const

Translates a point (x, y) in the contents to a point (vx, vy) on the viewport() widget.

void QScrollView::contentsToViewport ( int  x,
int  y,
int vx,
int vy 
) const
QPoint QScrollView::contentsToViewport ( const QPoint ) const
QPoint QScrollView::contentsToViewport ( const QPoint p) const

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.

Reimplementado en QTextEdit y QTextEdit.

virtual void QScrollView::contentsWheelEvent ( QWheelEvent ) [protected, virtual]

Reimplementado en QTextEdit y QTextEdit.

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.

Ver también:
event(), QContextMenuEvent

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]
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.

void QScrollView::ensureVisible ( int  x,
int  y 
) [slot]
void QScrollView::ensureVisible ( int  x,
int  y,
int  xmargin,
int  ymargin 
) [slot]
void QScrollView::ensureVisible ( int  x,
int  y 
) [slot]

Scrolls the content so that the point (x, y) is visible with at least 50-pixel margins (if possible, otherwise centered).

void QScrollView::ensureVisible ( int  x,
int  y,
int  xmargin,
int  ymargin 
) [slot]

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).

bool QScrollView::eventFilter ( QObject obj,
QEvent e 
) [protected, virtual]

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.

bool QScrollView::eventFilter ( QObject ,
QEvent  
) [protected, virtual]

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.

Atención:
If you delete the receiver object in this function, be sure to return TRUE. Otherwise, Qt will forward the event to the deleted object and the program might crash.
Ver también:
installEventFilter()

Reimplementado de QObject.

Reimplementado en FLDataTable, Editor, QDataTable, QIconView, QListBox, QListView, QTable, QTextEdit, QIconView, QDataTable, QTable, QListBox, QListView, QTextEdit, Workspace y Editor.

bool QScrollView::focusNextPrevChild ( bool  next) [protected, virtual]

Reimplementado de QWidget.

Reimplementado en QTextEdit y QTextEdit.

bool QScrollView::focusNextPrevChild ( bool  next) [protected, virtual]

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.

Atención:
QScrollView uses it own logic for this function, which does the right thing in most cases. But if you are using a QScrollView and want complete control of the focus chain you'll need to override QScrollView::focusNextPrevChild() and your top-level widgets' focusNextPrevChild() functions.
Ver también:
focusData()

Reimplementado de QWidget.

Reimplementado en QTextEdit y QTextEdit.

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.

Ver también:
setFont(), font(), update(), updateGeometry()

Reimplementado de QWidget.

void QScrollView::fontChange ( const QFont old) [protected, virtual]

Reimplementado de QWidget.

void QScrollView::frameChanged ( ) [protected, virtual]

Reimplementado de QFrame.

void QScrollView::frameChanged ( ) [protected, virtual]

Virtual function that is called when the frame style, line width or mid-line width changes.

This function can be reimplemented by subclasses that need to know when the frame attributes change.

The default implementation calls update().

Reimplementado de QFrame.

bool QScrollView::hasStaticBackground ( ) const
bool QScrollView::hasStaticBackground ( ) const

Returns TRUE if QScrollView uses a static background; otherwise returns FALSE.

Ver también:
setStaticBackground()
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.

Ver también:
setMargins()
int QScrollView::leftMargin ( ) const [protected]
QSize QScrollView::minimumSizeHint ( ) const [virtual]

Reimplementado de QWidget.

Reimplementado en QIconView, QListBox, QListView, QErrorMessageTextView, QIconView, QListBox y QListView.

QSize QScrollView::minimumSizeHint ( ) const [virtual]

Reimplementado de QWidget.

Reimplementado en QIconView, QListBox, QListView, QErrorMessageTextView, QIconView, QListBox y QListView.

void QScrollView::mouseDoubleClickEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QWidget.

Reimplementado en QListBox y QListBox.

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().

Ver también:
mousePressEvent(), mouseReleaseEvent() mouseMoveEvent(), event(), QMouseEvent

Reimplementado de QWidget.

Reimplementado en QListBox y QListBox.

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.

Ver también:
setMouseTracking(), mousePressEvent(), mouseReleaseEvent(), mouseDoubleClickEvent(), event(), QMouseEvent

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.

Ver también:
mouseReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), event(), QMouseEvent

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.

Ver también:
mouseReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), event(), QMouseEvent

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.

virtual void QScrollView::moveChild ( QWidget child,
int  x,
int  y 
) [virtual]
void QScrollView::moveChild ( QWidget child,
int  x,
int  y 
) [virtual]

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.

Atención:
This function will not remove a child widget from the screen. It will only remove it from the parent widget's list of children.
Ver también:
insertChild(), QWidget::reparent()

Reimplementado de QObject.

void QScrollView::removeChild ( QObject child) [virtual]

Reimplementado de QObject.

void QScrollView::removeChild ( QWidget child)
void QScrollView::repaintContents ( const QRect r,
bool  erase = TRUE 
)
void QScrollView::repaintContents ( int  x,
int  y,
int  w,
int  h,
bool  erase = TRUE 
)

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.

Ver también:
updateContents()
void QScrollView::repaintContents ( const QRect r,
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 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 ( int  x,
int  y,
int  w,
int  h,
bool  erase = TRUE 
)
void QScrollView::repaintContents ( bool  erase = TRUE)
void QScrollView::resize ( int  w,
int  h 
) [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 corresponds to resize( QSize(w, h) ).

Reimplementado de QWidget.

void QScrollView::resize ( const QSize )

Reimplementado de QWidget.

void QScrollView::resize ( int  w,
int  h 
) [virtual]

Reimplementado de QWidget.

void QScrollView::resize ( const QSize s)

Reimplementado de QWidget.

virtual void QScrollView::resizeContents ( int  w,
int  h 
) [virtual, slot]
void QScrollView::resizeContents ( int  w,
int  h 
) [virtual, slot]

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]
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.

Ver también:
setMargins()
void QScrollView::scrollBy ( int  dx,
int  dy 
) [slot]
void QScrollView::scrollBy ( int  dx,
int  dy 
) [slot]

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]
virtual void QScrollView::setContentsPos ( int  x,
int  y 
) [virtual, slot]

Reimplementado en QIconView, QListView, QIconView y QListView.

void QScrollView::setContentsPos ( int  x,
int  y 
) [virtual, slot]

Scrolls the content so that the point (x, y) is in the top-left corner.

Reimplementado en QIconView, QListView, QIconView y QListView.

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.

Ver también:
setVScrollBarMode(), setHScrollBarMode()
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]

Reimplementado de QWidget.

Reimplementado en QTable, QTextEdit, QTable y QTextEdit.

void QScrollView::setEnabled ( bool  enable) [virtual, slot]

Reimplementado de QWidget.

Reimplementado en QTable, QTextEdit, QTable y QTextEdit.

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.

Ver también:
setVBarGeometry()
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]
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.

Ver también:
frameChanged()
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.

Ver también:
hasStaticBackground()
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.

Ver también:
setHBarGeometry()
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().

Ver también:
showEvent(), hide(), showMinimized(), showMaximized(), showNormal(), isVisible(), polish()

Reimplementado de QWidget.

Reimplementado en QListView y QListView.

void QScrollView::show ( ) [virtual]

Reimplementado de QWidget.

Reimplementado en QListView y QListView.

void QScrollView::showChild ( QWidget child,
bool  y = TRUE 
) [inline]

Sets the visibility of child. Equivalent to QWidget::show() or QWidget::hide().

void QScrollView::showChild ( QWidget child,
bool  yes = TRUE 
) [inline]
QSize QScrollView::sizeHint ( ) const [virtual]
QSize QScrollView::sizeHint ( ) const [virtual]
void QScrollView::styleChange ( QStyle old) [virtual]

Reimplementado de QFrame.

Reimplementado en QIconView, QListView, QIconView y QListView.

void QScrollView::styleChange ( QStyle old) [virtual]

Reimplementado de QFrame.

Reimplementado en QIconView, QListView, QIconView y QListView.

int QScrollView::topMargin ( ) const [protected]

Returns the top margin.

Ver también:
setMargins()
int QScrollView::topMargin ( ) const [protected]
void QScrollView::updateContents ( )

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.

Reimplementado en QIconView, QListView, QIconView y QListView.

void QScrollView::updateContents ( int  x,
int  y,
int  w,
int  h 
)

Calls update() on a rectangle defined by x, y, w, h, translated appropriately. If the rectangle is not visible, nothing is repainted.

Ver también:
repaintContents()
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::updateContents ( int  x,
int  y,
int  w,
int  h 
)
void QScrollView::updateContents ( )

Reimplementado en QIconView, QListView, QIconView y QListView.

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]

Reimplementado en QListBox y QListBox.

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.

Reimplementado en QListBox y QListBox.

virtual void QScrollView::viewportResizeEvent ( QResizeEvent ) [protected, virtual]
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.

Ver también:
QWidget::resizeEvent()

Reimplementado en VDateInternalMonthPicker, VDateTable, QListView, QTable, QTextEdit, QTable, QListView, QTextEdit y QwtLegend::PrivateData::LegendView.

QSize QScrollView::viewportSize ( int  ,
int   
) const
QSize QScrollView::viewportSize ( int  x,
int  y 
) const

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.

void QScrollView::viewportToContents ( int  vx,
int  vy,
int x,
int y 
) const
QPoint QScrollView::viewportToContents ( const QPoint ) const
void QScrollView::viewportToContents ( int  vx,
int  vy,
int x,
int y 
) const

Translates a point (vx, vy) on the viewport() widget to a point (x, y) in the contents.

QPoint QScrollView::viewportToContents ( const QPoint vp) const

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.

Ver también:
QWheelEvent::ignore(), QWheelEvent::accept(), event(), QWheelEvent

Reimplementado de QWidget.

void QScrollView::wheelEvent ( QWheelEvent e) [protected, virtual]

Reimplementado de QWidget.


Documentación de propiedades

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.

Atención:
Enabling this property might not be enough to effectively turn on autoscrolling. If you put a custom widget in the QScrollView, you might need to call QDragEvent::ignore() on the event in the dragEnterEvent() and dragMoveEvent() reimplementations.
ScrollBarMode QScrollView::hScrollBarMode [read, write]

the mode for the horizontal scroll bar

The default mode is QScrollView::Auto.

Ver también:
vScrollBarMode
ResizePolicy QScrollView::resizePolicy [read, write]

the resize policy

The default is Default.

Ver también:
ResizePolicy
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.

Ver también:
hScrollBarMode

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'