changeset 57:4f3e6a09239a

(none)
author benoitrigolleau
date Wed, 23 May 2007 15:11:52 +0000
parents 81921835ddf1
children b3c3a5fa185f
files widgets/ItemLayerList.cpp widgets/ItemLayerList.h widgets/PropertyBox.cpp widgets/PropertyBox.h
diffstat 4 files changed, 42 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
+	
+}
 
 
 
 
 
 
+
--- 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);
 
 };
 
--- 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;
+}
--- 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<QString, QLayout *> m_groupLayouts;
     std::map<QString, QWidget *> m_propertyControllers;
+
+public :
+	LEDButton* showButton();
+	LEDButton* playButton();
 };
 
 #endif