src/widgets.h

changeset 494
bd005c78a089
parent 493
16766ac1bbd9
child 498
791c831c8020
equal deleted inserted replaced
493:16766ac1bbd9 494:bd005c78a089
38 // ============================================================================= 38 // =============================================================================
39 class RadioGroup : public QGroupBox 39 class RadioGroup : public QGroupBox
40 { Q_OBJECT 40 { Q_OBJECT
41 41
42 public: 42 public:
43 typedef List<QRadioButton*>::it it; 43 typedef List<QRadioButton*>::Iterator Iterator;
44 44
45 explicit RadioGroup() 45 explicit RadioGroup()
46 { init (Qt::Vertical); 46 { init (Qt::Vertical);
47 } 47 }
48 48
52 52
53 explicit RadioGroup (const QString& title, QWidget* parent = null); 53 explicit RadioGroup (const QString& title, QWidget* parent = null);
54 explicit RadioGroup (const QString& title, initlist<char const*> entries, int const defaultId, 54 explicit RadioGroup (const QString& title, initlist<char const*> entries, int const defaultId,
55 const Qt::Orientation orient = Qt::Vertical, QWidget* parent = null); 55 const Qt::Orientation orient = Qt::Vertical, QWidget* parent = null);
56 56
57 void addButton (const char* entry); 57 void addButton (const char* entry);
58 void addButton (QRadioButton* button); 58 void addButton (QRadioButton* button);
59 it begin (); 59 Iterator begin();
60 it end (); 60 Iterator end();
61 void init (Qt::Orientation orient); 61 void init (Qt::Orientation orient);
62 bool isChecked (int n) const; 62 bool isChecked (int n) const;
63 void rowBreak (); 63 void rowBreak();
64 void setCurrentRow (uint row); 64 void setCurrentRow (uint row);
65 void setValue (int val); 65 void setValue (int val);
66 int value () const; 66 int value() const;
67 67
68 QRadioButton* operator[] (uint n) const; 68 QRadioButton* operator[] (uint n) const;
69 RadioGroup& operator<< (QRadioButton* button); 69 RadioGroup& operator<< (QRadioButton* button);
70 RadioGroup& operator<< (const char* entry); 70 RadioGroup& operator<< (const char* entry);
71 71
72 signals: 72 signals:
73 void buttonPressed (int btn); 73 void buttonPressed (int btn);
74 void buttonReleased (int btn); 74 void buttonReleased (int btn);
75 void valueChanged (int val); 75 void valueChanged (int val);

mercurial