File indexing completed on 2024-04-28 05:47:20

0001 /*****************************************************************************
0002  *   Copyright 2007 - 2010 Craig Drummond <craig.p.drummond@gmail.com>       *
0003  *   Copyright 2013 - 2015 Yichao Yu <yyc1992@gmail.com>                     *
0004  *                                                                           *
0005  *   This program is free software; you can redistribute it and/or modify    *
0006  *   it under the terms of the GNU Lesser General Public License as          *
0007  *   published by the Free Software Foundation; either version 2.1 of the    *
0008  *   License, or (at your option) version 3, or any later version accepted   *
0009  *   by the membership of KDE e.V. (or its successor approved by the         *
0010  *   membership of KDE e.V.), which shall act as a proxy defined in          *
0011  *   Section 6 of version 3 of the license.                                  *
0012  *                                                                           *
0013  *   This program is distributed in the hope that it will be useful,         *
0014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
0015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       *
0016  *   Lesser General Public License for more details.                         *
0017  *                                                                           *
0018  *   You should have received a copy of the GNU Lesser General Public        *
0019  *   License along with this library. If not,                                *
0020  *   see <http://www.gnu.org/licenses/>.                                     *
0021  *****************************************************************************/
0022 
0023 #ifndef __QTCURVE_H__
0024 #define __QTCURVE_H__
0025 
0026 #include <QElapsedTimer>
0027 #include <QPalette>
0028 #include <QMap>
0029 #include <QList>
0030 #include <QSet>
0031 #include <QCache>
0032 #include <QColor>
0033 #include <QFont>
0034 #include <QPainter>
0035 #include <QPainterPath>
0036 #include <QStyleOption>
0037 #include <QtGlobal>
0038 #include <QCommonStyle>
0039 #ifdef QTC_QT5_ENABLE_KDE
0040 #include <KConfigCore/KSharedConfig>
0041 #include <KConfigCore/KConfigGroup>
0042 #include <KStyle/KStyle>
0043 using ParentStyleClass = KStyle;
0044 #else
0045 using ParentStyleClass = QCommonStyle;
0046 #endif
0047 
0048 typedef qulonglong QtcKey;
0049 #include <common/common.h>
0050 
0051 class QStyleOptionSlider;
0052 class QLabel;
0053 class QMenuBar;
0054 class QScrollBar;
0055 class QDBusInterface;
0056 class QMainWindow;
0057 class QStatusBar;
0058 class QAbstractScrollArea;
0059 class QProgressBar;
0060 class QFormLayout;
0061 
0062 namespace QtCurve {
0063 class WindowManager;
0064 class BlurHelper;
0065 class ShortcutHandler;
0066 class ShadowHelper;
0067 class StylePlugin;
0068 
0069 class Style: public ParentStyleClass {
0070     Q_OBJECT
0071     Q_CLASSINFO("X-KDE-CustomElements", "true")
0072 public:
0073     enum BackgroundType {
0074         BGND_WINDOW,
0075         BGND_DIALOG,
0076         BGND_MENU
0077     };
0078 
0079     enum MenuItemType {
0080         MENU_POPUP,
0081         MENU_BAR,
0082         MENU_COMBO
0083     };
0084 
0085     enum CustomElements {
0086         CE_QtC_KCapacityBar = CE_CustomBase + 0x00FFFF00,
0087         CE_QtC_Preview,
0088         CE_QtC_SetOptions
0089     };
0090 
0091     enum PreviewType {
0092         PREVIEW_FALSE,
0093         PREVIEW_MDI,
0094         PREVIEW_WINDOW
0095     };
0096 
0097     class PreviewOption: public QStyleOption {
0098     public:
0099         Options opts;
0100     };
0101 
0102     class BgndOption: public QStyleOption {
0103     public:
0104         EAppearance app;
0105         QPainterPath path;
0106         QRect widgetRect;
0107     };
0108 
0109     enum Icon {
0110         ICN_MIN,
0111         ICN_MAX,
0112         ICN_MENU,
0113         ICN_RESTORE,
0114         ICN_CLOSE,
0115         ICN_UP,
0116         ICN_DOWN,
0117         ICN_RIGHT,
0118         ICN_SHADE,
0119         ICN_UNSHADE
0120     };
0121 
0122     explicit Style();
0123     virtual ~Style();
0124 
0125     void polish(QApplication *app) override;
0126     void polish(QPalette &palette) override;
0127     void polish(QWidget *widget) override;
0128     void unpolish(QApplication *app) override;
0129     void unpolish(QWidget *widget) override;
0130 
0131     bool eventFilter(QObject *object, QEvent *event) override;
0132     void timerEvent(QTimerEvent *event) override;
0133 
0134     int pixelMetric(PixelMetric metric, const QStyleOption *option=0,
0135                     const QWidget *widget=0) const override;
0136     int styleHint(StyleHint hint, const QStyleOption *option,
0137                   const QWidget *widget,
0138                   QStyleHintReturn *returnData=0) const override;
0139     QSize sizeFromContents(ContentsType type, const QStyleOption *option,
0140                            const QSize &size,
0141                            const QWidget *widget) const override;
0142     QPalette standardPalette() const override;
0143     QIcon standardIcon(StandardPixmap pix, const QStyleOption *option=0,
0144                        const QWidget *widget=0) const override;
0145     int layoutSpacing(QSizePolicy::ControlType control1,
0146                       QSizePolicy::ControlType control2,
0147                       Qt::Orientation orientation,
0148                       const QStyleOption *option=0,
0149                       const QWidget *widget=0) const override;
0150 
0151     void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
0152                        QPainter *painter,
0153                        const QWidget *widget) const override;
0154     void drawControl(ControlElement control, const QStyleOption *option,
0155                      QPainter *painter, const QWidget *widget) const override;
0156     void drawComplexControl(ComplexControl control,
0157                             const QStyleOptionComplex *option,
0158                             QPainter *painter,
0159                             const QWidget *widget) const override;
0160     void drawItemText(QPainter *painter, const QRect &rect, int flags,
0161                       const QPalette &pal, bool enabled, const QString &text,
0162                       QPalette::ColorRole=QPalette::NoRole) const override;
0163 
0164     QRect subElementRect(SubElement element, const QStyleOption *option,
0165                          const QWidget *widget) const override;
0166     QRect subControlRect(ComplexControl control,
0167                          const QStyleOptionComplex *option,
0168                          SubControl subControl,
0169                          const QWidget *widget) const override;
0170     SubControl hitTestComplexControl(ComplexControl control,
0171                                      const QStyleOptionComplex *option,
0172                                      const QPoint &pos,
0173                                      const QWidget *widget) const override;
0174 
0175     Options&
0176     options()
0177     {
0178         return opts;
0179     }
0180     void prePolish(QWidget *w) const;
0181     void
0182     prePolish(const QWidget *w) const
0183     {
0184         prePolish(const_cast<QWidget*>(w));
0185     }
0186 
0187 private:
0188     void init(bool initial);
0189     void connectDBus();
0190     void freeColor(QSet<QColor*> &freedColors, QColor **cols);
0191     void freeColors();
0192     void polishFormLayout(QFormLayout *layout);
0193     void polishLayout(QLayout *layout);
0194     void polishScrollArea(QAbstractScrollArea *scrollArea,
0195                           bool isKFilePlacesView=false) const;
0196 
0197     void drawItemTextWithRole(QPainter *painter, const QRect &rect, int flags,
0198                               const QPalette &pal, bool enabled,
0199                               const QString &text,
0200                               QPalette::ColorRole textRole) const;
0201     void drawSideBarButton(QPainter *painter, const QRect &r,
0202                            const QStyleOption *option,
0203                            const QWidget *widget) const;
0204     void drawHighlight(QPainter *p, const QRect &r, bool horiz, bool inc) const;
0205     void drawFadedLine(QPainter *p, const QRect &r, const QColor &col,
0206                        bool fadeStart, bool fadeEnd, bool horiz,
0207                        double fadeSizeStart=FADE_SIZE,
0208                        double fadeSizeEnd=FADE_SIZE) const;
0209     void drawLines(QPainter *p, const QRect &r, bool horiz, int nLines,
0210                    int offset, const QColor *cols, int startOffset,
0211                    int dark, ELine type) const;
0212     void drawProgressBevelGradient(QPainter *p, const QRect &origRect,
0213                                    const QStyleOption *option, bool horiz,
0214                                    EAppearance bevApp,
0215                                    const QColor *cols) const;
0216     void drawBevelGradient(const QColor &base, QPainter *p, QRect const &r,
0217                            const QPainterPath &path, bool horiz, bool sel,
0218                            EAppearance bevApp, EWidget w=WIDGET_OTHER,
0219                            bool useCache=true) const;
0220     void drawBevelGradientReal(const QColor &base, QPainter *p, const QRect &r,
0221                                const QPainterPath &path, bool horiz, bool sel,
0222                                EAppearance bevApp, EWidget w) const;
0223 
0224     void
0225     drawBevelGradient(const QColor &base, QPainter *p, QRect const &r,
0226                       bool horiz, bool sel, EAppearance bevApp,
0227                       EWidget w=WIDGET_OTHER, bool useCache=true) const
0228     {
0229         drawBevelGradient(base, p, r, QPainterPath(), horiz, sel, bevApp, w,
0230                           useCache);
0231     }
0232     void
0233     drawBevelGradientReal(const QColor &base, QPainter *p, const QRect &r,
0234                           bool horiz, bool sel,
0235                           EAppearance bevApp, EWidget w) const
0236     {
0237         drawBevelGradientReal(base, p, r, QPainterPath(), horiz,
0238                               sel, bevApp, w);
0239     }
0240 
0241     void drawSunkenBevel(QPainter *p, const QRect &r, const QColor &col) const;
0242     void drawLightBevel(QPainter *p, const QRect &r, const QStyleOption *option,
0243                         const QWidget *widget, int round, const QColor &fill,
0244                         const QColor *custom=0, bool doBorder=true,
0245                         EWidget w=WIDGET_OTHER) const;
0246     void drawLightBevelReal(QPainter *p, const QRect &r,
0247                             const QStyleOption *option, const QWidget *widget,
0248                             int round, const QColor &fill,
0249                             const QColor *custom, bool doBorder, EWidget w,
0250                             bool useCache, ERound realRound,
0251                             bool onToolbar) const;
0252     void drawGlow(QPainter *p, const QRect &r, EWidget w,
0253                   const QColor *cols=0L) const;
0254     void drawEtch(QPainter *p, const QRect &r, const QWidget *widget,
0255                   EWidget w, bool raised=false, int round=ROUNDED_ALL) const;
0256     void drawBgndRing(QPainter &painter, int x, int y, int size,
0257                       int size2, bool isWindow) const;
0258     QPixmap drawStripes(const QColor &color, int opacity) const;
0259     void drawBackground(QPainter *p, const QColor &bgnd, const QRect &r,
0260                         int opacity, BackgroundType type, EAppearance app,
0261                         const QPainterPath &path=QPainterPath()) const;
0262     void drawBackgroundImage(QPainter *p, bool isWindow, const QRect &r) const;
0263     void drawBackground(QPainter *p, const QWidget *widget,
0264                         BackgroundType type) const;
0265     QPainterPath buildPath(const QRectF &r, EWidget w,
0266                            int round, double radius) const;
0267     QPainterPath buildPath(const QRect &r, EWidget w,
0268                            int round, double radius) const;
0269     void buildSplitPath(const QRect &r, int round, double radius,
0270                         QPainterPath &tl, QPainterPath &br) const;
0271     void drawBorder(QPainter *p, const QRect &r, const QStyleOption *option,
0272                     int round, const QColor *custom=0, EWidget w=WIDGET_OTHER,
0273                     EBorder borderProfile=BORDER_FLAT, bool doBlend=true,
0274                     int borderVal=QTC_STD_BORDER) const;
0275     void drawMdiControl(QPainter *p, const QStyleOptionTitleBar *titleBar,
0276                         SubControl sc, const QWidget *widget,
0277                         ETitleBarButtons btn, const QColor &iconColor,
0278                         const QColor *btnCols, const QColor *bgndCols,
0279                         int adjust, bool activeWindow) const;
0280     void drawDwtControl(QPainter *p, const State &state,
0281                         const QRect &rect, ETitleBarButtons btn, Icon icon,
0282                         const QColor &iconColor, const QColor *btnCols,
0283                         const QColor *bgndCols) const;
0284     bool drawMdiButton(QPainter *painter, const QRect &r, bool hover,
0285                        bool sunken, const QColor *cols) const;
0286     void drawMdiIcon(QPainter *painter, const QColor &color, const QColor &bgnd,
0287                      const QRect &r, bool hover, bool sunken, Icon iclearcon,
0288                      bool stdSize, bool drewFrame) const;
0289     void drawIcon(QPainter *painter, const QColor &color, const QRect &r,
0290                   bool sunken, Icon icon, bool stdSize=true) const;
0291     void drawEntryField(QPainter *p, const QRect &rx, const QWidget *widget,
0292                         const QStyleOption *option, int round,
0293                         bool fill, bool doEtch, EWidget w=WIDGET_ENTRY) const;
0294     void drawMenuItem(QPainter *p, const QRect &r, const QStyleOption *option,
0295                       MenuItemType type, int round, const QColor *cols) const;
0296     void drawProgress(QPainter *p, const QRect &r, const QStyleOption *option,
0297                       bool vertical=false, bool reverse=false) const;
0298     void drawArrow(QPainter *p, const QRect &rx, PrimitiveElement pe,
0299                    QColor col, bool small=false, bool kwin=false) const;
0300     void drawSbSliderHandle(QPainter *p, const QRect &r,
0301                             const QStyleOption *option,
0302                             bool slider=false) const;
0303     void drawSliderHandle(QPainter *p, const QRect &r,
0304                           const QStyleOptionSlider *option) const;
0305     void drawSliderGroove(QPainter *p, const QRect &groove, const QRect &handle,
0306                           const QStyleOptionSlider *slider,
0307                           const QWidget *widget) const;
0308     void drawMenuOrToolBarBackground(const QWidget *widget, QPainter *p,
0309                                      const QRect &r, const QStyleOption *option,
0310                                      bool menu=true, bool horiz=true) const;
0311     void drawHandleMarkers(QPainter *p, const QRect &r,
0312                            const QStyleOption *option, bool tb,
0313                            ELine handles) const;
0314     void fillTab(QPainter *p, const QRect &r, const QStyleOption *option,
0315                  const QColor &fill, bool horiz, EWidget tab,
0316                  bool tabOnly) const;
0317     void colorTab(QPainter *p, const QRect &r, bool horiz,
0318                   EWidget tab, int round) const;
0319     void shadeColors(const QColor &base, QColor *vals) const;
0320     const QColor *buttonColors(const QStyleOption *option) const;
0321     QColor titlebarIconColor(const QStyleOption *option) const;
0322     const QColor *popupMenuCols(const QStyleOption *option=0L) const;
0323     const QColor *checkRadioColors(const QStyleOption *option) const;
0324     const QColor *sliderColors(const QStyleOption *option) const;
0325     const QColor *backgroundColors(const QColor &col) const;
0326     const QColor*
0327     backgroundColors(const QStyleOption *option) const
0328     {
0329         return (option ?
0330                 backgroundColors(option->palette.window().color()) :
0331                 m_backgroundCols);
0332     }
0333     const QColor *highlightColors(const QColor &col) const;
0334     const QColor*
0335     highlightColors(const QStyleOption *option, bool useActive) const
0336     {
0337         return highlightColors(
0338             option->palette.brush(useActive ? QPalette::Active :
0339                                   QPalette::Current,
0340                                   QPalette::Highlight).color());
0341     }
0342     const QColor *borderColors(const QStyleOption *option,
0343                                const QColor *use) const;
0344     const QColor *getSidebarButtons() const;
0345     void setMenuColors(const QColor &bgnd);
0346     void setMenuTextColors(QWidget *widget, bool isMenuBar) const;
0347     const QColor *menuColors(const QStyleOption *option, bool active) const;
0348     bool coloredMdiButtons(bool active, bool mouseOver) const;
0349     const QColor *getMdiColors(const QStyleOption *option, bool active) const;
0350     void readMdiPositions() const;
0351     const QColor &getFill(const QStyleOption *option, const QColor *use,
0352                           bool cr=false, bool darker=false) const;
0353     const QColor &getTabFill(bool current, bool highlight,
0354                              const QColor *use) const;
0355     QColor menuStripeCol() const;
0356     QPixmap *getPixmap(const QColor col, EPixmap p, double shade=1.0) const;
0357     const QColor &checkRadioCol(const QStyleOption *opt) const;
0358     QColor shade(const QColor &a, double k) const;
0359     void shade(const QColor &ca, QColor *cb, double k) const;
0360     QColor getLowerEtchCol(const QWidget *widget) const;
0361     int getFrameRound(const QWidget *widget) const;
0362 
0363 private slots:
0364     void disconnectDBus();
0365     void kdeGlobalSettingsChange(int type, int);
0366     void borderSizesChanged();
0367     void toggleMenuBar(unsigned int xid);
0368     void toggleStatusBar(unsigned int xid);
0369     void compositingToggled();
0370 
0371 private:
0372     void widgetDestroyed(QObject *o);
0373     void toggleMenuBar(QMainWindow *window);
0374     void toggleStatusBar(QMainWindow *window);
0375 
0376 #ifdef QTC_QT5_ENABLE_KDE
0377     // void setupKde4();
0378     void setDecorationColors();
0379     // void applyKdeSettings(bool pal);
0380 #endif
0381     bool isWindowDragWidget(QObject *o);
0382     void emitMenuSize(QWidget *w, unsigned short size, bool force=false);
0383     void emitStatusBarState(QStatusBar *sb);
0384     const QColor&
0385     MOArrow(State state, const QPalette &palette, bool mo,
0386             QPalette::ColorRole rol) const
0387     {
0388         if (!(state & State_Enabled)) {
0389             return palette.color(QPalette::Disabled, rol);
0390         } else if (opts.coloredMouseOver != MO_NONE && mo) {
0391             return m_mouseOverCols[ARROW_MO_SHADE];
0392         } else {
0393             return palette.color(rol);
0394         }
0395     }
0396     const QColor&
0397     MOArrow(State state, const QPalette &palette,
0398             QPalette::ColorRole rol) const
0399     {
0400         return MOArrow(state, palette, state & State_MouseOver, rol);
0401     }
0402 
0403     bool
0404     drawPrimitiveNone(PrimitiveElement, const QStyleOption*,
0405                       QPainter*, const QWidget*) const
0406     {
0407         return true;
0408     }
0409     bool drawPrimitivePanelMenu(PrimitiveElement element,
0410                                 const QStyleOption *option,
0411                                 QPainter *painter,
0412                                 const QWidget *widget) const;
0413     bool drawPrimitiveIndicatorTabClose(PrimitiveElement element,
0414                                         const QStyleOption *option,
0415                                         QPainter *painter,
0416                                         const QWidget *widget) const;
0417     bool drawPrimitiveWidget(PrimitiveElement element,
0418                              const QStyleOption *option,
0419                              QPainter *painter,
0420                              const QWidget *widget) const;
0421     bool drawPrimitivePanelScrollAreaCorner(PrimitiveElement element,
0422                                             const QStyleOption *option,
0423                                             QPainter *painter,
0424                                             const QWidget *widget) const;
0425     bool drawPrimitiveIndicatorBranch(PrimitiveElement element,
0426                                       const QStyleOption *option,
0427                                       QPainter *painter,
0428                                       const QWidget *widget) const;
0429     bool drawPrimitiveIndicatorViewItemCheck(PrimitiveElement element,
0430                                              const QStyleOption *option,
0431                                              QPainter *painter,
0432                                              const QWidget *widget) const;
0433     bool drawPrimitiveIndicatorHeaderArrow(PrimitiveElement element,
0434                                            const QStyleOption *option,
0435                                            QPainter *painter,
0436                                            const QWidget *widget) const;
0437     bool drawPrimitiveIndicatorArrow(PrimitiveElement element,
0438                                      const QStyleOption *option,
0439                                      QPainter *painter,
0440                                      const QWidget *widget) const;
0441     bool drawPrimitiveIndicatorSpin(PrimitiveElement element,
0442                                     const QStyleOption *option,
0443                                     QPainter *painter,
0444                                     const QWidget *widget) const;
0445     bool drawPrimitiveIndicatorToolBarSeparator(PrimitiveElement element,
0446                                                 const QStyleOption *option,
0447                                                 QPainter *painter,
0448                                                 const QWidget *widget) const;
0449     bool drawPrimitiveFrameGroupBox(PrimitiveElement element,
0450                                     const QStyleOption *option,
0451                                     QPainter *painter,
0452                                     const QWidget *widget) const;
0453     bool drawPrimitiveFrame(PrimitiveElement element,
0454                             const QStyleOption *option, QPainter *painter,
0455                             const QWidget *widget) const;
0456     bool drawPrimitivePanelMenuBar(PrimitiveElement element,
0457                                    const QStyleOption *option,
0458                                    QPainter *painter,
0459                                    const QWidget *widget) const;
0460     bool drawPrimitivePanelTipLabel(PrimitiveElement element,
0461                                     const QStyleOption *option,
0462                                     QPainter *painter,
0463                                     const QWidget *widget) const;
0464     bool drawPrimitiveQtcBackground(PrimitiveElement element,
0465                                     const QStyleOption *option,
0466                                     QPainter *painter,
0467                                     const QWidget *widget) const;
0468     bool drawPrimitivePanelItemViewItem(PrimitiveElement element,
0469                                         const QStyleOption *option,
0470                                         QPainter *painter,
0471                                         const QWidget *widget) const;
0472     bool drawPrimitiveFrameTabWidget(PrimitiveElement element,
0473                                      const QStyleOption *option,
0474                                      QPainter *painter,
0475                                      const QWidget *widget) const;
0476     bool drawPrimitiveFrameWindow(PrimitiveElement element,
0477                                   const QStyleOption *option,
0478                                   QPainter *painter,
0479                                   const QWidget *widget) const;
0480     bool drawPrimitiveButton(PrimitiveElement element,
0481                              const QStyleOption *option, QPainter *painter,
0482                              const QWidget *widget) const;
0483     bool drawPrimitiveFrameFocusRect(PrimitiveElement element,
0484                                      const QStyleOption *option,
0485                                      QPainter *painter,
0486                                      const QWidget *widget) const;
0487     bool drawPrimitiveIndicatorToolBarHandle(PrimitiveElement element,
0488                                              const QStyleOption *option,
0489                                              QPainter *painter,
0490                                              const QWidget *widget) const;
0491     bool drawPrimitiveIndicatorRadioButton(PrimitiveElement element,
0492                                            const QStyleOption *option,
0493                                            QPainter *painter,
0494                                            const QWidget *widget) const;
0495     bool drawPrimitiveIndicatorCheckBox(PrimitiveElement element,
0496                                         const QStyleOption *option,
0497                                         QPainter *painter,
0498                                         const QWidget *widget) const;
0499     bool drawPrimitiveFrameLineEdit(PrimitiveElement element,
0500                                     const QStyleOption *option,
0501                                     QPainter *painter,
0502                                     const QWidget *widget) const;
0503     bool drawPrimitivePanelLineEdit(PrimitiveElement element,
0504                                     const QStyleOption *option,
0505                                     QPainter *painter,
0506                                     const QWidget *widget) const;
0507     bool drawPrimitiveIndicatorDockWidgetResizeHandle(
0508         PrimitiveElement element, const QStyleOption *option,
0509         QPainter *painter, const QWidget *widget) const;
0510     bool drawPrimitiveButtonTool(PrimitiveElement element,
0511                                  const QStyleOption *option, QPainter *painter,
0512                                  const QWidget *widget) const;
0513     bool drawPrimitiveFrameDockWidget(PrimitiveElement element,
0514                                       const QStyleOption *option,
0515                                       QPainter *painter,
0516                                       const QWidget *widget) const;
0517     bool drawPrimitiveFrameStatusBarOrMenu(PrimitiveElement element,
0518                                            const QStyleOption *option,
0519                                            QPainter *painter,
0520                                            const QWidget *widget) const;
0521     bool drawPrimitiveFrameTabBarBase(PrimitiveElement element,
0522                                       const QStyleOption *option,
0523                                       QPainter *painter,
0524                                       const QWidget *widget) const;
0525     void initFontTickData(const QFont &font, const QWidget *widget=0) const;
0526 
0527 private:
0528     class DBusHelper;
0529     DBusHelper *m_dBusHelper;
0530     class FontHelper;
0531     FontHelper *m_fntHelper;
0532 
0533     mutable Options opts;
0534     QColor m_highlightCols[TOTAL_SHADES + 1],
0535         m_backgroundCols[TOTAL_SHADES + 1],
0536         m_menubarCols[TOTAL_SHADES + 1],
0537         m_focusCols[TOTAL_SHADES + 1],
0538         m_mouseOverCols[TOTAL_SHADES + 1],
0539         *m_popupMenuCols,
0540         *m_sliderCols,
0541         *m_defBtnCols,
0542         *m_comboBtnCols,
0543         *m_checkRadioSelCols,
0544         *m_sortedLvColors,
0545         *m_ooMenuCols,
0546         *m_progressCols,
0547         m_buttonCols[TOTAL_SHADES + 1],
0548         m_checkRadioCol;
0549     bool m_saveMenuBarStatus,
0550         m_saveStatusBarStatus,
0551         m_usePixmapCache,
0552         m_inactiveChangeSelectionColor;
0553     PreviewType m_isPreview;
0554     mutable QColor *m_sidebarButtonsCols;
0555     mutable QColor *m_activeMdiColors;
0556     mutable QColor *m_mdiColors;
0557     mutable QColor m_activeMdiTextColor;
0558     mutable QColor m_mdiTextColor;
0559     mutable QColor m_coloredButtonCols[TOTAL_SHADES + 1];
0560     mutable QColor m_coloredBackgroundCols[TOTAL_SHADES + 1];
0561     mutable QColor m_coloredHighlightCols[TOTAL_SHADES + 1];
0562     mutable QCache<QtcKey, QPixmap> m_pixmapCache;
0563     mutable bool m_active;
0564     mutable const QWidget *m_sbWidget;
0565     mutable QLabel *m_clickedLabel;
0566     QSet<QProgressBar*> m_progressBars;
0567     mutable int m_progressBarAnimateTimer,
0568         m_progressBarAnimateFps,
0569         m_animateStep;
0570     mutable QElapsedTimer m_timer;
0571     mutable QMap<int, QColor*> m_titleBarButtonsCols;
0572     mutable QList<int> m_mdiButtons[2]; // 0=left, 1=right
0573     mutable int m_titlebarHeight;
0574 
0575     ShadowHelper *m_shadowHelper;
0576     mutable QScrollBar *m_sViewSBar;
0577     mutable QMap<QWidget*, QSet<QWidget*> > m_sViewContainers;
0578     WindowManager *m_windowManager;
0579     BlurHelper *m_blurHelper;
0580     ShortcutHandler *m_shortcutHandler;
0581 #ifdef QTC_QT5_ENABLE_KDE
0582     KSharedConfigPtr m_configFile;
0583     KSharedConfigPtr m_kdeGlobals;
0584 #endif
0585 protected:
0586     StylePlugin *m_plugin;
0587     friend class StylePlugin;
0588 };
0589 }
0590 
0591 #endif