示例#1
0
 def eventFilter(self, obj, event):
     if event.type() == QtCore.QEvent.MouseButtonPress:
         self.close()
         return True
     elif isinstance(event, QtGui.QHoverEvent):
         if self.bgcolor != obj.bgcolor:
             self.bgcolor = obj.bgcolor
             windowsoptions['frameqss'] = makeFrameQss(obj.bgcolor)
             views['MainWindow'].setskin()
         return False
     else:
         return super(ColorPopupFrame, self).eventFilter(obj, event)
示例#2
0
 def eventFilter(self, obj, event):
     if event.type() == QtCore.QEvent.MouseButtonPress:
         self.close()
         return  True
     elif isinstance(event, QtGui.QHoverEvent):
         if self.bgcolor != obj.bgcolor:
             self.bgcolor = obj.bgcolor
             windowsoptions['frameqss'] = makeFrameQss(obj.bgcolor)
             views['MainWindow'].setskin()
         return  False
     else:
         return super(ColorPopupFrame, self).eventFilter(obj, event)
示例#3
0
 def updateBg(self, color):
     self.bgcolor = 'rgb(%s, %s, %s)' % (color.red(), color.green(),
                                         color.blue())
     windowsoptions['frameqss'] = makeFrameQss(self.bgcolor)
     views['MainWindow'].setskin()
示例#4
0
 def updateBg(self, color):
     self.bgcolor = 'rgb(%s, %s, %s)' % (color.red(), color.green(), color.blue())
     windowsoptions['frameqss'] = makeFrameQss(self.bgcolor)
     views['MainWindow'].setskin()