Warning, file /graphics/tikzkit/src/ui/propertybrowser/OpacityEditor.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the TikZKit project. 0002 * 0003 * Copyright (C) 2014 Dominik Haumann <dhaumann@kde.org> 0004 * 0005 * This library is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU Library General Public License as published 0007 * by the Free Software Foundation, either version 2 of the License, or 0008 * (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 * GNU Library General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Library General Public License 0016 * along with this library; see the file COPYING.LIB. If not, see 0017 * <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 #ifndef TIKZ_UI_OPACITY_EDITOR_H 0021 #define TIKZ_UI_OPACITY_EDITOR_H 0022 0023 #include <QWidget> 0024 0025 namespace tikz { 0026 namespace ui { 0027 0028 class OpacityEditorPrivate; 0029 0030 class OpacityEditor : public QWidget 0031 { 0032 Q_OBJECT 0033 public: 0034 OpacityEditor(QWidget * parent = nullptr); 0035 ~OpacityEditor(); 0036 0037 public Q_SLOTS: 0038 /** 0039 * Sets the opacity of this editor to @p opacity. 0040 */ 0041 void setValue(qreal opacity); 0042 0043 /** 0044 * Changes the editor to @p readOnly mode. 0045 */ 0046 void setReadOnly(bool readOnly); 0047 0048 public: 0049 /** 0050 * Get the current value. 0051 */ 0052 qreal value() const; 0053 0054 Q_SIGNALS: 0055 /** 0056 * This signal is emitted whenever the opacity changed. 0057 */ 0058 void valueChanged(qreal opacity); 0059 0060 protected Q_SLOTS: 0061 /** 0062 * This slot forwards @p value through the signal valueChanged(const tikz::Value &). 0063 */ 0064 void slotSliderChanged(int opacity); 0065 void slotSpinBoxChanged(int opacity); 0066 0067 private: 0068 OpacityEditorPrivate * const d; 0069 }; 0070 0071 } 0072 } 0073 0074 #endif // TIKZ_UI_OPACITY_EDITOR_H 0075 0076 // kate: indent-width 4; replace-tabs on;