diff options
Diffstat (limited to 'src/qt6gtk2-style/qgtkstyle_p.h')
| -rw-r--r-- | src/qt6gtk2-style/qgtkstyle_p.h | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/src/qt6gtk2-style/qgtkstyle_p.h b/src/qt6gtk2-style/qgtkstyle_p.h new file mode 100644 index 0000000..aa7dfa3 --- /dev/null +++ b/src/qt6gtk2-style/qgtkstyle_p.h @@ -0,0 +1,108 @@ +/*************************************************************************** + * Copyright (C) 2015 The Qt Company Ltd. * + * Copyright (C) 2016-2024 Ilya Kotov, forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef QGTKSTYLE_P_H +#define QGTKSTYLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +//#include <private/qwindowsstyle_p.h> +#include <QPalette> +#include <QFont> +#include <QFileDialog> +#include <QCommonStyle> + +QT_BEGIN_NAMESPACE + + +#if !defined(QT_NO_STYLE_GTK) + +class QPainterPath; +class QGtkStylePrivate; + +class QGtkStyle : public QCommonStyle +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QGtkStyle) + +public: + QGtkStyle(); + QGtkStyle(QGtkStylePrivate &dd); + + ~QGtkStyle(); + + QPalette standardPalette() const override; + + void drawPrimitive(PrimitiveElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const override; + void drawControl(ControlElement control, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const override; + void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, + QPainter *painter, const QWidget *widget) const override; + void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, + const QPixmap &pixmap) const override; + void drawItemText(QPainter *painter, const QRect &rect, int alignment, const QPalette &pal, + bool enabled, const QString& text, QPalette::ColorRole textRole) const override; + + int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr, + const QWidget *widget = nullptr) const override; + int styleHint(StyleHint hint, const QStyleOption *option, + const QWidget *widget, QStyleHintReturn *returnData) const override; + + QStyle::SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, + const QPoint &pt, const QWidget *w) const override; + + QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, + SubControl subControl, const QWidget *widget) const override; + QRect subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *w) const override; + QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const override; + + + QSize sizeFromContents(ContentsType type, const QStyleOption *option, + const QSize &size, const QWidget *widget) const override; + QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = nullptr, + const QWidget *widget = nullptr) const override; + QPixmap standardPixmap(StandardPixmap sp, const QStyleOption *option, + const QWidget *widget) const override; + QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, + const QStyleOption *opt) const override; + + void polish(QWidget *widget) override; + void polish(QApplication *app) override; + void polish(QPalette &palette) override; + + void unpolish(QWidget *widget) override; + void unpolish(QApplication *app) override; +}; + +#endif //!defined(QT_NO_STYLE_QGTK) + +QT_END_NAMESPACE + +#endif //QGTKSTYLE_P_H |
