From 2936a021ccd0c78095d394fd62f12fbdd8294871 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 13 Mar 2007 07:46:12 +0000 Subject: [PATCH] Const svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=642049 --- widgets/checkbox.cpp | 12 ++++++------ widgets/checkbox.h | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/widgets/checkbox.cpp b/widgets/checkbox.cpp index 7f2164b23..6796982ee 100644 --- a/widgets/checkbox.cpp +++ b/widgets/checkbox.cpp @@ -65,7 +65,7 @@ CheckBox::CheckBox(QGraphicsItem *parent) d->maxWidth = 600; setPos(QPointF(0.0,0.0)); d->state= Qt::Unchecked; - d->labelText=tr("Plasma"); + d->labelText=QString("Plasma"); d->labelTextColor= QColor(201,201,255); d->hasIcon = false; 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; } -int CheckBox::height() +int CheckBox::height() const { return d->height; } -int CheckBox::width() +int CheckBox::width() const { 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); } -void CheckBox::setSize(QSize s) +void CheckBox::setSize(const QSize &s) { prepareGeometryChange (); if (!d->maxWidth >= s.width() ) { diff --git a/widgets/checkbox.h b/widgets/checkbox.h index 88edd17bd..f198c90f6 100644 --- a/widgets/checkbox.h +++ b/widgets/checkbox.h @@ -47,11 +47,11 @@ class KDE_EXPORT CheckBox : public DataVisualization,public QGraphicsItem void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); QRectF boundingRect() const; void setText(const QString&) ; - QString text(); - QSize size(); - int height(); - int width(); - void setSize(QSize size); + QString text() const; + QSize size() const; + int height() const; + int width() const; + void setSize(const QSize &size); void setWidth(int width); void setHeight(int height); void setMaximumWidth(int maxwidth);