Commits

Jack Krieger  committed a571364

pre-relese
cleaning code

  • Participants
  • Parent commits 7f7df29
  • Branches nightly
  • Tags 0.1

Comments (0)

Files changed (2)

 		self.endpoint = QtCore.QPoint(event.x(), event.y())
 
 	def mousePressEvent(self, event):
+		""" sets start point of selection and starts repaint timer """
 		self.timer.start(10)
 		self.startpoint = event.pos()
 
 	def mouseReleaseEvent(self, event):
-		"""  """
+		""" sets end point of selection and stops repaint timer """
 		# сброс области съемки при щелчке мышкой
 		if event.pos() == self.startpoint:
 			self.startpoint = self.defaultstart
 		self.repaint()
 
 	def keyPressEvent(self, event):
+		""" shoting on RETURN key or exiting on ESC key """
 		if event.key() == QtCore.Qt.Key_Return:
 			self.fill(0, 0, 0, 0)
 			self.repaint()
 		width = max(self.startpoint.x(), self.endpoint.x()) - x
 		height = max(self.startpoint.y(), self.endpoint.y()) -y
 
-#		print x, y, width, height
-
 		screenpath = self.settings.option('SETTINGS', 'folder')
 
 		if not os.access(screenpath, os.W_OK):
 				self.close()
 
 		screenname = os.path.join(screenpath, 'screenshot.png')
-
-#		print unicode.encode(screenname, 'utf-8')
-
 		QtGui.QPixmap.grabWindow(self.app.desktop().winId(), x, y, width, height).save(screenname, 'png')
-
 		self.close()
 
 

File settings.ini

-[SETTINGS]
-folder = d:\��������