1 /***************************************************************************
2                           rkpluginspinbox  -  description
3                              -------------------
4     begin                : Wed Aug 11 2004
5     copyright            : (C) 2004, 2006, 2012, 2014 by Thomas Friedrichsmeier
6     email                : thomas.friedrichsmeier@kdemail.net
7  ***************************************************************************/
8 
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17 #ifndef RKPLUGINSPINBOX_H
18 #define RKPLUGINSPINBOX_H
19 
20 #include "rkcomponent.h"
21 
22 #include "rkcomponentproperties.h"
23 
24 class RKSpinBox;
25 class QDomElement;
26 class QLabel;
27 
28 /** RKComponent for numeric input represented as a spinbox
29 TODO: rename file and class to RKComponentSpinBox
30 @author Thomas Friedrichsmeier
31 */
32 class RKPluginSpinBox : public RKComponent {
33 	Q_OBJECT
34 public:
35 	RKPluginSpinBox (const QDomElement &element, RKComponent *parent_component, QWidget *parent_widget);
36 
37 	~RKPluginSpinBox ();
38 	QVariant value (const QString &modifier=QString ()) override;
39 	QStringList getUiLabelPair () const override;
type()40 	int type () override { return ComponentSpinBox; };
41 
42 	RKComponentPropertyInt *intvalue;
43 	RKComponentPropertyDouble *realvalue;
44 public slots:
45 	void valueChangedFromUi ();
46 	void valueChanged (RKComponentPropertyBase *property);
47 private:
48 	RKSpinBox *spinbox;
49 	QLabel *label;
50 	bool intmode;
51 	bool updating;
52 };
53 
54 #endif
55