src/widgets.cpp

changeset 251
c4b96bc41298
parent 202
a027f6fc6141
child 252
3f9067022d74
equal deleted inserted replaced
250:6e80f038e8df 251:c4b96bc41298
125 125
126 if (m_oldId != newid) 126 if (m_oldId != newid)
127 emit valueChanged (newid); 127 emit valueChanged (newid);
128 } 128 }
129 129
130 RadioBox::iter RadioBox::begin() { 130 RadioBox::it RadioBox::begin() {
131 return m_objects.begin (); 131 return m_objects.begin ();
132 } 132 }
133 133
134 RadioBox::iter RadioBox::end() { 134 RadioBox::it RadioBox::end() {
135 return m_objects.end (); 135 return m_objects.end ();
136 } 136 }
137 137
138 CheckBoxGroup::CheckBoxGroup (const char* label, Qt::Orientation orient, QWidget* parent) : QGroupBox (parent) { 138 CheckBoxGroup::CheckBoxGroup (const char* label, Qt::Orientation orient, QWidget* parent) : QGroupBox (parent) {
139 m_layout = new QBoxLayout (makeDirection (orient)); 139 m_layout = new QBoxLayout (makeDirection (orient));
152 m_layout->addWidget (box); 152 m_layout->addWidget (box);
153 153
154 connect (box, SIGNAL (stateChanged (int)), this, SLOT (buttonChanged ())); 154 connect (box, SIGNAL (stateChanged (int)), this, SLOT (buttonChanged ()));
155 } 155 }
156 156
157 std::vector<int> CheckBoxGroup::checkedValues () const { 157 vector<int> CheckBoxGroup::checkedValues () const {
158 std::vector<int> vals; 158 vector<int> vals;
159 159
160 for (const auto& kv : m_vals) 160 for (const auto& kv : m_vals)
161 if (kv.second->isChecked ()) 161 if (kv.second->isChecked ())
162 vals.push_back (kv.first); 162 vals.push_back (kv.first);
163 163

mercurial