missing API for scripting

svn path=/branches/KDE/4.4/kdelibs/; revision=1077851
This commit is contained in:
Aaron J. Seigo 2010-01-21 00:14:04 +00:00
parent 368ba84f10
commit cc5eaae1c2
2 changed files with 12 additions and 0 deletions

View File

@ -116,6 +116,11 @@ QScrollBar *ScrollBar::nativeWidget() const
return static_cast<QScrollBar *>(widget());
}
Qt::Orientation ScrollBar::orientation() const
{
return nativeWidget()->orientation();
}
void ScrollBar::setOrientation(Qt::Orientation orientation)
{
QScrollBar *native = static_cast<QScrollBar *>(widget());

View File

@ -47,6 +47,7 @@ class PLASMA_EXPORT ScrollBar : public QGraphicsProxyWidget
Q_PROPERTY(int maximum READ maximum)
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
Q_PROPERTY(QScrollBar *nativeWidget READ nativeWidget)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
public:
/**
@ -118,6 +119,12 @@ public:
*/
QScrollBar *nativeWidget() const;
/**
* @return the orientation of the scrollbar
* @since 4.4
*/
Qt::Orientation orientation() const;
protected:
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);