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
4#ifndef QFRAME_H
5#define QFRAME_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qwidget.h>
9
11
12
13class QFramePrivate;
14class QStyleOptionFrame;
15
16class Q_WIDGETS_EXPORT QFrame : public QWidget
17{
18 Q_OBJECT
19
20 Q_PROPERTY(Shape frameShape READ frameShape WRITE setFrameShape)
21 Q_PROPERTY(Shadow frameShadow READ frameShadow WRITE setFrameShadow)
22 Q_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth)
23 Q_PROPERTY(int midLineWidth READ midLineWidth WRITE setMidLineWidth)
24 Q_PROPERTY(int frameWidth READ frameWidth)
25 Q_PROPERTY(QRect frameRect READ frameRect WRITE setFrameRect DESIGNABLE false)
26
27public:
28 explicit QFrame(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
29 ~QFrame();
30
31 int frameStyle() const;
32 void setFrameStyle(int);
33
34 int frameWidth() const;
35
36 QSize sizeHint() const override;
37
38 enum Shape {
39 NoFrame = 0, // no frame
40 Box = 0x0001, // rectangular box
41 Panel = 0x0002, // rectangular panel
42 WinPanel = 0x0003, // rectangular panel (Windows)
43 HLine = 0x0004, // horizontal line
44 VLine = 0x0005, // vertical line
45 StyledPanel = 0x0006 // rectangular panel depending on the GUI style
46 };
47 Q_ENUM(Shape)
48 enum Shadow {
49 Plain = 0x0010, // plain line
50 Raised = 0x0020, // raised shadow effect
51 Sunken = 0x0030 // sunken shadow effect
52 };
53 Q_ENUM(Shadow)
54
55 enum StyleMask {
56 Shadow_Mask = 0x00f0, // mask for the shadow
57 Shape_Mask = 0x000f // mask for the shape
58 };
59
60 Shape frameShape() const;
61 void setFrameShape(Shape);
62 Shadow frameShadow() const;
63 void setFrameShadow(Shadow);
64
65 int lineWidth() const;
66 void setLineWidth(int);
67
68 int midLineWidth() const;
69 void setMidLineWidth(int);
70
71 QRect frameRect() const;
72 void setFrameRect(const QRect &);
73
74protected:
75 bool event(QEvent *e) override;
76 void paintEvent(QPaintEvent *) override;
77 void changeEvent(QEvent *) override;
78 void drawFrame(QPainter *);
79
80
81protected:
82 QFrame(QFramePrivate &dd, QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
83 virtual void initStyleOption(QStyleOptionFrame *option) const;
84
85private:
86 Q_DISABLE_COPY(QFrame)
87 Q_DECLARE_PRIVATE(QFrame)
88};
89
90Q_DECLARE_MIXED_ENUM_OPERATORS_SYMMETRIC(int, QFrame::Shape, QFrame::Shadow)
91
92QT_END_NAMESPACE
93
94#endif // QFRAME_H
The QBoxLayout class lines up child widgets horizontally or vertically.
Definition qboxlayout.h:21
The QFrame class is the base class of widgets that can have a frame.
Definition qframe.h:17
The QHBoxLayout class lines up widgets horizontally.
Definition qboxlayout.h:78
The QLayoutItem class provides an abstract item that a QLayout manipulates.
Definition qlayoutitem.h:25
friend class QWidget
Definition qpainter.h:421
The QSpacerItem class provides blank space in a layout.
Definition qlayoutitem.h:57
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
The QVBoxLayout class lines up widgets vertically.
Definition qboxlayout.h:91
QSize minimumSizeHint() const override
\reimp
Definition qwizard.cpp:415
void setSideWidget(QWidget *widget)
Definition qwizard.cpp:421
QWatermarkLabel(QWidget *parent, QWidget *sideWidget)
Definition qwizard.cpp:409
QWidget * sideWidget() const
Definition qwizard.cpp:432
The QWidgetItem class is a layout item that represents a widget.
Definition qlayoutitem.h:86
QWizardAntiFlickerWidget(QWizard *wizard, QWizardPrivate *)
Definition qwizard.cpp:496
QWizardDefaultProperty(const char *className, const char *property, const char *changedSignal)
Definition qwizard.cpp:141
QByteArray changedSignal
Definition qwizard.cpp:138
QString name
Definition qwizard.cpp:158
void resolve(const QList< QWizardDefaultProperty > &defaultPropertyTable)
Definition qwizard.cpp:178
QWizardField(QWizardPage *page, const QString &spec, QObject *object, const char *property, const char *changedSignal)
Definition qwizard.cpp:167
void findProperty(const QWizardDefaultProperty *properties, int propertyCount)
Definition qwizard.cpp:185
QByteArray property
Definition qwizard.cpp:161
QByteArray changedSignal
Definition qwizard.cpp:162
QVariant initialValue
Definition qwizard.cpp:163
QWizardPage * page
Definition qwizard.cpp:157
QObject * object
Definition qwizard.cpp:160
void paintEvent(QPaintEvent *event) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
Definition qwizard.cpp:383
QWizardHeader(RulerType, QWidget *parent=nullptr)
Definition qwizard.cpp:251
QWizardHeader(QWidget *parent=nullptr)
Definition qwizard.cpp:273
void setup(const QWizardLayoutInfo &info, const QString &title, const QString &subTitle, const QPixmap &logo, const QPixmap &banner, Qt::TextFormat titleFormat, Qt::TextFormat subTitleFormat)
Definition qwizard.cpp:323
bool operator!=(const QWizardLayoutInfo &other) const
Definition qwizard.cpp:221
bool operator==(const QWizardLayoutInfo &other) const
Definition qwizard.cpp:224
TriState completeState
Definition qwizard.cpp:456
void _q_maybeEmitCompleteChanged()
Definition qwizard.cpp:471
QMap< int, QString > buttonCustomTexts
Definition qwizard.cpp:460
void _q_updateCachedCompleteState()
Definition qwizard.cpp:479
bool cachedIsComplete() const
Definition qwizard.cpp:463
QPixmap pixmaps[QWizard::NPixmaps]
Definition qwizard.cpp:454
QList< QWizardField > pendingFields
Definition qwizard.cpp:455
The QWizardPage class is the base class for wizard pages.
Definition qwizard.h:177
QMap< int, QString > buttonCustomTexts
Definition qwizard.cpp:563
QList< int > history
Definition qwizard.cpp:552
QMap< QString, int > fieldIndexMap
Definition qwizard.cpp:550
void setStyle(QStyle *style)
Definition qwizard.cpp:1695
PageMap pageMap
Definition qwizard.cpp:548
QGridLayout * mainLayout
Definition qwizard.cpp:595
QList< QWizardDefaultProperty > defaultPropertyTable
Definition qwizard.cpp:551
QAbstractButton * commit
Definition qwizard.cpp:575
bool buttonLayoutContains(QWizard::WizardButton which)
Definition qwizard.cpp:1493
void updateCurrentPage()
Definition qwizard.cpp:1312
void _q_updateButtonStates()
Definition qwizard.cpp:1617
QVBoxLayout * pageVBoxLayout
Definition qwizard.cpp:593
QWatermarkLabel * watermarkLabel
Definition qwizard.cpp:586
QAbstractButton * cancel
Definition qwizard.cpp:577
QWizardLayoutInfo layoutInfoForCurrentPage()
Definition qwizard.cpp:856
bool startSetByUser
Definition qwizard.cpp:554
void connectButton(QWizard::WizardButton which) const
Definition qwizard.cpp:1381
void removeFieldAt(int index)
Definition qwizard.cpp:741
QAbstractButton * next
Definition qwizard.cpp:574
QAbstractButton * help
Definition qwizard.cpp:578
QAbstractButton * back
Definition qwizard.cpp:573
QLabel * subTitleLabel
Definition qwizard.cpp:590
QFrame * pageFrame
Definition qwizard.cpp:588
QLabel * titleLabel
Definition qwizard.cpp:589
void recreateLayout(const QWizardLayoutInfo &info)
Definition qwizard.cpp:917
QWizardAntiFlickerWidget * antiFlickerWidget
Definition qwizard.cpp:582
QAbstractButton * finish
Definition qwizard.cpp:576
QWizardHeader * headerWidget
Definition qwizard.cpp:585
void updateLayout()
Definition qwizard.cpp:1191
QHBoxLayout * buttonLayout
Definition qwizard.cpp:594
void updateMinMaxSizes(const QWizardLayoutInfo &info)
Definition qwizard.cpp:1276
void _q_emitCustomButtonClicked()
Definition qwizard.cpp:1605
void setButtonLayout(const QWizard::WizardButton *array, int size)
Definition qwizard.cpp:1460
bool isVistaThemeEnabled() const
Definition qwizard.cpp:1578
void updatePixmap(QWizard::WizardPixmap which)
Definition qwizard.cpp:1498
QWidget * sideWidget
Definition qwizard.cpp:587
void _q_handleFieldObjectDestroyed(QObject *)
Definition qwizard.cpp:1668
void switchToPage(int newId, Direction direction)
Definition qwizard.cpp:756
QList< QWizard::WizardButton > buttonsCustomLayout
Definition qwizard.cpp:565
void enableUpdates()
Definition qwizard.cpp:1596
int disableUpdatesCount
Definition qwizard.cpp:559
QPixmap defaultPixmaps[QWizard::NPixmaps]
Definition qwizard.cpp:568
QWidget * placeholderWidget2
Definition qwizard.cpp:584
QWizardRuler * bottomRuler
Definition qwizard.cpp:591
Qt::TextFormat subTitleFmt
Definition qwizard.cpp:567
void updateButtonTexts()
Definition qwizard.cpp:1391
void updateButtonLayout()
Definition qwizard.cpp:1420
QList< QWizardField > fields
Definition qwizard.cpp:549
bool ensureButton(QWizard::WizardButton which) const
Definition qwizard.cpp:1352
void updatePalette()
Definition qwizard.cpp:1252
bool buttonsHaveCustomLayout
Definition qwizard.cpp:564
void cleanupPagesNotInHistory()
Definition qwizard.cpp:705
QAbstractButton * btns[QWizard::NButtons]
Definition qwizard.cpp:580
Qt::TextFormat titleFmt
Definition qwizard.cpp:566
void disableUpdates()
Definition qwizard.cpp:1587
QWidget * placeholderWidget1
Definition qwizard.cpp:583
void addField(const QWizardField &field)
Definition qwizard.cpp:719
QWizardLayoutInfo layoutInfo
Definition qwizard.cpp:558
QWizardRuler(QWidget *parent=nullptr)
Definition qwizard.cpp:402
The QWizard class provides a framework for wizards.
Definition qwizard.h:19
Combined button and popup list for selecting options.
QT_BEGIN_NAMESPACE constexpr int QLAYOUTSIZE_MAX
Definition qlayoutitem.h:16
static const char * buttonSlots(QWizard::WizardButton which)
Definition qwizard.cpp:832
static QString buttonDefaultText(int wstyle, int which, const QWizardPrivate *wizardPrivate)
Definition qwizard.cpp:613
static QString object_name_for_button(QWizard::WizardButton which)
Definition qwizard.cpp:1326
Q_DECLARE_TYPEINFO(QWizardDefaultProperty, Q_RELOCATABLE_TYPE)
const int ModernHeaderTopMargin
Definition qwizard.cpp:50
static void changeSpacerSize(QLayout *layout, int index, int width, int height)
Definition qwizard.cpp:58
const int MacLayoutLeftMargin
Definition qwizard.cpp:53
const int GapBetweenLogoAndRightEdge
Definition qwizard.cpp:49
const char property[13]
Definition qwizard.cpp:100
static bool objectInheritsXAndXIsCloserThanY(const QObject *object, const QByteArray &classX, const QByteArray &classY)
Definition qwizard.cpp:84
static QWidget * iWantTheFocus(QWidget *ancestor)
Definition qwizard.cpp:66
Q_DECLARE_TYPEINFO(QWizardField, Q_RELOCATABLE_TYPE)
const int MacLayoutBottomMargin
Definition qwizard.cpp:56
const int MacLayoutRightMargin
Definition qwizard.cpp:55
static const char * changed_signal(int which)
Definition qwizard.cpp:113
const size_t NFallbackDefaultProperties
Definition qwizard.cpp:111
const int ClassicHMargin
Definition qwizard.cpp:51
const int MacButtonTopMargin
Definition qwizard.cpp:52
const char className[16]
[1]
Definition qwizard.cpp:99
QT_REQUIRE_CONFIG(wizard)