LibreOffice Module vcl (master)  1
Qt5Graphics_Controls.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #pragma once
21 
22 #include <vclpluginapi.h>
23 #include <WidgetDrawInterface.hxx>
24 
25 #include <memory>
26 
27 #include <QtGui/QImage>
28 #include <QtGui/QPainter>
29 #include <QtGui/QRegion>
30 #include <QtWidgets/QPushButton>
31 
33 {
34  std::unique_ptr<QImage> m_image;
36 
37 public:
39 
40  QImage* getImage() { return m_image.get(); }
41 
42  bool isNativeControlSupported(ControlType nType, ControlPart nPart) override;
44  const tools::Rectangle& rControlRegion, const Point& aPos,
45  bool& rIsInside) override;
46  bool drawNativeControl(ControlType nType, ControlPart nPart,
47  const tools::Rectangle& rControlRegion, ControlState nState,
48  const ImplControlValue& aValue, const OUString& aCaption) override;
50  const tools::Rectangle& rControlRegion, ControlState nState,
51  const ImplControlValue& aValue, const OUString& aCaption,
52  tools::Rectangle& rNativeBoundingRegion,
53  tools::Rectangle& rNativeContentRegion) override;
54 };
55 
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCLPLUG_QT5_PUBLIC
Definition: vclpluginapi.h:53
virtual bool hitTestNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, const Point &aPos, bool &rIsInside)
Query if a position is inside the native widget part.
virtual bool isNativeControlSupported(ControlType eType, ControlPart ePart)
Query the platform layer for native control support.
virtual bool getNativeControlRegion(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, ControlState eState, const ImplControlValue &aValue, const OUString &aCaption, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion)
Get the native control regions for the control part.
virtual bool drawNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, ControlState eState, const ImplControlValue &aValue, const OUString &aCaptions)
Draw the requested control.
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
std::unique_ptr< QImage > m_image