Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtWidgets/qgraphicslinearlayout.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QGRAPHICSLINEARLAYOUT_H
0005 #define QGRAPHICSLINEARLAYOUT_H
0006 
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qgraphicsitem.h>
0009 #include <QtWidgets/qgraphicslayout.h>
0010 
0011 QT_REQUIRE_CONFIG(graphicsview);
0012 
0013 QT_BEGIN_NAMESPACE
0014 
0015 class QGraphicsLinearLayoutPrivate;
0016 
0017 class Q_WIDGETS_EXPORT QGraphicsLinearLayout : public QGraphicsLayout
0018 {
0019 public:
0020     QGraphicsLinearLayout(QGraphicsLayoutItem *parent = nullptr);
0021     QGraphicsLinearLayout(Qt::Orientation orientation, QGraphicsLayoutItem *parent = nullptr);
0022     virtual ~QGraphicsLinearLayout();
0023 
0024     void setOrientation(Qt::Orientation orientation);
0025     Qt::Orientation orientation() const;
0026 
0027     inline void addItem(QGraphicsLayoutItem *item) { insertItem(-1, item); }
0028     inline void addStretch(int stretch = 1) { insertStretch(-1, stretch); }
0029 
0030     void insertItem(int index, QGraphicsLayoutItem *item);
0031     void insertStretch(int index, int stretch = 1);
0032 
0033     void removeItem(QGraphicsLayoutItem *item);
0034     void removeAt(int index) override;
0035 
0036     void setSpacing(qreal spacing);
0037     qreal spacing() const;
0038     void setItemSpacing(int index, qreal spacing);
0039     qreal itemSpacing(int index) const;
0040 
0041     void setStretchFactor(QGraphicsLayoutItem *item, int stretch);
0042     int stretchFactor(QGraphicsLayoutItem *item) const;
0043 
0044     void setAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment);
0045     Qt::Alignment alignment(QGraphicsLayoutItem *item) const;
0046 
0047     void setGeometry(const QRectF &rect) override;
0048 
0049     int count() const override;
0050     QGraphicsLayoutItem *itemAt(int index) const override;
0051 
0052     void invalidate() override;
0053     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
0054 
0055 #if 0 // ###
0056     Q5SizePolicy::ControlTypes controlTypes(LayoutSide side) const;
0057 #endif
0058 
0059     void dump(int indent = 0) const;
0060 
0061 protected:
0062 #if 0
0063     QSize contentsSizeHint(Qt::SizeHint which, const QSize &constraint = QSize()) const;
0064 #endif
0065 
0066 private:
0067     Q_DISABLE_COPY(QGraphicsLinearLayout)
0068     Q_DECLARE_PRIVATE(QGraphicsLinearLayout)
0069 };
0070 
0071 QT_END_NAMESPACE
0072 
0073 #endif