diff options
author | TCH <[email protected]> | 2020-05-03 00:39:34 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-05-03 00:39:34 +0900 |
commit | f77e5f19e61db1c7f4a96852440c8912cc8dfb2f (patch) | |
tree | e9c34b6b4cb1b1977485a9616f77051cfe4ee30d /style/qtcurve.h | |
parent | 82fe64d550d8754266109084f82dd56cc8a04f49 (diff) | |
download | tde-style-qtcurve-f77e5f19e61db1c7f4a96852440c8912cc8dfb2f.tar.gz tde-style-qtcurve-f77e5f19e61db1c7f4a96852440c8912cc8dfb2f.zip |
Updated to QtCurve version 1.8.5
Based on the original LGPL 2.1 QtCurve code from Craig Drummond <[email protected]> available at https://github.com/KDE/qtcurve
Signed-off-by: TCH <[email protected]>
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'style/qtcurve.h')
-rw-r--r-- | style/qtcurve.h | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/style/qtcurve.h b/style/qtcurve.h index 5bd78ca..453076a 100644 --- a/style/qtcurve.h +++ b/style/qtcurve.h @@ -78,10 +78,11 @@ class TQSlider; #define BASE_STYLE TDEStyle #endif +class ShortcutHandler; + class QtCurveStyle : public BASE_STYLE { Q_OBJECT - public: @@ -139,19 +140,20 @@ class QtCurveStyle : public BASE_STYLE virtual ~QtCurveStyle(); void applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); + void applicationUnPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); void polish(TQPalette &pal); TQColorGroup setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis=false); void polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); void drawLightBevel(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round, const TQColor &fill, const TQColor *custom=NULL, - bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER) const - { drawLightBevel(cg.background(), p, r, cg, flags, round, fill, custom, doBorder, doCorners, w); } + bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER, const TQWidget *widget=0L) const + { drawLightBevel(cg.background(), p, r, cg, flags, round, fill, custom, doBorder, doCorners, w, widget); } void drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round, const TQColor &fill, const TQColor *custom=NULL, - bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER) const; + bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER, const QWidget *widget=0L) const; void drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, EWidget w, const TQColor *cols=0) const; - void drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised=false, bool square=false) const; + void drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised=false, bool square=false, EWidget w=WIDGET_OTHER) const; void drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round, const TQColor *custom=NULL, EWidget w=WIDGET_OTHER, bool doCorners=true, EBorder borderProfile=BORDER_FLAT, bool blendBorderColors=true, int borderVal=STD_BORDER) const; @@ -195,9 +197,9 @@ class QtCurveStyle : public BASE_STYLE bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const; void drawProgress(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round, const TQWidget *widget) const; - void drawBevelGradient(const TQColor &base, TQPainter *p, TQRect const &r, + void drawBevelGradient(const TQColor &base, const TQColor &bgnd, TQPainter *p, TQRect const &r, bool horiz, bool sel, EAppearance bevApp, EWidget w=WIDGET_OTHER) const; - void drawBevelGradientReal(const TQColor &base, TQPainter *p, TQRect const &r, + void drawBevelGradientReal(const TQColor &base, const TQColor &bgnd, TQPainter *p, TQRect const &r, bool horiz, bool sel, EAppearance bevApp, EWidget w=WIDGET_OTHER) const; void drawGradient(const TQColor &top, const TQColor &bot, TQPainter *p, const TQRect &r, bool horiz=true) const; void drawSbSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, bool slider=false) const; @@ -215,7 +217,7 @@ class QtCurveStyle : public BASE_STYLE return tqGray(col.rgb()) < 100 ? TQColor(255, 255, 255) : TQColor(0, 0, 0); } - void shadeColors(const TQColor &base, TQColor *vals) const; + void shadeColors(const TQColor &base, TQColor *vals) const; const TQColor * buttonColors(const TQColorGroup &cg) const; const TQColor * popupMenuCols(const TQColorGroup &cg) const; const TQColor & popupMenuCol(const TQColorGroup &cg, int shade=ORIGINAL_SHADE) const; @@ -226,31 +228,31 @@ class QtCurveStyle : public BASE_STYLE { return backgroundColors(cg.background()); } const TQColor * borderColors(SFlags flags, const TQColor *use) const; const TQColor * getSidebarButtons() const; - void setMenuColors(const TQColorGroup &cg); - void setMenuTextColors(TQWidget *widget, bool isMenuBar) const; + void setMenuColors(const TQColorGroup &cg); + void setMenuTextColors(TQWidget *widget, bool isMenuBar) const; const TQColor * menuColors(const TQColorGroup &cg, bool active) const; - void setDecorationColors(bool init=false); + void setDecorationColors(bool init=false); const TQColor * getMdiColors(const TQColorGroup &cg, bool active) const; #ifdef SET_MDI_WINDOW_BUTTON_POSITIONS void readMdiPositions() const; #endif - bool redrawHoverWidget(const TQPoint &pos); + bool redrawHoverWidget(const TQPoint &pos); const TQColor & getFill(SFlags flags, const TQColor *use, bool cr=false, bool darker=false) const; const TQColor & getListViewFill(SFlags flags, const TQColor *use) const; const TQColor & getTabFill(bool current, bool highlight, const TQColor *use) const; const TQColor & menuStripeCol(const TQColorGroup &cg) const; const TQColor & checkRadioCol(SFlags flags, const TQColorGroup &cg) const; TQColor shade(const TQColor &a, float k) const; - void shade(const color &ca, color *cb, double k) const; - void drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const; + void shade(const color &ca, color *cb, double k) const; + void drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const; TQPixmap * getPixelPixmap(const TQColor col) const; TQPixmap * getPixmap(const TQColor col, EPixmap pix, double shade=1.0) const; TQPixmap * createStripePixmap(const TQColor &col, bool forWindow) const; - void setSbType(); - bool isFormWidget(const TQWidget *w) const { return itsKhtmlWidgets.contains(w); } - void resetHover(); - bool isWindowDragWidget(TQObject *o, const TQPoint &pos=TQPoint()); - void adjustScrollbarRects(bool &itsFormMode, bool &horiz, bool &useThreeButtonScrollBar, TQRect &subline, TQRect &addline, TQRect &subpage, TQRect &addpage, TQRect &slider, TQRect &first, TQRect &last, TQRect &subline2, TQRect &sbRect, Options& opts, const TQWidget* widget) const; + void setSbType(); + bool isFormWidget(const TQWidget *w) const { return itsKhtmlWidgets.contains(w); } + void resetHover(); + bool isWindowDragWidget(TQObject *o, const TQPoint &pos=TQPoint()); + void adjustScrollbarRects(bool &itsFormMode, bool &horiz, bool &useThreeButtonScrollBar, TQRect &subline, TQRect &addline, TQRect &subpage, TQRect &addpage, TQRect &slider, TQRect &first, TQRect &last, TQRect &subline2, TQRect &sbRect, Options& opts, const TQWidget* widget) const; private slots: @@ -263,10 +265,11 @@ class QtCurveStyle : public BASE_STYLE private: mutable Options opts; - TQColor itsHighlightCols[TOTAL_SHADES+1], + TQColor itsHighlightCols[TOTAL_SHADES+1], itsBackgroundCols[TOTAL_SHADES+1], itsMenubarCols[TOTAL_SHADES+1], itsFocusCols[TOTAL_SHADES+1], + *itsPopupMenuCols, *itsSliderCols, *itsDefBtnCols, *itsMouseOverCols, @@ -275,7 +278,6 @@ class QtCurveStyle : public BASE_STYLE *itsSortedLvColors, *itsProgressCols, itsButtonCols[TOTAL_SHADES+1], - itsLighterPopupMenuBgndCol, itsCheckRadioCol; mutable TQColor *itsSidebarButtonsCols; mutable TQColor *itsActiveMdiColors; @@ -304,6 +306,7 @@ class QtCurveStyle : public BASE_STYLE mutable TQValueList<int> itsMdiButtons[2]; // 0=left, 1=right TQWidget *itsDragWidget; bool itsDragWidgetHadMouseTracking; + ShortcutHandler *itsShortcutHandler; }; #endif |