tabsbegone

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692758
This commit is contained in:
Aaron J. Seigo 2007-07-26 07:25:30 +00:00
parent ff936c2a57
commit c4570130f5
4 changed files with 41 additions and 41 deletions

View File

@ -26,8 +26,8 @@ namespace Plasma
{
HBoxLayout::HBoxLayout(LayoutItem *parent)
: BoxLayout(parent),
d(0)
: BoxLayout(parent),
d(0)
{
}
@ -37,18 +37,18 @@ HBoxLayout::~HBoxLayout()
Qt::Orientations HBoxLayout::expandingDirections() const
{
return Qt::Horizontal;
return Qt::Horizontal;
}
bool HBoxLayout::hasWidthForHeight() const
{
return true;
return true;
}
qreal HBoxLayout::widthForHeight(qreal w) const
{
Q_UNUSED(w);
return qreal();
return qreal();
}
void HBoxLayout::setGeometry(const QRectF& geometry)
@ -103,18 +103,18 @@ void HBoxLayout::setGeometry(const QRectF& geometry)
QSizeF HBoxLayout::sizeHint() const
{
qreal hintHeight = 0.0;
qreal hintWidth = 0.0;
qreal hintHeight = 0.0;
qreal hintWidth = 0.0;
foreach(LayoutItem *l, children()) {
foreach(LayoutItem *l, children()) {
QSizeF hint = l->sizeHint();
QSizeF hint = l->sizeHint();
hintHeight = qMax(hint.height(), hintHeight);
hintWidth += hint.width() + spacing();
}
}
return QSizeF(hintWidth, hintHeight);
return QSizeF(hintWidth, hintHeight);
}
}

View File

@ -38,30 +38,30 @@ namespace Plasma
*/
class PLASMA_EXPORT HBoxLayout : public BoxLayout
{
public:
public:
/**
* Constructor.
*/
HBoxLayout(LayoutItem *parent = 0);
HBoxLayout(LayoutItem *parent = 0);
/**
* Virtual Destructor.
*/
virtual ~HBoxLayout();
virtual ~HBoxLayout();
Qt::Orientations expandingDirections() const;
Qt::Orientations expandingDirections() const;
bool hasWidthForHeight() const;
qreal widthForHeight(qreal w) const;
bool hasWidthForHeight() const;
qreal widthForHeight(qreal w) const;
void setGeometry(const QRectF& geometry);
void setGeometry(const QRectF& geometry);
QSizeF sizeHint() const;
QSizeF sizeHint() const;
private:
class Private;
Private *const d;
private:
class Private;
Private *const d;
};
}

View File

@ -104,18 +104,18 @@ void VBoxLayout::setGeometry(const QRectF& geometry)
QSizeF VBoxLayout::sizeHint() const
{
qreal hintHeight = 0.0;
qreal hintWidth = 0.0;
qreal hintHeight = 0.0;
qreal hintWidth = 0.0;
foreach(LayoutItem *l, children()) {
foreach(LayoutItem *l, children()) {
QSizeF hint = l->sizeHint();
QSizeF hint = l->sizeHint();
hintWidth = qMax(hint.width(), hintWidth);
hintHeight += hint.height() + spacing();
}
hintWidth = qMax(hint.width(), hintWidth);
hintHeight += hint.height() + spacing();
}
return QSizeF(hintWidth, hintHeight);
return QSizeF(hintWidth, hintHeight);
}
}

View File

@ -35,30 +35,30 @@ namespace Plasma
*/
class PLASMA_EXPORT VBoxLayout : public BoxLayout
{
public:
public:
/**
* Constructor.
*/
explicit VBoxLayout(LayoutItem *parent = 0);
explicit VBoxLayout(LayoutItem *parent = 0);
/**
* Virtual Destructor.
*/
~VBoxLayout();
~VBoxLayout();
Qt::Orientations expandingDirections() const;
Qt::Orientations expandingDirections() const;
bool hasHeightForWidth() const;
qreal heightForWidth(qreal w) const;
bool hasHeightForWidth() const;
qreal heightForWidth(qreal w) const;
void setGeometry(const QRectF& geometry);
void setGeometry(const QRectF& geometry);
QSizeF sizeHint() const;
QSizeF sizeHint() const;
private:
class Private;
Private *const d;
private:
class Private;
Private *const d;
};
}