mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Added CDockManager::floatingWidgetCreated event (#121)
This allows to subscribe to events of the newly created window. A common use case is to show a message box if a dock container with many modified documents in it is closed. This allows for the user to decide whether he wants to save / discard all the changes or cancel the closing of the window.
This commit is contained in:
parent
2b9377b5ee
commit
3428a4b8b4
@ -440,6 +440,7 @@ CDockManager::~CDockManager()
|
||||
void CDockManager::registerFloatingWidget(CFloatingDockContainer* FloatingWidget)
|
||||
{
|
||||
d->FloatingWidgets.append(FloatingWidget);
|
||||
emit floatingWidgetCreated(FloatingWidget);
|
||||
ADS_PRINT("d->FloatingWidgets.count() " << d->FloatingWidgets.count());
|
||||
}
|
||||
|
||||
|
@ -450,10 +450,17 @@ signals:
|
||||
|
||||
/**
|
||||
* This signal is emitted if the dock manager finished opening a
|
||||
* perspective
|
||||
* perspective.
|
||||
*/
|
||||
void perspectiveOpened(const QString& PerspectiveName);
|
||||
|
||||
/**
|
||||
* This signal is emitted, if a new floating widget has been created.
|
||||
* An application can use this signal to e.g. subscribe to events of
|
||||
* the newly created window.
|
||||
*/
|
||||
void floatingWidgetCreated(CFloatingDockContainer* FloatingWidget);
|
||||
|
||||
/**
|
||||
* This signal is emitted, if a new DockArea has been created.
|
||||
* An application can use this signal to set custom icons or custom
|
||||
|
Loading…
Reference in New Issue
Block a user