minimum and maximum settable from javascript

svn path=/trunk/KDE/kdelibs/; revision=1194798
This commit is contained in:
Marco Martin 2010-11-09 22:16:05 +00:00
parent d85c4cc7ff
commit 11d8738af4
2 changed files with 24 additions and 2 deletions

View File

@ -102,6 +102,16 @@ int ScrollBar::maximum() const
return static_cast<QScrollBar*>(widget())->maximum(); return static_cast<QScrollBar*>(widget())->maximum();
} }
void ScrollBar::setMinimum(const int min) const
{
static_cast<QScrollBar*>(widget())->setMinimum(min);
}
void ScrollBar::setMaximum(const int max) const
{
static_cast<QScrollBar*>(widget())->setMaximum(max);
}
void ScrollBar::setStyleSheet(const QString &stylesheet) void ScrollBar::setStyleSheet(const QString &stylesheet)
{ {
widget()->setStyleSheet(stylesheet); widget()->setStyleSheet(stylesheet);

View File

@ -43,8 +43,8 @@ class PLASMA_EXPORT ScrollBar : public QGraphicsProxyWidget
Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep) Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep)
Q_PROPERTY(int pageStep READ pageStep WRITE setPageStep) Q_PROPERTY(int pageStep READ pageStep WRITE setPageStep)
Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged) Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
Q_PROPERTY(int minimum READ minimum) Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
Q_PROPERTY(int maximum READ maximum) Q_PROPERTY(int maximum READ maximum WRITE setMaximum)
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet) Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
Q_PROPERTY(QScrollBar *nativeWidget READ nativeWidget) Q_PROPERTY(QScrollBar *nativeWidget READ nativeWidget)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation) Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
@ -102,6 +102,18 @@ public:
*/ */
int maximum() const; int maximum() const;
/**
* @arg the minimum value bound of this ScrollBar
* @since 4.6
*/
void setMinimum(const int min) const;
/**
* @arg the maximum value bound of this ScrollBar
* @since 4.6
*/
void setMaximum(const int max) const;
/** /**
* Sets the stylesheet used to control the visual display of this ScrollBar * Sets the stylesheet used to control the visual display of this ScrollBar
* *