Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qgraphicslayoutstyleinfo_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3#ifndef QGRAPHICSLAYOUTSTYLEINFO_P_H
4#define QGRAPHICSLAYOUTSTYLEINFO_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <QtWidgets/private/qtwidgetsglobal_p.h>
18#include <QtGui/private/qabstractlayoutstyleinfo_p.h>
19#include <QtWidgets/qstyleoption.h>
20
21#include <memory>
22
23QT_REQUIRE_CONFIG(graphicsview);
24
26
27class QStyle;
28class QWidget;
30
32{
33public:
36
37 virtual qreal combinedLayoutSpacing(QLayoutPolicy::ControlTypes controls1,
38 QLayoutPolicy::ControlTypes controls2,
39 Qt::Orientation orientation) const override;
40
43 Qt::Orientation orientation) const override;
44
45 virtual qreal spacing(Qt::Orientation orientation) const override;
46
47 virtual qreal windowMargin(Qt::Orientation orientation) const override;
48
49 virtual void invalidate() override
50 {
51 m_style = nullptr;
53 }
54
55 QWidget *widget() const;
56 QStyle *style() const;
57
58private:
59 const QGraphicsLayoutPrivate *m_layout;
60 mutable QStyle *m_style;
61 QStyleOption m_styleOption;
62 std::unique_ptr<QWidget> m_widget;
63};
64
66
67#endif // QGRAPHICSLAYOUTSTYLEINFO_P_H
virtual qreal perItemSpacing(QLayoutPolicy::ControlType control1, QLayoutPolicy::ControlType control2, Qt::Orientation orientation) const override
virtual qreal combinedLayoutSpacing(QLayoutPolicy::ControlTypes controls1, QLayoutPolicy::ControlTypes controls2, Qt::Orientation orientation) const override
QGraphicsLayoutStyleInfo(const QGraphicsLayoutPrivate *layout)
virtual qreal windowMargin(Qt::Orientation orientation) const override
virtual void invalidate() override
The QStyleOption class stores the parameters used by QStyle functions.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
Definition qstyle.h:29
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
qreal spacing
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:98
#define QT_REQUIRE_CONFIG(feature)
double qreal
Definition qtypes.h:187
QVBoxLayout * layout