File indexing completed on 2024-04-28 05:47:17
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 /* 0024 based on the window decoration "Plastik": 0025 Copyright (C) 2003-2005 Sandro Giessl <sandro@giessl.com> 0026 0027 based on the window decoration "Web": 0028 Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org> 0029 */ 0030 0031 #ifndef QTCURVE_KWIN_CONFIG_WIDGET_H 0032 #define QTCURVE_KWIN_CONFIG_WIDGET_H 0033 0034 #include "ui_qtcurvekwinconfigwidget.h" 0035 #include "../kwin/qtcurveshadowconfiguration.h" 0036 #include "../kwin/qtcurveconfig.h" 0037 0038 class KConfig; 0039 0040 namespace QtCurve { 0041 0042 class KWinConfig: public QWidget, public Ui::QtCurveKWinConfigWidget { 0043 Q_OBJECT 0044 public: 0045 KWinConfig(KConfig *config, QWidget *parent); 0046 ~KWinConfig(); 0047 0048 void setNote(const QString &txt); 0049 void load(KConfig *config); 0050 void save(KConfig *config); 0051 bool ok(); 0052 void defaults(); 0053 0054 Q_SIGNALS: 0055 void changed(); 0056 0057 private: 0058 void activeShadowColorTypeChanged(); 0059 void inactiveShadowColorTypeChanged(); 0060 void innerBorderChanged(); 0061 void outerBorderChanged(); 0062 void setShadows(); 0063 void setWidgets(const KWin::QtCurveConfig &cfg); 0064 void setWidgetStates(); 0065 void shadowsChanged(); 0066 void sizeChanged(); 0067 0068 bool m_ok; 0069 KWin::ShadowConfig m_activeShadows; 0070 KWin::ShadowConfig m_inactiveShadows; 0071 }; 0072 0073 inline bool 0074 KWinConfig::ok() 0075 { 0076 return m_ok; 0077 } 0078 0079 } 0080 0081 #endif