1 | /* $Id: UIMousePointerShapeData.h 106061 2024-09-16 14:03:52Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIMousePointerShapeData class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2019-2024 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef FEQT_INCLUDED_SRC_globals_UIMousePointerShapeData_h
|
---|
29 | #define FEQT_INCLUDED_SRC_globals_UIMousePointerShapeData_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QMetaType>
|
---|
36 | #include <QPoint>
|
---|
37 | #include <QSize>
|
---|
38 | #include <QVector>
|
---|
39 |
|
---|
40 | /* GUI includes: */
|
---|
41 | #include "UILibraryDefs.h"
|
---|
42 |
|
---|
43 | /* Other VBox inlcudes: */
|
---|
44 | #include <VBox/com/defs.h>
|
---|
45 |
|
---|
46 | /** Holds the mouse shape data to be able
|
---|
47 | * to pass it through signal-slot mechanism. */
|
---|
48 | class SHARED_LIBRARY_STUFF UIMousePointerShapeData
|
---|
49 | {
|
---|
50 | public:
|
---|
51 |
|
---|
52 | /** Constructs mouse pointer shape data.
|
---|
53 | * @param fVisible Brings whether mouse pointer should be visible.
|
---|
54 | * @param fAlpha Brings whether mouse pointer chape has alpha channel.
|
---|
55 | * @param hotSpot Brings the mouse pointer hot-spot.
|
---|
56 | * @param shapeSize Brings the mouse pointer shape size.
|
---|
57 | * @param shape Brings the mouse pointer shape byte array. */
|
---|
58 | UIMousePointerShapeData(bool fVisible = false,
|
---|
59 | bool fAlpha = false,
|
---|
60 | const QPoint &hotSpot = QPoint(),
|
---|
61 | const QSize &shapeSize = QSize(),
|
---|
62 | const QVector<BYTE> &shape = QVector<BYTE>());
|
---|
63 |
|
---|
64 | /** Constructs mouse pointer shape data on the basis of another. */
|
---|
65 | UIMousePointerShapeData(const UIMousePointerShapeData &another);
|
---|
66 |
|
---|
67 | /** Assigns this mouse pointer shape data with values of @a another. */
|
---|
68 | UIMousePointerShapeData &operator=(const UIMousePointerShapeData &another);
|
---|
69 |
|
---|
70 | /** Returns whether mouse pointer should be visible. */
|
---|
71 | bool isVisible() const { return m_fVisible; }
|
---|
72 | /** Returns whether mouse pointer chape has alpha channel. */
|
---|
73 | bool hasAlpha() const { return m_fAlpha; }
|
---|
74 | /** Returns the mouse pointer hot-spot. */
|
---|
75 | const QPoint &hotSpot() const { return m_hotSpot; }
|
---|
76 | /** Returns the mouse pointer shape size. */
|
---|
77 | const QSize &shapeSize() const { return m_shapeSize; }
|
---|
78 | /** Returns the mouse pointer shape byte array. */
|
---|
79 | const QVector<BYTE> &shape() const { return m_shape; }
|
---|
80 |
|
---|
81 | private:
|
---|
82 |
|
---|
83 | /** Holds whether mouse pointer should be visible. */
|
---|
84 | bool m_fVisible;
|
---|
85 | /** Holds whether mouse pointer chape has alpha channel. */
|
---|
86 | bool m_fAlpha;
|
---|
87 | /** Holds the mouse pointer hot-spot. */
|
---|
88 | QPoint m_hotSpot;
|
---|
89 | /** Holds the mouse pointer shape size. */
|
---|
90 | QSize m_shapeSize;
|
---|
91 | /** Holds the mouse pointer shape byte array. */
|
---|
92 | QVector<BYTE> m_shape;
|
---|
93 | };
|
---|
94 | Q_DECLARE_METATYPE(UIMousePointerShapeData);
|
---|
95 |
|
---|
96 | #endif /* !FEQT_INCLUDED_SRC_globals_UIMousePointerShapeData_h */
|
---|