comparison widgets/ItemLayerList.cpp @ 99:ca1f73f027f5

fix the play checkBox bug
author benoitrigolleau
date Wed, 11 Jul 2007 12:18:15 +0000
parents 0387f53242b2
children 894b45c9b787
comparison
equal deleted inserted replaced
98:c5387d9e572a 99:ca1f73f027f5
123 ItemLayerList::configAction(); 123 ItemLayerList::configAction();
124 } 124 }
125 125
126 void ItemLayerList::showLayer(bool value){ 126 void ItemLayerList::showLayer(bool value){
127 changeCheckBoxShowState(value); 127 changeCheckBoxShowState(value);
128
129 } 128 }
129
130 void ItemLayerList::playAudibleChanged(bool value){
131 changeCheckBoxPlayState(value);
132 }
133
130 134
131 void ItemLayerList::updateCheckboxs(){ 135 void ItemLayerList::updateCheckboxs(){
132 Layer *layer = dynamic_cast<Layer *>(m_container); 136 Layer *layer = dynamic_cast<Layer *>(m_container);
133 if (layer) { 137 if (layer) {
134 m_checkBoxShow->setEnabled(true); 138 m_checkBoxShow->setEnabled(true);
151 155
152 if(params){ 156 if(params){
153 m_checkBoxPlay->setEnabled(true); 157 m_checkBoxPlay->setEnabled(true);
154 m_checkBoxPlay->setChecked(!params->isPlayMuted()); 158 m_checkBoxPlay->setChecked(!params->isPlayMuted());
155 159
156 connect(params, SIGNAL(playAudibleChanged(bool)),m_checkBoxPlay, SLOT(setState(bool))); 160 connect(params, SIGNAL(playAudibleChanged(bool)),this, SLOT(playAudibleChanged(bool)));
157 connect(m_checkBoxPlay, SIGNAL(stateChanged(int)),params, SLOT(setPlayAudible(int))); 161 connect(m_checkBoxPlay, SIGNAL(stateChanged(int)),params, SLOT(setPlayAudible(int)));
158 }else{ 162 }else{
159 m_checkBoxPlay->setEnabled(false); 163 m_checkBoxPlay->setEnabled(false);
160 } 164 }
161 } 165 }