summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Bugge Monsen <mmonsen@trolltech.com>2009-06-05 14:06:52 +0200
committerMarius Bugge Monsen <mmonsen@trolltech.com>2009-06-05 14:06:52 +0200
commitf2c9a30637e0b86dce0fb0bb05b420f82be2e678 (patch)
tree900283e88b1df6404420f5163a9e2ec6ace56892
parentfe3ad8fecad1791ea40efa2ab84054a9df54021f (diff)
Add some docs to QtGraphicsScrollBar.
-rw-r--r--src/qgraphicsscrollbar.cpp97
1 files changed, 97 insertions, 0 deletions
diff --git a/src/qgraphicsscrollbar.cpp b/src/qgraphicsscrollbar.cpp
index 76b08b4..82bb9f3 100644
--- a/src/qgraphicsscrollbar.cpp
+++ b/src/qgraphicsscrollbar.cpp
@@ -46,6 +46,9 @@ QtGraphicsScrollBarPrivate::~QtGraphicsScrollBarPrivate()
{
}
+/*!
+ \internal
+ */
void QtGraphicsScrollBarPrivate::performSubControlAction(QStyle::SubControl control)
{
Q_Q(QtGraphicsScrollBar);
@@ -78,6 +81,8 @@ void QtGraphicsScrollBarPrivate::performSubControlAction(QStyle::SubControl cont
*/
+/*!
+ */
QtGraphicsScrollBar::QtGraphicsScrollBar(Qt::Orientation orientation, QGraphicsWidget *parent, Qt::WindowFlags wFlags)
: QGraphicsWidget(parent, wFlags), d_ptr(new QtGraphicsScrollBarPrivate)
{
@@ -93,17 +98,28 @@ QtGraphicsScrollBar::QtGraphicsScrollBar(QtGraphicsScrollBarPrivate &dd, QGraphi
setAcceptHoverEvents(true);
}
*/
+
+/*!
+ */
QtGraphicsScrollBar::~QtGraphicsScrollBar()
{
delete d_ptr;
}
+/*!
+ Returns the value of the scrollbar.
+ \sa setValue()
+ */
qreal QtGraphicsScrollBar::value() const
{
Q_D(const QtGraphicsScrollBar);
return d->value;
}
+/*!
+ Sets the value of the scrollbar to be the given \a value.
+ \sa value()
+ */
void QtGraphicsScrollBar::setValue(qreal value)
{
Q_D(QtGraphicsScrollBar);
@@ -115,12 +131,20 @@ void QtGraphicsScrollBar::setValue(qreal value)
}
}
+/*!
+ Returns the minimum value of the scrollbar.
+ \sa setMinimum()
+ */
qreal QtGraphicsScrollBar::minimum() const
{
Q_D(const QtGraphicsScrollBar);
return d->minimum;
}
+/*!
+ Sets the minimum value of the scrollbar to the given \a minimum.
+ \sa minimum()
+ */
void QtGraphicsScrollBar::setMinimum(qreal minimum)
{
Q_D(QtGraphicsScrollBar);
@@ -131,12 +155,20 @@ void QtGraphicsScrollBar::setMinimum(qreal minimum)
}
}
+/*!
+ Returns the maximum value of the scrollbar.
+ \sa setMaximum()
+ */
qreal QtGraphicsScrollBar::maximum() const
{
Q_D(const QtGraphicsScrollBar);
return d->maximum;
}
+/*!
+ Sets the maximum value of the scrollbar to the given \a maximum.
+ \sa maximum()
+ */
void QtGraphicsScrollBar::setMaximum(qreal maximum)
{
Q_D(QtGraphicsScrollBar);
@@ -147,42 +179,68 @@ void QtGraphicsScrollBar::setMaximum(qreal maximum)
}
}
+/*!
+ Returns the single step of the scrollbar.
+ */
qreal QtGraphicsScrollBar::singleStep() const
{
Q_D(const QtGraphicsScrollBar);
return d->singleStep;
}
+/*!
+ Sets the single step of the scrollbar to the given \a step.
+ \sa singleStep()
+ */
void QtGraphicsScrollBar::setSingleStep(qreal step)
{
Q_D(QtGraphicsScrollBar);
d->singleStep = step;
}
+/*!
+ Returns the page step of the scrollbar.
+ \sa setPageStep()
+ */
qreal QtGraphicsScrollBar::pageStep() const
{
Q_D(const QtGraphicsScrollBar);
return d->pageStep;
}
+/*!
+ Sets the page step of the scrollbar to be the given \a step.
+ \sa setPageStep
+ */
void QtGraphicsScrollBar::setPageStep(qreal step)
{
Q_D(QtGraphicsScrollBar);
d->pageStep = step;
}
+/*!
+ Returns the orientation of the scrollbar.
+ \sa setOrientation()
+ */
Qt::Orientation QtGraphicsScrollBar::orientation() const
{
Q_D(const QtGraphicsScrollBar);
return d->orientation;
}
+/*!
+ Sets the orientation of the scrollbar to the given \a orientation.
+ \sa orientation()
+ */
void QtGraphicsScrollBar::setOrientation(Qt::Orientation orientation)
{
Q_D(QtGraphicsScrollBar);
d->orientation = orientation;
}
+/*!
+ \reimp
+ */
QSizeF QtGraphicsScrollBar::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
{
if (which == Qt::MinimumSize || which == Qt::PreferredSize) {
@@ -204,6 +262,9 @@ QSizeF QtGraphicsScrollBar::sizeHint(Qt::SizeHint which, const QSizeF &constrain
return QGraphicsWidget::sizeHint(which, constraint);
}
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *widget)
{
Q_D(QtGraphicsScrollBar);
@@ -219,16 +280,23 @@ void QtGraphicsScrollBar::paint(QPainter *painter, const QStyleOptionGraphicsIte
style()->drawComplexControl(QStyle::CC_ScrollBar, &option, painter, widget);
}
+/*!
+ */
void QtGraphicsScrollBar::increase()
{
setValue(value() + singleStep());
}
+/*!
+ */
void QtGraphicsScrollBar::decrease()
{
setValue(value() - singleStep());
}
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::timerEvent(QTimerEvent *event)
{
Q_D(QtGraphicsScrollBar);
@@ -239,16 +307,25 @@ void QtGraphicsScrollBar::timerEvent(QTimerEvent *event)
}
}
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::keyPressEvent(QKeyEvent *event)
{
Q_UNUSED(event);
}
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::keyReleaseEvent(QKeyEvent *event)
{
Q_UNUSED(event);
}
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QtGraphicsScrollBar);
@@ -262,6 +339,9 @@ void QtGraphicsScrollBar::mousePressEvent(QGraphicsSceneMouseEvent *event)
d->initialDelayTimer.start(d->initialDelay, this);
}
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QtGraphicsScrollBar);
@@ -285,6 +365,9 @@ void QtGraphicsScrollBar::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
}
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
Q_UNUSED(event);
@@ -298,12 +381,18 @@ void QtGraphicsScrollBar::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
}
#ifndef QT_NO_WHEELEVENT
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::wheelEvent(QGraphicsSceneWheelEvent *event)
{
setValue(value() - event->delta() / 120);
}
#endif
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
Q_D(QtGraphicsScrollBar);
@@ -314,6 +403,9 @@ void QtGraphicsScrollBar::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
update();
}
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
{
Q_D(QtGraphicsScrollBar);
@@ -324,6 +416,9 @@ void QtGraphicsScrollBar::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
update();
}
+/*!
+ \reimp
+ */
void QtGraphicsScrollBar::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
Q_UNUSED(event);
@@ -332,6 +427,8 @@ void QtGraphicsScrollBar::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
update();
}
+/*!
+ */
void QtGraphicsScrollBar::initStyleOption(QStyleOptionSlider *option) const
{
QGraphicsWidget::initStyleOption(option);