File indexing completed on 2024-05-05 05:49:58
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 Q_SLOTS: 0058 void outerBorderChanged(); 0059 void innerBorderChanged(); 0060 void shadowsChanged(); 0061 void activeShadowColorTypeChanged(); 0062 void inactiveShadowColorTypeChanged(); 0063 void sizeChanged(); 0064 0065 private: 0066 void setShadows(); 0067 void setWidgets(const KWin::QtCurveConfig &cfg); 0068 void setWidgetStates(); 0069 0070 bool m_ok; 0071 KWin::ShadowConfig m_activeShadows; 0072 KWin::ShadowConfig m_inactiveShadows; 0073 }; 0074 0075 inline bool 0076 KWinConfig::ok() 0077 { 0078 return m_ok; 0079 } 0080 0081 } 0082 0083 #endif // KNIFTYCONFIG_H