1 /* 2 KmPlot - a math. function plotter for the KDE-Desktop 3 4 SPDX-FileCopyrightText: 2005 Fredrik Edemar <f_edemar@linux.se> 5 SPDX-FileCopyrightText: 2007 David Saxton <david@bluehaze.org> 6 7 This file is part of the KDE Project. 8 KmPlot is part of the KDE-EDU Project. 9 10 SPDX-License-Identifier: GPL-2.0-or-later 11 12 */ 13 14 #ifndef KSLIDERWINDOW_H 15 #define KSLIDERWINDOW_H 16 17 #include <QDialog> 18 #include <QGroupBox> 19 20 class SliderWidget; 21 class QCloseEvent; 22 23 /** @short Slider window for changing a parameter value */ 24 class KSliderWindow : public QDialog 25 { 26 Q_OBJECT 27 public: 28 explicit KSliderWindow( QWidget* parent ); 29 virtual ~KSliderWindow(); 30 31 double value( int slider ); 32 33 Q_SIGNALS: 34 /// emitted when the window has been closed 35 void windowClosed(); 36 /// emitted when a slider value changes 37 void valueChanged(); 38 39 protected: 40 void closeEvent( QCloseEvent * ) Q_DECL_OVERRIDE; 41 42 SliderWidget * m_sliders[4]; 43 }; 44 45 46 #include "ui_sliderwidget.h" 47 48 class SliderWidget : public QGroupBox, public Ui::SliderWidget 49 { 50 Q_OBJECT 51 public: 52 SliderWidget( QWidget *parent, int number ); 53 ~SliderWidget(); 54 55 double value(); 56 57 Q_SIGNALS: 58 void valueChanged(); 59 60 protected Q_SLOTS: 61 void updateValue(); 62 63 protected: 64 int m_number; 65 }; 66 67 #endif 68