mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 23:51:33 +08:00
Removed debug output
This commit is contained in:
parent
056e1ef947
commit
64a2024513
@ -886,7 +886,6 @@ void CDockManager::onFocusObjectChanged(QObject *focusObject)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::cout << "\n\nCDockManager::onFocusObjectChanged " << focusObject->metaObject()->className() << std::endl;
|
|
||||||
|
|
||||||
auto FocusWidget = qobject_cast<QWidget*>(focusObject);
|
auto FocusWidget = qobject_cast<QWidget*>(focusObject);
|
||||||
if (!FocusWidget)
|
if (!FocusWidget)
|
||||||
@ -900,18 +899,14 @@ void CDockManager::onFocusObjectChanged(QObject *focusObject)
|
|||||||
if (DockWidgetTab)
|
if (DockWidgetTab)
|
||||||
{
|
{
|
||||||
DockWidget = DockWidgetTab->dockWidget();
|
DockWidget = DockWidgetTab->dockWidget();
|
||||||
std::cout << "TabText: " << DockWidgetTab->text().toStdString() << std::endl;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DockWidget = internal::findParent<CDockWidget*>(FocusWidget);
|
DockWidget = internal::findParent<CDockWidget*>(FocusWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Focus Object " << focusObject->objectName().toStdString()
|
|
||||||
<< " meta: " << focusObject->metaObject()->className() << std::endl;
|
|
||||||
if (!DockWidget)
|
if (!DockWidget)
|
||||||
{
|
{
|
||||||
std::cout << "!DockWidget" << std::endl;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -919,16 +914,15 @@ void CDockManager::onFocusObjectChanged(QObject *focusObject)
|
|||||||
CDockAreaWidget* NewFocusedDockArea = nullptr;
|
CDockAreaWidget* NewFocusedDockArea = nullptr;
|
||||||
if (d->FocusedDockWidget)
|
if (d->FocusedDockWidget)
|
||||||
{
|
{
|
||||||
std::cout << "focuse = false: " << d->FocusedDockWidget->objectName().toStdString() << std::endl;
|
|
||||||
d->FocusedDockWidget->setProperty("focused", false);
|
d->FocusedDockWidget->setProperty("focused", false);
|
||||||
d->FocusedDockWidget->tabWidget()->setProperty("focused", false);
|
d->FocusedDockWidget->tabWidget()->setProperty("focused", false);
|
||||||
DockWidgets.append(d->FocusedDockWidget);
|
DockWidgets.append(d->FocusedDockWidget);
|
||||||
}
|
}
|
||||||
d->FocusedDockWidget = DockWidget;
|
d->FocusedDockWidget = DockWidget;
|
||||||
std::cout << "d->FocusedDockWidget " << d->FocusedDockWidget->objectName().toStdString() << std::endl;
|
|
||||||
d->FocusedDockWidget->setProperty("focused", true);
|
d->FocusedDockWidget->setProperty("focused", true);
|
||||||
d->FocusedDockWidget->tabWidget()->setProperty("focused", true);
|
d->FocusedDockWidget->tabWidget()->setProperty("focused", true);
|
||||||
connect(d->FocusedDockWidget, SIGNAL(closed()), this, SLOT(onFocusedDockWidgetClosed()));
|
//connect(d->FocusedDockWidget, SIGNAL(closed()), this, SLOT(onFocusedDockWidgetClosed()));
|
||||||
NewFocusedDockArea = d->FocusedDockWidget->dockAreaWidget();
|
NewFocusedDockArea = d->FocusedDockWidget->dockAreaWidget();
|
||||||
if (NewFocusedDockArea)
|
if (NewFocusedDockArea)
|
||||||
{
|
{
|
||||||
@ -944,19 +938,16 @@ void CDockManager::onFocusObjectChanged(QObject *focusObject)
|
|||||||
|
|
||||||
if (!NewFocusedDockArea || (d->FocusedArea == NewFocusedDockArea))
|
if (!NewFocusedDockArea || (d->FocusedArea == NewFocusedDockArea))
|
||||||
{
|
{
|
||||||
std::cout << "d->FocusedArea == NewFocusedDockArea" << std::endl;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d->FocusedArea)
|
if (d->FocusedArea)
|
||||||
{
|
{
|
||||||
std::cout << "Repolish OldFocusedDockArea" << std::endl;
|
|
||||||
d->FocusedArea->setProperty("focused", false);
|
d->FocusedArea->setProperty("focused", false);
|
||||||
internal::repolishStyle(d->FocusedArea);
|
internal::repolishStyle(d->FocusedArea);
|
||||||
internal::repolishStyle(d->FocusedArea->titleBar());
|
internal::repolishStyle(d->FocusedArea->titleBar());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Repolish NewFocusedDockArea" << std::endl;
|
|
||||||
NewFocusedDockArea->setProperty("focused", true);
|
NewFocusedDockArea->setProperty("focused", true);
|
||||||
internal::repolishStyle(NewFocusedDockArea);
|
internal::repolishStyle(NewFocusedDockArea);
|
||||||
internal::repolishStyle(NewFocusedDockArea->titleBar());
|
internal::repolishStyle(NewFocusedDockArea->titleBar());
|
||||||
|
Loading…
Reference in New Issue
Block a user