some missing API bits

svn path=/trunk/KDE/kdelibs/; revision=914441
This commit is contained in:
Aaron J. Seigo 2009-01-21 05:59:33 +00:00
parent 0f3f06f024
commit fb8af31791
2 changed files with 13 additions and 1 deletions

View File

@ -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;

View File

@ -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