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