Warning, file /include/QtWidgets/qstackedlayout.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QSTACKEDLAYOUT_H
0005 #define QSTACKEDLAYOUT_H
0006
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qlayout.h>
0009
0010 QT_BEGIN_NAMESPACE
0011
0012
0013 class QStackedLayoutPrivate;
0014
0015 class Q_WIDGETS_EXPORT QStackedLayout : public QLayout
0016 {
0017 Q_OBJECT
0018 Q_DECLARE_PRIVATE(QStackedLayout)
0019 Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentChanged)
0020 Q_PROPERTY(StackingMode stackingMode READ stackingMode WRITE setStackingMode)
0021 QDOC_PROPERTY(int count READ count)
0022
0023 public:
0024 enum StackingMode {
0025 StackOne,
0026 StackAll
0027 };
0028 Q_ENUM(StackingMode)
0029
0030 QStackedLayout();
0031 explicit QStackedLayout(QWidget *parent);
0032 explicit QStackedLayout(QLayout *parentLayout);
0033 ~QStackedLayout();
0034
0035 int addWidget(QWidget *w);
0036 int insertWidget(int index, QWidget *w);
0037
0038 QWidget *currentWidget() const;
0039 int currentIndex() const;
0040 using QLayout::widget;
0041 QWidget *widget(int) const;
0042 int count() const override;
0043
0044 StackingMode stackingMode() const;
0045 void setStackingMode(StackingMode stackingMode);
0046
0047
0048 void addItem(QLayoutItem *item) override;
0049 QSize sizeHint() const override;
0050 QSize minimumSize() const override;
0051 QLayoutItem *itemAt(int) const override;
0052 QLayoutItem *takeAt(int) override;
0053 void setGeometry(const QRect &rect) override;
0054 bool hasHeightForWidth() const override;
0055 int heightForWidth(int width) const override;
0056
0057 Q_SIGNALS:
0058 void widgetRemoved(int index);
0059 void currentChanged(int index);
0060
0061 public Q_SLOTS:
0062 void setCurrentIndex(int index);
0063 void setCurrentWidget(QWidget *w);
0064
0065 private:
0066 Q_DISABLE_COPY(QStackedLayout)
0067 };
0068
0069 QT_END_NAMESPACE
0070
0071 #endif