From fb8af31791ed5c9c525b15bc23c29e45ef83e62d Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 21 Jan 2009 05:59:33 +0000 Subject: [PATCH] some missing API bits svn path=/trunk/KDE/kdelibs/; revision=914441 --- widgets/iconwidget.cpp | 5 +++++ widgets/iconwidget.h | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/widgets/iconwidget.cpp b/widgets/iconwidget.cpp index 939a04957..940c726b0 100644 --- a/widgets/iconwidget.cpp +++ b/widgets/iconwidget.cpp @@ -1224,6 +1224,11 @@ void IconWidget::setOrientation(Qt::Orientation orientation) resize(sizeFromIconSize(d->iconSize.width())); } +Qt::Orientation IconWidget::orientation() const +{ + return d->orientation; +} + void IconWidget::invertLayout(bool invert) { d->invertLayout = invert; diff --git a/widgets/iconwidget.h b/widgets/iconwidget.h index 2033742da..f9760becd 100644 --- a/widgets/iconwidget.h +++ b/widgets/iconwidget.h @@ -59,7 +59,9 @@ class PLASMA_EXPORT IconWidget : public QGraphicsWidget Q_PROPERTY(QIcon icon READ icon WRITE setIcon) Q_PROPERTY(QSizeF iconSize READ iconSize) Q_PROPERTY(QString svg WRITE setSvg) -// Q_PROPERTY(QAction action READ action WRITE setAction) + Q_PROPERTY(QAction *action READ action WRITE setAction) + Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation) + Q_PROPERTY(int numDisplayLines READ numDisplayLines WRITE setNumDisplayLines) public: /** @@ -171,6 +173,11 @@ public: */ void setOrientation(Qt::Orientation orientation); + /** + * @return the orientation of the icon + */ + Qt::Orientation orientation() const; + /** * inverts the layout of the icons if the orientation is horizontal, * normally we get icon on the left with left-to-right languages