usage of DATASTRUCTURE modified
This commit is contained in:
parent
b07f1b5b78
commit
903e87e1e1
@ -44,6 +44,7 @@ from pylot.core.util import (FilterOptionsDialog,
|
|||||||
MPLWidget,
|
MPLWidget,
|
||||||
PropertiesDlg,
|
PropertiesDlg,
|
||||||
HelpForm)
|
HelpForm)
|
||||||
|
from pylot.core.util.structure import DATASTRUCTURE
|
||||||
|
|
||||||
|
|
||||||
# Version information
|
# Version information
|
||||||
@ -64,7 +65,8 @@ class MainWindow(QMainWindow):
|
|||||||
settings.setValue("user/Login", os.getlogin())
|
settings.setValue("user/Login", os.getlogin())
|
||||||
settings.sync()
|
settings.sync()
|
||||||
self.recentEvents = settings.value("data/recentEvents", [])
|
self.recentEvents = settings.value("data/recentEvents", [])
|
||||||
self.dataStructure = settings.value("data/structure", None)
|
self.dataStructure = DATASTRUCTURE[
|
||||||
|
settings.value("data/Structure", None)]()
|
||||||
self.setWindowTitle("PyLoT - do seismic processing the python way")
|
self.setWindowTitle("PyLoT - do seismic processing the python way")
|
||||||
self.setWindowIcon(QIcon(":/icon.ico"))
|
self.setWindowIcon(QIcon(":/icon.ico"))
|
||||||
self.seismicPhase = str(settings.value("phase", "P"))
|
self.seismicPhase = str(settings.value("phase", "P"))
|
||||||
|
@ -8,4 +8,5 @@ Created on Wed Jan 26 17:47:25 2015
|
|||||||
|
|
||||||
from pylot.core.read import SeiscompDataStructure, PilotDataStructure
|
from pylot.core.read import SeiscompDataStructure, PilotDataStructure
|
||||||
|
|
||||||
DATASTRUCTURE = {'PILOT':PilotDataStructure, 'SeisComP':SeiscompDataStructure}
|
DATASTRUCTURE = {'PILOT':PilotDataStructure, 'SeisComP':SeiscompDataStructure,
|
||||||
|
None:None}
|
||||||
|
@ -162,15 +162,15 @@ class InputsTab(PropTab):
|
|||||||
|
|
||||||
from pylot.core.util.structure import DATASTRUCTURE
|
from pylot.core.util.structure import DATASTRUCTURE
|
||||||
|
|
||||||
datastruct = DATASTRUCTURE.keys()
|
self.structureSelect.addItems(DATASTRUCTURE.keys())
|
||||||
self.structureSelect.addItems(datastruct)
|
|
||||||
self.updateWidget(DATASTRUCTURE)
|
|
||||||
|
|
||||||
layout = QGridLayout()
|
layout = QGridLayout()
|
||||||
layout.addWidget(dataDirLabel, 0, 0)
|
layout.addWidget(dataDirLabel, 0, 0)
|
||||||
layout.addWidget(self.dataDirEdit, 0, 1)
|
layout.addWidget(self.dataDirEdit, 0, 1)
|
||||||
layout.addWidget(fullNameLabel, 1, 0)
|
layout.addWidget(fullNameLabel, 1, 0)
|
||||||
layout.addWidget(self.fullNameEdit, 1, 1)
|
layout.addWidget(self.fullNameEdit, 1, 1)
|
||||||
|
layout.addWidget(structureLabel, 2, 0)
|
||||||
|
layout.addWidget(self.structureSelect, 2, 1)
|
||||||
|
|
||||||
self.setLayout(layout)
|
self.setLayout(layout)
|
||||||
|
|
||||||
@ -178,15 +178,9 @@ class InputsTab(PropTab):
|
|||||||
values = {}
|
values = {}
|
||||||
values["data/dataRoot"] = self.dataDirEdit.text()
|
values["data/dataRoot"] = self.dataDirEdit.text()
|
||||||
values["user/FullName"] = self.fullNameEdit.text()
|
values["user/FullName"] = self.fullNameEdit.text()
|
||||||
|
values["data/Structure"] = self.structureSelect.currentText()
|
||||||
return values
|
return values
|
||||||
|
|
||||||
def updateWidget(self, structure):
|
|
||||||
key = self.structureSelect.currentText()
|
|
||||||
structure = structure[key]
|
|
||||||
structure().getFields().keys()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class OutputsTab(PropTab):
|
class OutputsTab(PropTab):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user