Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
0742932d
Commit
0742932d
authored
Mar 24, 2010
by
dt
Browse files
Add currentIndex API to DoubleTabWidget
Reviewed-By: con
parent
a3f827b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/doubletabwidget.cpp
View file @
0742932d
...
...
@@ -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
;
...
...
src/plugins/projectexplorer/doubletabwidget.h
View file @
0742932d
...
...
@@ -12,7 +12,8 @@ namespace Ui {
class
DoubleTabWidget
;
}
class
DoubleTabWidget
:
public
QWidget
{
class
DoubleTabWidget
:
public
QWidget
{
Q_OBJECT
public:
DoubleTabWidget
(
QWidget
*
parent
=
0
);
...
...
@@ -26,6 +27,9 @@ public:
void
removeTab
(
int
index
);
int
tabCount
()
const
;
int
currentIndex
()
const
;
void
setCurrentIndex
(
int
index
);
signals:
void
currentIndexChanged
(
int
index
,
int
subIndex
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment