Some krazy fixes while waiting for a compile:
22: Check for spelling errors. svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=671493
This commit is contained in:
parent
ab560f1242
commit
60032d6779
@ -55,7 +55,7 @@ public:
|
|||||||
RadioButton(QGraphicsItem *parent = 0);
|
RadioButton(QGraphicsItem *parent = 0);
|
||||||
virtual ~RadioButton();
|
virtual ~RadioButton();
|
||||||
|
|
||||||
// QGraphicsItem overriden virtual methods
|
// QGraphicsItem overridden virtual methods
|
||||||
QRectF boundingRect() const;
|
QRectF boundingRect() const;
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||||
|
|
||||||
|
@ -88,30 +88,30 @@ void VBoxLayout::setGeometry(const QRectF& geometry)
|
|||||||
|
|
||||||
qDebug("Geometry %p : %f, %f by %f, %f", this, geometry.x(), geometry.y(), geometry.width(), geometry.height());
|
qDebug("Geometry %p : %f, %f by %f, %f", this, geometry.x(), geometry.y(), geometry.width(), geometry.height());
|
||||||
|
|
||||||
QList<LayoutItem *> childs;
|
QList<LayoutItem *> children;
|
||||||
QList<LayoutItem *> expandingChilds;
|
QList<LayoutItem *> expandingChildren;
|
||||||
QList<QSizeF> sizes;
|
QList<QSizeF> sizes;
|
||||||
QSizeF available = geometry.size() - QSizeF(2 * margin(), 2 * margin());
|
QSizeF available = geometry.size() - QSizeF(2 * margin(), 2 * margin());
|
||||||
|
|
||||||
foreach (LayoutItem *l, d->childList) {
|
foreach (LayoutItem *l, d->childList) {
|
||||||
kDebug() << "testing layout item " << l << endl;
|
kDebug() << "testing layout item " << l << endl;
|
||||||
if (l->expandingDirections() & Qt::Vertical) {
|
if (l->expandingDirections() & Qt::Vertical) {
|
||||||
expandingChilds += l;
|
expandingChildren += l;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
childs += l;
|
children += l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (LayoutItem *l, childs) {
|
foreach (LayoutItem *l, children) {
|
||||||
QSizeF hint = l->sizeHint();
|
QSizeF hint = l->sizeHint();
|
||||||
sizes.insert(indexOf(l), QSizeF(available.width(), hint.height()));
|
sizes.insert(indexOf(l), QSizeF(available.width(), hint.height()));
|
||||||
available -= QSizeF(0.0, hint.height() + spacing());
|
available -= QSizeF(0.0, hint.height() + spacing());
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal expandHeight = (available.height() - ((expandingChilds.count() - 1) * spacing())) / expandingChilds.count();
|
qreal expandHeight = (available.height() - ((expandingChildren.count() - 1) * spacing())) / expandingChildren.count();
|
||||||
|
|
||||||
foreach (LayoutItem *l, expandingChilds) {
|
foreach (LayoutItem *l, expandingChildren) {
|
||||||
|
|
||||||
sizes.insert(indexOf(l),QSizeF(available.width(), expandHeight));
|
sizes.insert(indexOf(l),QSizeF(available.width(), expandHeight));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user