mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-24 23:31:32 +08:00
Removed new dropped signals
This commit is contained in:
parent
4041aa72cc
commit
a65b1bdcaf
@ -1464,7 +1464,7 @@ void CDockContainerWidget::dropFloatingWidget(CFloatingDockContainer* FloatingWi
|
||||
if (SingleDroppedDockWidget)
|
||||
{
|
||||
std::cout << "SingleDockWidget dropped" << std::endl;
|
||||
d->DockManager->notifyWidgetDrop(SingleDroppedDockWidget);
|
||||
d->DockManager->notifyWidgetOrAreaRelocation(SingleDroppedDockWidget);
|
||||
}
|
||||
d->DockManager->notifyFloatingWidgetDrop(FloatingWidget);
|
||||
}
|
||||
@ -1499,7 +1499,7 @@ void CDockContainerWidget::dropWidget(QWidget* Widget, DockWidgetArea DropArea,
|
||||
}
|
||||
|
||||
window()->activateWindow();
|
||||
d->DockManager->notifyWidgetDrop(Widget);
|
||||
d->DockManager->notifyWidgetOrAreaRelocation(Widget);
|
||||
}
|
||||
|
||||
|
||||
|
@ -530,6 +530,7 @@ void DockManagerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget)
|
||||
auto NewFloatingWidget = FocusedDockWidget->dockContainer()->floatingWidget();
|
||||
if (NewFloatingWidget)
|
||||
{
|
||||
std::cout << "NewFloatingWidget->setProperty(FocusedDockWidget)" << std::endl;
|
||||
NewFloatingWidget->setProperty("FocusedDockWidget", QVariant::fromValue(DockWidget));
|
||||
}
|
||||
|
||||
@ -1076,7 +1077,7 @@ void CDockManager::onFocusedDockAreaViewToggled(bool Open)
|
||||
|
||||
|
||||
//===========================================================================
|
||||
void CDockManager::notifyWidgetDrop(QWidget* DroppedWidget)
|
||||
void CDockManager::notifyWidgetOrAreaRelocation(QWidget* DroppedWidget)
|
||||
{
|
||||
std::cout << "\n\nCDockManager::notifyWidgetDrop" << std::endl;
|
||||
CDockWidget* DockWidget = qobject_cast<CDockWidget*>(DroppedWidget);
|
||||
@ -1084,7 +1085,6 @@ void CDockManager::notifyWidgetDrop(QWidget* DroppedWidget)
|
||||
{
|
||||
std::cout << "CDockManager::setWidgetFocus " << DockWidget->objectName().toStdString() << std::endl;
|
||||
CDockManager::setWidgetFocus(DockWidget->tabWidget());
|
||||
emit dockWidgetDropped(DockWidget);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ protected:
|
||||
* A container needs to call this function if a widget has been dropped
|
||||
* into it
|
||||
*/
|
||||
void notifyWidgetDrop(QWidget* DroppedWidget);
|
||||
void notifyWidgetOrAreaRelocation(QWidget* RelocatedWidget);
|
||||
|
||||
/**
|
||||
* This function is called, if a floating widget has been dropped into
|
||||
@ -517,18 +517,6 @@ signals:
|
||||
* docking system but it is not deleted yet.
|
||||
*/
|
||||
void dockWidgetRemoved(CDockWidget* DockWidget);
|
||||
|
||||
/**
|
||||
* This signal is emitted if a dock widget has been dropped into a new
|
||||
* position
|
||||
*/
|
||||
void dockWidgetDropped(CDockWidget* DockWidget);
|
||||
|
||||
/**
|
||||
* This signal is emitted if a dock area has been dropped into a new
|
||||
* position
|
||||
*/
|
||||
void dockAreaDropped(CDockAreaWidget* DockArea);
|
||||
}; // class DockManager
|
||||
} // namespace ads
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -466,24 +466,9 @@ void CDockWidgetTab::setActiveTab(bool active)
|
||||
bool AllTabsHaveCloseButton = d->testConfigFlag(CDockManager::AllTabsHaveCloseButton);
|
||||
bool TabHasCloseButton = (ActiveTabHasCloseButton && active) | AllTabsHaveCloseButton;
|
||||
d->CloseButton->setVisible(DockWidgetClosable && TabHasCloseButton);
|
||||
|
||||
if (CDockManager::configFlags().testFlag(CDockManager::FocusStyling))
|
||||
if (d->IsActiveTab == active)
|
||||
{
|
||||
bool UpdateFocusStyle = false;
|
||||
if (active && !hasFocus())
|
||||
{
|
||||
setFocus(Qt::OtherFocusReason);
|
||||
UpdateFocusStyle = true;
|
||||
}
|
||||
|
||||
if (d->IsActiveTab == active)
|
||||
{
|
||||
if (UpdateFocusStyle)
|
||||
{
|
||||
updateStyle();
|
||||
}
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
d->IsActiveTab = active;
|
||||
|
@ -637,6 +637,8 @@ CFloatingDockContainer::CFloatingDockContainer(CDockAreaWidget *DockArea) :
|
||||
{
|
||||
TopLevelDockWidget->emitTopLevelChanged(true);
|
||||
}
|
||||
|
||||
d->DockManager->notifyWidgetOrAreaRelocation(DockArea);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
@ -652,6 +654,8 @@ CFloatingDockContainer::CFloatingDockContainer(CDockWidget *DockWidget) :
|
||||
{
|
||||
TopLevelDockWidget->emitTopLevelChanged(true);
|
||||
}
|
||||
|
||||
d->DockManager->notifyWidgetOrAreaRelocation(DockWidget);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user