Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/multipagewidget.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
43 | 43 | | |||
44 | /* | 44 | /* | ||
45 | Added support for icons and main title (name) by: | 45 | Added support for icons and main title (name) by: | ||
46 | Percy Camilo Triveño Aucahuasi <orgyforever@gmail.com> | 46 | Percy Camilo Triveño Aucahuasi <orgyforever@gmail.com> | ||
47 | */ | 47 | */ | ||
48 | 48 | | |||
49 | #include "multipagewidget.h" | 49 | #include "multipagewidget.h" | ||
50 | 50 | | |||
51 | #include <QtGui/QLayout> | 51 | #include <QLayout> | ||
52 | #include <QtGui/QLabel> | 52 | #include <QLabel> | ||
53 | #include <QtGui/QStackedWidget> | 53 | #include <QStackedWidget> | ||
54 | 54 | | |||
55 | #include <KComboBox> | 55 | #include <KComboBox> | ||
56 | 56 | | |||
57 | MultiPageWidget::MultiPageWidget(QWidget * parent, const QString name) | 57 | MultiPageWidget::MultiPageWidget(QWidget * parent, const QString name) | ||
58 | : QGroupBox(parent) | 58 | : QGroupBox(parent) | ||
59 | { | 59 | { | ||
60 | comboBox = new KComboBox(); | 60 | comboBox = new KComboBox(); | ||
61 | comboBox->setObjectName("__qt__passive_comboBox"); | 61 | comboBox->setObjectName("__qt__passive_comboBox"); | ||
▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | |||||
142 | 142 | | |||
143 | void MultiPageWidget::setPageTitle(QString const &newTitle) | 143 | void MultiPageWidget::setPageTitle(QString const &newTitle) | ||
144 | { | 144 | { | ||
145 | comboBox->setItemText(currentIndex(), newTitle); | 145 | comboBox->setItemText(currentIndex(), newTitle); | ||
146 | if (QWidget *currentWidget = stackWidget->currentWidget()) | 146 | if (QWidget *currentWidget = stackWidget->currentWidget()) | ||
147 | currentWidget->setWindowTitle(newTitle); | 147 | currentWidget->setWindowTitle(newTitle); | ||
148 | emit pageTitleChanged(newTitle); | 148 | emit pageTitleChanged(newTitle); | ||
149 | } | 149 | } | ||
150 | | ||||
151 | #include "multipagewidget.moc" | |