Marble

MarbleGraphicsGridLayout.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2009 Bastian Holst <bastianholst@gmx.de>
4//
5
6#ifndef MARBLE_MARBLEGRAPHICSGRIDLAYOUT_H
7#define MARBLE_MARBLEGRAPHICSGRIDLAYOUT_H
8
9// Marble
10#include "AbstractMarbleGraphicsLayout.h"
11#include "marble_export.h"
12
13#include <Qt> // for Qt::Alignment
14
15namespace Marble
16{
17
18class ScreenGraphicsItem;
19class MarbleGraphicsGridLayoutPrivate;
20
21class MARBLE_EXPORT MarbleGraphicsGridLayout : public AbstractMarbleGraphicsLayout
22{
23public:
24 MarbleGraphicsGridLayout(int rows, int columns);
25 ~MarbleGraphicsGridLayout() override;
26
27 void addItem(ScreenGraphicsItem *item, int row, int column);
28
29 /**
30 * This updates the positions of all items in the layout.
31 * Calling this will be done on every repainting, so you won't have to do it yourself.
32 */
33 void updatePositions(MarbleGraphicsItem *parent) override;
34
35 Qt::Alignment alignment() const;
36
37 Qt::Alignment alignment(ScreenGraphicsItem *item) const;
38
39 void setAlignment(Qt::Alignment align);
40
41 void setAlignment(ScreenGraphicsItem *item, Qt::Alignment);
42
43 /**
44 * Returns the spacing between the items inside the layout.
45 */
46 int spacing() const;
47
48 /**
49 * Set the spacing between the items inside the layout. By default the spacing is 0.
50 */
51 void setSpacing(int spacing);
52
53private:
54 MarbleGraphicsGridLayoutPrivate *const d;
55};
56
57} // namespace Marble
58
59#endif
Binds a QML item to a specific geodetic location in screen coordinates.
typedef Alignment
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.