diff options
author | dt <qtc-committer@nokia.com> | 2010-03-24 17:33:29 +0100 |
---|---|---|
committer | dt <qtc-committer@nokia.com> | 2010-03-25 17:37:16 +0100 |
commit | 0742932d177081c1b6fc194136ae54e1610e0488 (patch) | |
tree | 228bcba78d28de1e134a733da2930bb0de6cf8c3 /src/plugins/projectexplorer/doubletabwidget.cpp | |
parent | a3f827b1b8e8a043b32a4de7eeb19681dfa41494 (diff) | |
download | qt-creator-0742932d177081c1b6fc194136ae54e1610e0488.tar.gz |
Add currentIndex API to DoubleTabWidget
Reviewed-By: con
Diffstat (limited to 'src/plugins/projectexplorer/doubletabwidget.cpp')
-rw-r--r-- | src/plugins/projectexplorer/doubletabwidget.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/doubletabwidget.cpp b/src/plugins/projectexplorer/doubletabwidget.cpp index 10882e94f4..33f9157e0c 100644 --- a/src/plugins/projectexplorer/doubletabwidget.cpp +++ b/src/plugins/projectexplorer/doubletabwidget.cpp @@ -71,6 +71,21 @@ DoubleTabWidget::~DoubleTabWidget() delete ui; } +int DoubleTabWidget::currentIndex() const +{ + return m_currentIndex; +} + +void DoubleTabWidget::setCurrentIndex(int index) +{ + Q_ASSERT(index < m_tabs.size()); + if (index == m_currentIndex) + return; + m_currentIndex = index; + emit currentIndexChanged(m_currentIndex, m_tabs.at(m_currentIndex).currentSubTab); + update(); +} + void DoubleTabWidget::setTitle(const QString &title) { m_title = title; |