Example #1
0
 def slot_add(__):
     dialog = NewLayerDialog()
     if dialog.exec_() == qt.QDialog.Accepted:
         size = dialog.size.text().toInt()[0]
         w = dialog.tile_w.text().toInt()[0]
         h = dialog.tile_h.text().toInt()[0]
         if not size or not w or not h:
             return
         __.central.newGraphicLayer((w, h), size)
Example #2
0
	def slot_add(__):
		dialog = NewLayerDialog()
		if dialog.exec_() == qt.QDialog.Accepted:
			size = dialog.size.text().toInt()[0]
			w = dialog.tile_w.text().toInt()[0]
			h = dialog.tile_h.text().toInt()[0]
			if not size or not w or not h:
				return
			__.central.newGraphicLayer((w, h), size)
Example #3
0
	def slot_resize(__):
		layer = __.central.tab.currentWidget()
		if layer == None:
			return
		dialog = NewLayerDialog(layer.mapLength(), (layer.tileWidth(), layer.tileHeight()), True)
		if dialog.exec_() == qt.QDialog.Accepted:
			size = dialog.size.text().toInt()[0]
			if not size:
				return
			__.central.resizeGraphicLayer(size)
Example #4
0
 def slot_resize(__):
     layer = __.central.tab.currentWidget()
     if layer == None:
         return
     dialog = NewLayerDialog(layer.mapLength(),
                             (layer.tileWidth(), layer.tileHeight()), True)
     if dialog.exec_() == qt.QDialog.Accepted:
         size = dialog.size.text().toInt()[0]
         if not size:
             return
         __.central.resizeGraphicLayer(size)