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
qframe.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 QFRAME_H
6#define QFRAME_H
7
8#include <QtWidgets/qtwidgetsglobal.h>
9#include <QtWidgets/qwidget.h>
10
12
13
14class QFramePrivate;
15class QStyleOptionFrame;
16
17class Q_WIDGETS_EXPORT QFrame : public QWidget
18{
19 Q_OBJECT
20
21 Q_PROPERTY(Shape frameShape READ frameShape WRITE setFrameShape)
22 Q_PROPERTY(Shadow frameShadow READ frameShadow WRITE setFrameShadow)
23 Q_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth)
24 Q_PROPERTY(int midLineWidth READ midLineWidth WRITE setMidLineWidth)
25 Q_PROPERTY(int frameWidth READ frameWidth)
26 Q_PROPERTY(QRect frameRect READ frameRect WRITE setFrameRect DESIGNABLE false)
27
28public:
29 explicit QFrame(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
30 ~QFrame();
31
32 int frameStyle() const;
33 void setFrameStyle(int);
34
35 int frameWidth() const;
36
37 QSize sizeHint() const override;
38
39 enum Shape {
40 NoFrame = 0, // no frame
41 Box = 0x0001, // rectangular box
42 Panel = 0x0002, // rectangular panel
43 WinPanel = 0x0003, // rectangular panel (Windows)
44 HLine = 0x0004, // horizontal line
45 VLine = 0x0005, // vertical line
46 StyledPanel = 0x0006 // rectangular panel depending on the GUI style
47 };
48 Q_ENUM(Shape)
49 enum Shadow {
50 Plain = 0x0010, // plain line
51 Raised = 0x0020, // raised shadow effect
52 Sunken = 0x0030 // sunken shadow effect
53 };
54 Q_ENUM(Shadow)
55
56 enum StyleMask {
57 Shadow_Mask = 0x00f0, // mask for the shadow
58 Shape_Mask = 0x000f // mask for the shape
59 };
60
61 Shape frameShape() const;
62 void setFrameShape(Shape);
63 Shadow frameShadow() const;
64 void setFrameShadow(Shadow);
65
66 int lineWidth() const;
67 void setLineWidth(int);
68
69 int midLineWidth() const;
70 void setMidLineWidth(int);
71
72 QRect frameRect() const;
73 void setFrameRect(const QRect &);
74
75protected:
76 bool event(QEvent *e) override;
77 void paintEvent(QPaintEvent *) override;
78 void changeEvent(QEvent *) override;
79 void drawFrame(QPainter *);
80
81
82protected:
83 QFrame(QFramePrivate &dd, QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
84 virtual void initStyleOption(QStyleOptionFrame *option) const;
85
86private:
87 Q_DISABLE_COPY(QFrame)
88 Q_DECLARE_PRIVATE(QFrame)
89};
90
91Q_DECLARE_MIXED_ENUM_OPERATORS_SYMMETRIC(int, QFrame::Shape, QFrame::Shadow)
92
93QT_END_NAMESPACE
94
95#endif // QFRAME_H
The QBoxLayout class lines up child widgets horizontally or vertically.
Definition qboxlayout.h:22
The QFrame class is the base class of widgets that can have a frame.
Definition qframe.h:18
The QHBoxLayout class lines up widgets horizontally.
Definition qboxlayout.h:79
The QLayoutItem class provides an abstract item that a QLayout manipulates.
Definition qlayoutitem.h:26
friend class QWidget
Definition qpainter.h:431
The QSpacerItem class provides blank space in a layout.
Definition qlayoutitem.h:58
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
The QVBoxLayout class lines up widgets vertically.
Definition qboxlayout.h:92
QSize minimumSizeHint() const override
\reimp
Definition qwizard.cpp:432
void setSideWidget(QWidget *widget)
Definition qwizard.cpp:438
QWatermarkLabel(QWidget *parent, QWidget *sideWidget)
Definition qwizard.cpp:426
QWidget * sideWidget() const
Definition qwizard.cpp:449
The QWidgetItem class is a layout item that represents a widget.
Definition qlayoutitem.h:87
QWizardAntiFlickerWidget(QWizard *wizard, QWizardPrivate *)
Definition qwizard.cpp:513
QWizardDefaultProperty(const char *className, const char *property, const char *changedSignal)
Definition qwizard.cpp:142
QByteArray changedSignal
Definition qwizard.cpp:139
QString name
Definition qwizard.cpp:159
void resolve(const QList< QWizardDefaultProperty > &defaultPropertyTable)
Definition qwizard.cpp:179
QWizardField(QWizardPage *page, const QString &spec, QObject *object, const char *property, const char *changedSignal)
Definition qwizard.cpp:168
void findProperty(const QWizardDefaultProperty *properties, int propertyCount)
Definition qwizard.cpp:186
QByteArray property
Definition qwizard.cpp:162
QByteArray changedSignal
Definition qwizard.cpp:163
QVariant initialValue
Definition qwizard.cpp:164
QWizardPage * page
Definition qwizard.cpp:158
QObject * object
Definition qwizard.cpp:161
void paintEvent(QPaintEvent *event) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
Definition qwizard.cpp:392
QWizardHeader(RulerType, QWidget *parent=nullptr)
Definition qwizard.cpp:253
QWizardHeader(QWidget *parent=nullptr)
Definition qwizard.cpp:279
void setup(const QWizardLayoutInfo &info, const QString &title, const QString &subTitle, const QPixmap &logo, const QPixmap &banner, Qt::TextFormat titleFormat, Qt::TextFormat subTitleFormat, QWizard::BannerSizePolicy bannerSizePolicy)
Definition qwizard.cpp:329
bool operator!=(const QWizardLayoutInfo &other) const
Definition qwizard.cpp:222
bool operator==(const QWizardLayoutInfo &other) const
Definition qwizard.cpp:225
TriState completeState
Definition qwizard.cpp:473
void _q_maybeEmitCompleteChanged()
Definition qwizard.cpp:488
QMap< int, QString > buttonCustomTexts
Definition qwizard.cpp:477
void _q_updateCachedCompleteState()
Definition qwizard.cpp:496
bool cachedIsComplete() const
Definition qwizard.cpp:480
QPixmap pixmaps[QWizard::NPixmaps]
Definition qwizard.cpp:471
QList< QWizardField > pendingFields
Definition qwizard.cpp:472
The QWizardPage class is the base class for wizard pages.
Definition qwizard.h:187
QMap< int, QString > buttonCustomTexts
Definition qwizard.cpp:580
QList< int > history
Definition qwizard.cpp:569
QMap< QString, int > fieldIndexMap
Definition qwizard.cpp:567
void setStyle(QStyle *style)
Definition qwizard.cpp:1713
PageMap pageMap
Definition qwizard.cpp:565
QGridLayout * mainLayout
Definition qwizard.cpp:613
QList< QWizardDefaultProperty > defaultPropertyTable
Definition qwizard.cpp:568
QAbstractButton * commit
Definition qwizard.cpp:593
bool buttonLayoutContains(QWizard::WizardButton which)
Definition qwizard.cpp:1511
void updateCurrentPage()
Definition qwizard.cpp:1330
void _q_updateButtonStates()
Definition qwizard.cpp:1635
QVBoxLayout * pageVBoxLayout
Definition qwizard.cpp:611
QWatermarkLabel * watermarkLabel
Definition qwizard.cpp:604
QAbstractButton * cancel
Definition qwizard.cpp:595
QWizardLayoutInfo layoutInfoForCurrentPage()
Definition qwizard.cpp:874
bool startSetByUser
Definition qwizard.cpp:571
void connectButton(QWizard::WizardButton which) const
Definition qwizard.cpp:1399
void removeFieldAt(int index)
Definition qwizard.cpp:759
QAbstractButton * next
Definition qwizard.cpp:592
QAbstractButton * help
Definition qwizard.cpp:596
QAbstractButton * back
Definition qwizard.cpp:591
QLabel * subTitleLabel
Definition qwizard.cpp:608
QFrame * pageFrame
Definition qwizard.cpp:606
QLabel * titleLabel
Definition qwizard.cpp:607
void recreateLayout(const QWizardLayoutInfo &info)
Definition qwizard.cpp:935
QWizardAntiFlickerWidget * antiFlickerWidget
Definition qwizard.cpp:600
QAbstractButton * finish
Definition qwizard.cpp:594
QWizardHeader * headerWidget
Definition qwizard.cpp:603
void updateLayout()
Definition qwizard.cpp:1209
QHBoxLayout * buttonLayout
Definition qwizard.cpp:612
void updateMinMaxSizes(const QWizardLayoutInfo &info)
Definition qwizard.cpp:1294
void _q_emitCustomButtonClicked()
Definition qwizard.cpp:1623
void setButtonLayout(const QWizard::WizardButton *array, int size)
Definition qwizard.cpp:1478
bool isVistaThemeEnabled() const
Definition qwizard.cpp:1596
void updatePixmap(QWizard::WizardPixmap which)
Definition qwizard.cpp:1516
QWidget * sideWidget
Definition qwizard.cpp:605
void _q_handleFieldObjectDestroyed(QObject *)
Definition qwizard.cpp:1686
void switchToPage(int newId, Direction direction)
Definition qwizard.cpp:774
QList< QWizard::WizardButton > buttonsCustomLayout
Definition qwizard.cpp:582
void enableUpdates()
Definition qwizard.cpp:1614
int disableUpdatesCount
Definition qwizard.cpp:576
QPixmap defaultPixmaps[QWizard::NPixmaps]
Definition qwizard.cpp:586
QWidget * placeholderWidget2
Definition qwizard.cpp:602
QWizardRuler * bottomRuler
Definition qwizard.cpp:609
Qt::TextFormat subTitleFmt
Definition qwizard.cpp:584
void updateButtonTexts()
Definition qwizard.cpp:1409
void updateButtonLayout()
Definition qwizard.cpp:1438
QList< QWizardField > fields
Definition qwizard.cpp:566
bool ensureButton(QWizard::WizardButton which) const
Definition qwizard.cpp:1370
void updatePalette()
Definition qwizard.cpp:1270
bool buttonsHaveCustomLayout
Definition qwizard.cpp:581
void cleanupPagesNotInHistory()
Definition qwizard.cpp:723
QAbstractButton * btns[QWizard::NButtons]
Definition qwizard.cpp:598
Qt::TextFormat titleFmt
Definition qwizard.cpp:583
void disableUpdates()
Definition qwizard.cpp:1605
QWidget * placeholderWidget1
Definition qwizard.cpp:601
void addField(const QWizardField &field)
Definition qwizard.cpp:737
QWizardLayoutInfo layoutInfo
Definition qwizard.cpp:575
QWizardRuler(QWidget *parent=nullptr)
Definition qwizard.cpp:419
The QWizard class provides a framework for wizards.
Definition qwizard.h:20
QT_BEGIN_NAMESPACE constexpr int QLAYOUTSIZE_MAX
Definition qlayoutitem.h:17
static const char * buttonSlots(QWizard::WizardButton which)
Definition qwizard.cpp:850
static QString buttonDefaultText(int wstyle, int which, const QWizardPrivate *wizardPrivate)
Definition qwizard.cpp:631
const char className[16]
Definition qwizard.cpp:100
static QString object_name_for_button(QWizard::WizardButton which)
Definition qwizard.cpp:1344
Q_DECLARE_TYPEINFO(QWizardDefaultProperty, Q_RELOCATABLE_TYPE)
const int ModernHeaderTopMargin
Definition qwizard.cpp:51
static void changeSpacerSize(QLayout *layout, int index, int width, int height)
Definition qwizard.cpp:59
const int MacLayoutLeftMargin
Definition qwizard.cpp:54
const int GapBetweenLogoAndRightEdge
Definition qwizard.cpp:50
const char property[13]
Definition qwizard.cpp:101
static bool objectInheritsXAndXIsCloserThanY(const QObject *object, const QByteArray &classX, const QByteArray &classY)
Definition qwizard.cpp:85
static QWidget * iWantTheFocus(QWidget *ancestor)
Definition qwizard.cpp:67
Q_DECLARE_TYPEINFO(QWizardField, Q_RELOCATABLE_TYPE)
const int MacLayoutBottomMargin
Definition qwizard.cpp:57
const int MacLayoutRightMargin
Definition qwizard.cpp:56
static const char * changed_signal(int which)
Definition qwizard.cpp:114
const size_t NFallbackDefaultProperties
Definition qwizard.cpp:112
const int ClassicHMargin
Definition qwizard.cpp:52
const int MacButtonTopMargin
Definition qwizard.cpp:53
QT_REQUIRE_CONFIG(wizard)