make this useful from scripts
(ah, from before the days when we scrutinized every drop of api and required 'fancy' things like apidox because we were in such a hurry to get things done (yay 4.0)) svn path=/trunk/KDE/kdelibs/; revision=1048875
This commit is contained in:
parent
7de7cf8de8
commit
9d90d23d31
@ -102,6 +102,11 @@ FlashingLabel::~FlashingLabel()
|
||||
delete d;
|
||||
}
|
||||
|
||||
int FlashingLabel::duration() const
|
||||
{
|
||||
return d->defaultDuration;
|
||||
}
|
||||
|
||||
void FlashingLabel::setDuration(int duration)
|
||||
{
|
||||
if (duration < 1) {
|
||||
@ -111,11 +116,21 @@ void FlashingLabel::setDuration(int duration)
|
||||
d->defaultDuration = duration;
|
||||
}
|
||||
|
||||
QColor FlashingLabel::color() const
|
||||
{
|
||||
return d->color;
|
||||
}
|
||||
|
||||
void FlashingLabel::setColor(const QColor &color)
|
||||
{
|
||||
d->color = color;
|
||||
}
|
||||
|
||||
QFont FlashingLabel::font() const
|
||||
{
|
||||
return d->font;
|
||||
}
|
||||
|
||||
void FlashingLabel::setFont(const QFont &font)
|
||||
{
|
||||
d->font = font;
|
||||
|
@ -38,21 +38,31 @@ class FlashingLabelPrivate;
|
||||
*/
|
||||
class PLASMA_EXPORT FlashingLabel : public QGraphicsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool autohide READ autohide WRITE setAutohide)
|
||||
Q_PROPERTY(QFont font READ font WRITE setFont)
|
||||
Q_PROPERTY(QColor color READ color WRITE setColor)
|
||||
Q_PROPERTY(int duration READ duration WRITE setDuration)
|
||||
|
||||
public:
|
||||
explicit FlashingLabel(QGraphicsItem *parent = 0);
|
||||
virtual ~FlashingLabel();
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
|
||||
QFont font() const;
|
||||
void setFont(const QFont &);
|
||||
|
||||
QColor color() const;
|
||||
void setColor(const QColor &);
|
||||
|
||||
int duration() const;
|
||||
void setDuration(int duration);
|
||||
|
||||
void flash(const QString &text, int duration = 0,
|
||||
const QTextOption &option = QTextOption(Qt::AlignCenter));
|
||||
void flash(const QPixmap &pixmap, int duration = 0,
|
||||
Qt::Alignment align = Qt::AlignCenter);
|
||||
Q_INVOKABLE void flash(const QString &text, int duration = 0,
|
||||
const QTextOption &option = QTextOption(Qt::AlignCenter));
|
||||
Q_INVOKABLE void flash(const QPixmap &pixmap, int duration = 0,
|
||||
Qt::Alignment align = Qt::AlignCenter);
|
||||
|
||||
void setAutohide(bool autohide);
|
||||
bool autohide() const;
|
||||
|
Loading…
Reference in New Issue
Block a user