qtquick: Added TitleBar_qtquick::numDockWidgetsChanged() signal
In case the custom titlebar wants to do something with it.
This commit is contained in:
@@ -44,6 +44,7 @@ TitleBar::TitleBar(Group *parent)
|
||||
{
|
||||
init();
|
||||
connect(m_group, &Group::numDockWidgetsChanged, this, &TitleBar::updateCloseButton);
|
||||
connect(m_group, &Group::numDockWidgetsChanged, this, &TitleBar::numDockWidgetsChanged);
|
||||
connect(m_group, &Group::isFocusedChanged, this, &TitleBar::isFocusedChanged);
|
||||
connect(m_group, &Group::isInMainWindowChanged, this, &TitleBar::updateAutoHideButton);
|
||||
}
|
||||
@@ -59,6 +60,8 @@ TitleBar::TitleBar(FloatingWindow *parent)
|
||||
{
|
||||
init();
|
||||
connect(m_floatingWindow, &FloatingWindow::numFramesChanged, this, &TitleBar::updateButtons);
|
||||
connect(m_floatingWindow, &FloatingWindow::numFramesChanged, this,
|
||||
&TitleBar::numDockWidgetsChanged);
|
||||
connect(m_floatingWindow, &FloatingWindow::windowStateChanged, this,
|
||||
&TitleBar::updateMaximizeButton);
|
||||
connect(m_floatingWindow, &FloatingWindow::activatedChanged, this, &TitleBar::isFocusedChanged);
|
||||
|
||||
@@ -113,6 +113,7 @@ public:
|
||||
bool floatButtonVisible() const;
|
||||
void setCloseButtonEnabled(bool);
|
||||
void setFloatButtonVisible(bool);
|
||||
|
||||
Q_SIGNALS:
|
||||
void titleChanged();
|
||||
void iconChanged();
|
||||
@@ -120,6 +121,7 @@ Q_SIGNALS:
|
||||
void closeButtonEnabledChanged(bool);
|
||||
void floatButtonVisibleChanged(bool);
|
||||
void floatButtonToolTipChanged(const QString &);
|
||||
void numDockWidgetsChanged();
|
||||
|
||||
/// @brief Emitted to tell the views to update their auto-hide button
|
||||
void autoHideButtonChanged(bool visible, bool enabled, TitleBarButtonType);
|
||||
|
||||
@@ -51,6 +51,8 @@ void TitleBar_qtquick::init()
|
||||
&TitleBar_qtquick::floatButtonVisibleChanged);
|
||||
connect(m_titleBar, &Controllers::TitleBar::floatButtonToolTipChanged, this,
|
||||
&TitleBar_qtquick::floatButtonToolTipChanged);
|
||||
connect(m_titleBar, &Controllers::TitleBar::numDockWidgetsChanged, this,
|
||||
&TitleBar_qtquick::numDockWidgetsChanged);
|
||||
}
|
||||
|
||||
#ifdef DOCKS_DEVELOPER_MODE
|
||||
|
||||
@@ -85,6 +85,9 @@ Q_SIGNALS:
|
||||
void floatButtonVisibleChanged(bool);
|
||||
void floatButtonToolTipChanged(const QString &);
|
||||
|
||||
/// Emitted when the number of dock widgets under this titlebar changes
|
||||
void numDockWidgetsChanged();
|
||||
|
||||
protected:
|
||||
void init() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user