8#include <QtWidgets/qtwidgetsglobal.h>
9#include <QtCore/qobject.h>
10#include <QtWidgets/qlayoutitem.h>
11#include <QtWidgets/qsizepolicy.h>
12#include <QtCore/qrect.h>
13#include <QtCore/qmargins.h>
26class Q_WIDGETS_EXPORT QLayout :
public QObject,
public QLayoutItem
29 Q_DECLARE_PRIVATE(QLayout)
31 Q_PROPERTY(
int spacing READ spacing WRITE setSpacing)
32 Q_PROPERTY(QMargins contentsMargins READ contentsMargins WRITE setContentsMargins
33 RESET unsetContentsMargins)
35 Q_PROPERTY(SizeConstraint sizeConstraint READ sizeConstraint WRITE setSizeConstraint)
36 Q_PROPERTY(SizeConstraint horizontalSizeConstraint READ horizontalSizeConstraint WRITE setHorizontalSizeConstraint)
37 Q_PROPERTY(SizeConstraint verticalSizeConstraint READ verticalSizeConstraint WRITE setVerticalSizeConstraint)
48 Q_ENUM(SizeConstraint)
50 explicit QLayout(QWidget *parent =
nullptr);
53 virtual int spacing()
const;
54 virtual void setSpacing(
int);
56 void setContentsMargins(
int left,
int top,
int right,
int bottom);
57 void setContentsMargins(
const QMargins &margins);
58 void unsetContentsMargins();
59 void getContentsMargins(
int *left,
int *top,
int *right,
int *bottom)
const;
60 QMargins contentsMargins()
const;
61 QRect contentsRect()
const;
63 bool setAlignment(QWidget *w, Qt::Alignment alignment);
64 bool setAlignment(QLayout *l, Qt::Alignment alignment);
65 using QLayoutItem::setAlignment;
67 void setSizeConstraint(SizeConstraint constraint);
68 SizeConstraint sizeConstraint()
const;
70 void setSizeConstraints(SizeConstraint horizontal, SizeConstraint vertical);
72 void setHorizontalSizeConstraint(SizeConstraint constraint);
73 SizeConstraint horizontalSizeConstraint()
const;
75 void setVerticalSizeConstraint(SizeConstraint constraint);
76 SizeConstraint verticalSizeConstraint()
const;
78 void setMenuBar(QWidget *w);
79 QWidget *menuBar()
const;
81 QWidget *parentWidget()
const;
83 void invalidate() override;
84 QRect geometry()
const override;
88 void addWidget(QWidget *w);
89 virtual void addItem(QLayoutItem *) = 0;
91 void removeWidget(QWidget *w);
92 void removeItem(QLayoutItem *);
94 Qt::Orientations expandingDirections()
const override;
95 QSize minimumSize()
const override;
96 QSize maximumSize()
const override;
97 virtual void setGeometry(
const QRect&) override;
98 virtual QLayoutItem *itemAt(
int index)
const = 0;
99 virtual QLayoutItem *takeAt(
int index) = 0;
100 virtual int indexOf(
const QWidget *)
const;
101 virtual int indexOf(
const QLayoutItem *)
const;
102 virtual int count()
const = 0;
103 bool isEmpty()
const override;
104 QSizePolicy::ControlTypes controlTypes()
const override;
106 virtual QLayoutItem *replaceWidget(QWidget *from, QWidget *to,
107 Qt::FindChildOptions options = Qt::FindChildrenRecursively);
109 int totalMinimumHeightForWidth(
int w)
const;
110 int totalHeightForWidth(
int w)
const;
111 QSize totalMinimumSize()
const;
112 QSize totalMaximumSize()
const;
113 QSize totalSizeHint()
const;
114 QLayout *layout() override;
116 void setEnabled(
bool);
117 bool isEnabled()
const;
120 static QSize closestAcceptableSize(
const QWidget *w,
const QSize &s);
123 void widgetEvent(QEvent *);
124 void childEvent(QChildEvent *e) override;
125 void addChildLayout(QLayout *l);
126 void addChildWidget(QWidget *w);
127 bool adoptLayout(QLayout *layout);
129 QRect alignmentRect(
const QRect&)
const;
131 QLayout(QLayoutPrivate &d, QLayout*, QWidget*);
134 Q_DISABLE_COPY(QLayout)
136 static void activateRecursiveHelper(QLayoutItem *item);
138 friend class QApplicationPrivate;
139 friend class QWidget;
146#include <QtWidgets/qboxlayout.h>
147#include <QtWidgets/qgridlayout.h>
void releaseColorPicking()
QColor grabScreenColor(const QPoint &p)
bool selectColor(const QColor &color)
void init(const QColor &initial)
void setCurrentAlpha(int a)
QColorPickingEventFilter * colorPickingEventFilter
bool handleColorPickingMouseButtonRelease(QMouseEvent *e)
QColor currentQColor() const
void updateColorPicking()
bool handleColorPickingMouseMove(QMouseEvent *e)
QLabel * lblScreenColorInfo
void _q_setCustom(int index, QRgb color)
QPushButton * eyeDropperButton
void updateColorLabelText(const QPoint &)
void setCurrentColor(const QColor &color, SetColorMode setColorMode=SetColorAll)
bool isAlphaVisible() const
void setCurrentQColor(const QColor &color)
bool canBeNativeDialog() const override
void setCurrentRgbColor(QRgb rgb)
void retranslateStrings()
QRgb currentColor() const
void newColorTypedIn(QRgb rgb)
bool handleColorPickingKeyPress(QKeyEvent *e)
void updateColorPicking(const QPoint &pos)
QSharedPointer< QColorDialogOptions > options
void newStandard(int, int)
void setVisible(bool visible) override
QDialogButtonBox * buttons
bool supportsColorPicking() const
QPointer< QObject > receiverToDisconnectOnClose
QRgb beforeScreenColorPicking
virtual void initHelper(QPlatformDialogHelper *h) override
QByteArray memberToDisconnectOnClose
void newHsv(int h, int s, int v)
virtual void helperPrepareShow(QPlatformDialogHelper *h) override
QColorLuminancePicker * lp
QPlatformColorDialogHelper * platformColorDialogHelper() const
void nextCustom(int, int)
The QColorDialog class provides a dialog widget for specifying colors.
\inmodule QtCore\reentrant
\variable QStyleOption::palette
\variable QStyleOptionFocusRect::backgroundColor
QColSpinBox(QWidget *parent)
void paintEvent(QPaintEvent *) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
void mouseMoveEvent(QMouseEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse move events ...
void setCol(int h, int s)
void mousePressEvent(QMouseEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
void paintEvent(QPaintEvent *) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
void mouseMoveEvent(QMouseEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse move events ...
QSize sizeHint() const override
void setCrossVisible(bool visible)
void resizeEvent(QResizeEvent *) override
This event handler can be reimplemented in a subclass to receive widget resize events which are passe...
void mousePressEvent(QMouseEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
bool eventFilter(QObject *, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
void applicationStateChanged(Qt::ApplicationState state)
QColorPickingEventFilter(QColorDialogPrivate *dp, QObject *parent)
void mouseReleaseEvent(QMouseEvent *e) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse release even...
void mousePressEvent(QMouseEvent *e) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
void mouseMoveEvent(QMouseEvent *e) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse move events ...
void paintEvent(QPaintEvent *) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
QColor currentQColor() const
void setCurrentAlpha(int a)
bool isAlphaVisible() const
void setHsv(int h, int s, int v)
void retranslateStrings()
QRgb currentColor() const
void currentColorChanged(const QColor &color)
QColorWell(QWidget *parent, int r, int c, const QRgb *vals)
void paintCellContents(QPainter *, int row, int col, const QRect &) override
void mousePressEvent(QMouseEvent *e) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
void mouseMoveEvent(QMouseEvent *e) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse move events ...
void mouseReleaseEvent(QMouseEvent *e) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse release even...
friend class QT_PREPEND_NAMESPACE(QUntypedBindable)
void mouseReleaseEvent(QMouseEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse release even...
void focusOutEvent(QFocusEvent *) override
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) f...
void currentChanged(int row, int col)
int columnAt(int x) const
void updateCell(int row, int column)
void colorChanged(int index, QRgb color)
void paintEvent(QPaintEvent *) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
void mousePressEvent(QMouseEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
void focusInEvent(QFocusEvent *) override
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus receive...
virtual void setCurrent(int row, int col)
virtual void setSelected(int row, int col)
QRect cellGeometry(int row, int column)
virtual void paintCell(QPainter *, int row, int col, const QRect &)
int columnX(int column) const
QSize sizeHint() const override
virtual void paintCellContents(QPainter *, int row, int col, const QRect &)
int selectedColumn() const
void keyPressEvent(QKeyEvent *) override
This event handler, for event event, can be reimplemented in a subclass to receive key press events f...
QString cellContent(int row, int col) const
QtPrivate::QColorShower QColorShower
static void rgb2hsv(QRgb rgb, int &h, int &s, int &v)
QtPrivate::QColorWell QColorWell
QtPrivate::QWellArray QWellArray
QtPrivate::QColorPickingEventFilter QColorPickingEventFilter
QtPrivate::QColorLuminancePicker QColorLuminancePicker
QtPrivate::QColorPicker QColorPicker
static const Qt::WindowFlags qcd_DefaultWindowFlags
QT_REQUIRE_CONFIG(colordialog)