Skip to content
Snippets Groups Projects
Commit 006d70a5 authored by Emmanuel Oceguera Conchas's avatar Emmanuel Oceguera Conchas
Browse files

has been updated

parent a0ade85b
Branches
No related tags found
No related merge requests found
...@@ -81,7 +81,10 @@ class maskAndFuntionality (BASE, WIDGET): ...@@ -81,7 +81,10 @@ class maskAndFuntionality (BASE, WIDGET):
self.btn_inputFile.clicked.connect(self.importData) self.btn_inputFile.clicked.connect(self.importData)
self.btn_remove.clicked.connect(self.removePath) self.btn_remove.clicked.connect(self.removePath)
self.btn_load.clicked.connect(self.loadNetCDF) self.btn_load.clicked.connect(self.loadNetCDF)
self.btn_remove_sel.clicked.connect(self.removeSelection)
"""Here is the place for set stzlesheet"""
#self.btn_plot.setStyleSheet("backgrou")
def closePlugin(self): def closePlugin(self):
"""This function closes the plugin""" """This function closes the plugin"""
...@@ -104,7 +107,10 @@ class maskAndFuntionality (BASE, WIDGET): ...@@ -104,7 +107,10 @@ class maskAndFuntionality (BASE, WIDGET):
#we remove the information from the listWidget #we remove the information from the listWidget
#self.column_data.clear() #self.column_data.clear()
def removeSelection(self):
"""this function remove the selection in the tree widget"""
#remove the selection in the tree widget
self.tree_data.clearSelection()
...@@ -126,7 +132,9 @@ class maskAndFuntionality (BASE, WIDGET): ...@@ -126,7 +132,9 @@ class maskAndFuntionality (BASE, WIDGET):
top_level = QTreeWidgetItem([ncFileName, ncFileTitle]) top_level = QTreeWidgetItem([ncFileName, ncFileTitle])
#we get the variables of the netCDf file #we get the variables of the netCDf file
ncFileVariablesName = list(ncFile.variables.keys()) ncFileVariablesName = list(ncFile.variables.keys())
#we get the groups of the file
ncFileGroupsName = list(ncFile.groups.keys())
#we set the top of the tree that it is the name od the file #we set the top of the tree that it is the name od the file
self.tree_data.addTopLevelItem(top_level) self.tree_data.addTopLevelItem(top_level)
...@@ -135,6 +143,9 @@ class maskAndFuntionality (BASE, WIDGET): ...@@ -135,6 +143,9 @@ class maskAndFuntionality (BASE, WIDGET):
child = QTreeWidgetItem([ncFileVariablesName[i]]) child = QTreeWidgetItem([ncFileVariablesName[i]])
top_level.addChild(child) top_level.addChild(child)
for i in range(len(ncFileGroupsName)):
child = QTreeWidgetItem([ncFileGroupsName[i]])
top_level.addChild(child)
# #we set the dimensions in the ListWidget # #we set the dimensions in the ListWidget
# self.column_data.addItems(ncFileDimensions) # self.column_data.addItems(ncFileDimensions)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment