# HG changeset patch # User benoitrigolleau # Date 1179933112 0 # Node ID 4f3e6a09239a45500cf33eb809378368ca920b6e # Parent 81921835ddf13ee922678fe51502eba2e720c007 diff -r 81921835ddf1 -r 4f3e6a09239a widgets/ItemLayerList.cpp --- a/widgets/ItemLayerList.cpp Wed May 23 13:09:19 2007 +0000 +++ b/widgets/ItemLayerList.cpp Wed May 23 15:11:52 2007 +0000 @@ -93,6 +93,18 @@ void ItemLayerList::setPropertyBox(PropertyBox *box){ m_propertyBox = box; + if(m_propertyBox!=0){ + connect(checkBox1,SIGNAL(stateChanged(int)),m_propertyBox,SLOT(layerVisibilityChanged(int))); + connect(m_propertyBox, SIGNAL(showLayer(bool)), this, SLOT(showLayer(bool))); + if(m_propertyBox->showButton() == 0){ + checkBox1->setEnabled(false); + } + if(m_propertyBox->playButton() ==0 ){ + checkBox2->setEnabled(false); + } + } + + //connect(); } void ItemLayerList::configAction(){ @@ -108,9 +120,14 @@ ItemLayerList::configAction(); } +void ItemLayerList::showLayer(bool value){ + changeCheckBox1State(value); + +} + diff -r 81921835ddf1 -r 4f3e6a09239a widgets/ItemLayerList.h --- a/widgets/ItemLayerList.h Wed May 23 13:09:19 2007 +0000 +++ b/widgets/ItemLayerList.h Wed May 23 15:11:52 2007 +0000 @@ -47,6 +47,7 @@ private slots : void openPropertyBox(); + void showLayer(bool value); }; diff -r 81921835ddf1 -r 4f3e6a09239a widgets/PropertyBox.cpp --- a/widgets/PropertyBox.cpp Wed May 23 13:09:19 2007 +0000 +++ b/widgets/PropertyBox.cpp Wed May 23 15:11:52 2007 +0000 @@ -644,6 +644,19 @@ if (m_showButton) m_showButton->setState(visible); } +void PropertyBox::layerVisibilityChanged(int value){ + if (m_showButton){ + if(value==Qt::Checked){ + m_showButton->setState(true); + emit(showLayer(true)); + }else if(value == Qt::Unchecked){ + m_showButton->setState(false); + emit(showLayer(false)); + } + + } +} + void PropertyBox::mouseEnteredWidget() { @@ -699,3 +712,9 @@ } +LEDButton* PropertyBox::showButton(){ + return m_showButton; +} +LEDButton* PropertyBox::playButton(){ + return m_playButton; +} diff -r 81921835ddf1 -r 4f3e6a09239a widgets/PropertyBox.h --- a/widgets/PropertyBox.h Wed May 23 13:09:19 2007 +0000 +++ b/widgets/PropertyBox.h Wed May 23 15:11:52 2007 +0000 @@ -51,6 +51,7 @@ void propertyContainerPropertyRangeChanged(PropertyContainer *); void pluginConfigurationChanged(QString); void layerVisibilityChanged(bool); + void layerVisibilityChanged(int); protected slots: void propertyControllerChanged(int); @@ -84,6 +85,10 @@ LEDButton *m_playButton; std::map m_groupLayouts; std::map m_propertyControllers; + +public : + LEDButton* showButton(); + LEDButton* playButton(); }; #endif