1 //
2 // C++ Interface: smradiobutton
3 //
4 // Description: a clone of SMCheckBox
5 //
6 //
7 // Author: Pierre Marchand <pierremarc@oep-h.com>, (C) 2009
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12 
13 #ifndef SMRADIOBUTTON_H
14 #define SMRADIOBUTTON_H
15 
16 #include <QRadioButton>
17 
18 class SMRadioButton : public QRadioButton
19 {
20 	Q_OBJECT
21 
22 	public:
23 		SMRadioButton(QWidget *parent);
~SMRadioButton()24 		~SMRadioButton() {}
25 
26 		void setChecked(bool val);
27 		void setChecked(bool val, bool isParentVal);
28 
29 		void setParentValue(bool);
30 		bool useParentValue();
31 
32 	private:
33 		bool m_hasParent = false;
34 		bool m_useParentValue = false;
35 		bool m_pValue = false;
36 
37 		void setFont(bool wantBold);
38 };
39 
40 
41 #endif //SMRADIOBUTTON_H
42 
43