Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:09:37

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QPROXYSTYLE_H
0005 #define QPROXYSTYLE_H
0006 
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/QCommonStyle>
0009 
0010 QT_BEGIN_NAMESPACE
0011 
0012 
0013 #if !defined(QT_NO_STYLE_PROXY)
0014 
0015 class QProxyStylePrivate;
0016 class Q_WIDGETS_EXPORT QProxyStyle : public QCommonStyle
0017 {
0018     Q_OBJECT
0019 
0020 public:
0021     QProxyStyle(QStyle *style = nullptr);
0022     QProxyStyle(const QString &key);
0023     ~QProxyStyle();
0024 
0025     QStyle *baseStyle() const;
0026     void setBaseStyle(QStyle *style);
0027 
0028     void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override;
0029     void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override;
0030     void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = nullptr) const override;
0031     void drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled,
0032                       const QString &text, QPalette::ColorRole textRole = QPalette::NoRole) const override;
0033     virtual void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const override;
0034 
0035     QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const override;
0036 
0037     QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const override;
0038     QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const override;
0039     QRect itemTextRect(const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const override;
0040     QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const override;
0041 
0042     SubControl hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option, const QPoint &pos, const QWidget *widget = nullptr) const override;
0043     int styleHint(StyleHint hint, const QStyleOption *option = nullptr, const QWidget *widget = nullptr, QStyleHintReturn *returnData = nullptr) const override;
0044     int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override;
0045     int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2,
0046                       Qt::Orientation orientation, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override;
0047 
0048     QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override;
0049     QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget = nullptr) const override;
0050     QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const override;
0051     QPalette standardPalette() const override;
0052 
0053     void polish(QWidget *widget) override;
0054     void polish(QPalette &pal) override;
0055     void polish(QApplication *app) override;
0056 
0057     void unpolish(QWidget *widget) override;
0058     void unpolish(QApplication *app) override;
0059 
0060 protected:
0061     bool event(QEvent *e) override;
0062 
0063 private:
0064     Q_DISABLE_COPY(QProxyStyle)
0065     Q_DECLARE_PRIVATE(QProxyStyle)
0066 };
0067 
0068 #endif // QT_NO_STYLE_PROXY
0069 
0070 QT_END_NAMESPACE
0071 
0072 #endif // QPROXYSTYLE_H