Esempio n. 1
0
	def initTabElement(self,locapp,internalnum,resourcePath):
		self.internalnum = internalnum;
		
		# create ui widgets for this custom tab element and collect
		# them into a buffer
		self.widgets = Rundata_TabWidgets()
		self.widgets.init(resourcePath)
		# set title to the new tab widget
		
		# set slots and signals
		QtCore.QObject.connect(self.widgets.t1GMmaptype, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGMMaptype1)
		QtCore.QObject.connect(self.widgets.t1GMmaptype_2, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGMMaptype2)
		QtCore.QObject.connect(self.widgets.t1GMmaptype_3, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGMMaptype3)
		QtCore.QObject.connect(self.widgets.t1GMmaptype_4, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGMMaptype4)
		QtCore.QObject.connect(self.widgets.t1GM2maptype, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGM2Maptype1)
		QtCore.QObject.connect(self.widgets.t1GM2maptype_2, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGM2Maptype2)
		QtCore.QObject.connect(self.widgets.t1GM2maptype_3, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGM2Maptype3)
		QtCore.QObject.connect(self.widgets.t1GM2maptype_4, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGM2Maptype4)
		# store the tab widget

		# create an application data buffer for this tab element
		rundata = Rundata_Locomotif()
		rundata.setupRundata()	
		# and init the rundata
		rundata.setDataFont( configData.getDataFont() )
		mapWidth = configData.getMapWidth()
		rundata.setMapWidth( mapWidth )
		mapHeight = configData.getMapHeight()
		rundata.setMapHeight( mapHeight )
		mapWidth = configData.getGoogleMapWidth()
		rundata.setGoogleMapWidth( mapWidth )
		mapHeight = configData.getGoogleMapHeight()
		rundata.setGoogleMapHeight( mapHeight )
		self.rundata = rundata
Esempio n. 2
0
class UiCustomTab(object):
	"""
	This class creates a tab element and all fields included in it
	Supplies a rundata element for a users dataset
	"""

	def initTabElement(self,locapp,internalnum,resourcePath):
		self.internalnum = internalnum;
		
		# create ui widgets for this custom tab element and collect
		# them into a buffer
		self.widgets = Rundata_TabWidgets()
		self.widgets.init(resourcePath)
		# set title to the new tab widget
		
		# set slots and signals
		QtCore.QObject.connect(self.widgets.t1GMmaptype, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGMMaptype1)
		QtCore.QObject.connect(self.widgets.t1GMmaptype_2, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGMMaptype2)
		QtCore.QObject.connect(self.widgets.t1GMmaptype_3, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGMMaptype3)
		QtCore.QObject.connect(self.widgets.t1GMmaptype_4, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGMMaptype4)
		QtCore.QObject.connect(self.widgets.t1GM2maptype, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGM2Maptype1)
		QtCore.QObject.connect(self.widgets.t1GM2maptype_2, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGM2Maptype2)
		QtCore.QObject.connect(self.widgets.t1GM2maptype_3, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGM2Maptype3)
		QtCore.QObject.connect(self.widgets.t1GM2maptype_4, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), locapp.doSelectGM2Maptype4)
		# store the tab widget

		# create an application data buffer for this tab element
		rundata = Rundata_Locomotif()
		rundata.setupRundata()	
		# and init the rundata
		rundata.setDataFont( configData.getDataFont() )
		mapWidth = configData.getMapWidth()
		rundata.setMapWidth( mapWidth )
		mapHeight = configData.getMapHeight()
		rundata.setMapHeight( mapHeight )
		mapWidth = configData.getGoogleMapWidth()
		rundata.setGoogleMapWidth( mapWidth )
		mapHeight = configData.getGoogleMapHeight()
		rundata.setGoogleMapHeight( mapHeight )
		self.rundata = rundata
		
	def debugTabElement(self):
		print "self.internalnum = " + str(self.internalnum)
		print "self.widgets = " + str(self.widgets)
		print "self.rundata = " + str(self.rundata)
		self.rundata.debugRundata( "rundata"+str(self.internalnum) )

	def setInternalnum(self, internalnum):
		self.internalnum = internalnum
		
	def getInternalnum(self):
		return self.internalnum
		
	def getRundataBuffer(self):
		return self.rundata

	def getWidgetBuffer(self):
		return self.widgets
		
	# access the UI elements of this tab 
	def getTabElementWidget(self):
		return self.widgets.getTab()

	def gett1LoadedDataFilename(self):
		return self.widgets.t1LoadedDataFilename
		
	def gett1LoadedDatasets(self):
		return self.widgets.t1LoadedDatasets
	
	def gett1DataFrame(self):
		return self.widgets.t1DataFrame

	def gett1DataFrameView(self):
		return self.widgets.t1DataFrameView