created by notepad++ (no need)
parent
31357a8838
commit
c6d17cadd8
47
sight.py.bak
47
sight.py.bak
|
|
@ -1,47 +0,0 @@
|
|||
import base
|
||||
from callhandler import CallHandler
|
||||
from browser import Browser
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtWidgets import QMainWindow, QWidget, QVBoxLayout
|
||||
|
||||
class Sight(QWidget):
|
||||
def __init__(self, id, type):
|
||||
super().__init__()
|
||||
|
||||
self.id = id
|
||||
self.type = type
|
||||
self.data = {} # private data of the sight
|
||||
|
||||
base.data["active_sight"] = self.id
|
||||
self.title = id
|
||||
|
||||
self.setWindowFlags(Qt.WindowType(0x00000800)) # remove the os windows frame (borders, close and other buttons
|
||||
self.setAttribute(Qt.WidgetAttribute(0x78)) # (int: 120)) # Make Transparent
|
||||
|
||||
self.browser = Browser()
|
||||
self.browser.addObject('handler', CallHandler(self) )
|
||||
self.browser.loadContent(type)
|
||||
|
||||
self.layout = QVBoxLayout()
|
||||
self.layout.addWidget(self.browser)
|
||||
self.layout.setSpacing(0);
|
||||
self.layout.setContentsMargins(1, 1, 1, 1); #Need 1,1,1,1 if it is 0,0,0,0 I got setgeometry warnings
|
||||
|
||||
self.setLayout(self.layout)
|
||||
|
||||
def setLayoutContentMargins(self,a,b,c,d):
|
||||
self.layout.setContentsMargins(a, b, c, d)
|
||||
|
||||
def setTitle(self, title):
|
||||
self.title = title
|
||||
def getTitle(self):
|
||||
return self.title
|
||||
def getId(self):
|
||||
return self.id
|
||||
def addData(self, key, value):
|
||||
self.data[key] = value
|
||||
def getData(self, key):
|
||||
if key in self.data:
|
||||
return self.data[key]
|
||||
return None
|
||||
|
||||
Loading…
Reference in New Issue