File indexing completed on 2024-05-05 17:40:44
0001 #ifndef oxygenshadowconfiguration_h 0002 #define oxygenshadowconfiguration_h 0003 /* 0004 * this file is part of the oxygen gtk engine 0005 * SPDX-FileCopyrightText: 2010 Hugo Pereira Da Costa <hugo.pereira@free.fr> 0006 * 0007 * inspired notably from kdelibs/kdeui/color/kcolorutils.h 0008 * SPDX-FileCopyrightText: 2007 Matthew Woehlke <mw_triad@users.sourceforge.net> 0009 * SPDX-FileCopyrightText: 2007 Thomas Zander <zander@kde.org> 0010 * SPDX-FileCopyrightText: 2007 Zack Rusin <zack@kde.org> 0011 * 0012 * SPDX-License-Identifier: LGPL-2.0-or-later 0013 */ 0014 0015 #include "oxygenoptionmap.h" 0016 #include "oxygenpalette.h" 0017 0018 namespace Oxygen 0019 { 0020 //! shadow configuration (not including colors since they reside in _palette) 0021 class ShadowConfiguration 0022 { 0023 public: 0024 0025 //! default constructor 0026 ShadowConfiguration( Palette::Group ); 0027 0028 //! destructor 0029 virtual ~ShadowConfiguration() 0030 {} 0031 0032 Palette::Group colorGroup() const 0033 { return _colorGroup; } 0034 0035 //! enability 0036 bool isEnabled() const 0037 { return _enabled; } 0038 0039 //! shadow size 0040 double shadowSize() const 0041 { return _shadowSize; } 0042 0043 //! horizontal offset 0044 double horizontalOffset() const 0045 { return _horizontalOffset; } 0046 0047 //! vertical offset 0048 double verticalOffset() const 0049 { return _verticalOffset; } 0050 0051 //! inner color 0052 ColorUtils::Rgba innerColor() const 0053 { return _innerColor; } 0054 0055 //! outer color 0056 ColorUtils::Rgba outerColor() const 0057 { return _outerColor; } 0058 0059 //! initialize from options 0060 void initialize( const OptionMap& ); 0061 0062 private: 0063 0064 //! color group 0065 Palette::Group _colorGroup; 0066 0067 //! enability 0068 bool _enabled; 0069 0070 //! shadow size 0071 double _shadowSize; 0072 0073 //! horizontal offset 0074 double _horizontalOffset; 0075 0076 //! vertical offset 0077 double _verticalOffset; 0078 0079 //! inner color 0080 ColorUtils::Rgba _innerColor; 0081 0082 //! outer color 0083 ColorUtils::Rgba _outerColor; 0084 0085 //! use outer color 0086 bool _useOuterColor; 0087 0088 //! streamer (for debugging) 0089 friend std::ostream& operator << (std::ostream&, const ShadowConfiguration& ); 0090 0091 }; 0092 } 0093 0094 #endif