add alignment/setAlignment wrapping in the api
svn path=/trunk/KDE/kdelibs/; revision=900868
This commit is contained in:
parent
4d38cc53b6
commit
614c2252d1
@ -145,6 +145,16 @@ QString Label::image() const
|
||||
return d->imagePath;
|
||||
}
|
||||
|
||||
void Label::setAlignment(Qt::Alignment alignment)
|
||||
{
|
||||
nativeWidget()->setAlignment(alignment);
|
||||
}
|
||||
|
||||
Qt::Alignment Label::alignment() const
|
||||
{
|
||||
return nativeWidget()->alignment();
|
||||
}
|
||||
|
||||
void Label::setStyleSheet(const QString &stylesheet)
|
||||
{
|
||||
widget()->setStyleSheet(stylesheet);
|
||||
|
@ -44,6 +44,7 @@ class PLASMA_EXPORT Label : public QGraphicsProxyWidget
|
||||
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
||||
Q_PROPERTY(QString text READ text WRITE setText)
|
||||
Q_PROPERTY(QString image READ image WRITE setImage)
|
||||
Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
|
||||
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
||||
Q_PROPERTY(QLabel *nativeWidget READ nativeWidget)
|
||||
|
||||
@ -75,6 +76,18 @@ public:
|
||||
*/
|
||||
QString image() const;
|
||||
|
||||
/**
|
||||
* Sets the alignment for the text
|
||||
*
|
||||
* @arg the desired alignment
|
||||
*/
|
||||
void setAlignment(Qt::Alignment alignment);
|
||||
|
||||
/**
|
||||
* @return the alignment for the text used in the labels
|
||||
*/
|
||||
Qt::Alignment alignment() const;
|
||||
|
||||
/**
|
||||
* Sets the stylesheet used to control the visual display of this Label
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user