Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qpushbutton_p.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
QPUSHBUTTON_P_H
6
#
define
QPUSHBUTTON_P_H
7
8
#
include
<
QtWidgets
/
private
/
qtwidgetsglobal_p
.
h
>
9
#
include
"private/qabstractbutton_p.h"
10
11
#
include
<
QtCore
/
qpointer
.
h
>
12
13
QT_REQUIRE_CONFIG
(
pushbutton
);
14
15
//
16
// W A R N I N G
17
// -------------
18
//
19
// This file is not part of the Qt API. It exists purely as an
20
// implementation detail. This header file may change from version to
21
// version without notice, or even be removed.
22
//
23
// We mean it.
24
//
25
26
QT_BEGIN_NAMESPACE
27
28
class
QDialog;
29
class
QPushButton;
30
31
class
QPushButtonPrivate
:
public
QAbstractButtonPrivate
32
{
33
Q_DECLARE_PUBLIC(QPushButton)
34
public
:
35
enum
AutoDefaultValue
{
Off
= 0,
On
= 1,
Auto
= 2 };
36
37
QPushButtonPrivate
()
38
:
QAbstractButtonPrivate
(
QSizePolicy
::
PushButton
),
autoDefault
(
Auto
),
39
defaultButton
(
false
),
flat
(
false
),
menuOpen
(
false
),
hovering
(
false
),
40
lastAutoDefault
(
false
)
41
{}
42
43
void
init
();
44
static
QPushButtonPrivate
*
get
(QPushButton *b) {
return
b->d_func(); }
45
#
if
QT_CONFIG
(
menu
)
46
QPoint
adjustedMenuPosition
();
47
#
endif
48
void
resetLayoutItemMargins
();
49
void
popupPressed
();
50
#
if
QT_CONFIG
(
dialog
)
51
QDialog
*
dialogParent
()
const
;
52
#
else
53
QDialog *
dialogParent
()
const
{
return
nullptr
; }
54
#
endif
55
56
QPointer
<
QMenu
>
menu
;
57
uint
autoDefault
: 2;
58
uint
defaultButton
: 1;
59
uint
flat
: 1;
60
uint
menuOpen
: 1;
61
uint
hovering
: 1;
62
mutable
uint
lastAutoDefault
: 1;
63
};
64
65
QT_END_NAMESPACE
66
67
#
endif
// QPUSHBUTTON_P_H
QPushButtonPrivate
Definition
qpushbutton_p.h:32
QPushButtonPrivate::popupPressed
void popupPressed()
QPushButtonPrivate::lastAutoDefault
uint lastAutoDefault
Definition
qpushbutton_p.h:62
QPushButtonPrivate::init
void init()
Definition
qpushbutton.cpp:633
QPushButtonPrivate::hovering
uint hovering
Definition
qpushbutton_p.h:61
QPushButtonPrivate::get
static QPushButtonPrivate * get(QPushButton *b)
Definition
qpushbutton_p.h:44
QPushButtonPrivate::resetLayoutItemMargins
void resetLayoutItemMargins()
Definition
qpushbutton.cpp:640
QPushButtonPrivate::autoDefault
uint autoDefault
Definition
qpushbutton_p.h:57
QPushButtonPrivate::flat
uint flat
Definition
qpushbutton_p.h:59
QPushButtonPrivate::menuOpen
uint menuOpen
Definition
qpushbutton_p.h:60
QPushButtonPrivate::dialogParent
QDialog * dialogParent() const
Definition
qpushbutton_p.h:53
QPushButtonPrivate::menu
QPointer< QMenu > menu
Definition
qpushbutton_p.h:56
QPushButtonPrivate::QPushButtonPrivate
QPushButtonPrivate()
Definition
qpushbutton_p.h:37
QPushButtonPrivate::defaultButton
uint defaultButton
Definition
qpushbutton_p.h:58
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(pushbutton)
qtbase
src
widgets
widgets
qpushbutton_p.h
Generated on
for Qt by
1.14.0