svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=642049
This commit is contained in:
Laurent Montel 2007-03-13 07:46:12 +00:00
parent a918f6180f
commit 2936a021cc
2 changed files with 11 additions and 11 deletions

View File

@ -65,7 +65,7 @@ CheckBox::CheckBox(QGraphicsItem *parent)
d->maxWidth = 600; d->maxWidth = 600;
setPos(QPointF(0.0,0.0)); setPos(QPointF(0.0,0.0));
d->state= Qt::Unchecked; d->state= Qt::Unchecked;
d->labelText=tr("Plasma"); d->labelText=QString("Plasma");
d->labelTextColor= QColor(201,201,255); d->labelTextColor= QColor(201,201,255);
d->hasIcon = false; d->hasIcon = false;
d->iconSize=QSize(32,32); d->iconSize=QSize(32,32);
@ -130,16 +130,16 @@ void CheckBox::setText(const QString& text)
} }
QString CheckBox::text() QString CheckBox::text() const
{ {
return d->labelText; return d->labelText;
} }
int CheckBox::height() int CheckBox::height() const
{ {
return d->height; return d->height;
} }
int CheckBox::width() int CheckBox::width() const
{ {
return d->width; return d->width;
} }
@ -160,12 +160,12 @@ void CheckBox::setWidth(int w)
} }
} }
QSize CheckBox::size() QSize CheckBox::size() const
{ {
return QSize(d->width,d->height); return QSize(d->width,d->height);
} }
void CheckBox::setSize(QSize s) void CheckBox::setSize(const QSize &s)
{ {
prepareGeometryChange (); prepareGeometryChange ();
if (!d->maxWidth >= s.width() ) { if (!d->maxWidth >= s.width() ) {

View File

@ -47,11 +47,11 @@ class KDE_EXPORT CheckBox : public DataVisualization,public QGraphicsItem
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
QRectF boundingRect() const; QRectF boundingRect() const;
void setText(const QString&) ; void setText(const QString&) ;
QString text(); QString text() const;
QSize size(); QSize size() const;
int height(); int height() const;
int width(); int width() const;
void setSize(QSize size); void setSize(const QSize &size);
void setWidth(int width); void setWidth(int width);
void setHeight(int height); void setHeight(int height);
void setMaximumWidth(int maxwidth); void setMaximumWidth(int maxwidth);