Argument verification

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=725047
This commit is contained in:
Ivan Čukić 2007-10-14 10:57:14 +00:00
parent 3ffa8ee720
commit 93187d0a90

View File

@ -194,12 +194,14 @@ void NodeLayout::addItem (LayoutItem * item)
void NodeLayout::addItem (LayoutItem * item, NodeCoordinate topLeft, NodeCoordinate bottomRight)
{
if (!item) return;
d->items[item] = QPair<NodeCoordinate, NodeCoordinate>(topLeft, bottomRight);
d->calculateSizeHint(item);
}
void NodeLayout::addItem (LayoutItem * item, NodeCoordinate node, qreal xr, qreal yr)
{
if (!item) return;
d->items[item] = QPair<NodeCoordinate, NodeCoordinate>(node,
NodeCoordinate::simple(xr, yr, NodeCoordinate::InnerRelative, NodeCoordinate::InnerRelative));
d->calculateSizeHint(item);
@ -207,6 +209,7 @@ void NodeLayout::addItem (LayoutItem * item, NodeCoordinate node, qreal xr, qrea
void NodeLayout::removeItem (LayoutItem * item)
{
if (!item) return;
d->items.remove(item);
d->calculateSizeHint();
}
@ -218,6 +221,7 @@ int NodeLayout::count() const
int NodeLayout::indexOf(LayoutItem * item) const
{
if (!item) return -1;
return d->items.keys().indexOf(item);
}