Mercurial > hg > svgui
comparison widgets/PropertyBox.cpp @ 1187:306c24eeab10 levelpanwidget
Moving around some UI bits
author | Chris Cannam |
---|---|
date | Thu, 15 Dec 2016 10:36:41 +0000 |
parents | 6a6a63506e3f |
children | 7609580fb05a |
comparison
equal
deleted
inserted
replaced
1186:8665e0ffa0d8 | 1187:306c24eeab10 |
---|---|
156 layout->setMargin(layout->margin() / 2); | 156 layout->setMargin(layout->margin() / 2); |
157 | 157 |
158 #ifdef DEBUG_PROPERTY_BOX | 158 #ifdef DEBUG_PROPERTY_BOX |
159 SVDEBUG << "PropertyBox::populateViewPlayFrame: container " << m_container << " (name " << m_container->getPropertyContainerName() << ") params " << params << endl; | 159 SVDEBUG << "PropertyBox::populateViewPlayFrame: container " << m_container << " (name " << m_container->getPropertyContainerName() << ") params " << params << endl; |
160 #endif | 160 #endif |
161 | |
162 if (layer) { | |
163 QLabel *showLabel = new QLabel(tr("Show")); | |
164 layout->addWidget(showLabel); | |
165 layout->setAlignment(showLabel, Qt::AlignVCenter); | |
166 | |
167 m_showButton = new LEDButton(Qt::blue); | |
168 layout->addWidget(m_showButton); | |
169 connect(m_showButton, SIGNAL(stateChanged(bool)), | |
170 this, SIGNAL(showLayer(bool))); | |
171 connect(m_showButton, SIGNAL(mouseEntered()), | |
172 this, SLOT(mouseEnteredWidget())); | |
173 connect(m_showButton, SIGNAL(mouseLeft()), | |
174 this, SLOT(mouseLeftWidget())); | |
175 layout->setAlignment(m_showButton, Qt::AlignVCenter); | |
176 } | |
177 | 161 |
178 if (params) { | 162 if (params) { |
179 | 163 |
180 layout->insertStretch(-1, 10); | 164 m_playButton = new NotifyingPushButton; |
181 | 165 m_playButton->setCheckable(true); |
182 if (params->getPlayClipId() != "") { | 166 m_playButton->setIcon(IconLoader().load("speaker")); |
183 NotifyingPushButton *playParamButton = new NotifyingPushButton; | 167 m_playButton->setChecked(!params->isPlayMuted()); |
184 playParamButton->setObjectName("playParamButton"); | 168 layout->addWidget(m_playButton); |
185 playParamButton->setIcon(IconLoader().load("faders")); | 169 connect(m_playButton, SIGNAL(toggled(bool)), |
186 playParamButton->setFixedWidth(WidgetScale::scalePixelSize(24)); | 170 this, SLOT(playAudibleButtonChanged(bool))); |
187 playParamButton->setFixedHeight(WidgetScale::scalePixelSize(24)); | 171 connect(m_playButton, SIGNAL(mouseEntered()), |
188 layout->addWidget(playParamButton); | 172 this, SLOT(mouseEnteredWidget())); |
189 connect(playParamButton, SIGNAL(clicked()), | 173 connect(m_playButton, SIGNAL(mouseLeft()), |
190 this, SLOT(editPlayParameters())); | 174 this, SLOT(mouseLeftWidget())); |
191 connect(playParamButton, SIGNAL(mouseEntered()), | 175 connect(params, SIGNAL(playAudibleChanged(bool)), |
192 this, SLOT(mouseEnteredWidget())); | 176 this, SLOT(playAudibleChanged(bool))); |
193 connect(playParamButton, SIGNAL(mouseLeft()), | 177 layout->setAlignment(m_playButton, Qt::AlignVCenter); |
194 this, SLOT(mouseLeftWidget())); | |
195 } | |
196 | 178 |
197 LevelPanToolButton *levelPan = new LevelPanToolButton; | 179 LevelPanToolButton *levelPan = new LevelPanToolButton; |
198 layout->addWidget(levelPan); | 180 layout->addWidget(levelPan); |
199 connect(levelPan, SIGNAL(levelChanged(float)), | 181 connect(levelPan, SIGNAL(levelChanged(float)), |
200 this, SLOT(playGainControlChanged(float))); | 182 this, SLOT(playGainControlChanged(float))); |
207 connect(levelPan, SIGNAL(mouseEntered()), | 189 connect(levelPan, SIGNAL(mouseEntered()), |
208 this, SLOT(mouseEnteredWidget())); | 190 this, SLOT(mouseEnteredWidget())); |
209 connect(levelPan, SIGNAL(mouseLeft()), | 191 connect(levelPan, SIGNAL(mouseLeft()), |
210 this, SLOT(mouseLeftWidget())); | 192 this, SLOT(mouseLeftWidget())); |
211 | 193 |
212 m_playButton = new NotifyingPushButton; | 194 if (params->getPlayClipId() != "") { |
213 m_playButton->setCheckable(true); | 195 NotifyingPushButton *playParamButton = new NotifyingPushButton; |
214 m_playButton->setIcon(IconLoader().load("speaker")); | 196 playParamButton->setObjectName("playParamButton"); |
215 m_playButton->setChecked(!params->isPlayMuted()); | 197 playParamButton->setIcon(IconLoader().load("faders")); |
216 layout->addWidget(m_playButton); | 198 playParamButton->setFixedWidth(WidgetScale::scalePixelSize(24)); |
217 connect(m_playButton, SIGNAL(toggled(bool)), | 199 playParamButton->setFixedHeight(WidgetScale::scalePixelSize(24)); |
218 this, SLOT(playAudibleButtonChanged(bool))); | 200 layout->addWidget(playParamButton); |
219 connect(m_playButton, SIGNAL(mouseEntered()), | 201 connect(playParamButton, SIGNAL(clicked()), |
202 this, SLOT(editPlayParameters())); | |
203 connect(playParamButton, SIGNAL(mouseEntered()), | |
204 this, SLOT(mouseEnteredWidget())); | |
205 connect(playParamButton, SIGNAL(mouseLeft()), | |
206 this, SLOT(mouseLeftWidget())); | |
207 } | |
208 } | |
209 | |
210 layout->insertStretch(-1, 10); | |
211 | |
212 if (layer) { | |
213 | |
214 QLabel *showLabel = new QLabel(tr("Show")); | |
215 layout->addWidget(showLabel); | |
216 layout->setAlignment(showLabel, Qt::AlignVCenter); | |
217 | |
218 m_showButton = new LEDButton(Qt::blue); | |
219 layout->addWidget(m_showButton); | |
220 connect(m_showButton, SIGNAL(stateChanged(bool)), | |
221 this, SIGNAL(showLayer(bool))); | |
222 connect(m_showButton, SIGNAL(mouseEntered()), | |
220 this, SLOT(mouseEnteredWidget())); | 223 this, SLOT(mouseEnteredWidget())); |
221 connect(m_playButton, SIGNAL(mouseLeft()), | 224 connect(m_showButton, SIGNAL(mouseLeft()), |
222 this, SLOT(mouseLeftWidget())); | 225 this, SLOT(mouseLeftWidget())); |
223 connect(params, SIGNAL(playAudibleChanged(bool)), | 226 layout->setAlignment(m_showButton, Qt::AlignVCenter); |
224 this, SLOT(playAudibleChanged(bool))); | |
225 layout->setAlignment(m_playButton, Qt::AlignVCenter); | |
226 | |
227 } else { | |
228 | |
229 layout->insertStretch(-1, 10); | |
230 } | 227 } |
231 } | 228 } |
232 | 229 |
233 void | 230 void |
234 PropertyBox::updatePropertyEditor(PropertyContainer::PropertyName name, | 231 PropertyBox::updatePropertyEditor(PropertyContainer::PropertyName name, |