예제 #1
0
파일: app.py 프로젝트: rsrg/autoscanner
 def _set_resolution_limits(self):
     screen_geom = ScanTools.get_full_screen_geometry()
     
     self.spinBox_x.setMinimum(screen_geom.x())
     self.spinBox_y.setMinimum(screen_geom.y())
     self.spinBox_x.setMaximum(screen_geom.x() + screen_geom.width())
     self.spinBox_y.setMaximum(screen_geom.y() + screen_geom.height())
     
     self.spinBox_width.setMaximum(screen_geom.width())
     self.spinBox_height.setMaximum(screen_geom.height())
예제 #2
0
    def __init__(self, parent=None):
        super(TransparentWindow, self).__init__(parent)

        self.layout = QtGui.QGridLayout()
        self.setLayout(self.layout)

        self.setWindowOpacity(TransparentWindow.OPACITY)
        self.showMaximized()
        self.activateWindow()
        self.raise_()
        self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.FramelessWindowHint)

        self.origin = None
        screen_geometry = ScanTools.get_full_screen_geometry()
        self.setGeometry(screen_geometry)
        self.rubber_band = QtGui.QRubberBand(QtGui.QRubberBand.Rectangle, self)