hasScaledContents/setScaledcontents properties, useful for qtscript
svn path=/trunk/KDE/kdelibs/; revision=903557
This commit is contained in:
parent
84685506af
commit
ccf2fef95f
@ -148,6 +148,16 @@ QString Label::image() const
|
||||
return d->imagePath;
|
||||
}
|
||||
|
||||
void Label::setScaledContents(bool scaled)
|
||||
{
|
||||
static_cast<QLabel*>(widget())->setScaledContents(scaled);
|
||||
}
|
||||
|
||||
bool Label::hasScaledContents() const
|
||||
{
|
||||
return static_cast<QLabel*>(widget())->hasScaledContents();
|
||||
}
|
||||
|
||||
void Label::setAlignment(Qt::Alignment alignment)
|
||||
{
|
||||
nativeWidget()->setAlignment(alignment);
|
||||
|
@ -45,6 +45,7 @@ class PLASMA_EXPORT Label : public QGraphicsProxyWidget
|
||||
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(bool hasScaledContents READ hasScaledContents WRITE setScaledContents)
|
||||
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
||||
Q_PROPERTY(QLabel *nativeWidget READ nativeWidget)
|
||||
|
||||
@ -88,6 +89,18 @@ public:
|
||||
*/
|
||||
Qt::Alignment alignment() const;
|
||||
|
||||
/**
|
||||
* Scale or not the contents of the label to the label size
|
||||
*
|
||||
* @arg scale
|
||||
*/
|
||||
void setScaledContents(bool scaled);
|
||||
|
||||
/**
|
||||
* @return true if the contents are scaled to the label size
|
||||
*/
|
||||
bool hasScaledContents() const;
|
||||
|
||||
/**
|
||||
* Sets the stylesheet used to control the visual display of this Label
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user