missing API for scripting

svn path=/trunk/KDE/kdelibs/; revision=1077850
This commit is contained in:
Aaron J. Seigo 2010-01-21 00:13:30 +00:00
parent 69a0c5bc3a
commit d336f7034d
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);