| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | class QStackedWidgetPrivate : public QFramePrivate | - |
| 8 | { | - |
| 9 | inline QStackedWidget* q_func() { return static_cast<QStackedWidget *>(q_ptr); } inline const QStackedWidget* q_func() const { return static_cast<const QStackedWidget *>(q_ptr); } friend class QStackedWidget; | - |
| 10 | public: | - |
| 11 | QStackedWidgetPrivate():layout(0){} | - |
| 12 | QStackedLayout *layout; | - |
| 13 | bool blockChildAdd; | - |
| 14 | }; | - |
| 15 | QStackedWidget::QStackedWidget(QWidget *parent) | - |
| 16 | : QFrame(*new QStackedWidgetPrivate, parent) | - |
| 17 | { | - |
| 18 | QStackedWidgetPrivate * const d = d_func(); | - |
| 19 | d->layout = new QStackedLayout(this); | - |
| 20 | connect(d->layout, qFlagLocation("2""widgetRemoved(int)" "\0" __FILE__ ":" "134""140"), this, qFlagLocation("2""widgetRemoved(int)" "\0" __FILE__ ":" "134""140")); | - |
| 21 | connect(d->layout, qFlagLocation("2""currentChanged(int)" "\0" __FILE__ ":" "135""141"), this, qFlagLocation("2""currentChanged(int)" "\0" __FILE__ ":" "135""141")); | - |
| 22 | } | - |
| 23 | | - |
| 24 | | - |
| 25 | | - |
| 26 | | - |
| 27 | QStackedWidget::~QStackedWidget() | - |
| 28 | { | - |
| 29 | } | - |
| 30 | int QStackedWidget::addWidget(QWidget *widget) | - |
| 31 | { | - |
| 32 | return d_func()->layout->addWidget(widget); | - |
| 33 | } | - |
| 34 | int QStackedWidget::insertWidget(int index, QWidget *widget) | - |
| 35 | { | - |
| 36 | return d_func()->layout->insertWidget(index, widget); | - |
| 37 | } | - |
| 38 | void QStackedWidget::removeWidget(QWidget *widget) | - |
| 39 | { | - |
| 40 | d_func()->layout->removeWidget(widget); | - |
| 41 | } | - |
| 42 | void QStackedWidget::setCurrentIndex(int index) | - |
| 43 | { | - |
| 44 | d_func()->layout->setCurrentIndex(index); | - |
| 45 | } | - |
| 46 | | - |
| 47 | int QStackedWidget::currentIndex() const | - |
| 48 | { | - |
| 49 | return d_func()->layout->currentIndex(); | - |
| 50 | } | - |
| 51 | | - |
| 52 | | - |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | | - |
| 57 | QWidget *QStackedWidget::currentWidget() const | - |
| 58 | { | - |
| 59 | return d_func()->layout->currentWidget(); | - |
| 60 | } | - |
| 61 | void QStackedWidget::setCurrentWidget(QWidget *widget) | - |
| 62 | { | - |
| 63 | QStackedWidgetPrivate * const d = d_func(); | - |
| 64 | if (__builtin_expect(!!(| TRUE | never evaluated | | FALSE | never evaluated |
d->layout->indexOf(widget) == -1)), false)| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 65 | QMessageLogger(__FILE__, 241247, __PRETTY_FUNCTION__).warning("QStackedWidget::setCurrentWidget: widget %p not contained in stack", widget); | - |
| 66 | return; never executed: return; | 0 |
| 67 | } | - |
| 68 | d->layout->setCurrentWidget(widget); | - |
| 69 | } never executed: end of block | 0 |
| 70 | | - |
| 71 | | - |
| 72 | | - |
| 73 | | - |
| 74 | | - |
| 75 | | - |
| 76 | | - |
| 77 | int QStackedWidget::indexOf(QWidget *widget) const | - |
| 78 | { | - |
| 79 | return d_func()->layout->indexOf(widget); | - |
| 80 | } | - |
| 81 | | - |
| 82 | | - |
| 83 | | - |
| 84 | | - |
| 85 | | - |
| 86 | | - |
| 87 | | - |
| 88 | QWidget *QStackedWidget::widget(int index) const | - |
| 89 | { | - |
| 90 | return d_func()->layout->widget(index); | - |
| 91 | } | - |
| 92 | int QStackedWidget::count() const | - |
| 93 | { | - |
| 94 | return d_func()->layout->count(); | - |
| 95 | } | - |
| 96 | | - |
| 97 | | - |
| 98 | bool QStackedWidget::event(QEvent *e) | - |
| 99 | { | - |
| 100 | return QFrame::event(e); | - |
| 101 | } | - |
| 102 | | - |
| 103 | | - |
| 104 | | - |
| | |