widgets/qstackedwidget.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7class 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; -
10public: -
11 QStackedWidgetPrivate():layout(0){}
executed: }
Execution Count:232
232
12 QStackedLayout *layout; -
13 bool blockChildAdd; -
14}; -
15QStackedWidget::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, "2""widgetRemoved(int)", this, "2""widgetRemoved(int)"); -
21 connect(d->layout, "2""currentChanged(int)", this, "2""currentChanged(int)"); -
22}
executed: }
Execution Count:232
232
23 -
24 -
25 -
26 -
27QStackedWidget::~QStackedWidget() -
28{ -
29} -
30int QStackedWidget::addWidget(QWidget *widget) -
31{ -
32 return d_func()->layout->addWidget(widget);
executed: return d_func()->layout->addWidget(widget);
Execution Count:382
382
33} -
34int QStackedWidget::insertWidget(int index, QWidget *widget) -
35{ -
36 return d_func()->layout->insertWidget(index, widget);
executed: return d_func()->layout->insertWidget(index, widget);
Execution Count:53
53
37} -
38void QStackedWidget::removeWidget(QWidget *widget) -
39{ -
40 d_func()->layout->removeWidget(widget); -
41}
executed: }
Execution Count:20
20
42void QStackedWidget::setCurrentIndex(int index) -
43{ -
44 d_func()->layout->setCurrentIndex(index); -
45}
executed: }
Execution Count:262
262
46 -
47int QStackedWidget::currentIndex() const -
48{ -
49 return d_func()->layout->currentIndex();
executed: return d_func()->layout->currentIndex();
Execution Count:3
3
50} -
51 -
52 -
53 -
54 -
55 -
56 -
57QWidget *QStackedWidget::currentWidget() const -
58{ -
59 return d_func()->layout->currentWidget();
executed: return d_func()->layout->currentWidget();
Execution Count:227
227
60} -
61void QStackedWidget::setCurrentWidget(QWidget *widget) -
62{ -
63 QStackedWidgetPrivate * const d = d_func(); -
64 if (d->layout->indexOf(widget) == -1) {
partially evaluated: d->layout->indexOf(widget) == -1
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:130
0-130
65 QMessageLogger("widgets/qstackedwidget.cpp", 247, __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}
executed: }
Execution Count:130
130
70 -
71 -
72 -
73 -
74 -
75 -
76 -
77int QStackedWidget::indexOf(QWidget *widget) const -
78{ -
79 return d_func()->layout->indexOf(widget);
executed: return d_func()->layout->indexOf(widget);
Execution Count:18
18
80} -
81 -
82 -
83 -
84 -
85 -
86 -
87 -
88QWidget *QStackedWidget::widget(int index) const -
89{ -
90 return d_func()->layout->widget(index);
executed: return d_func()->layout->widget(index);
Execution Count:53
53
91} -
92int QStackedWidget::count() const -
93{ -
94 return d_func()->layout->count();
executed: return d_func()->layout->count();
Execution Count:85
85
95} -
96 -
97 -
98bool QStackedWidget::event(QEvent *e) -
99{ -
100 return QFrame::event(e);
executed: return QFrame::event(e);
Execution Count:2088
2088
101} -
102 -
103 -
104 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial