tabsbegone
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692758
This commit is contained in:
parent
ff936c2a57
commit
c4570130f5
@ -26,8 +26,8 @@ namespace Plasma
|
|||||||
{
|
{
|
||||||
|
|
||||||
HBoxLayout::HBoxLayout(LayoutItem *parent)
|
HBoxLayout::HBoxLayout(LayoutItem *parent)
|
||||||
: BoxLayout(parent),
|
: BoxLayout(parent),
|
||||||
d(0)
|
d(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,18 +37,18 @@ HBoxLayout::~HBoxLayout()
|
|||||||
|
|
||||||
Qt::Orientations HBoxLayout::expandingDirections() const
|
Qt::Orientations HBoxLayout::expandingDirections() const
|
||||||
{
|
{
|
||||||
return Qt::Horizontal;
|
return Qt::Horizontal;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HBoxLayout::hasWidthForHeight() const
|
bool HBoxLayout::hasWidthForHeight() const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal HBoxLayout::widthForHeight(qreal w) const
|
qreal HBoxLayout::widthForHeight(qreal w) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(w);
|
Q_UNUSED(w);
|
||||||
return qreal();
|
return qreal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HBoxLayout::setGeometry(const QRectF& geometry)
|
void HBoxLayout::setGeometry(const QRectF& geometry)
|
||||||
@ -103,18 +103,18 @@ void HBoxLayout::setGeometry(const QRectF& geometry)
|
|||||||
|
|
||||||
QSizeF HBoxLayout::sizeHint() const
|
QSizeF HBoxLayout::sizeHint() const
|
||||||
{
|
{
|
||||||
qreal hintHeight = 0.0;
|
qreal hintHeight = 0.0;
|
||||||
qreal hintWidth = 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);
|
hintHeight = qMax(hint.height(), hintHeight);
|
||||||
hintWidth += hint.width() + spacing();
|
hintWidth += hint.width() + spacing();
|
||||||
}
|
}
|
||||||
|
|
||||||
return QSizeF(hintWidth, hintHeight);
|
return QSizeF(hintWidth, hintHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,30 +38,30 @@ namespace Plasma
|
|||||||
*/
|
*/
|
||||||
class PLASMA_EXPORT HBoxLayout : public BoxLayout
|
class PLASMA_EXPORT HBoxLayout : public BoxLayout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
HBoxLayout(LayoutItem *parent = 0);
|
HBoxLayout(LayoutItem *parent = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Virtual Destructor.
|
* Virtual Destructor.
|
||||||
*/
|
*/
|
||||||
virtual ~HBoxLayout();
|
virtual ~HBoxLayout();
|
||||||
|
|
||||||
Qt::Orientations expandingDirections() const;
|
Qt::Orientations expandingDirections() const;
|
||||||
|
|
||||||
bool hasWidthForHeight() const;
|
bool hasWidthForHeight() const;
|
||||||
qreal widthForHeight(qreal w) const;
|
qreal widthForHeight(qreal w) const;
|
||||||
|
|
||||||
void setGeometry(const QRectF& geometry);
|
void setGeometry(const QRectF& geometry);
|
||||||
|
|
||||||
QSizeF sizeHint() const;
|
QSizeF sizeHint() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Private;
|
class Private;
|
||||||
Private *const d;
|
Private *const d;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -104,18 +104,18 @@ void VBoxLayout::setGeometry(const QRectF& geometry)
|
|||||||
|
|
||||||
QSizeF VBoxLayout::sizeHint() const
|
QSizeF VBoxLayout::sizeHint() const
|
||||||
{
|
{
|
||||||
qreal hintHeight = 0.0;
|
qreal hintHeight = 0.0;
|
||||||
qreal hintWidth = 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);
|
hintWidth = qMax(hint.width(), hintWidth);
|
||||||
hintHeight += hint.height() + spacing();
|
hintHeight += hint.height() + spacing();
|
||||||
}
|
}
|
||||||
|
|
||||||
return QSizeF(hintWidth, hintHeight);
|
return QSizeF(hintWidth, hintHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -35,30 +35,30 @@ namespace Plasma
|
|||||||
*/
|
*/
|
||||||
class PLASMA_EXPORT VBoxLayout : public BoxLayout
|
class PLASMA_EXPORT VBoxLayout : public BoxLayout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
explicit VBoxLayout(LayoutItem *parent = 0);
|
explicit VBoxLayout(LayoutItem *parent = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Virtual Destructor.
|
* Virtual Destructor.
|
||||||
*/
|
*/
|
||||||
~VBoxLayout();
|
~VBoxLayout();
|
||||||
|
|
||||||
Qt::Orientations expandingDirections() const;
|
Qt::Orientations expandingDirections() const;
|
||||||
|
|
||||||
bool hasHeightForWidth() const;
|
bool hasHeightForWidth() const;
|
||||||
qreal heightForWidth(qreal w) const;
|
qreal heightForWidth(qreal w) const;
|
||||||
|
|
||||||
void setGeometry(const QRectF& geometry);
|
void setGeometry(const QRectF& geometry);
|
||||||
|
|
||||||
QSizeF sizeHint() const;
|
QSizeF sizeHint() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Private;
|
class Private;
|
||||||
Private *const d;
|
Private *const d;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user