~ubuntu-branches/ubuntu/natty/digikam/natty

« back to all changes in this revision

Viewing changes to utilities/advancedrename/common/dynamiclayout.h

  • Committer: Bazaar Package Importer
  • Author(s): Luka Renko
  • Date: 2009-11-12 18:02:13 UTC
  • mfrom: (1.2.24 upstream) (3.2.7 sid)
  • Revision ID: james.westby@ubuntu.com-20091112180213-8p63z8taug49ji3t
Tags: 2:1.0.0~beta6-1ubuntu1
* Merge with Debian, remaining changes:
  - Export .pot name and copy to plugins in debian/rules
  - Remove liblqr-1-0-dev from build-deps, not in main

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ============================================================
 
2
 *
 
3
 * This file is a part of digiKam project
 
4
 * http://www.digikam.org
 
5
 *
 
6
 * Date        : 2009-10-22
 
7
 * Description : a dynamic layout manager
 
8
 *
 
9
 * Copyright (C) 2009 by Andi Clemens <andi dot clemens at gmx dot net>
 
10
 *
 
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)
 
15
 * any later version.
 
16
 *
 
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.
 
21
 *
 
22
 * ============================================================ */
 
23
 
 
24
#ifndef DYNAMICLAYOUT_H
 
25
#define DYNAMICLAYOUT_H
 
26
 
 
27
// Qt includes
 
28
 
 
29
#include <QLayout>
 
30
#include <QSize>
 
31
#include <QStyle>
 
32
#include <QWidget>
 
33
 
 
34
class QLayoutItem;
 
35
class QRect;
 
36
 
 
37
namespace Digikam
 
38
{
 
39
 
 
40
class DynamicLayoutPriv;
 
41
 
 
42
class DynamicLayout : public QLayout
 
43
{
 
44
public:
 
45
 
 
46
    DynamicLayout(QWidget* parent, int margin = -1,   int hSpacing = 0, int vSpacing = 0);
 
47
    DynamicLayout(int margin = -1, int hSpacing = 0,  int vSpacing = 0);
 
48
    ~DynamicLayout();
 
49
 
 
50
    void addItem(QLayoutItem* item);
 
51
 
 
52
    int  horizontalSpacing() const;
 
53
    int  verticalSpacing() const;
 
54
 
 
55
    Qt::Orientations expandingDirections() const;
 
56
 
 
57
    bool hasHeightForWidth() const;
 
58
    int  heightForWidth(int) const;
 
59
 
 
60
    int count() const;
 
61
 
 
62
    QLayoutItem* itemAt(int index) const;
 
63
    QLayoutItem* takeAt(int index);
 
64
 
 
65
    QSize minimumSize() const;
 
66
 
 
67
    void  setGeometry(const QRect& rect);
 
68
    QSize sizeHint() const;
 
69
 
 
70
private:
 
71
 
 
72
    int reLayout(const QRect& rect, bool testOnly) const;
 
73
 
 
74
private:
 
75
 
 
76
    DynamicLayoutPriv* const d;
 
77
};
 
78
 
 
79
} // namespace Digikam
 
80
 
 
81
#endif // DYNAMICLAYOUT_H