diff options
Diffstat (limited to 'src/libs/advanceddockingsystem/linux/floatingwidgettitlebar.h')
-rw-r--r-- | src/libs/advanceddockingsystem/linux/floatingwidgettitlebar.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/libs/advanceddockingsystem/linux/floatingwidgettitlebar.h b/src/libs/advanceddockingsystem/linux/floatingwidgettitlebar.h index ed0c4202c9..f56405ffa8 100644 --- a/src/libs/advanceddockingsystem/linux/floatingwidgettitlebar.h +++ b/src/libs/advanceddockingsystem/linux/floatingwidgettitlebar.h @@ -25,7 +25,7 @@ #pragma once -#include <QWidget> +#include <QFrame> namespace ADS { @@ -34,45 +34,50 @@ class FloatingWidgetTitleBarPrivate; /** * Titlebar for floating widgets to capture non client are mouse events. - * Linux does not support NonClieantArea mouse events like + * Linux does not support NonClientArea mouse events like * QEvent::NonClientAreaMouseButtonPress. Because these events are required * for the docking system to work properly, we use our own titlebar here to * capture the required mouse events. */ -class FloatingWidgetTitleBar : public QWidget +class FloatingWidgetTitleBar : public QFrame { Q_OBJECT private: FloatingWidgetTitleBarPrivate *d; ///< private data (pimpl) protected: - virtual void mousePressEvent(QMouseEvent *event) override; - virtual void mouseReleaseEvent(QMouseEvent *event) override; - virtual void mouseMoveEvent(QMouseEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; public: using Super = QWidget; explicit FloatingWidgetTitleBar(FloatingDockContainer *parent = nullptr); /** - * Virtual Destructor - */ - virtual ~FloatingWidgetTitleBar() override; + * Virtual Destructor + */ + ~FloatingWidgetTitleBar() override; /** - * Enables / disables the window close button. - */ + * Enables / disables the window close button. + */ void enableCloseButton(bool enable); /** - * Sets the window title, that means, the text of the internal tile label. - */ + * Sets the window title, that means, the text of the internal tile label. + */ void setTitle(const QString &text); + /** + * Update stylesheet style if a property changes + */ + void updateStyle(); + signals: /** - * This signal is emitted, if the close button is clicked. - */ + * This signal is emitted, if the close button is clicked. + */ void closeRequested(); }; |