1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : a dynamic layout manager
9
* Copyright (C) 2009 by Andi Clemens <andi dot clemens at gmx dot net>
11
* This program is free software; you can redistribute it
12
* and/or modify it under the terms of the GNU General
13
* Public License as published by the Free Software Foundation;
14
* either version 2, or (at your option)
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* ============================================================ */
24
#ifndef DYNAMICLAYOUT_H
25
#define DYNAMICLAYOUT_H
40
class DynamicLayoutPriv;
42
class DynamicLayout : public QLayout
46
DynamicLayout(QWidget* parent, int margin = -1, int hSpacing = 0, int vSpacing = 0);
47
DynamicLayout(int margin = -1, int hSpacing = 0, int vSpacing = 0);
50
void addItem(QLayoutItem* item);
52
int horizontalSpacing() const;
53
int verticalSpacing() const;
55
Qt::Orientations expandingDirections() const;
57
bool hasHeightForWidth() const;
58
int heightForWidth(int) const;
62
QLayoutItem* itemAt(int index) const;
63
QLayoutItem* takeAt(int index);
65
QSize minimumSize() const;
67
void setGeometry(const QRect& rect);
68
QSize sizeHint() const;
72
int reLayout(const QRect& rect, bool testOnly) const;
76
DynamicLayoutPriv* const d;
79
} // namespace Digikam
81
#endif // DYNAMICLAYOUT_H