VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMousePointerShapeData.h@ 82781

Last change on this file since 82781 was 82029, checked in by vboxsync, 5 years ago

FE/Qt: bugref:9598: UIMousePointerShapeData: Rename hot point to hot-spot.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* $Id: UIMousePointerShapeData.h 82029 2019-11-20 15:43:46Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIMousePointerShapeData class declaration.
4 */
5
6/*
7 * Copyright (C) 2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef FEQT_INCLUDED_SRC_globals_UIMousePointerShapeData_h
19#define FEQT_INCLUDED_SRC_globals_UIMousePointerShapeData_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QMetaType>
26#include <QPoint>
27#include <QSize>
28#include <QVector>
29
30/* GUI includes: */
31#include "UILibraryDefs.h"
32
33/* Other VBox inlcudes: */
34#include <VBox/com/defs.h>
35
36/** Holds the mouse shape data to be able
37 * to pass it through signal-slot mechanism. */
38class SHARED_LIBRARY_STUFF UIMousePointerShapeData
39{
40public:
41
42 /** Constructs mouse pointer shape data.
43 * @param fVisible Brings whether mouse pointer should be visible.
44 * @param fAlpha Brings whether mouse pointer chape has alpha channel.
45 * @param hotSpot Brings the mouse pointer hot-spot.
46 * @param shapeSize Brings the mouse pointer shape size.
47 * @param shape Brings the mouse pointer shape byte array. */
48 UIMousePointerShapeData(bool fVisible = false,
49 bool fAlpha = false,
50 const QPoint &hotSpot = QPoint(),
51 const QSize &shapeSize = QSize(),
52 const QVector<BYTE> &shape = QVector<BYTE>());
53
54 /** Constructs mouse pointer shape data on the basis of another. */
55 UIMousePointerShapeData(const UIMousePointerShapeData &another);
56
57 /** Assigns this mouse pointer shape data with values of @a another. */
58 UIMousePointerShapeData &operator=(const UIMousePointerShapeData &another);
59
60 /** Returns whether mouse pointer should be visible. */
61 bool isVisible() const { return m_fVisible; }
62 /** Returns whether mouse pointer chape has alpha channel. */
63 bool hasAlpha() const { return m_fAlpha; }
64 /** Returns the mouse pointer hot-spot. */
65 const QPoint &hotSpot() const { return m_hotSpot; }
66 /** Returns the mouse pointer shape size. */
67 const QSize &shapeSize() const { return m_shapeSize; }
68 /** Returns the mouse pointer shape byte array. */
69 const QVector<BYTE> &shape() const { return m_shape; }
70
71private:
72
73 /** Holds whether mouse pointer should be visible. */
74 bool m_fVisible;
75 /** Holds whether mouse pointer chape has alpha channel. */
76 bool m_fAlpha;
77 /** Holds the mouse pointer hot-spot. */
78 QPoint m_hotSpot;
79 /** Holds the mouse pointer shape size. */
80 QSize m_shapeSize;
81 /** Holds the mouse pointer shape byte array. */
82 QVector<BYTE> m_shape;
83};
84Q_DECLARE_METATYPE(UIMousePointerShapeData);
85
86#endif /* !FEQT_INCLUDED_SRC_globals_UIMousePointerShapeData_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use