~ubuntu-branches/ubuntu/wily/oxygen/wily

« back to all changes in this revision

Viewing changes to kdecoration/oxygendecohelper.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell, Scarlett Clark, Jonathan Riddell
  • Date: 2015-08-10 23:18:51 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20150810231851-wtw33zvkigya4f7t
Tags: 4:5.3.95-0ubuntu1
[ Scarlett Clark ]
* Vivid backport. 

[ Jonathan Riddell ]
* new upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "oxygenhelper.h"
27
27
#include <ksharedconfig.h>
28
28
 
29
 
//! helper class
 
29
//* helper class
30
30
/*! contains utility functions used at multiple places in oxygen style */
31
31
namespace Oxygen
32
32
{
35
35
    {
36
36
 
37
37
        public:
38
 
        static DecoHelper* self();
39
38
 
40
 
        //! constructor
 
39
        //* constructor
41
40
        explicit DecoHelper();
42
41
 
43
 
        //! destructor
 
42
        //* destructor
44
43
        virtual ~DecoHelper()
45
44
        {}
46
45
 
47
 
        //! reset all caches
 
46
        //* reset all caches
48
47
        virtual void invalidateCaches();
49
48
 
50
 
        //!@name decoration specific helper functions
51
 
        //!
52
 
        //@{
 
49
        //* windeco buttons
53
50
        virtual QPixmap windecoButton(const QColor &color, const QColor& glow, bool sunken, int size = 21);
54
 
        //@}
55
 
 
56
 
        //
57
 
        virtual QRegion decoRoundedMask( const QRect&, int left = 1, int right = 1, int top = 1, int bottom = 1 ) const;
58
 
 
59
 
        //! title bar text color
60
 
        const QColor& inactiveTitleBarTextColor( const QPalette& );
61
 
 
62
 
        //! button text color
63
 
        const QColor& inactiveButtonTextColor( const QPalette& );
64
 
 
65
 
        protected:
66
 
 
67
 
        //! reduce contrast between two colors
68
 
        QColor reduceContrast(const QColor&, const QColor&, double) const;
69
51
 
70
52
        private:
71
53
 
72
 
        //! windeco buttons
 
54
        //* windeco buttons
73
55
        Cache<QPixmap> _windecoButtonCache;
74
56
 
75
 
        //! titleBar text color cache
76
 
        ColorCache _titleBarTextColorCache;
77
 
 
78
 
        //! button text color cache
79
 
        ColorCache _buttonTextColorCache;
80
 
 
81
57
    };
82
58
 
83
59
}