diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-12-11 12:12:52 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-12-12 10:12:04 +0100 |
commit | e4e28359d688992deb8be5fbfdb3bcae855a7fe2 (patch) | |
tree | 64ce7ac9a1559a7bcc280cc809049bf14674de9c /vcl/inc | |
parent | ce0ba2c95396898e9e411ee70e219360159e36c4 (diff) |
tdf#120454: Implement native rendering of tooltips
side-step the entire misery of proper positioning of non-native
tooltips just like in gtk3
Change-Id: I09a75fae672d3d999c946c50c547d5f2cfa3ec14
Reviewed-on: https://gerrit.libreoffice.org/64956
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/qt5/Qt5Frame.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/qt5/Qt5Widget.hxx | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx index 766044a7b6d5..86f22e9d95eb 100644 --- a/vcl/inc/qt5/Qt5Frame.hxx +++ b/vcl/inc/qt5/Qt5Frame.hxx @@ -108,6 +108,7 @@ private Q_SLOTS: Q_SIGNALS: void setVisibleSignal(bool); + void tooltipRequest(const OUString& rTooltip); public: Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nSalFrameStyle, bool bUseCairo); @@ -157,6 +158,7 @@ public: virtual void SetPointer(PointerStyle ePointerStyle) override; virtual void CaptureMouse(bool bMouse) override; virtual void SetPointerPos(long nX, long nY) override; + virtual bool ShowTooltip(const OUString& rText, const tools::Rectangle& rHelpArea); using SalFrame::Flush; virtual void Flush() override; virtual void SetInputContext(SalInputContext* pContext) override; diff --git a/vcl/inc/qt5/Qt5Widget.hxx b/vcl/inc/qt5/Qt5Widget.hxx index 9f14d44fd5ef..ce68e1892c8c 100644 --- a/vcl/inc/qt5/Qt5Widget.hxx +++ b/vcl/inc/qt5/Qt5Widget.hxx @@ -20,6 +20,7 @@ #pragma once #include <QtWidgets/QWidget> +#include <rtl/ustring.hxx> class Qt5Frame; class Qt5Object; @@ -58,6 +59,9 @@ class Qt5Widget : public QWidget const QString m_InternalMimeType = "application/x-libreoffice-dnditem"; +public slots: + void showTooltip(const OUString& rTip); + public: Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f = Qt::WindowFlags()); Qt5Frame* m_pFrame; |