Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qrubberband.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QRUBBERBAND_H
6
#
define
QRUBBERBAND_H
7
8
#
include
<
QtWidgets
/
qtwidgetsglobal
.
h
>
9
#
include
<
QtWidgets
/
qwidget
.
h
>
10
11
QT_REQUIRE_CONFIG
(
rubberband
);
12
13
QT_BEGIN_NAMESPACE
14
15
class
QRubberBandPrivate;
16
class
QStyleOptionRubberBand;
17
18
class
Q_WIDGETS_EXPORT
QRubberBand
:
public
QWidget
19
{
20
Q_OBJECT
21
22
public
:
23
enum
Shape { Line, Rectangle };
24
explicit
QRubberBand(Shape, QWidget * =
nullptr
);
25
~QRubberBand();
26
27
Shape shape()
const
;
28
29
void
setGeometry(
const
QRect &r);
30
31
inline
void
setGeometry(
int
x,
int
y,
int
w,
int
h);
32
inline
void
move(
int
x,
int
y);
33
inline
void
move(
const
QPoint &p)
34
{ move(p.x(), p.y()); }
35
inline
void
resize(
int
w,
int
h)
36
{ setGeometry(geometry().x(), geometry().y(), w, h); }
37
inline
void
resize(
const
QSize &s)
38
{ resize(s.width(), s.height()); }
39
40
protected
:
41
bool
event(QEvent *e) override;
42
void
paintEvent(QPaintEvent *) override;
43
void
changeEvent(QEvent *) override;
44
void
showEvent(QShowEvent *) override;
45
void
resizeEvent(QResizeEvent *) override;
46
void
moveEvent(QMoveEvent *) override;
47
virtual
void
initStyleOption(QStyleOptionRubberBand *option)
const
;
48
49
private
:
50
Q_DECLARE_PRIVATE(QRubberBand)
51
};
52
53
inline
void
QRubberBand::setGeometry(
int
ax,
int
ay,
int
aw,
int
ah)
54
{ setGeometry(QRect(ax, ay, aw, ah)); }
55
inline
void
QRubberBand::move(
int
ax,
int
ay)
56
{ setGeometry(ax, ay, width(), height()); }
57
58
QT_END_NAMESPACE
59
60
#
endif
// QRUBBERBAND_H
QRubberBandPrivate
Definition
qrubberband.cpp:23
QRubberBandPrivate::clipping
QRegion clipping
Definition
qrubberband.cpp:28
QRubberBandPrivate::updateMask
void updateMask()
Definition
qrubberband.cpp:145
QRubberBand
The QRubberBand class provides a rectangle or line that can indicate a selection or a boundary.
Definition
qrubberband.h:19
QStyleHintReturnMask
The QStyleHintReturnMask class provides style hints that return a QRegion.
Definition
qstyleoption.h:730
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(liburing)
RUBBERBAND_WINDOW_TYPE
#define RUBBERBAND_WINDOW_TYPE
Definition
qrubberband.cpp:20
qtbase
src
widgets
widgets
qrubberband.h
Generated on
for Qt by
1.18.0