Fix GNU C++ version check
[LibreOffice.git] / vcl / inc / qt5 / QtInstanceDrawingArea.hxx
blobc403662ef6f952a0d004c04d7c80e7c7ca282577
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #pragma once
12 #include "QtInstanceWidget.hxx"
14 #include <QtWidgets/QLabel>
16 class QtInstanceDrawingArea : public QtInstanceWidget, public virtual weld::DrawingArea
18 Q_OBJECT
20 QLabel* m_pLabel;
21 ScopedVclPtrInstance<VirtualDevice> m_xDevice;
23 public:
24 QtInstanceDrawingArea(QLabel* pLabel);
26 virtual void queue_draw() override;
27 virtual void queue_draw_area(int x, int y, int width, int height) override;
29 virtual void enable_drag_source(rtl::Reference<TransferDataContainer>& rTransferable,
30 sal_uInt8 eDNDConstants) override;
32 virtual void set_cursor(PointerStyle ePointerStyle) override;
34 virtual Point get_pointer_position() const override;
36 virtual void set_input_context(const InputContext& rInputContext) override;
37 virtual void im_context_set_cursor_location(const tools::Rectangle& rCursorRect,
38 int nExtTextInputWidth) override;
40 virtual OutputDevice& get_ref_device() override;
42 virtual a11yref get_accessible_parent() override;
43 virtual a11yrelationset get_accessible_relation_set() override;
44 virtual AbsoluteScreenPixelPoint get_accessible_location_on_screen() override;
46 virtual bool eventFilter(QObject* pObject, QEvent* pEvent) override;
48 private:
49 void handlePaintEvent();
50 void handleResizeEvent();
52 private:
53 virtual void click(const Point&) override;
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */