summaryrefslogtreecommitdiff
path: root/qt-recordmydesktop/src/rmdSelectThumb.py
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-08-09 23:11:43 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-08-09 23:11:43 +0000
commitc364387c6657769e29ade8fe16038a1c9b6fa1e0 (patch)
tree57e4a0e606ec4c32c70d41b185fe5e399801063d /qt-recordmydesktop/src/rmdSelectThumb.py
parentb5244639d1b3e38b1c56e03e7f65b8da44970233 (diff)
rmdConfig.py.in, rmdFrame.py, rmdPrefsWidget.py,
rmdSelectThumb.py, rmdSimple.py, rmdStrings.py, rmdTrayIcon.py : Added follow mouse option in the Preferences Widget and all relevant functionality ( save/load , defaults, string/tooltip). Also added moveFrame method so that the frame can follow the mouse. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@406 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'qt-recordmydesktop/src/rmdSelectThumb.py')
-rw-r--r--qt-recordmydesktop/src/rmdSelectThumb.py34
1 files changed, 18 insertions, 16 deletions
diff --git a/qt-recordmydesktop/src/rmdSelectThumb.py b/qt-recordmydesktop/src/rmdSelectThumb.py
index 3da48ec..045a1c8 100644
--- a/qt-recordmydesktop/src/rmdSelectThumb.py
+++ b/qt-recordmydesktop/src/rmdSelectThumb.py
@@ -68,8 +68,9 @@ class QtThumbSelector(QtGui.QLabel):
def update(self):
QtGui.QLabel.update(self)
if self.realFrame!=None:
- if (self.area_return[0]!=self.realFrame.x or
- self.area_return[1]!=self.realFrame.y or
+ if (((self.area_return[0]!=self.realFrame.x or
+ self.area_return[1]!=self.realFrame.y) and
+ self.caller.values[15]==1) or
self.area_return[2]-self.area_return[0]!=self.realFrame.w or
self.area_return[3]-self.area_return[1]!=self.realFrame.h or
self.caller.values[25]):
@@ -93,19 +94,19 @@ class QtThumbSelector(QtGui.QLabel):
painter = QtGui.QPainter(self)
painter.drawPixmap(0,0,self.wwidth/self.factor,self.wheight/self.factor,self.pix)
-
- if self.x1 >= 0:
- x = min(self.x1, self.x2)
- y = min(self.y1, self.y2)
- w = max(self.x1, self.x2) - x
- h = max(self.y1, self.y2) - y
- painter.fillRect(x,y,w,h,QtGui.QBrush(QtCore.Qt.red,QtCore.Qt.CrossPattern))
- elif self.area_return[0]>=0 or self.area_return[1]>=0 or self.area_return[2]>=0 or self.area_return[3]>=0:
- x = max(0, self.area_return[0])/self.factor
- y = max(0, self.area_return[1])/self.factor
- w = min(self.wwidth, self.area_return[2])/self.factor - x
- h = min(self.wheight, self.area_return[3])/self.factor - y
- painter.fillRect(x,y,w,h,QtGui.QBrush(QtCore.Qt.red,QtCore.Qt.CrossPattern))
+ if self.selecting==1 or self.caller.values[15]==1:
+ if self.x1 >= 0:
+ x = min(self.x1, self.x2)
+ y = min(self.y1, self.y2)
+ w = max(self.x1, self.x2) - x
+ h = max(self.y1, self.y2) - y
+ painter.fillRect(x,y,w,h,QtGui.QBrush(QtCore.Qt.red,QtCore.Qt.CrossPattern))
+ elif self.area_return[0]>=0 or self.area_return[1]>=0 or self.area_return[2]>=0 or self.area_return[3]>=0:
+ x = max(0, self.area_return[0])/self.factor
+ y = max(0, self.area_return[1])/self.factor
+ w = min(self.wwidth, self.area_return[2])/self.factor - x
+ h = min(self.wheight, self.area_return[3])/self.factor - y
+ painter.fillRect(x,y,w,h,QtGui.QBrush(QtCore.Qt.red,QtCore.Qt.CrossPattern))
def mouseMoveEvent(self, event):
if self.x1 >= 0:
rect = QtCore.QRect()
@@ -145,7 +146,8 @@ class QtThumbSelector(QtGui.QLabel):
self.realFrame=rmdFrame(self.area_return[0],
self.area_return[1],
self.area_return[2]-self.area_return[0],
- self.area_return[3]-self.area_return[1])
+ self.area_return[3]-self.area_return[1],
+ self.caller)
def closeEvent(self,event):
self.realFrame.destroy()
QtGui.QLabel.close(self)
© All Rights Reserved