File indexing completed on 2024-04-28 16:49:27
0001 /* 0002 * Copyright 2019 Michail Vourlakos <mvourlakos@gmail.com> 0003 * 0004 * This file is part of Latte-Dock 0005 * 0006 * Latte-Dock is free software; you can redistribute it and/or 0007 * modify it under the terms of the GNU General Public License as 0008 * published by the Free Software Foundation; either version 2 of 0009 * the License, or (at your option) any later version. 0010 * 0011 * Latte-Dock is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 * GNU General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU General Public License 0017 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 #include "indicatorinfo.h" 0021 0022 // Qt 0023 #include <QDebug> 0024 0025 // Plasma 0026 #include <Plasma/Svg> 0027 0028 namespace Latte { 0029 namespace ViewPart { 0030 namespace IndicatorPart { 0031 0032 Info::Info(QObject *parent) : 0033 QObject(parent) 0034 { 0035 } 0036 0037 Info::~Info() 0038 { 0039 } 0040 0041 bool Info::needsIconColors() const 0042 { 0043 return m_needsIconColors; 0044 } 0045 0046 void Info::setNeedsIconColors(bool needs) 0047 { 0048 if (m_needsIconColors == needs) { 0049 return; 0050 } 0051 0052 m_needsIconColors = needs; 0053 emit needsIconColorsChanged(); 0054 } 0055 0056 bool Info::needsMouseEventCoordinates() const 0057 { 0058 return m_needsMouseEventCoordinates; 0059 } 0060 0061 void Info::setNeedsMouseEventCoordinates(bool needs) 0062 { 0063 if (m_needsMouseEventCoordinates == needs) { 0064 return; 0065 } 0066 0067 m_needsMouseEventCoordinates = needs; 0068 emit needsMouseEventCoordinatesChanged(); 0069 } 0070 0071 bool Info::providesClickedAnimation() const 0072 { 0073 return m_providesClickedAnimation; 0074 } 0075 0076 void Info::setProvidesClickedAnimation(bool provides) 0077 { 0078 if (m_providesClickedAnimation == provides) { 0079 return; 0080 } 0081 0082 m_providesClickedAnimation = provides; 0083 emit providesClickedAnimationChanged(); 0084 } 0085 0086 bool Info::providesHoveredAnimation() const 0087 { 0088 return m_providesHoveredAnimation; 0089 } 0090 0091 void Info::setProvidesHoveredAnimation(bool provides) 0092 { 0093 if (m_providesHoveredAnimation == provides) { 0094 return; 0095 } 0096 0097 m_providesHoveredAnimation = provides; 0098 emit providesHoveredAnimationChanged(); 0099 } 0100 0101 bool Info::providesFrontLayer() const 0102 { 0103 return m_providesFrontLayer; 0104 } 0105 0106 void Info::setProvidesFrontLayer(bool front) 0107 { 0108 if (m_providesFrontLayer == front) { 0109 return; 0110 } 0111 0112 m_providesFrontLayer = front; 0113 emit providesFrontLayerChanged(); 0114 } 0115 0116 int Info::extraMaskThickness() const 0117 { 0118 return m_extraMaskThickness; 0119 } 0120 0121 void Info::setExtraMaskThickness(int thick) 0122 { 0123 if (m_extraMaskThickness == thick) { 0124 return; 0125 } 0126 0127 m_extraMaskThickness = thick; 0128 emit extraMaskThicknessChanged(); 0129 } 0130 0131 float Info::minLengthPadding() const 0132 { 0133 return m_minLengthPadding; 0134 } 0135 0136 void Info::setMinLengthPadding(float padding) 0137 { 0138 if (m_minLengthPadding == padding) { 0139 return; 0140 } 0141 0142 m_minLengthPadding = padding; 0143 emit minLengthPaddingChanged(); 0144 } 0145 0146 float Info::minThicknessPadding() const 0147 { 0148 return m_minThicknessPadding; 0149 } 0150 0151 void Info::setMinThicknessPadding(float padding) 0152 { 0153 if (m_minThicknessPadding == padding) { 0154 return; 0155 } 0156 0157 m_minThicknessPadding = padding; 0158 emit minThicknessPaddingChanged(); 0159 } 0160 0161 } 0162 } 0163 }