digiKam
atkinspagelayout.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2007-02-13
7  * Description : Layouting photos on a page
8  *
9  * Copyright (C) 2007-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) 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 DIGIKAM_ATKINS_PAGE_LAYOUT_H
25 #define DIGIKAM_ATKINS_PAGE_LAYOUT_H
26 
27 // Qt includes
28 
29 #include <QRectF>
30 #include <QMap>
31 
33 {
34 
48 {
49 public:
50 
54  explicit AtkinsPageLayout(const QRectF& pageRect);
56 
62  void addLayoutItem(int key, const QSizeF& itemSize);
63 
70  QRectF itemRect(int key);
71 
72 private:
73 
74  void addLayoutItem(int key, double aspectRatio, double relativeArea);
75  double aspectRatio(const QSizeF& size);
76  double absoluteArea(const QSizeF& size);
77 
78 private:
79 
80  // Disable
81  AtkinsPageLayout(const AtkinsPageLayout&) = delete;
82  AtkinsPageLayout& operator=(const AtkinsPageLayout&) = delete;
83 
84 private:
85 
86  class Private;
87  Private* const d;
88 };
89 
90 } // Namespace Digikam
91 
92 #endif // DIGIKAM_ATKINS_PAGE_LAYOUT_H
QRectF itemRect(int key)
Definition: atkinspagelayout.cpp:91
AtkinsPageLayout(const QRectF &pageRect)
Definition: atkinspagelayout.cpp:55
~AtkinsPageLayout()
Definition: atkinspagelayout.cpp:63
void addLayoutItem(int key, const QSizeF &itemSize)
Definition: atkinspagelayout.cpp:79
Definition: advprintphoto.cpp:43