Adds activeTabChanged() signal to let API users know about this state
change. It might be use to re-polish style sheets.
This commit is contained in:
@@ -70,6 +70,8 @@ SectionWidget* ContainerWidget::addSectionContent(const SectionContent::RefPtr&
|
||||
data.content = sc;
|
||||
data.titleWidget = new SectionTitleWidget(sc, NULL);
|
||||
data.contentWidget = new SectionContentWidget(sc, NULL);
|
||||
QObject::connect(data.titleWidget, &SectionTitleWidget::activeTabChanged, this, &ContainerWidget::onActiveTabChanged);
|
||||
|
||||
return dropContent(data, sw, area, false);
|
||||
}
|
||||
|
||||
@@ -1021,6 +1023,16 @@ bool ContainerWidget::takeContent(const SectionContent::RefPtr& sc, InternalCont
|
||||
return found;
|
||||
}
|
||||
|
||||
void ContainerWidget::onActiveTabChanged()
|
||||
{
|
||||
SectionTitleWidget* stw = qobject_cast<SectionTitleWidget*>(sender());
|
||||
if (stw)
|
||||
{
|
||||
qDebug() << "Active tab changed" << stw->_content->uid() << stw->isActiveTab();
|
||||
emit activeTabChanged(stw->_content, stw->isActiveTab());
|
||||
}
|
||||
}
|
||||
|
||||
void ContainerWidget::onActionToggleSectionContentVisibility(bool visible)
|
||||
{
|
||||
QAction* a = qobject_cast<QAction*>(sender());
|
||||
|
||||
Reference in New Issue
Block a user