mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
3515386739
commit
13762a9ea0
@ -27,8 +27,10 @@ class LLabel(QLabel, LBase):
|
|||||||
|
|
||||||
|
|
||||||
class LMessageBox(QMessageBox, LBase):
|
class LMessageBox(QMessageBox, LBase):
|
||||||
_title = None
|
def __init__(self, *argc, **kwarg):
|
||||||
_text = None
|
super().__init__(*argc, **kwarg)
|
||||||
|
self._title = None
|
||||||
|
self._text = None
|
||||||
|
|
||||||
def setText(self, t):
|
def setText(self, t):
|
||||||
self._text = t
|
self._text = t
|
||||||
@ -106,7 +108,10 @@ class LCheckBox(QCheckBox, LBase):
|
|||||||
|
|
||||||
|
|
||||||
class LGroupBox(QGroupBox, LBase):
|
class LGroupBox(QGroupBox, LBase):
|
||||||
_text = None
|
|
||||||
|
def __init__(self, *argc, **kwarg):
|
||||||
|
super().__init__(*argc, **kwarg)
|
||||||
|
self._text = None
|
||||||
|
|
||||||
def setTitle(self, t):
|
def setTitle(self, t):
|
||||||
self._text = t
|
self._text = t
|
||||||
@ -145,7 +150,10 @@ class LFormLayout(QFormLayout):
|
|||||||
|
|
||||||
|
|
||||||
class LDialog(QDialog, LBase):
|
class LDialog(QDialog, LBase):
|
||||||
_title = None
|
|
||||||
|
def __init__(self, *argc, **kwarg):
|
||||||
|
super().__init__(*argc, **kwarg)
|
||||||
|
self._title = None
|
||||||
|
|
||||||
def setWindowTitle(self, t):
|
def setWindowTitle(self, t):
|
||||||
self._title = t
|
self._title = t
|
||||||
@ -157,7 +165,10 @@ class LDialog(QDialog, LBase):
|
|||||||
|
|
||||||
|
|
||||||
class LMainWindow(QMainWindow, LBase):
|
class LMainWindow(QMainWindow, LBase):
|
||||||
_title = None
|
|
||||||
|
def __init__(self, *argc, **kwarg):
|
||||||
|
super().__init__(*argc, **kwarg)
|
||||||
|
self._title = None
|
||||||
|
|
||||||
def setWindowTitle(self, t):
|
def setWindowTitle(self, t):
|
||||||
self._title = t
|
self._title = t
|
||||||
@ -178,7 +189,9 @@ class LRadioButton(QRadioButton, LBase):
|
|||||||
|
|
||||||
|
|
||||||
class LTabBar(QTabBar, LBase):
|
class LTabBar(QTabBar, LBase):
|
||||||
__titles = []
|
def __init__(self, *argc, **kwarg):
|
||||||
|
super().__init__(*argc, **kwarg)
|
||||||
|
self.__titles = []
|
||||||
|
|
||||||
def insertTab(self, idx, t):
|
def insertTab(self, idx, t):
|
||||||
self.__titles.insert(idx, t)
|
self.__titles.insert(idx, t)
|
||||||
@ -198,7 +211,9 @@ class LTabBar(QTabBar, LBase):
|
|||||||
|
|
||||||
|
|
||||||
class LTabWidget(QTabWidget, LBase):
|
class LTabWidget(QTabWidget, LBase):
|
||||||
__titles = []
|
def __init__(self, *argc, **kwarg):
|
||||||
|
super().__init__(*argc, **kwarg)
|
||||||
|
self.__titles = []
|
||||||
|
|
||||||
def addTab(self, w, t):
|
def addTab(self, w, t):
|
||||||
self.__titles.append(t)
|
self.__titles.append(t)
|
||||||
@ -210,7 +225,9 @@ class LTabWidget(QTabWidget, LBase):
|
|||||||
|
|
||||||
|
|
||||||
class LStandardItemModel(QStandardItemModel, LBase):
|
class LStandardItemModel(QStandardItemModel, LBase):
|
||||||
__ls = []
|
def __init__(self, *argc, **kwarg):
|
||||||
|
super().__init__(*argc, **kwarg)
|
||||||
|
self.__ls = []
|
||||||
|
|
||||||
def setHorizontalHeaderLabels(self, ls: list):
|
def setHorizontalHeaderLabels(self, ls: list):
|
||||||
self.__ls = ls.copy()
|
self.__ls = ls.copy()
|
||||||
|
@ -62,10 +62,11 @@ class CaseInsensitiveDict(MutableMapping):
|
|||||||
|
|
||||||
|
|
||||||
class ResponseBase:
|
class ResponseBase:
|
||||||
headers = CaseInsensitiveDict()
|
def __init__(self):
|
||||||
cookies = {}
|
self.headers = CaseInsensitiveDict()
|
||||||
status_code = 0
|
self.cookies = {}
|
||||||
content = b""
|
self.status_code = 0
|
||||||
|
self.content = b""
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def text(self):
|
def text(self):
|
||||||
@ -347,17 +348,19 @@ class Requester_common:
|
|||||||
|
|
||||||
|
|
||||||
class Session:
|
class Session:
|
||||||
cookies = {}
|
def __init__(self):
|
||||||
_requester = None
|
|
||||||
_libidx = -1
|
|
||||||
|
|
||||||
headers = CaseInsensitiveDict(
|
self.cookies = {}
|
||||||
{
|
self._requester = None
|
||||||
# "Accept-Encoding": "gzip, deflate, br",
|
self._libidx = -1
|
||||||
"Accept": "*/*",
|
|
||||||
"Connection": "keep-alive",
|
self.headers = CaseInsensitiveDict(
|
||||||
}
|
{
|
||||||
)
|
# "Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
return self
|
return self
|
||||||
|
Loading…
x
Reference in New Issue
Block a user