mirror of
https://github.com/tonquer/picacg-qt.git
synced 2025-01-08 11:57:48 +08:00
更新1.3.9
This commit is contained in:
parent
e6106d3b92
commit
a3bc189d96
21
CHANGELOG
21
CHANGELOG
@ -2,6 +2,26 @@
|
||||
# tonquer<tonquer@qq.com>
|
||||
# https://github.com/tonquer/picacg-qt
|
||||
######################################################################################
|
||||
# Version: v1.3.9
|
||||
# 2022/8/14
|
||||
# 1) 漫画详情新增大家都在看
|
||||
# 2) 优化测速流程
|
||||
# 3) 可离线观看下载好的本子
|
||||
# 4) 新增锅贴(暂时屏蔽)
|
||||
# 5) waifu2x小工具支持GIF,webp
|
||||
# 6) 修复魔推荐没了(改名了)
|
||||
# 7) 看图右键新增复制
|
||||
# 8) 部分bug修复
|
||||
|
||||
# Version: v1.3.8
|
||||
# 2022/6/26
|
||||
# 1) waifu2x库更新,速度提升100%-300%
|
||||
# 2) 修复部分上传者搜索结果为空
|
||||
# 3) 修复收藏出现重复的漫画
|
||||
# 4) 修复部分漫画waifu2x出现失败
|
||||
# 5) 修复下载章节和waifu2x目录可能出现不一致的问题
|
||||
# 5) 看图可用F2或右键单独用waifu2x转换当前图片
|
||||
|
||||
# Version: v1.3.8
|
||||
# 2022/6/26
|
||||
# 1) waifu2x库更新,速度提升100%-300%
|
||||
@ -294,3 +314,4 @@
|
||||
# Version: 1.0.3
|
||||
# 2021/02/5
|
||||
# 1)初步完成版本
|
||||
|
||||
|
89
src/component/label/auto_picture_label.py
Normal file
89
src/component/label/auto_picture_label.py
Normal file
@ -0,0 +1,89 @@
|
||||
from PySide6.QtCore import QByteArray, QBuffer, Qt, QSize
|
||||
from PySide6.QtGui import QMovie, QPixmap
|
||||
from PySide6.QtWidgets import QLabel
|
||||
|
||||
from tools.tool import ToolUtil
|
||||
|
||||
|
||||
class AutoPictureLabel(QLabel):
|
||||
def __init__(self, parent=None):
|
||||
QLabel.__init__(self, parent)
|
||||
self.movie = None
|
||||
self.byteArray = None
|
||||
self.bBuffer = None
|
||||
self.gifWidth = 0
|
||||
self.gifHeight = 0
|
||||
|
||||
def realW(self):
|
||||
return self.pixmap().width() / max(1, self.pixmap().devicePixelRatioF())
|
||||
|
||||
def realH(self):
|
||||
return self.pixmap().height() / max(1, self.pixmap().devicePixelRatioF())
|
||||
|
||||
# def setPixmap(self, data):
|
||||
# if self.movie:
|
||||
# self.movie.stop()
|
||||
# self.widget().setMovie(None)
|
||||
# self.movie.setDevice(None)
|
||||
# self.movie = None
|
||||
# self.bBuffer = None
|
||||
# self.byteArray = None
|
||||
# self.widget().setText("")
|
||||
# widget = data.width() // max(1, data.devicePixelRatioF())
|
||||
# height = data.height()//max(1, data.devicePixelRatioF())
|
||||
# self.widget().setFixedWidth(widget)
|
||||
# self.widget().setFixedHeight(height)
|
||||
# # self.widget().setStyleSheet("border:2px solid rgb(177,177,177);")
|
||||
# return self.widget().setPixmap(data)
|
||||
|
||||
def paintEvent(self, ev):
|
||||
# print("paint")
|
||||
if self.movie and self.movie.state() == QMovie.NotRunning:
|
||||
self.movie.start()
|
||||
# if self.movie and self.movie.state == QMovie.Running:
|
||||
# bound = self.boundingRect().adjused(10, 10, -5, -5)
|
||||
# p.drawImage(bound, self.movie.currentImage)
|
||||
return QLabel.paintEvent(self, ev)
|
||||
|
||||
def SetGifData(self, data, width, height):
|
||||
if self.movie:
|
||||
self.movie.stop()
|
||||
self.setMovie(None)
|
||||
self.movie.setDevice(None)
|
||||
animationFormat = ToolUtil.GetAnimationFormat(data)
|
||||
if animationFormat:
|
||||
self.movie = QMovie()
|
||||
self.gifWidth = width
|
||||
self.gifHeight = height
|
||||
self.setFixedWidth(width)
|
||||
self.setFixedHeight(height)
|
||||
self.byteArray = QByteArray(data)
|
||||
self.bBuffer = QBuffer(self.byteArray)
|
||||
# self.movie.frameChanged.connect(self.FrameChange)
|
||||
self.movie.setFormat(QByteArray(animationFormat.encode("utf-8")))
|
||||
self.movie.setCacheMode(QMovie.CacheMode.CacheAll)
|
||||
self.movie.setDevice(self.bBuffer)
|
||||
self.movie.setScaledSize(QSize(self.width(), self.height()))
|
||||
self.setMovie(self.movie)
|
||||
self.setScaledContents(True)
|
||||
else:
|
||||
pic = QPixmap()
|
||||
pic.loadFromData(data)
|
||||
radio = self.devicePixelRatio()
|
||||
pic.setDevicePixelRatio(radio)
|
||||
newPic = pic.scaled(width*radio, height*radio, Qt.KeepAspectRatio, Qt.SmoothTransformation)
|
||||
self.setPixmap(newPic)
|
||||
self.setScaledContents(True)
|
||||
widget = data.width() // max(1, data.devicePixelRatioF())
|
||||
height = data.height()//max(1, data.devicePixelRatioF())
|
||||
self.setFixedWidth(widget)
|
||||
self.setFixedHeight(height)
|
||||
|
||||
# def FrameChange(self):
|
||||
# currentPixmap = self.movie.currentPixmap()
|
||||
# size = currentPixmap.size()
|
||||
# radioF = self.widget().devicePixelRatioF()
|
||||
# currentPixmap.setDevicePixelRatio(radioF)
|
||||
# newData = currentPixmap.scaled(self.gifWidth * radioF, self.gifHeight * radioF, Qt.KeepAspectRatio, Qt.SmoothTransformation)
|
||||
# self.widget().setPixmap(newData)
|
||||
# return
|
@ -116,7 +116,7 @@ class CategoryListWidget(BaseListWidget):
|
||||
item = self.item(index)
|
||||
widget = self.itemWidget(item)
|
||||
assert isinstance(widget, ComicItemWidget)
|
||||
widget.SetPictureErr()
|
||||
widget.SetPictureErr(status)
|
||||
return
|
||||
|
||||
def Waifu2xPicture(self, index, isIfSize=False):
|
||||
|
@ -174,7 +174,7 @@ class ComicListWidget(BaseListWidget):
|
||||
if not widget:
|
||||
return
|
||||
assert isinstance(widget, ComicItemWidget)
|
||||
widget.SetPictureErr()
|
||||
widget.SetPictureErr(status)
|
||||
return
|
||||
|
||||
def SelectItem(self, item):
|
||||
|
@ -192,7 +192,7 @@ class UserListWidget(BaseListWidget):
|
||||
else:
|
||||
item = self.item(index)
|
||||
widget = self.itemWidget(item)
|
||||
widget.SetPictureErr()
|
||||
widget.SetPictureErr(status)
|
||||
return
|
||||
|
||||
def LoadingHeadComplete(self, data, status, index):
|
||||
|
@ -92,8 +92,8 @@ class ComicItemWidget(QWidget, Ui_ComicItem):
|
||||
newPic = pic.scaled(self.picLabel.width()*radio, self.picLabel.height()*radio, Qt.KeepAspectRatio, Qt.SmoothTransformation)
|
||||
self.picLabel.setPixmap(newPic)
|
||||
|
||||
def SetPictureErr(self):
|
||||
self.picLabel.setText(Str.GetStr(Str.LoadingFail))
|
||||
def SetPictureErr(self, st):
|
||||
self.picLabel.setText(Str.GetStr(st))
|
||||
|
||||
def paintEvent(self, event) -> None:
|
||||
if self.url and not self.isLoadPicture and config.IsLoadingPicture:
|
||||
|
@ -76,8 +76,8 @@ class CommentItemWidget(QtWidgets.QWidget, Ui_CommentItem):
|
||||
self.pictureData = data
|
||||
self.picIcon.SetPicture(self.pictureData, self.headData)
|
||||
|
||||
def SetPictureErr(self):
|
||||
self.picIcon.setText(Str.GetStr(Str.LoadingFail))
|
||||
def SetPictureErr(self, status):
|
||||
self.picIcon.setText(Str.GetStr(status))
|
||||
|
||||
def SetHeadData(self, data):
|
||||
self.headData = data
|
||||
|
@ -34,6 +34,12 @@ class NavigationWidget(QWidget, Ui_Navigation, QtTaskBase):
|
||||
self.signButton.clicked.connect(self.Sign)
|
||||
self.picLabel.installEventFilter(self)
|
||||
self.picData = None
|
||||
self.offlineButton.SetState(False)
|
||||
self.offlineButton.Switch.connect(self.SwitchOffline)
|
||||
|
||||
def SwitchOffline(self, state):
|
||||
QtOwner().isOfflineModel = state
|
||||
return
|
||||
|
||||
def OpenLoginView(self):
|
||||
isAutoLogin = Setting.AutoLogin.value
|
||||
@ -51,13 +57,21 @@ class NavigationWidget(QWidget, Ui_Navigation, QtTaskBase):
|
||||
return
|
||||
|
||||
def LoginSucBack(self):
|
||||
self.UpdateProxyName()
|
||||
if not User().isLogin:
|
||||
self.loginButton.setText(Str.GetStr(Str.Login))
|
||||
QtOwner().owner.favorityView.InitFavorite()
|
||||
return
|
||||
QtOwner().owner.LoginSucBack()
|
||||
self.loginButton.setText(Str.GetStr(Str.LoginOut))
|
||||
self.AddHttpTask(req.GetUserInfo(), self.UpdateUserBack)
|
||||
|
||||
def UpdateProxyName(self):
|
||||
if Setting.ProxySelectIndex.value == 4:
|
||||
self.proxyName.setText("CDN_{}".format(Setting.PreferCDNIP.value))
|
||||
else:
|
||||
self.proxyName.setText("分流{}".format(str(Setting.ProxySelectIndex.value)))
|
||||
|
||||
def UpdateUserBack(self, raw):
|
||||
self.levelLabel.setText("LV" + str(User().level))
|
||||
self.expLabel.setText("Exp: " + str(User().exp))
|
||||
|
@ -31,20 +31,23 @@ UpdateUrlBack = "https://github.com/tonquer/picacg-qt"
|
||||
UpdateUrl2 = "https://hub.fastgit.xyz/tonquer/picacg-qt/releases/latest"
|
||||
UpdateUrl2Back = "https://hub.fastgit.xyz/tonquer/picacg-qt"
|
||||
|
||||
UpdateUrl3 = "https://raw.bika.life/tonquer/picacg-qt/releases/latest"
|
||||
UpdateUrl3Back = "https://raw.bika.life/tonquer/picacg-qt"
|
||||
|
||||
DatabaseUpdate = "https://raw.githubusercontent.com/bika-robot/picacg-database/main/version3.txt"
|
||||
DatabaseDownload = "https://raw.githubusercontent.com/bika-robot/picacg-database/main/data3/"
|
||||
|
||||
DatabaseUpdate2 = "https://raw.fastgit.org/bika-robot/picacg-database/main/version3.txt"
|
||||
DatabaseDownload2 = "https://raw.fastgit.org/bika-robot/picacg-database/main/data3/"
|
||||
|
||||
DatabaseUpdate3 = "https://raw.staticdn.net/bika-robot/picacg-database/main/version3.txt"
|
||||
DatabaseDownload3 = "https://raw.staticdn.net/bika-robot/picacg-database/main/data3/"
|
||||
DatabaseUpdate3 = "https://raw.bika.life/bika-robot/picacg-database/main/version3.txt"
|
||||
DatabaseDownload3 = "https://raw.bika.life/bika-robot/picacg-database/main/data3/"
|
||||
|
||||
UpdateVersion = "v1.3.8"
|
||||
RealVersion = "v1.3.8"
|
||||
TimeVersion = "2022-6-25"
|
||||
UpdateVersion = "v1.3.9"
|
||||
RealVersion = "v1.3.9"
|
||||
TimeVersion = "2022-8-14"
|
||||
|
||||
Waifu2xVersion = "1.1.2"
|
||||
Waifu2xVersion = "1.1.4"
|
||||
|
||||
|
||||
# waifu2x
|
||||
@ -78,6 +81,7 @@ ImageServer3 = 'storage.wikawika.xyz' # 分流3 使用的图片服务
|
||||
|
||||
ApiDomain = [
|
||||
"picaapi.picacomic.com",
|
||||
"post-api.wikawika.xyz"
|
||||
]
|
||||
|
||||
ImageDomain = [
|
||||
@ -85,6 +89,7 @@ ImageDomain = [
|
||||
"storage1.picacomic.com",
|
||||
"img.tipatipa.xyz",
|
||||
"img.picacomic.com",
|
||||
"storage.tipatipa.xyz",
|
||||
# "pica-pica.wikawika.xyz",
|
||||
"www.picacomic.com",
|
||||
"storage-b.picacomic.com",
|
||||
|
@ -89,7 +89,7 @@ class Setting:
|
||||
FontStyle = SettingValue("GeneraSetting", 0, True)
|
||||
|
||||
# 代理设置
|
||||
IsHttpProxy = SettingValue("ProxySetting", 0, False, ["", "Http", "Sock5"])
|
||||
IsHttpProxy = SettingValue("ProxySetting", 0, False, ["", "Http", "Sock5", "system"])
|
||||
HttpProxy = SettingValue("ProxySetting", "", False)
|
||||
Sock5Proxy = SettingValue("ProxySetting", "", False)
|
||||
ChatProxy = SettingValue("ProxySetting", 0, False)
|
||||
@ -128,6 +128,7 @@ class Setting:
|
||||
LookReadFull = SettingValue("ReadSetting", 0, False)
|
||||
TurnSpeed = SettingValue("ReadSetting", 5000, False)
|
||||
ScrollSpeed = SettingValue("ReadSetting", 400, False)
|
||||
PreDownWaifu2x = SettingValue("ReadSetting", 1, False)
|
||||
|
||||
# Other
|
||||
UserId = SettingValue("Other", "", False)
|
||||
|
BIN
src/data/book.db
BIN
src/data/book.db
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_book_eps.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_book_info.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
@ -15,10 +15,11 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QFont, QFontDatabase, QGradient, QIcon,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QAbstractItemView, QApplication, QComboBox, QFrame,
|
||||
QGridLayout, QHBoxLayout, QLabel, QLayout,
|
||||
QListView, QListWidgetItem, QPlainTextEdit, QPushButton,
|
||||
QSizePolicy, QSpacerItem, QVBoxLayout, QWidget)
|
||||
from PySide6.QtWidgets import (QAbstractItemView, QApplication, QComboBox, QCommandLinkButton,
|
||||
QFrame, QGridLayout, QHBoxLayout, QLabel,
|
||||
QLayout, QListView, QListWidgetItem, QPlainTextEdit,
|
||||
QPushButton, QSizePolicy, QSpacerItem, QTabWidget,
|
||||
QVBoxLayout, QWidget)
|
||||
|
||||
from component.button.icon_tool_button import IconToolButton
|
||||
from component.label.head_label import HeadLabel
|
||||
@ -73,118 +74,6 @@ class Ui_BookInfo(object):
|
||||
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
|
||||
self.gridLayout_3 = QGridLayout()
|
||||
self.gridLayout_3.setObjectName(u"gridLayout_3")
|
||||
self.horizontalLayout_10 = QHBoxLayout()
|
||||
self.horizontalLayout_10.setObjectName(u"horizontalLayout_10")
|
||||
self.user_icon = HeadLabel(self.scrollAreaWidgetContents)
|
||||
self.user_icon.setObjectName(u"user_icon")
|
||||
self.user_icon.setMinimumSize(QSize(50, 50))
|
||||
self.user_icon.setMaximumSize(QSize(50, 50))
|
||||
|
||||
self.horizontalLayout_10.addWidget(self.user_icon)
|
||||
|
||||
self.verticalLayout_5 = QVBoxLayout()
|
||||
self.verticalLayout_5.setObjectName(u"verticalLayout_5")
|
||||
self.user_name = QLabel(self.scrollAreaWidgetContents)
|
||||
self.user_name.setObjectName(u"user_name")
|
||||
|
||||
self.verticalLayout_5.addWidget(self.user_name)
|
||||
|
||||
self.updateTick = QLabel(self.scrollAreaWidgetContents)
|
||||
self.updateTick.setObjectName(u"updateTick")
|
||||
|
||||
self.verticalLayout_5.addWidget(self.updateTick)
|
||||
|
||||
|
||||
self.horizontalLayout_10.addLayout(self.verticalLayout_5)
|
||||
|
||||
self.horizontalLayout_2 = QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
||||
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_2.addItem(self.horizontalSpacer_2)
|
||||
|
||||
self.starButton = IconToolButton(self.scrollAreaWidgetContents)
|
||||
self.starButton.setObjectName(u"starButton")
|
||||
self.starButton.setMinimumSize(QSize(40, 40))
|
||||
self.starButton.setCursor(QCursor(Qt.PointingHandCursor))
|
||||
self.starButton.setFocusPolicy(Qt.NoFocus)
|
||||
self.starButton.setStyleSheet(u"")
|
||||
icon = QIcon()
|
||||
icon.addFile(u":/png/icon/icon_bookmark_off.png", QSize(), QIcon.Normal, QIcon.Off)
|
||||
icon.addFile(u":/png/icon/icon_bookmark_on.png", QSize(), QIcon.Selected, QIcon.On)
|
||||
self.starButton.setIcon(icon)
|
||||
self.starButton.setIconSize(QSize(50, 50))
|
||||
self.starButton.setCheckable(False)
|
||||
self.starButton.setChecked(False)
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.starButton)
|
||||
|
||||
self.favoriteButton = IconToolButton(self.scrollAreaWidgetContents)
|
||||
self.favoriteButton.setObjectName(u"favoriteButton")
|
||||
self.favoriteButton.setMinimumSize(QSize(40, 40))
|
||||
self.favoriteButton.setCursor(QCursor(Qt.PointingHandCursor))
|
||||
self.favoriteButton.setStyleSheet(u"background-color:transparent;")
|
||||
icon1 = QIcon()
|
||||
icon1.addFile(u":/png/icon/icon_like_off.png", QSize(), QIcon.Normal, QIcon.Off)
|
||||
icon1.addFile(u":/png/icon/icon_bookmark_on.png", QSize(), QIcon.Selected, QIcon.On)
|
||||
self.favoriteButton.setIcon(icon1)
|
||||
self.favoriteButton.setIconSize(QSize(50, 50))
|
||||
self.favoriteButton.setCheckable(False)
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.favoriteButton)
|
||||
|
||||
self.commentButton = IconToolButton(self.scrollAreaWidgetContents)
|
||||
self.commentButton.setObjectName(u"commentButton")
|
||||
self.commentButton.setMinimumSize(QSize(40, 40))
|
||||
self.commentButton.setCursor(QCursor(Qt.PointingHandCursor))
|
||||
self.commentButton.setStyleSheet(u"background-color:transparent;")
|
||||
icon2 = QIcon()
|
||||
icon2.addFile(u":/png/icon/icon_comment.png", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.commentButton.setIcon(icon2)
|
||||
self.commentButton.setIconSize(QSize(50, 50))
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.commentButton)
|
||||
|
||||
self.downloadButton = IconToolButton(self.scrollAreaWidgetContents)
|
||||
self.downloadButton.setObjectName(u"downloadButton")
|
||||
self.downloadButton.setMinimumSize(QSize(40, 40))
|
||||
self.downloadButton.setCursor(QCursor(Qt.PointingHandCursor))
|
||||
self.downloadButton.setStyleSheet(u"background-color:transparent;")
|
||||
icon3 = QIcon()
|
||||
icon3.addFile(u":/png/icon/ic_get_app_black_36dp.png", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.downloadButton.setIcon(icon3)
|
||||
self.downloadButton.setIconSize(QSize(50, 50))
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.downloadButton)
|
||||
|
||||
self.startRead = QPushButton(self.scrollAreaWidgetContents)
|
||||
self.startRead.setObjectName(u"startRead")
|
||||
self.startRead.setMinimumSize(QSize(0, 40))
|
||||
self.startRead.setMaximumSize(QSize(16777215, 40))
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.startRead)
|
||||
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_2.addItem(self.horizontalSpacer)
|
||||
|
||||
self.pageLabel = QLabel(self.scrollAreaWidgetContents)
|
||||
self.pageLabel.setObjectName(u"pageLabel")
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.pageLabel)
|
||||
|
||||
self.pageBox = QComboBox(self.scrollAreaWidgetContents)
|
||||
self.pageBox.setObjectName(u"pageBox")
|
||||
self.pageBox.setMinimumSize(QSize(120, 0))
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.pageBox)
|
||||
|
||||
|
||||
self.horizontalLayout_10.addLayout(self.horizontalLayout_2)
|
||||
|
||||
|
||||
self.gridLayout_3.addLayout(self.horizontalLayout_10, 1, 0, 1, 1)
|
||||
|
||||
self.horizontalLayout = QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.picture = QLabel(self.scrollAreaWidgetContents)
|
||||
@ -364,16 +253,141 @@ class Ui_BookInfo(object):
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_9)
|
||||
|
||||
self.commandLinkButton = QCommandLinkButton(self.scrollAreaWidgetContents)
|
||||
self.commandLinkButton.setObjectName(u"commandLinkButton")
|
||||
sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.commandLinkButton.sizePolicy().hasHeightForWidth())
|
||||
self.commandLinkButton.setSizePolicy(sizePolicy)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.commandLinkButton)
|
||||
|
||||
|
||||
self.horizontalLayout.addLayout(self.verticalLayout_2)
|
||||
|
||||
|
||||
self.gridLayout_3.addLayout(self.horizontalLayout, 0, 0, 1, 1)
|
||||
|
||||
self.tabWidget = QTabWidget(self.scrollAreaWidgetContents)
|
||||
self.tabWidget.setObjectName(u"tabWidget")
|
||||
self.tab = QWidget()
|
||||
self.tab.setObjectName(u"tab")
|
||||
self.verticalLayout = QVBoxLayout(self.tab)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.horizontalLayout_10 = QHBoxLayout()
|
||||
self.horizontalLayout_10.setObjectName(u"horizontalLayout_10")
|
||||
self.user_icon = HeadLabel(self.tab)
|
||||
self.user_icon.setObjectName(u"user_icon")
|
||||
self.user_icon.setMinimumSize(QSize(50, 50))
|
||||
self.user_icon.setMaximumSize(QSize(50, 50))
|
||||
|
||||
self.verticalLayout_3.addLayout(self.gridLayout_3)
|
||||
self.horizontalLayout_10.addWidget(self.user_icon)
|
||||
|
||||
self.epsListWidget = EpsListWidget(self.scrollAreaWidgetContents)
|
||||
self.verticalLayout_5 = QVBoxLayout()
|
||||
self.verticalLayout_5.setObjectName(u"verticalLayout_5")
|
||||
self.user_name = QLabel(self.tab)
|
||||
self.user_name.setObjectName(u"user_name")
|
||||
|
||||
self.verticalLayout_5.addWidget(self.user_name)
|
||||
|
||||
self.updateTick = QLabel(self.tab)
|
||||
self.updateTick.setObjectName(u"updateTick")
|
||||
|
||||
self.verticalLayout_5.addWidget(self.updateTick)
|
||||
|
||||
|
||||
self.horizontalLayout_10.addLayout(self.verticalLayout_5)
|
||||
|
||||
self.horizontalLayout_2 = QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
||||
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_2.addItem(self.horizontalSpacer_2)
|
||||
|
||||
self.starButton = IconToolButton(self.tab)
|
||||
self.starButton.setObjectName(u"starButton")
|
||||
self.starButton.setMinimumSize(QSize(40, 40))
|
||||
self.starButton.setCursor(QCursor(Qt.PointingHandCursor))
|
||||
self.starButton.setFocusPolicy(Qt.NoFocus)
|
||||
self.starButton.setStyleSheet(u"")
|
||||
icon = QIcon()
|
||||
icon.addFile(u":/png/icon/icon_bookmark_off.png", QSize(), QIcon.Normal, QIcon.Off)
|
||||
icon.addFile(u":/png/icon/icon_bookmark_on.png", QSize(), QIcon.Selected, QIcon.On)
|
||||
self.starButton.setIcon(icon)
|
||||
self.starButton.setIconSize(QSize(50, 50))
|
||||
self.starButton.setCheckable(False)
|
||||
self.starButton.setChecked(False)
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.starButton)
|
||||
|
||||
self.favoriteButton = IconToolButton(self.tab)
|
||||
self.favoriteButton.setObjectName(u"favoriteButton")
|
||||
self.favoriteButton.setMinimumSize(QSize(40, 40))
|
||||
self.favoriteButton.setCursor(QCursor(Qt.PointingHandCursor))
|
||||
self.favoriteButton.setStyleSheet(u"background-color:transparent;")
|
||||
icon1 = QIcon()
|
||||
icon1.addFile(u":/png/icon/icon_like_off.png", QSize(), QIcon.Normal, QIcon.Off)
|
||||
icon1.addFile(u":/png/icon/icon_bookmark_on.png", QSize(), QIcon.Selected, QIcon.On)
|
||||
self.favoriteButton.setIcon(icon1)
|
||||
self.favoriteButton.setIconSize(QSize(50, 50))
|
||||
self.favoriteButton.setCheckable(False)
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.favoriteButton)
|
||||
|
||||
self.commentButton = IconToolButton(self.tab)
|
||||
self.commentButton.setObjectName(u"commentButton")
|
||||
self.commentButton.setMinimumSize(QSize(40, 40))
|
||||
self.commentButton.setCursor(QCursor(Qt.PointingHandCursor))
|
||||
self.commentButton.setStyleSheet(u"background-color:transparent;")
|
||||
icon2 = QIcon()
|
||||
icon2.addFile(u":/png/icon/icon_comment.png", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.commentButton.setIcon(icon2)
|
||||
self.commentButton.setIconSize(QSize(50, 50))
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.commentButton)
|
||||
|
||||
self.downloadButton = IconToolButton(self.tab)
|
||||
self.downloadButton.setObjectName(u"downloadButton")
|
||||
self.downloadButton.setMinimumSize(QSize(40, 40))
|
||||
self.downloadButton.setCursor(QCursor(Qt.PointingHandCursor))
|
||||
self.downloadButton.setStyleSheet(u"background-color:transparent;")
|
||||
icon3 = QIcon()
|
||||
icon3.addFile(u":/png/icon/ic_get_app_black_36dp.png", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.downloadButton.setIcon(icon3)
|
||||
self.downloadButton.setIconSize(QSize(50, 50))
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.downloadButton)
|
||||
|
||||
self.startRead = QPushButton(self.tab)
|
||||
self.startRead.setObjectName(u"startRead")
|
||||
self.startRead.setMinimumSize(QSize(0, 40))
|
||||
self.startRead.setMaximumSize(QSize(16777215, 40))
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.startRead)
|
||||
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_2.addItem(self.horizontalSpacer)
|
||||
|
||||
self.pageLabel = QLabel(self.tab)
|
||||
self.pageLabel.setObjectName(u"pageLabel")
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.pageLabel)
|
||||
|
||||
self.pageBox = QComboBox(self.tab)
|
||||
self.pageBox.setObjectName(u"pageBox")
|
||||
self.pageBox.setMinimumSize(QSize(120, 0))
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.pageBox)
|
||||
|
||||
|
||||
self.horizontalLayout_10.addLayout(self.horizontalLayout_2)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_10)
|
||||
|
||||
self.epsListWidget = EpsListWidget(self.tab)
|
||||
self.epsListWidget.setObjectName(u"epsListWidget")
|
||||
self.epsListWidget.setStyleSheet(u"QListWidget {background-color:transparent;}\n"
|
||||
"QListWidget::item {\n"
|
||||
@ -396,7 +410,66 @@ class Ui_BookInfo(object):
|
||||
self.epsListWidget.setHorizontalScrollMode(QAbstractItemView.ScrollPerPixel)
|
||||
self.epsListWidget.setSpacing(6)
|
||||
|
||||
self.verticalLayout_3.addWidget(self.epsListWidget)
|
||||
self.verticalLayout.addWidget(self.epsListWidget)
|
||||
|
||||
self.tabWidget.addTab(self.tab, "")
|
||||
self.tab_3 = QWidget()
|
||||
self.tab_3.setObjectName(u"tab_3")
|
||||
self.verticalLayout_6 = QVBoxLayout(self.tab_3)
|
||||
self.verticalLayout_6.setObjectName(u"verticalLayout_6")
|
||||
self.horizontalLayout_12 = QHBoxLayout()
|
||||
self.horizontalLayout_12.setObjectName(u"horizontalLayout_12")
|
||||
self.label_8 = QLabel(self.tab_3)
|
||||
self.label_8.setObjectName(u"label_8")
|
||||
|
||||
self.horizontalLayout_12.addWidget(self.label_8)
|
||||
|
||||
self.readOffline = QPushButton(self.tab_3)
|
||||
self.readOffline.setObjectName(u"readOffline")
|
||||
self.readOffline.setMinimumSize(QSize(0, 40))
|
||||
self.readOffline.setMaximumSize(QSize(16777215, 16777215))
|
||||
|
||||
self.horizontalLayout_12.addWidget(self.readOffline)
|
||||
|
||||
self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_12.addItem(self.horizontalSpacer_3)
|
||||
|
||||
self.horizontalSpacer_4 = QSpacerItem(120, 20, QSizePolicy.Minimum, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_12.addItem(self.horizontalSpacer_4)
|
||||
|
||||
|
||||
self.verticalLayout_6.addLayout(self.horizontalLayout_12)
|
||||
|
||||
self.listWidget = EpsListWidget(self.tab_3)
|
||||
self.listWidget.setObjectName(u"listWidget")
|
||||
self.listWidget.setStyleSheet(u"QListWidget {background-color:transparent;}\n"
|
||||
"QListWidget::item {\n"
|
||||
" background-color:rgb(251, 239, 243);\n"
|
||||
" color: rgb(196, 95, 125);\n"
|
||||
" border:2px solid red;\n"
|
||||
" border-radius: 10px;\n"
|
||||
" border-color:rgb(196, 95, 125);\n"
|
||||
"}\n"
|
||||
"/* \u9f20\u6807\u5728\u6309\u94ae\u4e0a\u65f6\uff0c\u6309\u94ae\u989c\u8272 */\n"
|
||||
" QListWidget::item:hover \n"
|
||||
"{\n"
|
||||
" background-color:rgb(21, 85, 154);\n"
|
||||
" border-radius: 10px;\n"
|
||||
" color: rgb(0, 0, 0);\n"
|
||||
"}\n"
|
||||
"")
|
||||
self.listWidget.setSpacing(6)
|
||||
|
||||
self.verticalLayout_6.addWidget(self.listWidget)
|
||||
|
||||
self.tabWidget.addTab(self.tab_3, "")
|
||||
|
||||
self.gridLayout_3.addWidget(self.tabWidget, 1, 0, 1, 1)
|
||||
|
||||
|
||||
self.verticalLayout_3.addLayout(self.gridLayout_3)
|
||||
|
||||
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
|
||||
|
||||
@ -409,20 +482,14 @@ class Ui_BookInfo(object):
|
||||
self.favoriteButton.clicked.connect(BookInfo.AddFavorite)
|
||||
self.downloadButton.clicked.connect(BookInfo.AddDownload)
|
||||
|
||||
self.tabWidget.setCurrentIndex(1)
|
||||
|
||||
|
||||
QMetaObject.connectSlotsByName(BookInfo)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, BookInfo):
|
||||
BookInfo.setWindowTitle(QCoreApplication.translate("BookInfo", u"\u6f2b\u753b\u8be6\u60c5", None))
|
||||
self.user_icon.setText(QCoreApplication.translate("BookInfo", u"TextLabel", None))
|
||||
self.user_name.setText(QCoreApplication.translate("BookInfo", u"TextLabel", None))
|
||||
self.updateTick.setText(QCoreApplication.translate("BookInfo", u"TextLabel", None))
|
||||
self.starButton.setText("")
|
||||
self.favoriteButton.setText("")
|
||||
self.commentButton.setText("")
|
||||
self.downloadButton.setText("")
|
||||
self.startRead.setText(QCoreApplication.translate("BookInfo", u"\u5f00\u59cb\u9605\u8bfb", None))
|
||||
self.pageLabel.setText(QCoreApplication.translate("BookInfo", u"\u5206\u9875\uff1a", None))
|
||||
self.picture.setText(QCoreApplication.translate("BookInfo", u"TextLabel", None))
|
||||
self.label.setText(QCoreApplication.translate("BookInfo", u"\u6807\u9898\uff1a", None))
|
||||
self.title.setText(QCoreApplication.translate("BookInfo", u"\u6807\u9898", None))
|
||||
@ -434,5 +501,19 @@ class Ui_BookInfo(object):
|
||||
self.label_5.setText(QCoreApplication.translate("BookInfo", u"Tags\uff1a", None))
|
||||
self.label_7.setText(QCoreApplication.translate("BookInfo", u"\u89c2\u770b\u6570\uff1a", None))
|
||||
self.views.setText(QCoreApplication.translate("BookInfo", u"\u89c2\u770b\u6570", None))
|
||||
self.commandLinkButton.setText(QCoreApplication.translate("BookInfo", u"\u770b\u4e86\u8fd9\u8fb9\u672c\u5b50\u7684\u4eba\u4e5f\u5728\u770b", None))
|
||||
self.user_icon.setText(QCoreApplication.translate("BookInfo", u"TextLabel", None))
|
||||
self.user_name.setText(QCoreApplication.translate("BookInfo", u"TextLabel", None))
|
||||
self.updateTick.setText(QCoreApplication.translate("BookInfo", u"TextLabel", None))
|
||||
self.starButton.setText("")
|
||||
self.favoriteButton.setText("")
|
||||
self.commentButton.setText("")
|
||||
self.downloadButton.setText("")
|
||||
self.startRead.setText(QCoreApplication.translate("BookInfo", u"\u5f00\u59cb\u9605\u8bfb", None))
|
||||
self.pageLabel.setText(QCoreApplication.translate("BookInfo", u"\u5206\u9875\uff1a", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QCoreApplication.translate("BookInfo", u"\u9605\u8bfb", None))
|
||||
self.label_8.setText(QCoreApplication.translate("BookInfo", u"\u53ef\u79bb\u7ebf\u9605\u8bfb\u5df2\u4e0b\u8f7d\u7684\u7ae0\u8282\uff1a", None))
|
||||
self.readOffline.setText(QCoreApplication.translate("BookInfo", u"\u5f00\u59cb\u9605\u8bfb", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QCoreApplication.translate("BookInfo", u"\u5df2\u4e0b\u8f7d\u7ae0\u8282", None))
|
||||
# retranslateUi
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_category.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_change_password_widget.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_chat.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_chat_room.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_chat_room_msg.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_comic_item.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_comment.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_comment_item.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_download.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_download_dir.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_favorite.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
121
src/interface/ui_fried.py
Normal file
121
src/interface/ui_fried.py
Normal file
@ -0,0 +1,121 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_fried.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
||||
QMetaObject, QObject, QPoint, QRect,
|
||||
QSize, QTime, QUrl, Qt)
|
||||
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QFont, QFontDatabase, QGradient, QIcon,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QFrame, QHBoxLayout, QLabel,
|
||||
QLayout, QPushButton, QScrollArea, QSizePolicy,
|
||||
QSpacerItem, QSpinBox, QVBoxLayout, QWidget)
|
||||
|
||||
class Ui_Fried(object):
|
||||
def setupUi(self, Fried):
|
||||
if not Fried.objectName():
|
||||
Fried.setObjectName(u"Fried")
|
||||
Fried.resize(721, 325)
|
||||
self.verticalLayout_3 = QVBoxLayout(Fried)
|
||||
self.verticalLayout_3.setSpacing(0)
|
||||
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
|
||||
self.verticalLayout_3.setContentsMargins(6, 6, 6, 6)
|
||||
self.verticalLayout = QVBoxLayout()
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.scrollArea = QScrollArea(Fried)
|
||||
self.scrollArea.setObjectName(u"scrollArea")
|
||||
self.scrollArea.setFrameShape(QFrame.NoFrame)
|
||||
self.scrollArea.setWidgetResizable(True)
|
||||
self.scrollAreaWidgetContents = QWidget()
|
||||
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
|
||||
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 707, 273))
|
||||
self.verticalLayout_4 = QVBoxLayout(self.scrollAreaWidgetContents)
|
||||
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
|
||||
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
|
||||
|
||||
self.verticalLayout.addWidget(self.scrollArea)
|
||||
|
||||
self.horizontalLayout = QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.horizontalLayout.setSizeConstraint(QLayout.SetDefaultConstraint)
|
||||
self.horizontalLayout.setContentsMargins(0, -1, 0, -1)
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout.addItem(self.horizontalSpacer)
|
||||
|
||||
self.line_2 = QFrame(Fried)
|
||||
self.line_2.setObjectName(u"line_2")
|
||||
self.line_2.setFrameShape(QFrame.VLine)
|
||||
self.line_2.setFrameShadow(QFrame.Sunken)
|
||||
|
||||
self.horizontalLayout.addWidget(self.line_2)
|
||||
|
||||
self.label = QLabel(Fried)
|
||||
self.label.setObjectName(u"label")
|
||||
self.label.setMinimumSize(QSize(0, 30))
|
||||
|
||||
self.horizontalLayout.addWidget(self.label)
|
||||
|
||||
self.pageLabel = QLabel(Fried)
|
||||
self.pageLabel.setObjectName(u"pageLabel")
|
||||
self.pageLabel.setMinimumSize(QSize(0, 30))
|
||||
|
||||
self.horizontalLayout.addWidget(self.pageLabel)
|
||||
|
||||
self.line = QFrame(Fried)
|
||||
self.line.setObjectName(u"line")
|
||||
self.line.setFrameShape(QFrame.VLine)
|
||||
self.line.setFrameShadow(QFrame.Sunken)
|
||||
|
||||
self.horizontalLayout.addWidget(self.line)
|
||||
|
||||
self.spinBox = QSpinBox(Fried)
|
||||
self.spinBox.setObjectName(u"spinBox")
|
||||
self.spinBox.setMinimumSize(QSize(50, 30))
|
||||
self.spinBox.setStyleSheet(u"background-color:transparent;")
|
||||
self.spinBox.setMinimum(1)
|
||||
self.spinBox.setMaximum(1)
|
||||
|
||||
self.horizontalLayout.addWidget(self.spinBox)
|
||||
|
||||
self.line_3 = QFrame(Fried)
|
||||
self.line_3.setObjectName(u"line_3")
|
||||
self.line_3.setFrameShape(QFrame.VLine)
|
||||
self.line_3.setFrameShadow(QFrame.Sunken)
|
||||
|
||||
self.horizontalLayout.addWidget(self.line_3)
|
||||
|
||||
self.pushButton = QPushButton(Fried)
|
||||
self.pushButton.setObjectName(u"pushButton")
|
||||
self.pushButton.setMinimumSize(QSize(0, 30))
|
||||
|
||||
self.horizontalLayout.addWidget(self.pushButton)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
|
||||
|
||||
self.verticalLayout_3.addLayout(self.verticalLayout)
|
||||
|
||||
|
||||
self.retranslateUi(Fried)
|
||||
self.pushButton.clicked.connect(Fried.JumpPage)
|
||||
|
||||
QMetaObject.connectSlotsByName(Fried)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, Fried):
|
||||
Fried.setWindowTitle(QCoreApplication.translate("Fried", u"\u9505\u8d34", None))
|
||||
self.label.setText(QCoreApplication.translate("Fried", u"\u5206\u9875\uff1a", None))
|
||||
self.pageLabel.setText(QCoreApplication.translate("Fried", u"1/1", None))
|
||||
self.pushButton.setText(QCoreApplication.translate("Fried", u"\u8df3\u8f6c", None))
|
||||
# retranslateUi
|
||||
|
182
src/interface/ui_fried_msg.py
Normal file
182
src/interface/ui_fried_msg.py
Normal file
@ -0,0 +1,182 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_fried_msg.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
||||
QMetaObject, QObject, QPoint, QRect,
|
||||
QSize, QTime, QUrl, Qt)
|
||||
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QFont, QFontDatabase, QGradient, QIcon,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QGridLayout, QHBoxLayout, QLabel,
|
||||
QListWidgetItem, QSizePolicy, QSpacerItem, QToolButton,
|
||||
QVBoxLayout, QWidget)
|
||||
|
||||
from component.label.auto_picture_label import AutoPictureLabel
|
||||
from component.label.head_label import HeadLabel
|
||||
from component.list.user_list_widget import UserListWidget
|
||||
|
||||
class Ui_FriedMsg(object):
|
||||
def setupUi(self, FriedMsg):
|
||||
if not FriedMsg.objectName():
|
||||
FriedMsg.setObjectName(u"FriedMsg")
|
||||
FriedMsg.resize(530, 591)
|
||||
self.gridLayout_2 = QGridLayout(FriedMsg)
|
||||
self.gridLayout_2.setSpacing(1)
|
||||
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
||||
self.gridLayout_2.setContentsMargins(-1, 1, -1, -1)
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.gridLayout_2.addItem(self.horizontalSpacer, 0, 2, 1, 1)
|
||||
|
||||
self.verticalLayout = QVBoxLayout()
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.picLabel = HeadLabel(FriedMsg)
|
||||
self.picLabel.setObjectName(u"picLabel")
|
||||
self.picLabel.setMinimumSize(QSize(100, 100))
|
||||
self.picLabel.setMaximumSize(QSize(100, 100))
|
||||
|
||||
self.verticalLayout.addWidget(self.picLabel, 0, Qt.AlignTop)
|
||||
|
||||
|
||||
self.gridLayout_2.addLayout(self.verticalLayout, 0, 0, 1, 1)
|
||||
|
||||
self.gridLayout = QGridLayout()
|
||||
self.gridLayout.setSpacing(1)
|
||||
self.gridLayout.setObjectName(u"gridLayout")
|
||||
self.nameLabel = QLabel(FriedMsg)
|
||||
self.nameLabel.setObjectName(u"nameLabel")
|
||||
self.nameLabel.setMinimumSize(QSize(0, 20))
|
||||
self.nameLabel.setMaximumSize(QSize(16777215, 30))
|
||||
font = QFont()
|
||||
font.setFamilies([u"\u5fae\u8f6f\u96c5\u9ed1"])
|
||||
font.setPointSize(12)
|
||||
self.nameLabel.setFont(font)
|
||||
|
||||
self.gridLayout.addWidget(self.nameLabel, 0, 0, 1, 1)
|
||||
|
||||
self.horizontalLayout = QHBoxLayout()
|
||||
self.horizontalLayout.setSpacing(6)
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.horizontalLayout.setContentsMargins(4, -1, 4, -1)
|
||||
self.indexLabel = QLabel(FriedMsg)
|
||||
self.indexLabel.setObjectName(u"indexLabel")
|
||||
|
||||
self.horizontalLayout.addWidget(self.indexLabel)
|
||||
|
||||
self.levelLabel = QLabel(FriedMsg)
|
||||
self.levelLabel.setObjectName(u"levelLabel")
|
||||
self.levelLabel.setMinimumSize(QSize(0, 20))
|
||||
self.levelLabel.setMaximumSize(QSize(16777215, 20))
|
||||
self.levelLabel.setStyleSheet(u"background:#eeA2A4;")
|
||||
|
||||
self.horizontalLayout.addWidget(self.levelLabel)
|
||||
|
||||
self.titleLabel = QLabel(FriedMsg)
|
||||
self.titleLabel.setObjectName(u"titleLabel")
|
||||
self.titleLabel.setMinimumSize(QSize(0, 20))
|
||||
self.titleLabel.setMaximumSize(QSize(16777215, 20))
|
||||
self.titleLabel.setStyleSheet(u"background:#eeA2A4;")
|
||||
|
||||
self.horizontalLayout.addWidget(self.titleLabel)
|
||||
|
||||
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout.addItem(self.horizontalSpacer_2)
|
||||
|
||||
|
||||
self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
|
||||
|
||||
self.widget = QWidget(FriedMsg)
|
||||
self.widget.setObjectName(u"widget")
|
||||
self.verticalLayout_3 = QVBoxLayout(self.widget)
|
||||
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
|
||||
self.commentLabel = QLabel(self.widget)
|
||||
self.commentLabel.setObjectName(u"commentLabel")
|
||||
self.commentLabel.setFont(font)
|
||||
|
||||
self.verticalLayout_3.addWidget(self.commentLabel)
|
||||
|
||||
self.replayLabel = AutoPictureLabel(self.widget)
|
||||
self.replayLabel.setObjectName(u"replayLabel")
|
||||
self.replayLabel.setFont(font)
|
||||
|
||||
self.verticalLayout_3.addWidget(self.replayLabel)
|
||||
|
||||
self.infoLabel = QLabel(self.widget)
|
||||
self.infoLabel.setObjectName(u"infoLabel")
|
||||
font1 = QFont()
|
||||
font1.setFamilies([u"\u5fae\u8f6f\u96c5\u9ed1"])
|
||||
font1.setPointSize(12)
|
||||
font1.setBold(False)
|
||||
font1.setItalic(False)
|
||||
font1.setUnderline(False)
|
||||
self.infoLabel.setFont(font1)
|
||||
self.infoLabel.setStyleSheet(u"color: #999999;")
|
||||
self.infoLabel.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.verticalLayout_3.addWidget(self.infoLabel)
|
||||
|
||||
self.horizontalLayout_2 = QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
||||
self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_2.addItem(self.horizontalSpacer_3)
|
||||
|
||||
self.likeButton = QToolButton(self.widget)
|
||||
self.likeButton.setObjectName(u"likeButton")
|
||||
self.likeButton.setStyleSheet(u"background-color:transparent;")
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.likeButton)
|
||||
|
||||
self.commentButton = QToolButton(self.widget)
|
||||
self.commentButton.setObjectName(u"commentButton")
|
||||
self.commentButton.setStyleSheet(u"background-color:transparent;")
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.commentButton)
|
||||
|
||||
|
||||
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
|
||||
|
||||
self.listWidget = UserListWidget(self.widget)
|
||||
self.listWidget.setObjectName(u"listWidget")
|
||||
self.listWidget.setMinimumSize(QSize(0, 400))
|
||||
self.listWidget.setStyleSheet(u"QListWidget {background-color:transparent;}\n"
|
||||
"QListWidget::item { border-bottom: 1px solid black; }")
|
||||
|
||||
self.verticalLayout_3.addWidget(self.listWidget)
|
||||
|
||||
|
||||
self.gridLayout.addWidget(self.widget, 4, 0, 1, 1)
|
||||
|
||||
|
||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 1, 1, 1)
|
||||
|
||||
|
||||
self.retranslateUi(FriedMsg)
|
||||
self.commentButton.clicked.connect(FriedMsg.OpenComment)
|
||||
|
||||
QMetaObject.connectSlotsByName(FriedMsg)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, FriedMsg):
|
||||
FriedMsg.setWindowTitle(QCoreApplication.translate("FriedMsg", u"Form", None))
|
||||
self.picLabel.setText(QCoreApplication.translate("FriedMsg", u"TextLabel", None))
|
||||
self.nameLabel.setText(QCoreApplication.translate("FriedMsg", u"TextLabel", None))
|
||||
self.indexLabel.setText(QCoreApplication.translate("FriedMsg", u"X\u697c", None))
|
||||
self.levelLabel.setText(QCoreApplication.translate("FriedMsg", u"LV", None))
|
||||
self.titleLabel.setText(QCoreApplication.translate("FriedMsg", u"TextLabel", None))
|
||||
self.commentLabel.setText(QCoreApplication.translate("FriedMsg", u"TextLabel", None))
|
||||
self.replayLabel.setText(QCoreApplication.translate("FriedMsg", u"TextLabel", None))
|
||||
self.infoLabel.setText(QCoreApplication.translate("FriedMsg", u"TextLabel", None))
|
||||
self.likeButton.setText(QCoreApplication.translate("FriedMsg", u"(0)", None))
|
||||
self.commentButton.setText(QCoreApplication.translate("FriedMsg", u"(0)", None))
|
||||
# retranslateUi
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_game.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_game_info.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_help.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_help_log_widget.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_history.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_index.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_line_edit_help_widget.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_login.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_login_proxy_widget.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
@ -111,6 +111,24 @@ class Ui_LoginProxyWidget(object):
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_10)
|
||||
|
||||
self.horizontalLayout_12 = QHBoxLayout()
|
||||
self.horizontalLayout_12.setObjectName(u"horizontalLayout_12")
|
||||
self.proxy_3 = QRadioButton(self.scrollAreaWidgetContents)
|
||||
self.buttonGroup_2.addButton(self.proxy_3)
|
||||
self.proxy_3.setObjectName(u"proxy_3")
|
||||
|
||||
self.horizontalLayout_12.addWidget(self.proxy_3)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_12)
|
||||
|
||||
self.line_3 = QFrame(self.scrollAreaWidgetContents)
|
||||
self.line_3.setObjectName(u"line_3")
|
||||
self.line_3.setFrameShape(QFrame.HLine)
|
||||
self.line_3.setFrameShadow(QFrame.Sunken)
|
||||
|
||||
self.verticalLayout.addWidget(self.line_3)
|
||||
|
||||
self.horizontalLayout_9 = QHBoxLayout()
|
||||
self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
|
||||
self.httpsBox = QCheckBox(self.scrollAreaWidgetContents)
|
||||
@ -122,6 +140,13 @@ class Ui_LoginProxyWidget(object):
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_9)
|
||||
|
||||
self.line_4 = QFrame(self.scrollAreaWidgetContents)
|
||||
self.line_4.setObjectName(u"line_4")
|
||||
self.line_4.setFrameShape(QFrame.HLine)
|
||||
self.line_4.setFrameShadow(QFrame.Sunken)
|
||||
|
||||
self.verticalLayout.addWidget(self.line_4)
|
||||
|
||||
self.horizontalLayout_2 = QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
||||
self.testSpeedButton = QPushButton(self.scrollAreaWidgetContents)
|
||||
@ -216,37 +241,6 @@ class Ui_LoginProxyWidget(object):
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_3)
|
||||
|
||||
self.horizontalLayout_8 = QHBoxLayout()
|
||||
self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
|
||||
self.label_3 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
|
||||
self.horizontalLayout_8.addWidget(self.label_3)
|
||||
|
||||
self.commandLinkButton = QCommandLinkButton(self.scrollAreaWidgetContents)
|
||||
self.commandLinkButton.setObjectName(u"commandLinkButton")
|
||||
|
||||
self.horizontalLayout_8.addWidget(self.commandLinkButton)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_8)
|
||||
|
||||
self.horizontalLayout_6 = QHBoxLayout()
|
||||
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
|
||||
self.label_11 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_11.setObjectName(u"label_11")
|
||||
self.label_11.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.horizontalLayout_6.addWidget(self.label_11)
|
||||
|
||||
self.cdnIp = QLineEdit(self.scrollAreaWidgetContents)
|
||||
self.cdnIp.setObjectName(u"cdnIp")
|
||||
|
||||
self.horizontalLayout_6.addWidget(self.cdnIp)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_6)
|
||||
|
||||
self.horizontalLayout_7 = QHBoxLayout()
|
||||
self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
|
||||
self.radioButton_4 = QRadioButton(self.scrollAreaWidgetContents)
|
||||
@ -270,6 +264,37 @@ class Ui_LoginProxyWidget(object):
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_7)
|
||||
|
||||
self.horizontalLayout_6 = QHBoxLayout()
|
||||
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
|
||||
self.label_11 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_11.setObjectName(u"label_11")
|
||||
self.label_11.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.horizontalLayout_6.addWidget(self.label_11)
|
||||
|
||||
self.cdnIp = QLineEdit(self.scrollAreaWidgetContents)
|
||||
self.cdnIp.setObjectName(u"cdnIp")
|
||||
|
||||
self.horizontalLayout_6.addWidget(self.cdnIp)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_6)
|
||||
|
||||
self.horizontalLayout_8 = QHBoxLayout()
|
||||
self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
|
||||
self.label_3 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
|
||||
self.horizontalLayout_8.addWidget(self.label_3)
|
||||
|
||||
self.commandLinkButton = QCommandLinkButton(self.scrollAreaWidgetContents)
|
||||
self.commandLinkButton.setObjectName(u"commandLinkButton")
|
||||
|
||||
self.horizontalLayout_8.addWidget(self.commandLinkButton)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_8)
|
||||
|
||||
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
|
||||
|
||||
self.gridLayout.addWidget(self.scrollArea, 0, 0, 1, 1)
|
||||
@ -296,7 +321,8 @@ class Ui_LoginProxyWidget(object):
|
||||
self.sockEdit.setToolTip(QCoreApplication.translate("LoginProxyWidget", u"127.0.0.1:10808", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.sockEdit.setPlaceholderText("")
|
||||
self.httpsBox.setText(QCoreApplication.translate("LoginProxyWidget", u"\u542f\u7528HTTPS", None))
|
||||
self.proxy_3.setText(QCoreApplication.translate("LoginProxyWidget", u"\u4f7f\u7528\u7cfb\u7edf\u4ee3\u7406", None))
|
||||
self.httpsBox.setText(QCoreApplication.translate("LoginProxyWidget", u"\u542f\u7528Https\uff08\u5982\u679c\u51fa\u73b0\u8fde\u63a5\u88ab\u91cd\u7f6e\uff0c\u5efa\u8bae\u5173\u95ed\u8bd5\u8bd5\uff09", None))
|
||||
self.testSpeedButton.setText(QCoreApplication.translate("LoginProxyWidget", u"\u6d4b\u901f", None))
|
||||
self.label_2.setText(QCoreApplication.translate("LoginProxyWidget", u"\u76f4\u8fde", None))
|
||||
self.label_4.setText(QCoreApplication.translate("LoginProxyWidget", u"\u4ee3\u7406", None))
|
||||
@ -309,11 +335,11 @@ class Ui_LoginProxyWidget(object):
|
||||
self.radioButton_3.setText(QCoreApplication.translate("LoginProxyWidget", u"\u5206\u6d413", None))
|
||||
self.label5.setText("")
|
||||
self.label6.setText("")
|
||||
self.label_3.setText(QCoreApplication.translate("LoginProxyWidget", u"CDN\u8bbe\u7f6e\u8bf7\u770b\u8bf4\u660e\u83b7\u53d6", None))
|
||||
self.commandLinkButton.setText(QCoreApplication.translate("LoginProxyWidget", u"\u8bf4\u660e", None))
|
||||
self.label_11.setText(QCoreApplication.translate("LoginProxyWidget", u" CDN\u7684IP\u5730\u5740 ", None))
|
||||
self.radioButton_4.setText(QCoreApplication.translate("LoginProxyWidget", u"CDN\u5206\u6d41", None))
|
||||
self.label7.setText("")
|
||||
self.label8.setText("")
|
||||
self.label_11.setText(QCoreApplication.translate("LoginProxyWidget", u" CDN\u7684IP\u5730\u5740 ", None))
|
||||
self.label_3.setText(QCoreApplication.translate("LoginProxyWidget", u"CDN\u8bbe\u7f6e\u8bf7\u770b\u8bf4\u660e\u83b7\u53d6", None))
|
||||
self.commandLinkButton.setText(QCoreApplication.translate("LoginProxyWidget", u"\u8bf4\u660e", None))
|
||||
# retranslateUi
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_login_widget.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_main.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
@ -29,6 +29,7 @@ from view.comment.game_comment_view import GameCommentView
|
||||
from view.comment.my_comment_view import MyCommentView
|
||||
from view.comment.sub_comment_view import SubCommentView
|
||||
from view.download.download_view import DownloadView
|
||||
from view.fried.fried_view import FriedView
|
||||
from view.game.game_view import GameView
|
||||
from view.help.help_view import HelpView
|
||||
from view.index.index_view import IndexView
|
||||
@ -153,6 +154,9 @@ class Ui_Main(object):
|
||||
self.bookEpsView = BookEpsView()
|
||||
self.bookEpsView.setObjectName(u"bookEpsView")
|
||||
self.subStackWidget.addWidget(self.bookEpsView)
|
||||
self.friedView = FriedView()
|
||||
self.friedView.setObjectName(u"friedView")
|
||||
self.subStackWidget.addWidget(self.friedView)
|
||||
|
||||
self.verticalLayout.addWidget(self.subStackWidget)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_main_windows.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
@ -30,6 +30,7 @@ from view.comment.game_comment_view import GameCommentView
|
||||
from view.comment.my_comment_view import MyCommentView
|
||||
from view.comment.sub_comment_view import SubCommentView
|
||||
from view.download.download_view import DownloadView
|
||||
from view.fried.fried_view import FriedView
|
||||
from view.game.game_view import GameView
|
||||
from view.help.help_view import HelpView
|
||||
from view.index.index_view import IndexView
|
||||
@ -160,6 +161,9 @@ class Ui_MainWindows(object):
|
||||
self.bookEpsView = BookEpsView()
|
||||
self.bookEpsView.setObjectName(u"bookEpsView")
|
||||
self.subStackWidget.addWidget(self.bookEpsView)
|
||||
self.friedView = FriedView()
|
||||
self.friedView.setObjectName(u"friedView")
|
||||
self.subStackWidget.addWidget(self.friedView)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.subStackWidget)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_navigation.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
@ -19,6 +19,7 @@ from PySide6.QtWidgets import (QApplication, QButtonGroup, QFrame, QHBoxLayout,
|
||||
QLabel, QPushButton, QSizePolicy, QSpacerItem,
|
||||
QToolButton, QVBoxLayout, QWidget)
|
||||
|
||||
from component.button.switch_button import SwitchButton
|
||||
from component.label.head_label import HeadLabel
|
||||
from component.scroll_area.smooth_scroll_area import SmoothScrollArea
|
||||
import images_rc
|
||||
@ -95,6 +96,36 @@ class Ui_Navigation(object):
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
|
||||
self.horizontalLayout_3 = QHBoxLayout()
|
||||
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
|
||||
self.label_4 = QLabel(self.widget)
|
||||
self.label_4.setObjectName(u"label_4")
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.label_4)
|
||||
|
||||
self.proxyName = QLabel(self.widget)
|
||||
self.proxyName.setObjectName(u"proxyName")
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.proxyName)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_3)
|
||||
|
||||
self.horizontalLayout_4 = QHBoxLayout()
|
||||
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
|
||||
self.label_5 = QLabel(self.widget)
|
||||
self.label_5.setObjectName(u"label_5")
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.label_5)
|
||||
|
||||
self.offlineButton = SwitchButton(self.widget)
|
||||
self.offlineButton.setObjectName(u"offlineButton")
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.offlineButton)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_4)
|
||||
|
||||
self.line_4 = QFrame(self.widget)
|
||||
self.line_4.setObjectName(u"line_4")
|
||||
self.line_4.setFrameShape(QFrame.HLine)
|
||||
@ -107,7 +138,7 @@ class Ui_Navigation(object):
|
||||
self.scrollArea.setWidgetResizable(True)
|
||||
self.scrollAreaWidgetContents = QWidget()
|
||||
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
|
||||
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 211, 654))
|
||||
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 211, 700))
|
||||
self.verticalLayout_3 = QVBoxLayout(self.scrollAreaWidgetContents)
|
||||
self.verticalLayout_3.setSpacing(6)
|
||||
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
|
||||
@ -286,6 +317,20 @@ class Ui_Navigation(object):
|
||||
|
||||
self.verticalLayout_3.addWidget(self.gameButton)
|
||||
|
||||
self.friedButton = QToolButton(self.scrollAreaWidgetContents)
|
||||
self.buttonGroup.addButton(self.friedButton)
|
||||
self.friedButton.setObjectName(u"friedButton")
|
||||
sizePolicy1.setHeightForWidth(self.friedButton.sizePolicy().hasHeightForWidth())
|
||||
self.friedButton.setSizePolicy(sizePolicy1)
|
||||
self.friedButton.setMinimumSize(QSize(150, 40))
|
||||
self.friedButton.setFocusPolicy(Qt.NoFocus)
|
||||
self.friedButton.setIcon(icon)
|
||||
self.friedButton.setIconSize(QSize(32, 32))
|
||||
self.friedButton.setCheckable(True)
|
||||
self.friedButton.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
|
||||
self.verticalLayout_3.addWidget(self.friedButton)
|
||||
|
||||
self.line_2 = QFrame(self.scrollAreaWidgetContents)
|
||||
self.line_2.setObjectName(u"line_2")
|
||||
self.line_2.setFrameShape(QFrame.HLine)
|
||||
@ -389,6 +434,9 @@ class Ui_Navigation(object):
|
||||
self.titleLabel.setText("")
|
||||
self.expLabel.setText("")
|
||||
self.levelLabel.setText("")
|
||||
self.label_4.setText(QCoreApplication.translate("Navigation", u"\u5206\u6d41\uff1a", None))
|
||||
self.proxyName.setText("")
|
||||
self.label_5.setText(QCoreApplication.translate("Navigation", u"\u79bb\u7ebf\u6a21\u5f0f\uff1a", None))
|
||||
self.label.setText(QCoreApplication.translate("Navigation", u"\u7528\u6237", None))
|
||||
self.collectButton.setText(QCoreApplication.translate("Navigation", u"\u6211\u7684\u6536\u85cf", None))
|
||||
self.myCommentButton.setText(QCoreApplication.translate("Navigation", u"\u6211\u7684\u8bc4\u8bba", None))
|
||||
@ -401,6 +449,7 @@ class Ui_Navigation(object):
|
||||
self.rankButton.setText(QCoreApplication.translate("Navigation", u"\u6392\u884c\u699c", None))
|
||||
self.chatButton.setText(QCoreApplication.translate("Navigation", u"\u804a\u5929\u5ba4", None))
|
||||
self.gameButton.setText(QCoreApplication.translate("Navigation", u"\u6e38\u620f\u533a", None))
|
||||
self.friedButton.setText(QCoreApplication.translate("Navigation", u"\u9505\u8d34", None))
|
||||
self.label_3.setText(QCoreApplication.translate("Navigation", u"\u5176\u4ed6", None))
|
||||
self.downloadButton.setText(QCoreApplication.translate("Navigation", u"\u4e0b\u8f7d", None))
|
||||
self.waifu2xButton.setText(QCoreApplication.translate("Navigation", u"Waifu2x", None))
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_rank.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_read_tool.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
@ -40,7 +40,7 @@ class Ui_ReadImg(object):
|
||||
self.scrollArea22.setWidgetResizable(True)
|
||||
self.scrollAreaWidgetContents = QWidget()
|
||||
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
|
||||
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 318, 815))
|
||||
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 310, 825))
|
||||
self.verticalLayout_2 = QVBoxLayout(self.scrollAreaWidgetContents)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.verticalLayout = QVBoxLayout()
|
||||
@ -101,10 +101,70 @@ class Ui_ReadImg(object):
|
||||
|
||||
self.gridLayout = QGridLayout()
|
||||
self.gridLayout.setObjectName(u"gridLayout")
|
||||
self.horizontalLayout_8 = QHBoxLayout()
|
||||
self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
|
||||
self.modelLabel = QLabel(self.scrollAreaWidgetContents)
|
||||
self.modelLabel.setObjectName(u"modelLabel")
|
||||
|
||||
self.horizontalLayout_8.addWidget(self.modelLabel)
|
||||
|
||||
self.modelBox = WheelComboBox(self.scrollAreaWidgetContents)
|
||||
self.modelBox.addItem("")
|
||||
self.modelBox.addItem("")
|
||||
self.modelBox.addItem("")
|
||||
self.modelBox.addItem("")
|
||||
self.modelBox.setObjectName(u"modelBox")
|
||||
|
||||
self.horizontalLayout_8.addWidget(self.modelBox)
|
||||
|
||||
|
||||
self.gridLayout.addLayout(self.horizontalLayout_8, 6, 1, 1, 1)
|
||||
|
||||
self.label_8 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_8.setObjectName(u"label_8")
|
||||
self.label_8.setMaximumSize(QSize(35, 16777215))
|
||||
|
||||
self.gridLayout.addWidget(self.label_8, 6, 0, 1, 1)
|
||||
|
||||
self.label_3 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
|
||||
self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1)
|
||||
|
||||
self.label_9 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_9.setObjectName(u"label_9")
|
||||
|
||||
self.gridLayout.addWidget(self.label_9, 7, 0, 1, 1)
|
||||
|
||||
self.tickLabel = QLabel(self.scrollAreaWidgetContents)
|
||||
self.tickLabel.setObjectName(u"tickLabel")
|
||||
|
||||
self.gridLayout.addWidget(self.tickLabel, 10, 0, 1, 1)
|
||||
|
||||
self.waifu2xTick = QLabel(self.scrollAreaWidgetContents)
|
||||
self.waifu2xTick.setObjectName(u"waifu2xTick")
|
||||
|
||||
self.gridLayout.addWidget(self.waifu2xTick, 10, 1, 1, 1)
|
||||
|
||||
self.gpuLabel = QLabel(self.scrollAreaWidgetContents)
|
||||
self.gpuLabel.setObjectName(u"gpuLabel")
|
||||
|
||||
self.gridLayout.addWidget(self.gpuLabel, 7, 1, 1, 1)
|
||||
|
||||
self.waifu2xRes = QLabel(self.scrollAreaWidgetContents)
|
||||
self.waifu2xRes.setObjectName(u"waifu2xRes")
|
||||
|
||||
self.gridLayout.addWidget(self.waifu2xRes, 8, 1, 1, 1)
|
||||
|
||||
self.waifu2xStatus = QLabel(self.scrollAreaWidgetContents)
|
||||
self.waifu2xStatus.setObjectName(u"waifu2xStatus")
|
||||
|
||||
self.gridLayout.addWidget(self.waifu2xStatus, 10, 1, 1, 1)
|
||||
self.gridLayout.addWidget(self.waifu2xStatus, 11, 1, 1, 1)
|
||||
|
||||
self.waifu2xSave = QPushButton(self.scrollAreaWidgetContents)
|
||||
self.waifu2xSave.setObjectName(u"waifu2xSave")
|
||||
|
||||
self.gridLayout.addWidget(self.waifu2xSave, 3, 0, 1, 1)
|
||||
|
||||
self.horizontalLayout_9 = QHBoxLayout()
|
||||
self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
|
||||
@ -114,7 +174,39 @@ class Ui_ReadImg(object):
|
||||
self.horizontalLayout_9.addWidget(self.waifu2xCancle)
|
||||
|
||||
|
||||
self.gridLayout.addLayout(self.horizontalLayout_9, 2, 1, 1, 1)
|
||||
self.gridLayout.addLayout(self.horizontalLayout_9, 3, 1, 1, 1)
|
||||
|
||||
self.waifu2xSize = QLabel(self.scrollAreaWidgetContents)
|
||||
self.waifu2xSize.setObjectName(u"waifu2xSize")
|
||||
|
||||
self.gridLayout.addWidget(self.waifu2xSize, 9, 1, 1, 1)
|
||||
|
||||
self.label_2 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
|
||||
self.gridLayout.addWidget(self.label_2, 4, 0, 1, 1)
|
||||
|
||||
self.checkBox = QCheckBox(self.scrollAreaWidgetContents)
|
||||
self.checkBox.setObjectName(u"checkBox")
|
||||
self.checkBox.setStyleSheet(u"")
|
||||
self.checkBox.setChecked(True)
|
||||
|
||||
self.gridLayout.addWidget(self.checkBox, 1, 0, 1, 1)
|
||||
|
||||
self.curWaifu2x = QCheckBox(self.scrollAreaWidgetContents)
|
||||
self.curWaifu2x.setObjectName(u"curWaifu2x")
|
||||
|
||||
self.gridLayout.addWidget(self.curWaifu2x, 1, 1, 1, 1)
|
||||
|
||||
self.stateWaifu = QLabel(self.scrollAreaWidgetContents)
|
||||
self.stateWaifu.setObjectName(u"stateWaifu")
|
||||
|
||||
self.gridLayout.addWidget(self.stateWaifu, 11, 0, 1, 1)
|
||||
|
||||
self.resolutionWaifu = QLabel(self.scrollAreaWidgetContents)
|
||||
self.resolutionWaifu.setObjectName(u"resolutionWaifu")
|
||||
|
||||
self.gridLayout.addWidget(self.resolutionWaifu, 8, 0, 1, 1)
|
||||
|
||||
self.horizontalLayout_6 = QHBoxLayout()
|
||||
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
|
||||
@ -133,82 +225,12 @@ class Ui_ReadImg(object):
|
||||
self.horizontalLayout_6.addWidget(self.scaleBox)
|
||||
|
||||
|
||||
self.gridLayout.addLayout(self.horizontalLayout_6, 4, 1, 1, 1)
|
||||
|
||||
self.label_9 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_9.setObjectName(u"label_9")
|
||||
|
||||
self.gridLayout.addWidget(self.label_9, 6, 0, 1, 1)
|
||||
|
||||
self.waifu2xSize = QLabel(self.scrollAreaWidgetContents)
|
||||
self.waifu2xSize.setObjectName(u"waifu2xSize")
|
||||
|
||||
self.gridLayout.addWidget(self.waifu2xSize, 8, 1, 1, 1)
|
||||
|
||||
self.label_2 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
|
||||
self.gridLayout.addWidget(self.label_2, 3, 0, 1, 1)
|
||||
|
||||
self.gpuLabel = QLabel(self.scrollAreaWidgetContents)
|
||||
self.gpuLabel.setObjectName(u"gpuLabel")
|
||||
|
||||
self.gridLayout.addWidget(self.gpuLabel, 6, 1, 1, 1)
|
||||
|
||||
self.tickLabel = QLabel(self.scrollAreaWidgetContents)
|
||||
self.tickLabel.setObjectName(u"tickLabel")
|
||||
|
||||
self.gridLayout.addWidget(self.tickLabel, 9, 0, 1, 1)
|
||||
|
||||
self.waifu2xTick = QLabel(self.scrollAreaWidgetContents)
|
||||
self.waifu2xTick.setObjectName(u"waifu2xTick")
|
||||
|
||||
self.gridLayout.addWidget(self.waifu2xTick, 9, 1, 1, 1)
|
||||
|
||||
self.stateWaifu = QLabel(self.scrollAreaWidgetContents)
|
||||
self.stateWaifu.setObjectName(u"stateWaifu")
|
||||
|
||||
self.gridLayout.addWidget(self.stateWaifu, 10, 0, 1, 1)
|
||||
|
||||
self.label_3 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
|
||||
self.gridLayout.addWidget(self.label_3, 4, 0, 1, 1)
|
||||
|
||||
self.horizontalLayout_8 = QHBoxLayout()
|
||||
self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
|
||||
self.modelLabel = QLabel(self.scrollAreaWidgetContents)
|
||||
self.modelLabel.setObjectName(u"modelLabel")
|
||||
|
||||
self.horizontalLayout_8.addWidget(self.modelLabel)
|
||||
|
||||
self.modelBox = WheelComboBox(self.scrollAreaWidgetContents)
|
||||
self.modelBox.addItem("")
|
||||
self.modelBox.addItem("")
|
||||
self.modelBox.addItem("")
|
||||
self.modelBox.addItem("")
|
||||
self.modelBox.setObjectName(u"modelBox")
|
||||
|
||||
self.horizontalLayout_8.addWidget(self.modelBox)
|
||||
|
||||
|
||||
self.gridLayout.addLayout(self.horizontalLayout_8, 5, 1, 1, 1)
|
||||
self.gridLayout.addLayout(self.horizontalLayout_6, 5, 1, 1, 1)
|
||||
|
||||
self.sizeWaifu = QLabel(self.scrollAreaWidgetContents)
|
||||
self.sizeWaifu.setObjectName(u"sizeWaifu")
|
||||
|
||||
self.gridLayout.addWidget(self.sizeWaifu, 8, 0, 1, 1)
|
||||
|
||||
self.label_8 = QLabel(self.scrollAreaWidgetContents)
|
||||
self.label_8.setObjectName(u"label_8")
|
||||
self.label_8.setMaximumSize(QSize(35, 16777215))
|
||||
|
||||
self.gridLayout.addWidget(self.label_8, 5, 0, 1, 1)
|
||||
|
||||
self.resolutionWaifu = QLabel(self.scrollAreaWidgetContents)
|
||||
self.resolutionWaifu.setObjectName(u"resolutionWaifu")
|
||||
|
||||
self.gridLayout.addWidget(self.resolutionWaifu, 7, 0, 1, 1)
|
||||
self.gridLayout.addWidget(self.sizeWaifu, 9, 0, 1, 1)
|
||||
|
||||
self.horizontalLayout_3 = QHBoxLayout()
|
||||
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
|
||||
@ -228,29 +250,12 @@ class Ui_ReadImg(object):
|
||||
self.horizontalLayout_3.addWidget(self.noiseBox)
|
||||
|
||||
|
||||
self.gridLayout.addLayout(self.horizontalLayout_3, 3, 1, 1, 1)
|
||||
self.gridLayout.addLayout(self.horizontalLayout_3, 4, 1, 1, 1)
|
||||
|
||||
self.waifu2xRes = QLabel(self.scrollAreaWidgetContents)
|
||||
self.waifu2xRes.setObjectName(u"waifu2xRes")
|
||||
self.preDownWaifu2x = QCheckBox(self.scrollAreaWidgetContents)
|
||||
self.preDownWaifu2x.setObjectName(u"preDownWaifu2x")
|
||||
|
||||
self.gridLayout.addWidget(self.waifu2xRes, 7, 1, 1, 1)
|
||||
|
||||
self.waifu2xSave = QPushButton(self.scrollAreaWidgetContents)
|
||||
self.waifu2xSave.setObjectName(u"waifu2xSave")
|
||||
|
||||
self.gridLayout.addWidget(self.waifu2xSave, 2, 0, 1, 1)
|
||||
|
||||
self.curWaifu2x = QCheckBox(self.scrollAreaWidgetContents)
|
||||
self.curWaifu2x.setObjectName(u"curWaifu2x")
|
||||
|
||||
self.gridLayout.addWidget(self.curWaifu2x, 1, 1, 1, 1)
|
||||
|
||||
self.checkBox = QCheckBox(self.scrollAreaWidgetContents)
|
||||
self.checkBox.setObjectName(u"checkBox")
|
||||
self.checkBox.setStyleSheet(u"")
|
||||
self.checkBox.setChecked(True)
|
||||
|
||||
self.gridLayout.addWidget(self.checkBox, 1, 0, 1, 1)
|
||||
self.gridLayout.addWidget(self.preDownWaifu2x, 2, 1, 1, 1)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.gridLayout)
|
||||
@ -488,26 +493,30 @@ class Ui_ReadImg(object):
|
||||
self.stateLable.setText(QCoreApplication.translate("ReadImg", u"\u72b6\u6001\uff1a", None))
|
||||
self.epsLabel.setText(QCoreApplication.translate("ReadImg", u"\u4f4d\u7f6e\uff1a", None))
|
||||
self.label.setText(QCoreApplication.translate("ReadImg", u"Waifu2x\u53c2\u6570", None))
|
||||
self.waifu2xStatus.setText("")
|
||||
self.waifu2xCancle.setText(QCoreApplication.translate("ReadImg", u"\u4fdd\u5b58", None))
|
||||
self.scaleLabel.setText(QCoreApplication.translate("ReadImg", u"2", None))
|
||||
self.label_9.setText(QCoreApplication.translate("ReadImg", u"\u8f6c\u6362\u6a21\u5f0f\uff1a", None))
|
||||
self.waifu2xSize.setText("")
|
||||
self.label_2.setText(QCoreApplication.translate("ReadImg", u"\u53bb\u566a\u7b49\u7ea7\uff1a", None))
|
||||
self.gpuLabel.setText(QCoreApplication.translate("ReadImg", u"GPU", None))
|
||||
self.tickLabel.setText(QCoreApplication.translate("ReadImg", u"\u8017\u65f6\uff1a", None))
|
||||
self.waifu2xTick.setText("")
|
||||
self.stateWaifu.setText(QCoreApplication.translate("ReadImg", u"\u72b6\u6001\uff1a", None))
|
||||
self.label_3.setText(QCoreApplication.translate("ReadImg", u"\u653e\u5927\u500d\u6570\uff1a", None))
|
||||
self.modelLabel.setText(QCoreApplication.translate("ReadImg", u"CUNET", None))
|
||||
self.modelBox.setItemText(0, QCoreApplication.translate("ReadImg", u"\u81ea\u52a8", None))
|
||||
self.modelBox.setItemText(1, QCoreApplication.translate("ReadImg", u"cunet", None))
|
||||
self.modelBox.setItemText(2, QCoreApplication.translate("ReadImg", u"photo", None))
|
||||
self.modelBox.setItemText(3, QCoreApplication.translate("ReadImg", u"anime_style_art_rgb", None))
|
||||
|
||||
self.sizeWaifu.setText(QCoreApplication.translate("ReadImg", u"\u5927\u5c0f\uff1a", None))
|
||||
self.label_8.setText(QCoreApplication.translate("ReadImg", u"\u6a21\u578b\uff1a", None))
|
||||
self.label_3.setText(QCoreApplication.translate("ReadImg", u"\u653e\u5927\u500d\u6570\uff1a", None))
|
||||
self.label_9.setText(QCoreApplication.translate("ReadImg", u"\u8f6c\u6362\u6a21\u5f0f\uff1a", None))
|
||||
self.tickLabel.setText(QCoreApplication.translate("ReadImg", u"\u8017\u65f6\uff1a", None))
|
||||
self.waifu2xTick.setText("")
|
||||
self.gpuLabel.setText(QCoreApplication.translate("ReadImg", u"GPU", None))
|
||||
self.waifu2xRes.setText("")
|
||||
self.waifu2xStatus.setText("")
|
||||
self.waifu2xSave.setText(QCoreApplication.translate("ReadImg", u"\u4fee\u6539\u53c2\u6570", None))
|
||||
self.waifu2xCancle.setText(QCoreApplication.translate("ReadImg", u"\u4fdd\u5b58", None))
|
||||
self.waifu2xSize.setText("")
|
||||
self.label_2.setText(QCoreApplication.translate("ReadImg", u"\u53bb\u566a\u7b49\u7ea7\uff1a", None))
|
||||
self.checkBox.setText(QCoreApplication.translate("ReadImg", u"\u81ea\u52a8Waifu2x", None))
|
||||
self.curWaifu2x.setText(QCoreApplication.translate("ReadImg", u"\u672c\u5f20\u56fe\u5f00\u542fWaifu2x (F2)", None))
|
||||
self.stateWaifu.setText(QCoreApplication.translate("ReadImg", u"\u72b6\u6001\uff1a", None))
|
||||
self.resolutionWaifu.setText(QCoreApplication.translate("ReadImg", u"\u5206\u8fa8\u7387\uff1a", None))
|
||||
self.scaleLabel.setText(QCoreApplication.translate("ReadImg", u"2", None))
|
||||
self.sizeWaifu.setText(QCoreApplication.translate("ReadImg", u"\u5927\u5c0f\uff1a", None))
|
||||
self.noiseLabel.setText(QCoreApplication.translate("ReadImg", u"3", None))
|
||||
self.noiseBox.setItemText(0, QCoreApplication.translate("ReadImg", u"\u81ea\u52a8", None))
|
||||
self.noiseBox.setItemText(1, QCoreApplication.translate("ReadImg", u"0", None))
|
||||
@ -515,10 +524,7 @@ class Ui_ReadImg(object):
|
||||
self.noiseBox.setItemText(3, QCoreApplication.translate("ReadImg", u"2", None))
|
||||
self.noiseBox.setItemText(4, QCoreApplication.translate("ReadImg", u"3", None))
|
||||
|
||||
self.waifu2xRes.setText("")
|
||||
self.waifu2xSave.setText(QCoreApplication.translate("ReadImg", u"\u4fee\u6539\u53c2\u6570", None))
|
||||
self.curWaifu2x.setText(QCoreApplication.translate("ReadImg", u"\u672c\u5f20\u56fe\u5f00\u542fWaifu2x (F2)", None))
|
||||
self.checkBox.setText(QCoreApplication.translate("ReadImg", u"\u81ea\u52a8Waifu2x", None))
|
||||
self.preDownWaifu2x.setText(QCoreApplication.translate("ReadImg", u"\u4f18\u5148\u4f7f\u7528\u4e0b\u8f7d\u8f6c\u6362\u597d\u7684", None))
|
||||
self.label_6.setText(QCoreApplication.translate("ReadImg", u"\u7ffb\u9875\u8bbe\u7f6e", None))
|
||||
self.label_5.setText(QCoreApplication.translate("ReadImg", u"\u7ffb\u9875\u6a21\u5f0f\uff1a", None))
|
||||
self.comboBox.setItemText(0, QCoreApplication.translate("ReadImg", u"\u4e0a\u4e0b\u6eda\u52a8", None))
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_register_widget.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_search.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_setting_new.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
@ -83,7 +83,7 @@ class Ui_SettingNew(object):
|
||||
self.scrollArea.setWidgetResizable(True)
|
||||
self.scrollAreaWidgetContents = QWidget()
|
||||
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
|
||||
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 661, 2648))
|
||||
self.scrollAreaWidgetContents.setGeometry(QRect(0, -980, 661, 2734))
|
||||
self.scrollAreaWidgetContents.setStyleSheet(u"")
|
||||
self.verticalLayout_4 = QVBoxLayout(self.scrollAreaWidgetContents)
|
||||
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
|
||||
@ -587,6 +587,31 @@ class Ui_SettingNew(object):
|
||||
|
||||
self.verticalLayout_8.addLayout(self.horizontalLayout_24)
|
||||
|
||||
self.horizontalLayout_27 = QHBoxLayout()
|
||||
self.horizontalLayout_27.setObjectName(u"horizontalLayout_27")
|
||||
self.proxy3 = QRadioButton(self.frame_5)
|
||||
self.proxyGroup.addButton(self.proxy3)
|
||||
self.proxy3.setObjectName(u"proxy3")
|
||||
|
||||
self.horizontalLayout_27.addWidget(self.proxy3)
|
||||
|
||||
|
||||
self.verticalLayout_8.addLayout(self.horizontalLayout_27)
|
||||
|
||||
self.horizontalLayout_28 = QHBoxLayout()
|
||||
self.horizontalLayout_28.setObjectName(u"horizontalLayout_28")
|
||||
self.openProxy = QPushButton(self.frame_5)
|
||||
self.openProxy.setObjectName(u"openProxy")
|
||||
|
||||
self.horizontalLayout_28.addWidget(self.openProxy)
|
||||
|
||||
self.horizontalSpacer_26 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_28.addItem(self.horizontalSpacer_26)
|
||||
|
||||
|
||||
self.verticalLayout_8.addLayout(self.horizontalLayout_28)
|
||||
|
||||
|
||||
self.verticalLayout_4.addWidget(self.frame_5)
|
||||
|
||||
@ -709,6 +734,11 @@ class Ui_SettingNew(object):
|
||||
|
||||
self.verticalLayout_10.addWidget(self.readCheckBox)
|
||||
|
||||
self.preDownWaifu2x = QCheckBox(self.frame_8)
|
||||
self.preDownWaifu2x.setObjectName(u"preDownWaifu2x")
|
||||
|
||||
self.verticalLayout_10.addWidget(self.preDownWaifu2x)
|
||||
|
||||
self.horizontalLayout_21 = QHBoxLayout()
|
||||
self.horizontalLayout_21.setObjectName(u"horizontalLayout_21")
|
||||
self.label_28 = QLabel(self.frame_8)
|
||||
@ -1305,6 +1335,8 @@ class Ui_SettingNew(object):
|
||||
self.label_31.setText(QCoreApplication.translate("SettingNew", u"\u4ee3\u7406\u5730\u5740", None))
|
||||
self.proxy2.setText(QCoreApplication.translate("SettingNew", u"Sock5\u4ee3\u7406", None))
|
||||
self.label_32.setText(QCoreApplication.translate("SettingNew", u"\u4ee3\u7406\u5730\u5740", None))
|
||||
self.proxy3.setText(QCoreApplication.translate("SettingNew", u"\u4f7f\u7528\u7cfb\u7edf\u4ee3\u7406", None))
|
||||
self.openProxy.setText(QCoreApplication.translate("SettingNew", u"\u6253\u5f00\u5206\u6d41\u8bbe\u7f6e", None))
|
||||
self.label_9.setText(QCoreApplication.translate("SettingNew", u"\u804a\u5929\u5ba4\uff1a", None))
|
||||
self.chatProxy.setText(QCoreApplication.translate("SettingNew", u"\u542f\u7528\u4ee3\u7406", None))
|
||||
self.waifu2xLabel.setText(QCoreApplication.translate("SettingNew", u"Waifu2x\u8bbe\u7f6e", None))
|
||||
@ -1314,6 +1346,7 @@ class Ui_SettingNew(object):
|
||||
|
||||
self.label_12.setText(QCoreApplication.translate("SettingNew", u"Waifu2x\u770b\u56fe\u6a21\u5f0f", None))
|
||||
self.readCheckBox.setText(QCoreApplication.translate("SettingNew", u"\u662f\u5426\u542f\u7528", None))
|
||||
self.preDownWaifu2x.setText(QCoreApplication.translate("SettingNew", u"\u4f18\u5148\u4f7f\u7528\u4e0b\u8f7d\u8f6c\u6362\u597d\u7684\u7f13\u5b58", None))
|
||||
self.label_28.setText(QCoreApplication.translate("SettingNew", u"\u4e3a\u4e86\u4fdd\u8bc1\u901f\u5ea6\uff0c\u56fe\u7247\u5206\u8fa8\u7387\u5c0f\u4e8e\u7b49\u4e8e\u8be5\u503c\u65f6\u624d\u8fdb\u884c\u8f6c\u6362\uff08\u9ed8\u8ba44096P\uff09", None))
|
||||
self.label_13.setText(QCoreApplication.translate("SettingNew", u"\u53bb\u566a\u7b49\u7ea7", None))
|
||||
self.readNoise.setItemText(0, QCoreApplication.translate("SettingNew", u"0", None))
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_sub_comment.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_title_bar.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'ui_waifu2x_tool.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.2.2
|
||||
## Created by: Qt User Interface Compiler version 6.2.4
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
@ -237,12 +237,29 @@ class Ui_Waifu2xTool(object):
|
||||
|
||||
self.gpuLabel = QLabel(Waifu2xTool)
|
||||
self.gpuLabel.setObjectName(u"gpuLabel")
|
||||
self.gpuLabel.setWordWrap(True)
|
||||
|
||||
self.horizontalLayout_11.addWidget(self.gpuLabel)
|
||||
|
||||
|
||||
self.verticalLayout_3.addLayout(self.horizontalLayout_11)
|
||||
|
||||
self.horizontalLayout = QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.label = QLabel(Waifu2xTool)
|
||||
self.label.setObjectName(u"label")
|
||||
self.label.setMaximumSize(QSize(60, 16777215))
|
||||
|
||||
self.horizontalLayout.addWidget(self.label)
|
||||
|
||||
self.format = QLabel(Waifu2xTool)
|
||||
self.format.setObjectName(u"format")
|
||||
|
||||
self.horizontalLayout.addWidget(self.format)
|
||||
|
||||
|
||||
self.verticalLayout_3.addLayout(self.horizontalLayout)
|
||||
|
||||
self.horizontalLayout_10 = QHBoxLayout()
|
||||
self.horizontalLayout_10.setObjectName(u"horizontalLayout_10")
|
||||
self.label_6 = QLabel(Waifu2xTool)
|
||||
@ -370,6 +387,8 @@ class Ui_Waifu2xTool(object):
|
||||
self.sizeLabel.setText(QCoreApplication.translate("Waifu2xTool", u"\u65e0\u4fe1\u606f", None))
|
||||
self.label_9.setText(QCoreApplication.translate("Waifu2xTool", u"\u8f6c\u6362\u6a21\u5f0f\uff1a", None))
|
||||
self.gpuLabel.setText(QCoreApplication.translate("Waifu2xTool", u"GPU", None))
|
||||
self.label.setText(QCoreApplication.translate("Waifu2xTool", u"\u683c\u5f0f", None))
|
||||
self.format.setText("")
|
||||
self.label_6.setText(QCoreApplication.translate("Waifu2xTool", u"\u8017\u65f6\uff1a", None))
|
||||
self.tickLabel.setText("")
|
||||
self.oepnButton.setText(QCoreApplication.translate("Waifu2xTool", u"\u6253\u5f00\u56fe\u7247", None))
|
||||
|
@ -5,6 +5,7 @@ from PySide6.QtCore import QFile
|
||||
|
||||
from component.label.msg_label import MsgLabel
|
||||
from tools.singleton import Singleton
|
||||
from tools.str import Str
|
||||
from tools.tool import ToolUtil
|
||||
|
||||
|
||||
@ -15,10 +16,12 @@ class QtOwner(Singleton):
|
||||
self._app = None
|
||||
self.backSock = None
|
||||
self.isUseDb = True
|
||||
self.isOfflineModel = False
|
||||
|
||||
# db不可使用
|
||||
def SetDbError(self):
|
||||
self.owner.searchView.SetDbError()
|
||||
self.isUseDb = False
|
||||
return
|
||||
|
||||
def ShowError(self, msg):
|
||||
@ -27,6 +30,27 @@ class QtOwner(Singleton):
|
||||
def ShowMsg(self, msg):
|
||||
return MsgLabel.ShowMsgEx(self.owner, msg)
|
||||
|
||||
def CheckShowMsg(self, raw):
|
||||
msg = raw.get("st")
|
||||
code = raw.get("code")
|
||||
if code:
|
||||
errorMsg = ToolUtil.GetCodeErrMsg(code)
|
||||
if errorMsg:
|
||||
return self.ShowError(errorMsg)
|
||||
|
||||
errorMsg = raw.get("errorMsg")
|
||||
if errorMsg:
|
||||
return self.ShowError(errorMsg)
|
||||
|
||||
message = raw.get("message")
|
||||
if message:
|
||||
return self.ShowMsg(message)
|
||||
|
||||
elif isinstance(msg, int):
|
||||
return self.ShowError(Str.GetStr(msg))
|
||||
else:
|
||||
return self.ShowError(msg)
|
||||
|
||||
def ShowMsgOne(self, msg):
|
||||
if not hasattr(self.owner, "msgLabel"):
|
||||
return
|
||||
@ -147,13 +171,20 @@ class QtOwner(Singleton):
|
||||
self.owner.searchView2.searchTab.setText("TAG: {}".format(text))
|
||||
self.owner.SwitchWidget(self.owner.searchView2, **arg)
|
||||
|
||||
def OpenRecomment(self, bookId):
|
||||
Title = "看了这边本子的人也在看"
|
||||
arg = {"recoment": 1, "bookId": bookId}
|
||||
self.owner.searchView2.setWindowTitle(Title)
|
||||
self.owner.searchView2.searchTab.setText(Title)
|
||||
self.owner.SwitchWidget(self.owner.searchView2, **arg)
|
||||
|
||||
def OpenSearchByText(self, text):
|
||||
self.owner.searchView.lineEdit.setText(text)
|
||||
self.owner.searchView.lineEdit.Search()
|
||||
|
||||
def OpenReadView(self, bookId, index, pageIndex):
|
||||
def OpenReadView(self, bookId, index, pageIndex, isOffline=False):
|
||||
self.owner.totalStackWidget.setCurrentIndex(1)
|
||||
self.owner.readView.OpenPage(bookId, index, pageIndex=pageIndex)
|
||||
self.owner.readView.OpenPage(bookId, index, pageIndex=pageIndex, isOffline=isOffline)
|
||||
|
||||
def CloseReadView(self):
|
||||
self.owner.totalStackWidget.setCurrentIndex(0)
|
||||
|
@ -3,6 +3,6 @@ websocket-client==0.59.0
|
||||
requests==2.26.0
|
||||
urllib3==1.25.11
|
||||
pillow==8.3.2
|
||||
waifu2x-vulkan==1.1.2
|
||||
waifu2x-vulkan==1.1.4
|
||||
Pysocks==1.7.1
|
||||
# pywin32==302
|
@ -18,8 +18,10 @@ class ServerReq(object):
|
||||
self.isUseHttps = True
|
||||
if Setting.IsHttpProxy.value == 1:
|
||||
self.proxy = {"http": Setting.HttpProxy.value, "https": Setting.HttpProxy.value}
|
||||
else:
|
||||
elif Setting.IsHttpProxy.value == 3:
|
||||
self.proxy = {}
|
||||
else:
|
||||
self.proxy = {"http": None, "https": None}
|
||||
|
||||
def __str__(self):
|
||||
# if Setting.LogIndex.value == 0:
|
||||
@ -501,10 +503,13 @@ class AppInfoReq(ServerReq):
|
||||
|
||||
# 锅贴评论列表
|
||||
class AppCommentInfoReq(ServerReq):
|
||||
def __init__(self, id, token, page=0):
|
||||
def __init__(self, id, token="", page=0):
|
||||
url = "https://post-api.wikawika.xyz"
|
||||
url = url + "/posts/{}/comments?offset={}".format(id, str(page))
|
||||
method = "GET"
|
||||
if not token:
|
||||
from server.server import Server
|
||||
token = Server().token
|
||||
header = {
|
||||
"Referer": url + "/?token=" + token,
|
||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
|
||||
@ -513,6 +518,44 @@ class AppCommentInfoReq(ServerReq):
|
||||
super(self.__class__, self).__init__(url, header, {}, method)
|
||||
|
||||
|
||||
# 锅贴发送评论列表
|
||||
class AppSendCommentInfoReq(ServerReq):
|
||||
def __init__(self, id, data="", token=""):
|
||||
url = "https://post-api.wikawika.xyz"
|
||||
url = url + "/comments"
|
||||
method = "POST"
|
||||
if not token:
|
||||
from server.server import Server
|
||||
token = Server().token
|
||||
header = {
|
||||
"Referer": url + "/?token=" + token,
|
||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
|
||||
"token": token,
|
||||
"Content-Type": "application/json",
|
||||
}
|
||||
data = {"content": data, "postId": id}
|
||||
super(self.__class__, self).__init__(url, header, data, method)
|
||||
|
||||
|
||||
# 锅贴发送评论列表
|
||||
class AppCommentLikeReq(ServerReq):
|
||||
def __init__(self, id, subID, token=""):
|
||||
url = "https://post-api.wikawika.xyz"
|
||||
url = url + "/comments/{}/like".format(subID)
|
||||
method = "PUT"
|
||||
if not token:
|
||||
from server.server import Server
|
||||
token = Server().token
|
||||
header = {
|
||||
"Referer": url + "/?token=" + token,
|
||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36",
|
||||
"token": token,
|
||||
"Content-Type": "application/json",
|
||||
}
|
||||
data = {"postId": id}
|
||||
super(self.__class__, self).__init__(url, header, data, method)
|
||||
|
||||
|
||||
# 游戏区列表
|
||||
class GetGameReq(ServerReq):
|
||||
def __init__(self, page=1):
|
||||
|
@ -1,4 +1,5 @@
|
||||
import json
|
||||
import pickle
|
||||
import threading
|
||||
from queue import Queue
|
||||
|
||||
@ -9,6 +10,7 @@ from urllib3.util.ssl_ import is_ipaddress
|
||||
import server.req as req
|
||||
import server.res as res
|
||||
from config import config
|
||||
from qt_owner import QtOwner
|
||||
from task.qt_task import TaskBase
|
||||
from tools.log import Log
|
||||
from tools.singleton import Singleton
|
||||
@ -22,6 +24,9 @@ from urllib3.util import connection
|
||||
_orig_create_connection = connection.create_connection
|
||||
|
||||
host_table = {}
|
||||
# import urllib3.contrib.pyopenssl
|
||||
# urllib3.contrib.pyopenssl.HAS_SNI = False
|
||||
# urllib3.contrib.pyopenssl.inject_into_urllib3()
|
||||
|
||||
|
||||
def _dns_resolver(host):
|
||||
@ -183,6 +188,12 @@ class Server(Singleton):
|
||||
def _Send(self, task):
|
||||
try:
|
||||
Log.Info("request-> backId:{}, {}".format(task.bakParam, task.req))
|
||||
if QtOwner().isOfflineModel:
|
||||
task.status = Status.OfflineModel
|
||||
data = {"st": Status.OfflineModel, "data": ""}
|
||||
TaskBase.taskObj.taskBack.emit(task.bakParam, pickle.dumps(data))
|
||||
return
|
||||
|
||||
if task.req.method.lower() == "post":
|
||||
self.Post(task)
|
||||
elif task.req.method.lower() == "get":
|
||||
@ -192,7 +203,21 @@ class Server(Singleton):
|
||||
else:
|
||||
return
|
||||
except Exception as es:
|
||||
task.status = Status.NetError
|
||||
if isinstance(es, requests.exceptions.ConnectTimeout):
|
||||
task.status = Status.ConnectErr
|
||||
elif isinstance(es, requests.exceptions.ReadTimeout):
|
||||
task.status = Status.TimeOut
|
||||
elif isinstance(es, requests.exceptions.SSLError):
|
||||
if "WSAECONNRESET" in es.__repr__():
|
||||
task.status = Status.ResetErr
|
||||
else:
|
||||
task.status = Status.SSLErr
|
||||
elif isinstance(es, requests.exceptions.ProxyError):
|
||||
task.status = Status.ProxyError
|
||||
elif isinstance(es, ConnectionResetError):
|
||||
task.status = Status.ResetErr
|
||||
else:
|
||||
task.status = Status.NetError
|
||||
# Log.Error(es)
|
||||
Log.Warn(task.req.url + " " + es.__repr__())
|
||||
Log.Debug(es)
|
||||
@ -267,6 +292,11 @@ class Server(Singleton):
|
||||
TaskBase.taskObj.downloadBack.emit(task.bakParam, 0, data)
|
||||
Log.Info("request cache -> backId:{}, {}".format(task.bakParam, task.req))
|
||||
return
|
||||
if QtOwner().isOfflineModel:
|
||||
task.status = Status.OfflineModel
|
||||
self.handler.get(task.req.__class__.__name__)(task)
|
||||
return
|
||||
|
||||
request = task.req
|
||||
if request.params is None:
|
||||
request.params = {}
|
||||
@ -279,8 +309,22 @@ class Server(Singleton):
|
||||
# print(r.elapsed.total_seconds())
|
||||
task.res = r
|
||||
except Exception as es:
|
||||
if isinstance(es, requests.exceptions.ConnectTimeout):
|
||||
task.status = Status.ConnectErr
|
||||
elif isinstance(es, requests.exceptions.ReadTimeout):
|
||||
task.status = Status.TimeOut
|
||||
elif isinstance(es, requests.exceptions.SSLError):
|
||||
if "WSAECONNRESET" in es.__repr__():
|
||||
task.status = Status.ResetErr
|
||||
else:
|
||||
task.status = Status.SSLErr
|
||||
elif isinstance(es, requests.exceptions.ProxyError):
|
||||
task.status = Status.ProxyError
|
||||
elif isinstance(es, ConnectionResetError):
|
||||
task.status = Status.ResetErr
|
||||
else:
|
||||
task.status = Status.NetError
|
||||
Log.Warn(task.req.url + " " + es.__repr__())
|
||||
task.status = Status.NetError
|
||||
self.handler.get(task.req.__class__.__name__)(task)
|
||||
if task.res:
|
||||
task.res.close()
|
||||
|
@ -120,7 +120,13 @@ class SqlServer(Singleton):
|
||||
TaskSql().taskObj.sqlBack.emit(backId, pickle.dumps(""))
|
||||
continue
|
||||
if taskType == self.TaskCheck:
|
||||
data2 = pickle.dumps(str(int(isInit)))
|
||||
try:
|
||||
cur = conn.cursor()
|
||||
cur.execute("select * from words")
|
||||
data2 = pickle.dumps(str(int(isInit)))
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
data2 = pickle.dumps("")
|
||||
TaskSql().taskObj.sqlBack.emit(backId, data2)
|
||||
elif taskType == self.TaskTypeSql:
|
||||
cur = conn.cursor()
|
||||
@ -238,7 +244,7 @@ class SqlServer(Singleton):
|
||||
|
||||
def _SelectFavoriteIds(self, conn, sql, backId):
|
||||
cur = conn.cursor()
|
||||
sql = "select id,sortId from favorite where user ='{}'".format(User().userId)
|
||||
sql = "select id,sortId from favorite where user ='{}'".format(Setting.UserId.value)
|
||||
cur.execute(sql)
|
||||
allFavoriteIds = []
|
||||
for data in cur.fetchall():
|
||||
@ -248,36 +254,41 @@ class SqlServer(Singleton):
|
||||
TaskSql().taskObj.sqlBack.emit(backId, data)
|
||||
|
||||
def _SelectCacheBook(self, conn, bookId, backId):
|
||||
cur = conn.cursor()
|
||||
cur.execute("select id, title, title2, author, chineseTeam, description, epsCount, pages, finished, likesCount, categories, tags," \
|
||||
"created_at, updated_at, path, fileServer, creator, totalLikes, totalViews from book where id ='{}'".format(bookId))
|
||||
v = {}
|
||||
allFavoriteIds = []
|
||||
for data in cur.fetchall():
|
||||
info = DbBook()
|
||||
info.id = data[0]
|
||||
info.title = data[1]
|
||||
info.title2 = data[2]
|
||||
info.author = data[3]
|
||||
info.chineseTeam = data[4]
|
||||
info.description = data[5]
|
||||
info.epsCount = data[6]
|
||||
info.pages = data[7]
|
||||
info.finished = data[8]
|
||||
info.likesCount = data[9]
|
||||
info.categories = data[10]
|
||||
info.tags = data[11]
|
||||
info.created_at = data[12]
|
||||
info.updated_at = data[13]
|
||||
info.path = data[14]
|
||||
info.fileServer = data[15]
|
||||
info.creator = data[16]
|
||||
info.totalLikes = data[17]
|
||||
info.totalViews = data[18]
|
||||
BookMgr().AddBookByDb(info)
|
||||
allFavoriteIds.append(info)
|
||||
v["bookList"] = allFavoriteIds
|
||||
v["st"] = Status.Ok
|
||||
try:
|
||||
cur = conn.cursor()
|
||||
cur.execute(
|
||||
"select id, title, title2, author, chineseTeam, description, epsCount, pages, finished, likesCount, categories, tags," \
|
||||
"created_at, updated_at, path, fileServer, creator, totalLikes, totalViews from book where id ='{}'".format(
|
||||
bookId))
|
||||
allFavoriteIds = []
|
||||
for data in cur.fetchall():
|
||||
info = DbBook()
|
||||
info.id = data[0]
|
||||
info.title = data[1]
|
||||
info.title2 = data[2]
|
||||
info.author = data[3]
|
||||
info.chineseTeam = data[4]
|
||||
info.description = data[5]
|
||||
info.epsCount = data[6]
|
||||
info.pages = data[7]
|
||||
info.finished = data[8]
|
||||
info.likesCount = data[9]
|
||||
info.categories = data[10]
|
||||
info.tags = data[11]
|
||||
info.created_at = data[12]
|
||||
info.updated_at = data[13]
|
||||
info.path = data[14]
|
||||
info.fileServer = data[15]
|
||||
info.creator = data[16]
|
||||
info.totalLikes = data[17]
|
||||
info.totalViews = data[18]
|
||||
BookMgr().AddBookByDb(info)
|
||||
allFavoriteIds.append(info)
|
||||
v["bookList"] = allFavoriteIds
|
||||
v["st"] = Status.Ok
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
data = pickle.dumps(v)
|
||||
if backId:
|
||||
TaskSql().taskObj.sqlBack.emit(backId, data)
|
||||
@ -330,7 +341,7 @@ class SqlServer(Singleton):
|
||||
try:
|
||||
if not bookId:
|
||||
continue
|
||||
sql = "replace INTO favorite(id, user, sortId) VALUES ('{0}', '{1}', {2});".format(bookId, User().userId, sortId)
|
||||
sql = "replace INTO favorite(id, user, sortId) VALUES ('{0}', '{1}', {2});".format(bookId, Setting.UserId.value, sortId)
|
||||
sql = sql.replace("\0", "")
|
||||
cur.execute(sql)
|
||||
except Exception as ex:
|
||||
@ -342,7 +353,7 @@ class SqlServer(Singleton):
|
||||
def SearchFavorite(page, sortKey=0, sortId=0):
|
||||
sql = "select book.id, title, title2, author, chineseTeam, description, epsCount, pages, finished, likesCount, categories, tags," \
|
||||
"created_at, updated_at, path, fileServer, creator, totalLikes, totalViews from book, favorite where book.id = favorite.id and favorite.user='{}' ".format(
|
||||
User().userId)
|
||||
Setting.UserId.value)
|
||||
if sortKey == 0:
|
||||
sql += "ORDER BY book.updated_at "
|
||||
|
||||
|
@ -198,6 +198,7 @@ class SpeedTestPingHandler(object):
|
||||
if task.res.raw.status_code == 401 or task.res.raw.status_code == 200:
|
||||
data["data"] = str(task.res.raw.elapsed.total_seconds())
|
||||
else:
|
||||
data["st"] = Status.Error
|
||||
data["data"] = "0"
|
||||
TaskBase.taskObj.taskBack.emit(task.bakParam, pickle.dumps(data))
|
||||
else:
|
||||
@ -210,13 +211,13 @@ class DownloadBookHandler(object):
|
||||
def __call__(self, backData):
|
||||
if backData.status != Status.Ok:
|
||||
if backData.bakParam:
|
||||
TaskBase.taskObj.downloadBack.emit(backData.bakParam, -1, b"")
|
||||
TaskBase.taskObj.downloadBack.emit(backData.bakParam, -backData.status, b"")
|
||||
else:
|
||||
r = backData.res
|
||||
try:
|
||||
if r.status_code != 200:
|
||||
if backData.bakParam:
|
||||
TaskBase.taskObj.downloadBack.emit(backData.bakParam, -1, b"")
|
||||
TaskBase.taskObj.downloadBack.emit(backData.bakParam, -Status.Error, b"")
|
||||
return
|
||||
|
||||
fileSize = int(r.headers.get('Content-Length', 0))
|
||||
@ -261,9 +262,10 @@ class DownloadBookHandler(object):
|
||||
TaskBase.taskObj.downloadBack.emit(backData.bakParam, 0, data)
|
||||
|
||||
except Exception as es:
|
||||
backData.status = Status.DownloadFail
|
||||
Log.Error(es)
|
||||
if backData.bakParam:
|
||||
TaskBase.taskObj.downloadBack.emit(backData.bakParam, -1, b"")
|
||||
TaskBase.taskObj.downloadBack.emit(backData.bakParam, -backData.status, b"")
|
||||
|
||||
|
||||
@handler(req.CheckUpdateDatabaseReq)
|
||||
@ -284,25 +286,25 @@ class DownloadDatabaseReqHandler(object):
|
||||
class CheckUpdateHandler(object):
|
||||
def __call__(self, task):
|
||||
data = {"st": task.status, "data": ""}
|
||||
if not task.res.GetText() or task.status == Status.NetError:
|
||||
return
|
||||
if task.res.raw.status_code != 200:
|
||||
return
|
||||
|
||||
updateInfo = re.findall(r"<meta property=\"og:description\" content=\"([^\"]*)\"", task.res.raw.text)
|
||||
if updateInfo:
|
||||
rawData = updateInfo[0]
|
||||
else:
|
||||
rawData = ""
|
||||
|
||||
versionInfo = re.findall("<meta property=\"og:url\" content=\".*tag/([^\"]*)\"", task.res.raw.text)
|
||||
if versionInfo:
|
||||
verData = versionInfo[0]
|
||||
else:
|
||||
verData = ""
|
||||
|
||||
info = verData.replace("v", "").split(".")
|
||||
try:
|
||||
if not task.res.GetText() or task.status == Status.NetError:
|
||||
return
|
||||
if task.res.raw.status_code != 200:
|
||||
return
|
||||
|
||||
updateInfo = re.findall(r"<meta property=\"og:description\" content=\"([^\"]*)\"", task.res.raw.text)
|
||||
if updateInfo:
|
||||
rawData = updateInfo[0]
|
||||
else:
|
||||
rawData = ""
|
||||
|
||||
versionInfo = re.findall("<meta property=\"og:url\" content=\".*tag/([^\"]*)\"", task.res.raw.text)
|
||||
if versionInfo:
|
||||
verData = versionInfo[0]
|
||||
else:
|
||||
verData = ""
|
||||
|
||||
info = verData.replace("v", "").split(".")
|
||||
version = int(info[0]) * 100 + int(info[1]) * 10 + int(info[2]) * 1
|
||||
info2 = re.findall(r"\d+\d*", os.path.basename(config.UpdateVersion))
|
||||
curversion = int(info2[0]) * 100 + int(info2[1]) * 10 + int(info2[2]) * 1
|
||||
@ -331,7 +333,9 @@ class SpeedTestHandler(object):
|
||||
r = backData.res
|
||||
try:
|
||||
if r.status_code != 200:
|
||||
data["st"] = Status.Error
|
||||
if backData.bakParam:
|
||||
data["st"] = Status.Error
|
||||
TaskBase.taskObj.taskBack.emit(backData.bakParam, pickle.dumps(data))
|
||||
return
|
||||
|
||||
@ -352,6 +356,7 @@ class SpeedTestHandler(object):
|
||||
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
data["st"] = Status.DownloadFail
|
||||
if backData.bakParam:
|
||||
TaskBase.taskObj.taskBack.emit(backData.bakParam, pickle.dumps(data))
|
||||
|
||||
|
@ -78,12 +78,18 @@ class QtTaskBase:
|
||||
cleanFlag = self.__taskFlagId
|
||||
return TaskDownload().DownloadBook(bookId, epsId, index, statusBack, downloadCallBack, completeCallBack, backParam, loadPath, cachePath, savePath, cleanFlag, isInit)
|
||||
|
||||
def AddDownloadBookCache(self, loadPath, completeCallBack=None, backParam=0, cleanFlag=""):
|
||||
from task.task_download import TaskDownload
|
||||
if not cleanFlag:
|
||||
cleanFlag = self.__taskFlagId
|
||||
return TaskDownload().DownloadCache(loadPath, completeCallBack, backParam, cleanFlag)
|
||||
|
||||
# completeCallBack(saveData, taskId, backParam, tick)
|
||||
def AddConvertTask(self, path, imgData, model, completeCallBack, backParam=None, cleanFlag=""):
|
||||
def AddConvertTask(self, path, imgData, model, completeCallBack, backParam=None, preDownPath=None, cleanFlag=""):
|
||||
from task.task_waifu2x import TaskWaifu2x
|
||||
if not cleanFlag:
|
||||
cleanFlag = self.__taskFlagId
|
||||
return TaskWaifu2x().AddConvertTaskByData(path, imgData, model, completeCallBack, backParam, cleanFlag)
|
||||
return TaskWaifu2x().AddConvertTaskByData(path, imgData, model, completeCallBack, backParam, preDownPath, cleanFlag)
|
||||
|
||||
# completeCallBack(saveData, taskId, backParam, tick)
|
||||
def AddConvertTaskByPath(self, loadPath, savePath, completeCallBack, backParam=None, cleanFlag=""):
|
||||
|
@ -39,6 +39,7 @@ class QtDownloadTask(object):
|
||||
self.loadPath = "" # 只加载
|
||||
self.cachePath = "" # 缓存路径
|
||||
self.savePath = "" # 下载保存路径
|
||||
self.isLoadTask = False
|
||||
|
||||
self.bookId = "" # 下载的bookId
|
||||
self.epsId = 0 # 下载的章节
|
||||
@ -101,14 +102,17 @@ class TaskDownload(TaskBase, QtTaskBase):
|
||||
v = {"st": Status.SaveError}
|
||||
self.CallBookBack(v, info)
|
||||
return
|
||||
st = Str.Error
|
||||
if laveFileSize < -2:
|
||||
st = - laveFileSize
|
||||
|
||||
if laveFileSize < 0 and data == b"":
|
||||
try:
|
||||
if info.downloadCompleteBack:
|
||||
if info.backParam is not None:
|
||||
info.downloadCompleteBack(b"", Str.Error, info.backParam)
|
||||
info.downloadCompleteBack(b"", st, info.backParam)
|
||||
else:
|
||||
info.downloadCompleteBack(b"", Str.Error)
|
||||
info.downloadCompleteBack(b"", st)
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
self.ClearDownloadTask(downloadId)
|
||||
@ -165,6 +169,21 @@ class TaskDownload(TaskBase, QtTaskBase):
|
||||
self._inQueue.put(self.taskId)
|
||||
return self.taskId
|
||||
|
||||
def DownloadCache(self, filePath, completeCallBack=None, backParam = 0, cleanFlag=""):
|
||||
self.taskId += 1
|
||||
data = QtDownloadTask(self.taskId)
|
||||
data.downloadCompleteBack = completeCallBack
|
||||
data.loadPath = filePath
|
||||
data.backParam = backParam
|
||||
data.isLoadTask = True
|
||||
if cleanFlag:
|
||||
data.cleanFlag = cleanFlag
|
||||
taskIds = self.flagToIds.setdefault(cleanFlag, set())
|
||||
taskIds.add(self.taskId)
|
||||
self.tasks[self.taskId] = data
|
||||
self._inQueue.put(self.taskId)
|
||||
return self.taskId
|
||||
|
||||
def HandlerDownload(self, data, v):
|
||||
(taskId, newStatus) = v
|
||||
task = self.tasks.get(taskId)
|
||||
@ -174,6 +193,15 @@ class TaskDownload(TaskBase, QtTaskBase):
|
||||
from server import req, ToolUtil
|
||||
try:
|
||||
assert isinstance(task, QtDownloadTask)
|
||||
if task.isLoadTask:
|
||||
imgData = ToolUtil.LoadCachePicture(task.loadPath)
|
||||
if imgData:
|
||||
TaskBase.taskObj.downloadBack.emit(taskId, len(imgData), b"")
|
||||
TaskBase.taskObj.downloadBack.emit(taskId, 0, imgData)
|
||||
else:
|
||||
TaskBase.taskObj.downloadBack.emit(taskId, -Status.FileError, b"")
|
||||
return
|
||||
|
||||
isReset = False
|
||||
if data["st"] != Status.Ok:
|
||||
task.resetCnt += 1
|
||||
|
@ -22,6 +22,7 @@ class QConvertTask(object):
|
||||
self.status = Status.Ok
|
||||
self.tick = 0
|
||||
self.loadPath = "" #
|
||||
self.preDownPath = "" #
|
||||
self.cachePath = "" #
|
||||
self.savePath = "" #
|
||||
self.imgData = b""
|
||||
@ -71,6 +72,13 @@ class TaskWaifu2x(TaskBase):
|
||||
self.taskObj.convertBack.emit(taskId)
|
||||
continue
|
||||
|
||||
if task.preDownPath:
|
||||
data = ToolUtil.LoadCachePicture(task.preDownPath)
|
||||
if data:
|
||||
task.saveData = data
|
||||
self.taskObj.convertBack.emit(taskId)
|
||||
continue
|
||||
|
||||
if task.savePath:
|
||||
if ToolUtil.IsHaveFile(task.savePath):
|
||||
self.taskObj.convertBack.emit(taskId)
|
||||
@ -165,7 +173,7 @@ class TaskWaifu2x(TaskBase):
|
||||
self.taskObj.convertBack.emit(taskId)
|
||||
t1.Refresh("RunLoad")
|
||||
|
||||
def AddConvertTaskByData(self, path, imgData, model, callBack, backParam=None, cleanFlag=None):
|
||||
def AddConvertTaskByData(self, path, imgData, model, callBack, backParam=None, preDownPath=None, cleanFlag=None):
|
||||
info = QConvertTask()
|
||||
info.callBack = callBack
|
||||
info.backParam = backParam
|
||||
@ -174,6 +182,7 @@ class TaskWaifu2x(TaskBase):
|
||||
info.taskId = self.taskId
|
||||
info.imgData = imgData
|
||||
info.model = model
|
||||
info.preDownPath = preDownPath
|
||||
if path and Setting.SavePath.value:
|
||||
info.cachePath = os.path.join(os.path.join(Setting.SavePath.value, config.CachePathDir), os.path.join("waifu2x", path))
|
||||
|
||||
|
@ -14,6 +14,13 @@ class Status(object):
|
||||
ParseError = Str.ParseError
|
||||
NeedGoogle = Str.NeedGoogle
|
||||
SetHeadError = Str.SetHeadError
|
||||
TimeOut = Str.TimeOut
|
||||
SSLErr = Str.SSLErr
|
||||
ResetErr = Str.ResetErr
|
||||
ConnectErr = Str.ConnectErr
|
||||
ProxyError = Str.ProxyError
|
||||
DownloadFail = Str.DownloadFail
|
||||
OfflineModel = Str.OfflineModel
|
||||
|
||||
UnderReviewBook = Str.UnderReviewBook
|
||||
SaveError = Str.SaveError
|
||||
|
@ -34,6 +34,14 @@ class Str:
|
||||
PathError = 1018 # "路径错误"
|
||||
FileError = 1019 # "未发现源文件"
|
||||
FileFormatError = 1020 # "文件损坏"
|
||||
TimeOut = 1021 # "连接超时"
|
||||
ConnectErr = 1022 # "无法连接"
|
||||
SSLErr = 1023 # "证书错误"
|
||||
ResetErr = 1024 # "连接被重置"
|
||||
ProxyError = 1025 # "无法连接代理"
|
||||
DownloadFail = 1026 # "下载失败"
|
||||
OfflineModel = 1027 # "离线模式中"
|
||||
NotDownload = 1028 # "未下载"
|
||||
|
||||
Success = 2001 # "下载完成"
|
||||
Reading = 2002 # "获取信息"
|
||||
@ -194,6 +202,9 @@ class Str:
|
||||
CloseAutoWaifu2x = 134 # 关闭自动waifu2x
|
||||
CloseCurWaifu2x = 135 # 关闭本张图waifu2x
|
||||
RightLeftDouble2 = 136 # 右左双页(滚轮正序)
|
||||
Copy = 137 # 复制
|
||||
CopyPicture = 138 # 复制图片到剪贴板
|
||||
CopyFile = 139 # 保存文件
|
||||
|
||||
@classmethod
|
||||
def Reload(cls):
|
||||
@ -219,6 +230,14 @@ class Str:
|
||||
cls.strDict[cls.PathError] = QCoreApplication.translate("cls.obj", "路径错误", None)
|
||||
cls.strDict[cls.FileError] = QCoreApplication.translate("cls.obj", "未发现源文件", None)
|
||||
cls.strDict[cls.FileFormatError] = QCoreApplication.translate("cls.obj", "文件损坏", None)
|
||||
cls.strDict[cls.TimeOut] = QCoreApplication.translate("cls.obj", "连接超时", None)
|
||||
cls.strDict[cls.ConnectErr] = QCoreApplication.translate("cls.obj", "无法连接", None)
|
||||
cls.strDict[cls.SSLErr] = QCoreApplication.translate("cls.obj", "证书错误", None)
|
||||
cls.strDict[cls.ResetErr] = QCoreApplication.translate("cls.obj", "连接被重置", None)
|
||||
cls.strDict[cls.ProxyError] = QCoreApplication.translate("cls.obj", "无法连接代理", None)
|
||||
cls.strDict[cls.DownloadFail] = QCoreApplication.translate("cls.obj", "下载失败", None)
|
||||
cls.strDict[cls.OfflineModel] = QCoreApplication.translate("cls.obj", "离线模式中", None)
|
||||
cls.strDict[cls.NotDownload] = QCoreApplication.translate("cls.obj", "未下载", None)
|
||||
|
||||
cls.strDict[cls.LoadingPicture] = QCoreApplication.translate("cls.obj", "图片加载中...", None)
|
||||
cls.strDict[cls.LoadingFail] = QCoreApplication.translate("cls.obj", "图片加载失败", None)
|
||||
@ -376,6 +395,9 @@ class Str:
|
||||
cls.strDict[cls.OpenCurWaifu2x] = QCoreApplication.translate("cls.obj", "开启本张图waifu2x", None)
|
||||
cls.strDict[cls.CloseCurWaifu2x] = QCoreApplication.translate("cls.obj", "关闭本张图waifu2x", None)
|
||||
cls.strDict[cls.RightLeftDouble2] = QCoreApplication.translate("cls.obj", "右左双页(滚轮正序)", None)
|
||||
cls.strDict[cls.Copy] = QCoreApplication.translate("cls.obj", "复制", None)
|
||||
cls.strDict[cls.CopyPicture] = QCoreApplication.translate("cls.obj", "复制图片到剪贴板", None)
|
||||
cls.strDict[cls.CopyFile] = QCoreApplication.translate("cls.obj", "保存文件", None)
|
||||
|
||||
@classmethod
|
||||
def GetStr(cls, enumType):
|
||||
|
@ -161,6 +161,58 @@ class ToolUtil(object):
|
||||
except Exception as es:
|
||||
Log.Error(src)
|
||||
|
||||
@staticmethod
|
||||
def GetCodeErrMsg(code):
|
||||
msg = ""
|
||||
if code == "1029":
|
||||
msg = "你所在的時間線與我們有所不同請你調整一下再嘗試吧!"
|
||||
if code == "1026":
|
||||
msg = "嗶咔娘認定你的是假冒電郵!!"
|
||||
elif code == "1025":
|
||||
msg = "嗶咔是註冊商標,不能用的。"
|
||||
elif code == "1024":
|
||||
msg = "我們不支授此郵箱...QQ和163電郵君不想跟我們做朋友,所以請你用其他電郵服務商吧。例如:Gmail, Yahoo 和 Outlook"
|
||||
elif code == "1023":
|
||||
msg = "吼!你的要求太多了!有問題你直接找團長吧!"
|
||||
elif code == "1019":
|
||||
msg = """小紳紳的等級不夠或者沒有認證帳戶!
|
||||
|
||||
認證了的帳戶等級2才能留言唷~
|
||||
|
||||
你可以打嗶卡和更換頭像升等級的~"""
|
||||
elif code == "1014":
|
||||
msg = "這個本子好像正在審核過程當中..?請待會再來吧!"
|
||||
elif code == "1010":
|
||||
msg = "你輸入的帳戶資料並不正確哦,請重新輸入!"
|
||||
elif code == "1009":
|
||||
msg = """這個匿稱已經屬於一位紳士
|
||||
請使用別的匿稱!"""
|
||||
elif code == "1008":
|
||||
msg = """這個嗶咔帳號已經被註冊!
|
||||
|
||||
如果你忘記了密碼,請回上一頁按忘記密碼!"""
|
||||
elif code == "1007":
|
||||
msg = """欸...!?
|
||||
|
||||
404 找不到"""
|
||||
elif code == "1006":
|
||||
msg = """這個帳戶還沒有被激活!
|
||||
|
||||
請前往你註冊的郵箱並找尋【嗶咔邀請函】(有機會在垃圾郵件中)!
|
||||
|
||||
如找不到邀請函郵件,請按下方的重新發送邀請函!"""
|
||||
elif code == "1005":
|
||||
msg = ""
|
||||
elif code == "1004":
|
||||
msg = "你輸入的帳戶資料並不正確哦,請重新輸入!"
|
||||
elif code == "1002":
|
||||
msg = """欸...!?
|
||||
為什麼呢?
|
||||
認證好像有點問題...
|
||||
|
||||
再試試看吧"""
|
||||
return msg
|
||||
|
||||
@staticmethod
|
||||
def GetUrlHost(url):
|
||||
host = url.replace("https://", "")
|
||||
@ -227,20 +279,45 @@ class ToolUtil(object):
|
||||
return {}
|
||||
return ToolUtil.GetModelByIndex(Setting.DownloadNoise.value, Setting.DownloadScale.value, Setting.DownloadModel.value, mat)
|
||||
|
||||
@staticmethod
|
||||
def GetAnimationFormat(data):
|
||||
try:
|
||||
from PIL import Image
|
||||
from io import BytesIO
|
||||
a = BytesIO(data)
|
||||
img = Image.open(a)
|
||||
|
||||
format = ""
|
||||
if getattr(img, "is_animated", ""):
|
||||
format = img.format
|
||||
a.close()
|
||||
return format
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
return ""
|
||||
|
||||
@staticmethod
|
||||
def GetPictureSize(data):
|
||||
if not data:
|
||||
return 0, 0, "jpg"
|
||||
from PIL import Image
|
||||
from io import BytesIO
|
||||
a = BytesIO(data)
|
||||
img = Image.open(a)
|
||||
a.close()
|
||||
if img.format == "PNG":
|
||||
mat = "png"
|
||||
else:
|
||||
mat = "jpg"
|
||||
return img.width, img.height, mat
|
||||
try:
|
||||
from PIL import Image
|
||||
from io import BytesIO
|
||||
a = BytesIO(data)
|
||||
img = Image.open(a)
|
||||
a.close()
|
||||
if img.format == "PNG":
|
||||
mat = "png"
|
||||
elif img.format == "GIF":
|
||||
mat = "gif"
|
||||
elif img.format == "WEBP":
|
||||
mat = "webp"
|
||||
else:
|
||||
mat = "jpg"
|
||||
return img.width, img.height, mat
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
return 0, 0, "jpg"
|
||||
|
||||
@staticmethod
|
||||
def GetLookModel(category):
|
||||
|
8
src/view/comment/fried_comment_view.py
Normal file
8
src/view/comment/fried_comment_view.py
Normal file
@ -0,0 +1,8 @@
|
||||
from component.widget.comment_widget import CommentWidget
|
||||
from server import req
|
||||
|
||||
|
||||
class FriedCommentView(CommentWidget):
|
||||
def __init__(self, parent=None):
|
||||
CommentWidget.__init__(self, parent)
|
||||
self.InitReq(req.AppCommentInfoReq, req.AppSendCommentInfoReq, req.AppCommentLikeReq, req.CommentsReportReq)
|
@ -100,6 +100,21 @@ class DownloadView(QtWidgets.QWidget, Ui_Download, DownloadStatus):
|
||||
def Init(self):
|
||||
self.timer.start()
|
||||
|
||||
def GetDownloadEpsInfo(self, bookId, epsId):
|
||||
info = self.GetDownloadInfo(bookId)
|
||||
if not info:
|
||||
return False
|
||||
return info.epsInfo.get(epsId)
|
||||
|
||||
def GetDownloadInfo(self, bookId):
|
||||
return self.downloadDict.get(bookId)
|
||||
|
||||
def IsDownloadEpsId(self, bookId, epsId):
|
||||
info = self.GetDownloadInfo(bookId)
|
||||
if not info:
|
||||
return False
|
||||
return epsId in info.epsIds
|
||||
|
||||
def GetDownloadEpsId(self, bookId):
|
||||
if bookId not in self.downloadDict:
|
||||
return []
|
||||
@ -110,6 +125,16 @@ class DownloadView(QtWidgets.QWidget, Ui_Download, DownloadStatus):
|
||||
# return []
|
||||
# return self.downloadDict[bookId].GetDownloadCompleteEpsId()
|
||||
|
||||
def GetDownloadWaifu2xFilePath(self, bookId, epsId, index):
|
||||
if bookId not in self.downloadDict:
|
||||
return ""
|
||||
task = self.downloadDict[bookId]
|
||||
if epsId not in task.epsInfo:
|
||||
return ""
|
||||
epsTitle = task.epsInfo[epsId].epsTitle
|
||||
convertPath = os.path.join(task.convertPath, ToolUtil.GetCanSaveName(epsTitle))
|
||||
return os.path.join(convertPath, "{:04}.{}".format(index + 1, "jpg"))
|
||||
|
||||
def GetDownloadFilePath(self, bookId, epsId, index):
|
||||
if bookId not in self.downloadDict:
|
||||
return ""
|
||||
|
0
src/view/fried/__init__.py
Normal file
0
src/view/fried/__init__.py
Normal file
158
src/view/fried/fried_view.py
Normal file
158
src/view/fried/fried_view.py
Normal file
@ -0,0 +1,158 @@
|
||||
import json
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6.QtCore import QPoint
|
||||
from PySide6.QtGui import Qt
|
||||
|
||||
from interface.ui_fried import Ui_Fried
|
||||
from qt_owner import QtOwner
|
||||
from server import req, Log, Status, config, ToolUtil
|
||||
from server.server import Server
|
||||
from task.qt_task import QtTaskBase
|
||||
from tools.str import Str
|
||||
from view.fried.qt_fried_msg import QtFriedMsg
|
||||
|
||||
|
||||
class FriedView(QtWidgets.QWidget, Ui_Fried, QtTaskBase):
|
||||
def __init__(self):
|
||||
super(self.__class__, self).__init__()
|
||||
Ui_Fried.__init__(self)
|
||||
QtTaskBase.__init__(self)
|
||||
self.setupUi(self)
|
||||
|
||||
self.scrollArea.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
|
||||
self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.page = 1
|
||||
self.maxPage = 1
|
||||
self.msgInfo = {}
|
||||
self.indexMsgId = 0
|
||||
self.mousePressed = False
|
||||
self.pressPos = QPoint(0, 0)
|
||||
self.limit = 10
|
||||
|
||||
def GetName(self):
|
||||
return self.__class__.__name__
|
||||
|
||||
def Clear(self):
|
||||
for info in self.msgInfo.values():
|
||||
info.setParent(None)
|
||||
self.msgInfo.clear()
|
||||
self.indexMsgId = 0
|
||||
|
||||
def SwitchCurrent(self, **kwargs):
|
||||
refresh = kwargs.get("refresh")
|
||||
if refresh:
|
||||
self.page = 1
|
||||
self.LoadPageInfo(self.page)
|
||||
return
|
||||
|
||||
def LoadPageInfo(self, page):
|
||||
QtOwner().ShowLoading()
|
||||
self.Clear()
|
||||
self.AddHttpTask(req.AppInfoReq(Server().token, (page-1)*self.limit), self.LoadPageBack, page)
|
||||
return
|
||||
|
||||
def LoadPageBack(self, data, page):
|
||||
QtOwner().CloseLoading()
|
||||
errMsg = ""
|
||||
try:
|
||||
info = json.loads(data.get("data"))
|
||||
errMsg = info.get("error", {}).get("message", "")
|
||||
self.maxPage = info.get("data").get('total')
|
||||
self.limit = info.get("data").get("limit")
|
||||
|
||||
self.page = page
|
||||
self.maxPage = self.maxPage // self.limit + 1
|
||||
self.spinBox.setMaximum(self.maxPage)
|
||||
self.pageLabel.setText(str(self.page) + "\\" + str(self.maxPage))
|
||||
for v in info.get("data").get("posts"):
|
||||
self.AddInfo(v)
|
||||
pass
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
QtOwner().ShowError(Str.GetStr(Status.UnKnowError) + errMsg)
|
||||
return
|
||||
|
||||
def JumpPage(self):
|
||||
page = int(self.spinBox.text())
|
||||
self.Clear()
|
||||
self.LoadPageInfo(page)
|
||||
|
||||
def AddInfo(self, v):
|
||||
info = QtFriedMsg(self)
|
||||
msg = v.get("content", "")
|
||||
name = v.get("_user", {}).get("name", "")
|
||||
level = v.get("_user", {}).get("level", "")
|
||||
title = v.get("_user", {}).get("title", "")
|
||||
character = v.get("_user", {}).get("character", "")
|
||||
avatar = v.get("_user", {}).get("avatar", "")
|
||||
medias = v.get("medias", [])
|
||||
info.id = v.get("_id")
|
||||
totalComment = v.get("totalComments")
|
||||
liked = v.get("liked")
|
||||
createdTime = v.get("createdAt")
|
||||
totalLikes = v.get('totalLikes')
|
||||
|
||||
if createdTime:
|
||||
timeArray, day = ToolUtil.GetDateStr(createdTime)
|
||||
strTime = "{}年{}月{}日 {}:{}:{} ".format(timeArray.tm_year, timeArray.tm_mon, timeArray.tm_mday, timeArray.tm_hour, timeArray.tm_min, timeArray.tm_sec)
|
||||
info.infoLabel.setText("{}".format(strTime))
|
||||
|
||||
info.likeButton.setText("({})".format(str(totalLikes)))
|
||||
info.commentButton.setText("({})".format(str(totalComment)))
|
||||
self.msgInfo[self.indexMsgId] = info
|
||||
info.commentLabel.setText(msg)
|
||||
info.nameLabel.setText(name)
|
||||
info.levelLabel.setText(" LV"+str(level)+" ")
|
||||
info.titleLabel.setText(" " + title + " ")
|
||||
info.indexLabel.setText("")
|
||||
info.replayLabel.setVisible(False)
|
||||
|
||||
if medias and config.IsLoadingPicture:
|
||||
self.AddDownloadTask(medias[0], "", None, self.LoadingPictureComplete, True, self.indexMsgId, True)
|
||||
|
||||
if avatar and config.IsLoadingPicture:
|
||||
self.AddDownloadTask(avatar, "", None, self.LoadingTitleComplete, True, self.indexMsgId, True)
|
||||
|
||||
if "pica-web.wakamoment.tk" not in character and character and config.IsLoadingPicture:
|
||||
self.AddDownloadTask(character, "", None, self.LoadingHeadComplete, True, self.indexMsgId, True)
|
||||
|
||||
self.indexMsgId += 1
|
||||
self.verticalLayout_4.addWidget(info)
|
||||
|
||||
def LoadingPictureComplete(self, data, status, index):
|
||||
if status == Status.Ok:
|
||||
widget = self.msgInfo.get(index)
|
||||
if not widget:
|
||||
return
|
||||
widget.SetPictureComment(data)
|
||||
|
||||
def LoadingTitleComplete(self, data, status, index):
|
||||
if status == Status.Ok:
|
||||
widget = self.msgInfo.get(index)
|
||||
if not widget:
|
||||
return
|
||||
widget.SetPicture(data)
|
||||
|
||||
def LoadingHeadComplete(self, data, status, index):
|
||||
if status == Status.Ok:
|
||||
widget = self.msgInfo.get(index)
|
||||
if not widget:
|
||||
return
|
||||
widget.SetHeadPicture(data)
|
||||
|
||||
def mouseMoveEvent(self, ev):
|
||||
if not self.mousePressed:
|
||||
return
|
||||
curretPot = ev.pos()
|
||||
dist = self.pressPos.y() - curretPot.y()
|
||||
self.scrollArea.verticalScrollBar().setValue(self.scrollArea.verticalScrollBar().value()+dist)
|
||||
self.pressPos = curretPot
|
||||
|
||||
def mousePressEvent(self, ev):
|
||||
self.mousePressed = True
|
||||
self.pressPos = ev.pos()
|
||||
|
||||
def mouseReleaseEvent(self, ev):
|
||||
self.mousePressed = False
|
||||
self.pressPos = QPoint(0, 0)
|
168
src/view/fried/qt_fried_msg.py
Normal file
168
src/view/fried/qt_fried_msg.py
Normal file
@ -0,0 +1,168 @@
|
||||
import json
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6.QtCore import QEvent
|
||||
from PySide6.QtGui import QPixmap, Qt, QIcon, QCursor
|
||||
from PySide6.QtWidgets import QMenu, QApplication
|
||||
|
||||
from interface.ui_fried_msg import Ui_FriedMsg
|
||||
from qt_owner import QtOwner
|
||||
from server import req, Log, Status
|
||||
from server.server import Server
|
||||
from task.qt_task import QtTaskBase
|
||||
from tools.str import Str
|
||||
|
||||
|
||||
class QtFriedMsg(QtWidgets.QWidget, Ui_FriedMsg, QtTaskBase):
|
||||
def __init__(self, chatRoom):
|
||||
super(self.__class__, self).__init__()
|
||||
Ui_FriedMsg.__init__(self)
|
||||
QtTaskBase.__init__(self)
|
||||
self.setupUi(self)
|
||||
self.id = ""
|
||||
# self.setWindowFlag(Qt.FramelessWindowHint)
|
||||
# self.setWindowFlag(Qt.Dialog)
|
||||
self.resize(400, 100)
|
||||
|
||||
# self.commentLabel.installEventFilter(self)
|
||||
self.picLabel.installEventFilter(self)
|
||||
self.replayLabel.installEventFilter(self)
|
||||
self.data = None
|
||||
self.picData = None
|
||||
self.headData = None
|
||||
self.picLabel.setPixmap(QPixmap(u":/png/icon/placeholder_avatar.png"))
|
||||
# self.picLabel.setCursor(Qt.PointingHandCursor)
|
||||
# self.picLabel.setScaledContents(True)
|
||||
# self.picLabel.setAttribute(Qt.WA_TranslucentBackground)
|
||||
self.commentLabel.setWordWrap(True)
|
||||
# self.setStyleSheet("""
|
||||
# background:transparent;
|
||||
# border:2px solid red;
|
||||
# """)
|
||||
self.widget.setStyleSheet(""".QWidget{
|
||||
border-image:url(resources/skin_aio_friend_bubble_pressed.9.png) 50;
|
||||
border-top-width: 10px;
|
||||
border-right-width: 10px;
|
||||
border-bottom-width: 10px;
|
||||
border-left-width: 10px;
|
||||
}
|
||||
""")
|
||||
self.replayLabel.setWordWrap(True)
|
||||
# self.replayLabel.setStyleSheet("""
|
||||
# border-image:url(resources/skin_aio_friend_bubble_pressed.9.png) 50;
|
||||
# border-top-width: 20px;
|
||||
# border-right-width: 20px;
|
||||
# border-bottom-width: 10px;
|
||||
# border-left-width: 20px;
|
||||
# """)
|
||||
# self.commentLabel.setTextInteractionFlags(Qt.TextSelectableByMouse)
|
||||
# self.name.setTextInteractionFlags(Qt.TextSelectableByMouse)
|
||||
self.popMenu = QMenu(self)
|
||||
|
||||
action = self.popMenu.addAction(self.tr("复制"))
|
||||
action.triggered.connect(self.CopyHandler)
|
||||
|
||||
self.setContextMenuPolicy(Qt.CustomContextMenu)
|
||||
self.customContextMenuRequested.connect(self.SelectMenu)
|
||||
self.chatRoom = chatRoom
|
||||
self.likeButton.setIcon(QIcon(":/png/icon/icon_comment_like"))
|
||||
self.commentButton.setIcon(QIcon(":/png/icon/icon_comment_like"))
|
||||
self.likeButton.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
self.commentButton.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
self.listWidget.setVisible(False)
|
||||
self.page = 1
|
||||
self.limit = 20
|
||||
|
||||
def setParent(self, parent):
|
||||
self.chatRoom = None
|
||||
return super(self.__class__, self).setParent(parent)
|
||||
|
||||
def SetPicture(self, data):
|
||||
self.picData = data
|
||||
self.picLabel.SetPicture(self.picData, self.headData)
|
||||
|
||||
def SetHeadPicture(self, data):
|
||||
self.headData = data
|
||||
self.picLabel.SetPicture(self.picData, self.headData)
|
||||
|
||||
def SetPictureComment(self, data):
|
||||
pic = QPixmap()
|
||||
pic.loadFromData(data)
|
||||
self.data = data
|
||||
# newPic = pic.scaled(500, 400, Qt.KeepAspectRatio, Qt.SmoothTransformation)
|
||||
# print(newPic.height(), newPic.width())
|
||||
self.replayLabel.setCursor(Qt.PointingHandCursor)
|
||||
self.replayLabel.setScaledContents(True)
|
||||
self.replayLabel.setAttribute(Qt.WA_TranslucentBackground)
|
||||
self.replayLabel.setMinimumSize(500, 400)
|
||||
self.replayLabel.setMaximumSize(500, 400)
|
||||
self.replayLabel.SetGifData(data, 500, 400)
|
||||
self.replayLabel.setVisible(True)
|
||||
self.listWidget.setVisible(False)
|
||||
# self.listWidget.InitUser(self.LoadNextPage)
|
||||
|
||||
def eventFilter(self, obj, event):
|
||||
if event.type() == QEvent.MouseButtonPress:
|
||||
if event.button() == Qt.LeftButton:
|
||||
if self.picData and (obj == self.picLabel):
|
||||
QtOwner().OpenWaifu2xTool(self.picData)
|
||||
elif self.data and obj == self.replayLabel:
|
||||
QtOwner().OpenWaifu2xTool(self.data)
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
return super(self.__class__, self).eventFilter(obj, event)
|
||||
|
||||
def SelectMenu(self, pos):
|
||||
self.popMenu.exec_(QCursor.pos())
|
||||
pass
|
||||
|
||||
def CopyHandler(self):
|
||||
if self.commentLabel.text():
|
||||
clipboard = QApplication.clipboard()
|
||||
clipboard.setText(self.commentLabel.text())
|
||||
return
|
||||
|
||||
def Clear(self):
|
||||
self.listWidget.clear()
|
||||
|
||||
def OpenAudioPath(self):
|
||||
return
|
||||
|
||||
def OpenComment(self):
|
||||
if not self.listWidget.isVisible():
|
||||
QtOwner().ShowLoading()
|
||||
self.AddHttpTask(req.AppCommentInfoReq(self.id, Server().token), self.LoadBack)
|
||||
else:
|
||||
self.listWidget.setVisible(False)
|
||||
return
|
||||
|
||||
def LoadBack(self, data):
|
||||
QtOwner().CloseLoading()
|
||||
errMsg = ""
|
||||
try:
|
||||
data = json.loads(data.get("data"))
|
||||
self.listWidget.UpdateState()
|
||||
errMsg = data.get("error", {}).get("message", "")
|
||||
self.limit = int(data.get('data').get("limit", 1))
|
||||
total = int(data.get('data').get("total", 1))
|
||||
pages = total//self.limit+1
|
||||
self.listWidget.UpdatePage(self.page, pages)
|
||||
for index, v in enumerate(data.get('data').get("comments")):
|
||||
floor = total - ((self.listWidget.page - 1) * self.limit + index)
|
||||
self.listWidget.AddUserItem(v, floor, True)
|
||||
|
||||
self.listWidget.setVisible(True)
|
||||
self.page = self.listWidget.page
|
||||
except Exception as es:
|
||||
self.page = self.listWidget.page
|
||||
Log.Error(es)
|
||||
QtOwner().ShowError(Str.GetStr(Status.UnKnowError) + errMsg)
|
||||
return
|
||||
|
||||
def LoadNextPage(self):
|
||||
self.page += 1
|
||||
QtOwner().CloseLoading()
|
||||
self.AddHttpTask(req.AppCommentInfoReq(self.id, Server().token, (self.page - 1)*self.limit), self.LoadBack)
|
||||
return
|
@ -41,8 +41,8 @@ class HelpView(QWidget, Ui_Help, QtTaskBase):
|
||||
self.dbCheck.clicked.connect(self.ReUpdateDatabase)
|
||||
self.verCheck.clicked.connect(self.InitUpdate)
|
||||
|
||||
self.updateUrl = [config.UpdateUrl, config.UpdateUrl2]
|
||||
self.updateBackUrl = [config.UpdateUrlBack, config.UpdateUrl2Back]
|
||||
self.updateUrl = [config.UpdateUrl, config.UpdateUrl2, config.UpdateUrl3]
|
||||
self.updateBackUrl = [config.UpdateUrlBack, config.UpdateUrl2Back, config.UpdateUrl3Back]
|
||||
self.checkUpdateIndex = 0
|
||||
self.helpLogWidget = HelpLogWidget()
|
||||
if Setting.IsShowCmd.value:
|
||||
@ -77,7 +77,7 @@ class HelpView(QWidget, Ui_Help, QtTaskBase):
|
||||
|
||||
def InitUpdateBack(self, raw):
|
||||
try:
|
||||
data = raw["data"]
|
||||
data = raw.get("data")
|
||||
if not data:
|
||||
self.checkUpdateIndex += 1
|
||||
self.StartUpdate()
|
||||
@ -98,6 +98,7 @@ class HelpView(QWidget, Ui_Help, QtTaskBase):
|
||||
Log.Error("Not found book.db !!!!!!!!!!!!!!!")
|
||||
from qt_owner import QtOwner
|
||||
QtOwner().SetDbError()
|
||||
QtOwner().ShowErrOne("无法加载本地数据库data/book.db")
|
||||
return
|
||||
self.isHaveDb = True
|
||||
self.UpdateDbInfo()
|
||||
@ -128,6 +129,9 @@ class HelpView(QWidget, Ui_Help, QtTaskBase):
|
||||
self.InitUpdateDatabase()
|
||||
|
||||
def InitUpdateDatabase(self):
|
||||
if QtOwner().isOfflineModel:
|
||||
return
|
||||
|
||||
if self.curUpdateTick <= 0:
|
||||
return
|
||||
if self.curIndex >= len(self.dbUpdateUrl):
|
||||
|
@ -49,11 +49,14 @@ class IndexView(QWidget, Ui_Index, QtTaskBase):
|
||||
st = raw["st"]
|
||||
if st == Status.Ok:
|
||||
data = json.loads(raw["data"])
|
||||
for categroys in data.get("data").get("collections"):
|
||||
if categroys.get("title") == "本子神推薦":
|
||||
allData = [data.get("data").get("collections", [])]
|
||||
for i, categroys in enumerate(data.get("data").get("collections")):
|
||||
if i == 0:
|
||||
bookList = self.godList
|
||||
else:
|
||||
bookList = self.magicList
|
||||
if i < 2:
|
||||
self.tabWidget.setTabText(i+1, categroys.get("title"))
|
||||
for v in categroys.get('comics'):
|
||||
bookList.AddBookByDict(v)
|
||||
else:
|
||||
|
@ -1,3 +1,5 @@
|
||||
import json
|
||||
|
||||
from PySide6 import QtWidgets, QtCore, QtGui
|
||||
from PySide6.QtCore import Qt, QSize, QEvent, Signal
|
||||
from PySide6.QtGui import QColor, QFont, QPixmap, QIcon
|
||||
@ -6,7 +8,7 @@ from PySide6.QtWidgets import QListWidgetItem, QLabel, QApplication, QScroller
|
||||
from config.setting import Setting
|
||||
from interface.ui_book_info import Ui_BookInfo
|
||||
from qt_owner import QtOwner
|
||||
from server import req, ToolUtil, config, Status
|
||||
from server import req, ToolUtil, config, Status, Log
|
||||
from server.sql_server import SqlServer
|
||||
from task.qt_task import QtTaskBase
|
||||
from tools.book import BookMgr, Book, BookEps
|
||||
@ -66,6 +68,14 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
self.epsListWidget.setResizeMode(self.epsListWidget.Adjust)
|
||||
|
||||
self.epsListWidget.clicked.connect(self.OpenReadImg)
|
||||
|
||||
self.listWidget.setFlow(self.listWidget.LeftToRight)
|
||||
self.listWidget.setWrapping(True)
|
||||
self.listWidget.setFrameShape(self.listWidget.NoFrame)
|
||||
self.listWidget.setResizeMode(self.listWidget.Adjust)
|
||||
|
||||
self.listWidget.clicked.connect(self.OpenReadImg2)
|
||||
|
||||
if Setting.IsGrabGesture.value:
|
||||
QScroller.grabGesture(self.epsListWidget, QScroller.LeftMouseButtonGesture)
|
||||
# self.epsListWidget.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel)
|
||||
@ -85,6 +95,9 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
self.ReloadHistory.connect(self.LoadHistory)
|
||||
|
||||
self.pageBox.currentIndexChanged.connect(self.UpdateEpsPageData)
|
||||
self.tabWidget.currentChanged.connect(self.SwitchPage)
|
||||
self.commandLinkButton.clicked.connect(self.OpenRecommend)
|
||||
self.readOffline.clicked.connect(self.StartRead2)
|
||||
|
||||
def UpdateFavoriteIcon(self):
|
||||
p = QPixmap()
|
||||
@ -113,12 +126,22 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
|
||||
def OpenBook(self, bookId):
|
||||
self.bookId = bookId
|
||||
if QtOwner().isOfflineModel:
|
||||
self.tabWidget.setCurrentIndex(1)
|
||||
else:
|
||||
self.tabWidget.setCurrentIndex(0)
|
||||
self.setFocus()
|
||||
self.Clear()
|
||||
self.show()
|
||||
QtOwner().ShowLoading()
|
||||
self.OpenLocalBack()
|
||||
|
||||
def OpenRecommend(self):
|
||||
QtOwner().OpenRecomment(self.bookId)
|
||||
|
||||
def SwitchPage(self, page):
|
||||
pass
|
||||
|
||||
def OpenComment(self):
|
||||
if self.bookId:
|
||||
QtOwner().OpenComment(self.bookId)
|
||||
@ -127,7 +150,49 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
self.AddSqlTask("book", self.bookId, SqlServer.TaskTypeCacheBook, callBack=self.SendLocalBack)
|
||||
|
||||
def SendLocalBack(self, books):
|
||||
self.AddHttpTask(req.GetComicsBookReq(self.bookId), self.OpenBookBack)
|
||||
if not QtOwner().isOfflineModel:
|
||||
self.AddHttpTask(req.GetComicsBookReq(self.bookId), self.OpenBookBack)
|
||||
else:
|
||||
self.OpenBookBack({"st": Status.Ok})
|
||||
self.UpdateDownloadEps()
|
||||
self.LoadHistory()
|
||||
|
||||
def UpdateDownloadEps(self):
|
||||
info = QtOwner().downloadView.GetDownloadInfo(self.bookId)
|
||||
self.listWidget.clear()
|
||||
if info:
|
||||
from view.download.download_item import DownloadItem
|
||||
from view.download.download_item import DownloadEpsItem
|
||||
assert isinstance(info, DownloadItem)
|
||||
# downloadIds = QtOwner().owner.downloadForm.GetDownloadCompleteEpsId(self.bookId)
|
||||
maxEpsId = max(info.epsIds)
|
||||
for i in range(0, maxEpsId+1):
|
||||
epsInfo = info.epsInfo.get(i)
|
||||
|
||||
item = QListWidgetItem(self.listWidget)
|
||||
if not epsInfo:
|
||||
label = QLabel(str(i + 1) + "-" + "未下载")
|
||||
item.setToolTip("未下载")
|
||||
else:
|
||||
assert isinstance(epsInfo, DownloadEpsItem)
|
||||
label = QLabel(str(i + 1) + "-" + epsInfo.epsTitle)
|
||||
item.setToolTip(epsInfo.epsTitle)
|
||||
|
||||
label.setAlignment(Qt.AlignCenter)
|
||||
label.setStyleSheet("color: rgb(196, 95, 125);")
|
||||
font = QFont()
|
||||
font.setPointSize(12)
|
||||
font.setBold(True)
|
||||
label.setFont(font)
|
||||
# label.setWordWrap(True)
|
||||
# label.setContentsMargins(20, 10, 20, 10)
|
||||
# if index in downloadIds:
|
||||
# item.setBackground(QColor(18, 161, 130))
|
||||
# else:
|
||||
# item.setBackground(QColor(0, 0, 0, 0))
|
||||
item.setSizeHint(label.sizeHint() + QSize(20, 20))
|
||||
self.listWidget.setItemWidget(item, label)
|
||||
return
|
||||
|
||||
def OpenBookBack(self, raw):
|
||||
QtOwner().CloseLoading()
|
||||
@ -176,9 +241,12 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
if config.IsLoadingPicture:
|
||||
url = ToolUtil.GetRealUrl(fileServer, path)
|
||||
self.path = ToolUtil.GetRealPath(self.bookId, "cover")
|
||||
self.AddDownloadTask(url, self.path, completeCallBack=self.UpdatePicture, isReload=True)
|
||||
|
||||
self.AddHttpTask(req.GetComicsBookEpsReq(self.bookId), self.GetEpsBack)
|
||||
if QtOwner().isOfflineModel:
|
||||
self.AddDownloadTask(url, self.path, completeCallBack=self.UpdatePicture)
|
||||
else:
|
||||
self.AddDownloadTask(url, self.path, completeCallBack=self.UpdatePicture, isReload=True)
|
||||
if not QtOwner().isOfflineModel:
|
||||
self.AddHttpTask(req.GetComicsBookEpsReq(self.bookId), self.GetEpsBack)
|
||||
self.startRead.setEnabled(False)
|
||||
if hasattr(info, "_creator"):
|
||||
creator = info._creator
|
||||
@ -219,7 +287,7 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
model = ToolUtil.GetModelByIndex(Setting.CoverLookNoise.value, Setting.CoverLookScale.value, Setting.CoverLookModel.value, mat)
|
||||
self.AddConvertTask(self.path, self.pictureData, model, self.Waifu2xPictureBack)
|
||||
else:
|
||||
self.picture.setText(Str.GetStr(Str.LoadingFail))
|
||||
self.picture.setText(Str.GetStr(status))
|
||||
return
|
||||
|
||||
def Waifu2xPictureBack(self, data, waifuId, index, tick):
|
||||
@ -237,7 +305,7 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
if st == Status.Ok:
|
||||
self.UpdateEpsData()
|
||||
self.lastEpsId = -1
|
||||
self.LoadHistory()
|
||||
# self.LoadHistory()
|
||||
return
|
||||
else:
|
||||
QtOwner().ShowError(Str.GetStr(Str.ChapterLoadFail) + ", {}".format(Str.GetStr(st)))
|
||||
@ -373,8 +441,22 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
epsId = (book.epsCount - loadIndex*book.epsLimit) - index - 1
|
||||
self.OpenReadIndex(epsId)
|
||||
|
||||
def OpenReadIndex(self, epsId, pageIndex=-1):
|
||||
QtOwner().OpenReadView(self.bookId, epsId, pageIndex=pageIndex)
|
||||
def OpenReadImg2(self, modelIndex):
|
||||
index = modelIndex.row()
|
||||
item = self.listWidget.item(index)
|
||||
if not item:
|
||||
return
|
||||
book = BookMgr().GetBook(self.bookId)
|
||||
if not book:
|
||||
return
|
||||
assert isinstance(book, Book)
|
||||
if not QtOwner().downloadView.IsDownloadEpsId(self.bookId, index):
|
||||
QtOwner().ShowError(Str.GetStr(Str.NotDownload))
|
||||
return
|
||||
self.OpenReadIndex(index, isOffline=True)
|
||||
|
||||
def OpenReadIndex(self, epsId, pageIndex=-1, isOffline=False):
|
||||
QtOwner().OpenReadView(self.bookId, epsId, pageIndex=pageIndex, isOffline=isOffline)
|
||||
# self.stackedWidget.setCurrentIndex(1)
|
||||
|
||||
def StartRead(self):
|
||||
@ -384,6 +466,19 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
self.OpenReadIndex(0)
|
||||
return
|
||||
|
||||
def StartRead2(self):
|
||||
if self.lastEpsId >= 0:
|
||||
if not QtOwner().downloadView.IsDownloadEpsId(self.bookId, self.lastEpsId):
|
||||
QtOwner().ShowError(Str.GetStr(Str.NotDownload))
|
||||
return
|
||||
self.OpenReadIndex(self.lastEpsId, self.lastIndex, isOffline=True)
|
||||
else:
|
||||
if not QtOwner().downloadView.IsDownloadEpsId(self.bookId, 0):
|
||||
QtOwner().ShowError(Str.GetStr(Str.NotDownload))
|
||||
return
|
||||
self.OpenReadIndex(0, isOffline=True)
|
||||
return
|
||||
|
||||
def LoadHistory(self):
|
||||
info = QtOwner().historyView.GetHistory(self.bookId)
|
||||
if not info:
|
||||
@ -392,6 +487,7 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
if self.lastEpsId == info.epsId:
|
||||
self.lastIndex = info.picIndex
|
||||
self.startRead.setText(Str.GetStr(Str.LastLook) + str(self.lastEpsId + 1) + Str.GetStr(Str.Chapter) + str(info.picIndex + 1) + Str.GetStr(Str.Page))
|
||||
self.readOffline.setText(Str.GetStr(Str.LastLook) + str(self.lastEpsId + 1) + Str.GetStr(Str.Chapter) + str(info.picIndex + 1) + Str.GetStr(Str.Page))
|
||||
return
|
||||
|
||||
# if self.lastEpsId >= 0:
|
||||
@ -410,6 +506,7 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
self.lastEpsId = info.epsId
|
||||
self.lastIndex = info.picIndex
|
||||
self.startRead.setText(Str.GetStr(Str.LastLook) + str(self.lastEpsId + 1) + Str.GetStr(Str.Chapter) + str(info.picIndex + 1) + Str.GetStr(Str.Page))
|
||||
self.readOffline.setText(Str.GetStr(Str.LastLook) + str(self.lastEpsId + 1) + Str.GetStr(Str.Chapter) + str(info.picIndex + 1) + Str.GetStr(Str.Page))
|
||||
|
||||
def ClickCategoriesItem(self, modelIndex):
|
||||
index = modelIndex.row()
|
||||
@ -448,21 +545,24 @@ class BookInfoView(QtWidgets.QWidget, Ui_BookInfo, QtTaskBase):
|
||||
index = self.tagsList.indexAt(pos)
|
||||
item = self.tagsList.itemFromIndex(index)
|
||||
if index.isValid() and item:
|
||||
text = item.text()
|
||||
widget = self.tagsList.itemWidget(item)
|
||||
text = widget.text()
|
||||
QtOwner().CopyText(text)
|
||||
|
||||
def CopyClickCategoriesItem(self, pos):
|
||||
index = self.categoriesList.indexAt(pos)
|
||||
item = self.categoriesList.itemFromIndex(index)
|
||||
if index.isValid() and item:
|
||||
text = item.text()
|
||||
if item:
|
||||
widget = self.categoriesList.itemWidget(item)
|
||||
text = widget.text()
|
||||
QtOwner().CopyText(text)
|
||||
|
||||
def CopyClickAutorItem(self, pos):
|
||||
index = self.autorList.indexAt(pos)
|
||||
item = self.autorList.itemFromIndex(index)
|
||||
if index.isValid() and item:
|
||||
text = item.text()
|
||||
widget = self.autorList.itemWidget(item)
|
||||
text = widget.text()
|
||||
QtOwner().CopyText(text)
|
||||
|
||||
def eventFilter(self, obj, event):
|
||||
|
@ -182,7 +182,7 @@ class GameInfoView(QtWidgets.QWidget, Ui_GameInfo, QtTaskBase):
|
||||
self.picture.setPixmap(newPic)
|
||||
# self.picture.setScaledContents(True)
|
||||
else:
|
||||
self.picture.setText(Str.GetStr(Str.LoadingFail))
|
||||
self.picture.setText(Str.GetStr(status))
|
||||
return
|
||||
|
||||
def UpdateListPicture(self, data, status, backId):
|
||||
@ -204,7 +204,7 @@ class GameInfoView(QtWidgets.QWidget, Ui_GameInfo, QtTaskBase):
|
||||
|
||||
item.setSizeHint(widget.sizeHint())
|
||||
else:
|
||||
widget.setText(Str.GetStr(Str.LoadingFail))
|
||||
widget.setText(Str.GetStr(status))
|
||||
return
|
||||
|
||||
def eventFilter(self, obj, event):
|
||||
|
@ -114,6 +114,8 @@ class MainView(Main, QtTaskBase):
|
||||
self.navigationWidget.gameButton.clicked.connect(partial(self.SwitchWidgetAndClear, self.subStackWidget.indexOf(self.gameView)))
|
||||
self.navigationWidget.helpButton.clicked.connect(partial(self.SwitchWidgetAndClear, self.subStackWidget.indexOf(self.helpView)))
|
||||
self.navigationWidget.waifu2xButton.clicked.connect(partial(self.SwitchWidgetAndClear, self.subStackWidget.indexOf(self.waifu2xToolView)))
|
||||
self.navigationWidget.friedButton.clicked.connect(partial(self.SwitchWidgetAndClear, self.subStackWidget.indexOf(self.friedView)))
|
||||
self.navigationWidget.friedButton.hide()
|
||||
|
||||
def RetranslateUi(self):
|
||||
Main.retranslateUi(self, self)
|
||||
|
96
src/view/read/read_qgraphics_proxy_widget.py
Normal file
96
src/view/read/read_qgraphics_proxy_widget.py
Normal file
@ -0,0 +1,96 @@
|
||||
from PySide6.QtCore import QByteArray, QBuffer, Qt, QSize
|
||||
from PySide6.QtGui import QPixmap, QMovie
|
||||
from PySide6.QtWidgets import QGraphicsProxyWidget
|
||||
|
||||
from tools.tool import ToolUtil
|
||||
|
||||
|
||||
class ReadQGraphicsProxyWidget(QGraphicsProxyWidget):
|
||||
def __init__(self):
|
||||
QGraphicsProxyWidget.__init__(self)
|
||||
self.movie = None
|
||||
self.byteArray = None
|
||||
self.bBuffer = None
|
||||
self.gifWidth = 0
|
||||
self.gifHeight = 0
|
||||
|
||||
def pixmap(self):
|
||||
if self.widget().pixmap() is not None:
|
||||
return self.widget().pixmap()
|
||||
return QPixmap()
|
||||
|
||||
def width(self):
|
||||
return self.widget().width()
|
||||
|
||||
def height(self):
|
||||
return self.widget().height()
|
||||
|
||||
def realW(self):
|
||||
return self.pixmap().width() / max(1, self.pixmap().devicePixelRatioF())
|
||||
|
||||
def realH(self):
|
||||
return self.pixmap().height() / max(1, self.pixmap().devicePixelRatioF())
|
||||
|
||||
def setPixmap(self, data):
|
||||
if self.movie:
|
||||
self.movie.stop()
|
||||
self.widget().setMovie(None)
|
||||
self.movie.setDevice(None)
|
||||
self.movie = None
|
||||
self.bBuffer = None
|
||||
self.byteArray = None
|
||||
# self.widget().setText("")
|
||||
widget = data.width() // max(1, data.devicePixelRatioF())
|
||||
height = data.height()//max(1, data.devicePixelRatioF())
|
||||
self.widget().setFixedWidth(widget)
|
||||
self.widget().setFixedHeight(height)
|
||||
# self.widget().setStyleSheet("border:2px solid rgb(177,177,177);")
|
||||
return self.widget().setPixmap(data)
|
||||
|
||||
def paint(self, p, option, parent):
|
||||
# print("paint")
|
||||
if self.movie and self.movie.state() == QMovie.NotRunning:
|
||||
self.movie.start()
|
||||
# if self.movie and self.movie.state == QMovie.Running:
|
||||
# bound = self.boundingRect().adjused(10, 10, -5, -5)
|
||||
# p.drawImage(bound, self.movie.currentImage)
|
||||
return QGraphicsProxyWidget.paint(self, p, option, parent)
|
||||
|
||||
def SetGifData(self, data, width, height):
|
||||
if self.movie:
|
||||
self.movie.stop()
|
||||
self.widget().setMovie(None)
|
||||
self.movie.setDevice(None)
|
||||
animationFormat = ToolUtil.GetAnimationFormat(data)
|
||||
if animationFormat:
|
||||
self.movie = QMovie()
|
||||
self.gifWidth = width
|
||||
self.gifHeight = height
|
||||
self.widget().setFixedWidth(width)
|
||||
self.widget().setFixedHeight(height)
|
||||
self.byteArray = QByteArray(data)
|
||||
self.bBuffer = QBuffer(self.byteArray)
|
||||
# self.movie.frameChanged.connect(self.FrameChange)
|
||||
self.movie.setFormat(QByteArray(animationFormat.encode("utf-8")))
|
||||
self.movie.setCacheMode(QMovie.CacheMode.CacheAll)
|
||||
self.movie.setDevice(self.bBuffer)
|
||||
self.movie.setScaledSize(QSize(self.width(), self.height()))
|
||||
self.widget().setMovie(self.movie)
|
||||
# self.widget().setScaledContents(True)
|
||||
else:
|
||||
pic = QPixmap()
|
||||
pic.loadFromData(data)
|
||||
radio = self.widget().devicePixelRatio()
|
||||
pic.setDevicePixelRatio(radio)
|
||||
newPic = pic.scaled(width*radio, height*radio, Qt.KeepAspectRatio, Qt.SmoothTransformation)
|
||||
self.setPixmap(newPic)
|
||||
# self.widget().setScaledContents(True)
|
||||
|
||||
# def FrameChange(self):
|
||||
# currentPixmap = self.movie.currentPixmap()
|
||||
# size = currentPixmap.size()
|
||||
# radioF = self.widget().devicePixelRatioF()
|
||||
# currentPixmap.setDevicePixelRatio(radioF)
|
||||
# newData = currentPixmap.scaled(self.gifWidth * radioF, self.gifHeight * radioF, Qt.KeepAspectRatio, Qt.SmoothTransformation)
|
||||
# self.widget().setPixmap(newData)
|
||||
# return
|
@ -115,6 +115,8 @@ class ReadTool(QtWidgets.QWidget, Ui_ReadImg):
|
||||
self.isMaxFull = False
|
||||
self.gpuLabel.setMaximumWidth(250)
|
||||
self.curWaifu2x.clicked.connect(self.OpenCurWaifu)
|
||||
self.preDownWaifu2x.clicked.connect(self.OpenPreDownloadWaifu2x)
|
||||
|
||||
|
||||
@property
|
||||
def imgFrame(self):
|
||||
@ -175,9 +177,15 @@ class ReadTool(QtWidgets.QWidget, Ui_ReadImg):
|
||||
bookInfo = BookMgr().books.get(bookId)
|
||||
|
||||
if self.curIndex >= self.maxPic - 1:
|
||||
if epsId + 1 < bookInfo.epsCount:
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.AutoSkipNext))
|
||||
if self.readImg.isOffline:
|
||||
if not QtOwner().downloadView.IsDownloadEpsId(self.readImg.bookId, self.readImg.epsId + 1):
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.NotDownload))
|
||||
return
|
||||
self.OpenNextEps()
|
||||
else:
|
||||
if epsId + 1 < bookInfo.epsCount:
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.AutoSkipNext))
|
||||
self.OpenNextEps()
|
||||
return
|
||||
self.CloseScrollAndTurn()
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.AlreadyNextPage))
|
||||
@ -213,6 +221,10 @@ class ReadTool(QtWidgets.QWidget, Ui_ReadImg):
|
||||
bookInfo = BookMgr().books.get(bookId)
|
||||
|
||||
if self.curIndex <= 0:
|
||||
if self.readImg.isOffline:
|
||||
if not QtOwner().downloadView.IsDownloadEpsId(self.readImg.bookId, self.readImg.epsId - 1):
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.NotDownload))
|
||||
return
|
||||
if epsId - 1 >= 0:
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.AutoSkipLast))
|
||||
self.OpenLastEps()
|
||||
@ -297,6 +309,10 @@ class ReadTool(QtWidgets.QWidget, Ui_ReadImg):
|
||||
self.scrollArea.changeScale.emit(self.scaleCnt)
|
||||
return
|
||||
|
||||
def OpenPreDownloadWaifu2x(self):
|
||||
Setting.PreDownWaifu2x.SetValue(int(self.preDownWaifu2x.isChecked()))
|
||||
return
|
||||
|
||||
def OpenWaifu(self):
|
||||
if self.checkBox.isChecked():
|
||||
Setting.IsOpenWaifu.SetValue(1)
|
||||
@ -320,13 +336,19 @@ class ReadTool(QtWidgets.QWidget, Ui_ReadImg):
|
||||
bookInfo = BookMgr().books.get(bookId)
|
||||
|
||||
epsId -= 1
|
||||
|
||||
if self.readImg.isOffline:
|
||||
if not QtOwner().downloadView.IsDownloadEpsId(self.readImg.bookId, self.readImg.epsId - 1):
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.NotDownload))
|
||||
return
|
||||
else:
|
||||
if epsId >= bookInfo.epsCount:
|
||||
return
|
||||
|
||||
if epsId < 0:
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.AlreadyLastChapter))
|
||||
return
|
||||
|
||||
if epsId >= bookInfo.epsCount:
|
||||
return
|
||||
|
||||
self.readImg.AddHistory()
|
||||
QtOwner().bookInfoView.LoadHistory()
|
||||
self.readImg.OpenPage(bookId, epsId)
|
||||
@ -336,16 +358,21 @@ class ReadTool(QtWidgets.QWidget, Ui_ReadImg):
|
||||
epsId = self.readImg.epsId
|
||||
bookId = self.readImg.bookId
|
||||
bookInfo = BookMgr().books.get(bookId)
|
||||
|
||||
epsId += 1
|
||||
if epsId >= bookInfo.epsCount:
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.AlreadyNextChapter))
|
||||
return
|
||||
|
||||
if epsId >= bookInfo.epsCount:
|
||||
return
|
||||
if self.readImg.isOffline:
|
||||
if not QtOwner().downloadView.IsDownloadEpsId(self.readImg.bookId, self.readImg.epsId + 1):
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.NotDownload))
|
||||
return
|
||||
else:
|
||||
if epsId >= bookInfo.epsCount:
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.AlreadyNextChapter))
|
||||
return
|
||||
|
||||
title = bookInfo.GetEpsTitle(epsId)
|
||||
if epsId >= bookInfo.epsCount:
|
||||
return
|
||||
|
||||
# title = bookInfo.GetEpsTitle(epsId)
|
||||
self.readImg.AddHistory()
|
||||
QtOwner().bookInfoView.LoadHistory()
|
||||
self.readImg.OpenPage(bookId, epsId)
|
||||
|
@ -1,19 +1,21 @@
|
||||
import os
|
||||
import time
|
||||
from functools import partial
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6.QtCore import Qt, QSize, QEvent
|
||||
from PySide6.QtCore import Qt, QSize, QEvent, QMimeData
|
||||
from PySide6.QtGui import QPixmap, QImage, QCursor
|
||||
from PySide6.QtWidgets import QMenu
|
||||
from PySide6.QtWidgets import QMenu, QApplication, QFileDialog
|
||||
|
||||
from config import config
|
||||
from config.setting import Setting
|
||||
from qt_owner import QtOwner
|
||||
from server import req, Status, Log
|
||||
from task.qt_task import QtTaskBase
|
||||
from tools.book import BookMgr
|
||||
from tools.book import BookMgr, Book
|
||||
from tools.str import Str
|
||||
from tools.tool import time_me, ToolUtil
|
||||
from view.download.download_item import DownloadItem, DownloadEpsItem
|
||||
from view.read.read_enum import ReadMode, QtFileData
|
||||
from view.read.read_frame import ReadFrame
|
||||
|
||||
@ -55,6 +57,7 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
|
||||
self.qtTool.turnSpeed.setValue(Setting.TurnSpeed.value / 1000)
|
||||
self.qtTool.scrollSpeed.setValue(Setting.ScrollSpeed.value)
|
||||
self.pageIndex = -1
|
||||
self.isOffline = False
|
||||
|
||||
@property
|
||||
def scrollArea(self):
|
||||
@ -131,6 +134,12 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
|
||||
action = menu3.addAction(Str.GetStr(Str.NextChapter))
|
||||
action.triggered.connect(self.qtTool.OpenNextEps)
|
||||
|
||||
menu4 = popMenu.addMenu(Str.GetStr(Str.Copy))
|
||||
action = menu4.addAction(Str.GetStr(Str.CopyPicture))
|
||||
action.triggered.connect(self.CopyPicture)
|
||||
action = menu4.addAction(Str.GetStr(Str.CopyFile))
|
||||
action.triggered.connect(self.CopyFile)
|
||||
|
||||
action = popMenu.addAction(Str.GetStr(Str.AutoScroll)+"(F5)")
|
||||
action.triggered.connect(self.qtTool.SwitchScrollAndTurn)
|
||||
|
||||
@ -173,15 +182,17 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
|
||||
self.ClearDownload()
|
||||
self.ClearQImageTask()
|
||||
|
||||
def OpenPage(self, bookId, epsId, pageIndex=-1):
|
||||
def OpenPage(self, bookId, epsId, pageIndex=-1, isOffline=False):
|
||||
if not bookId:
|
||||
return
|
||||
self.isOffline = isOffline
|
||||
self.Clear()
|
||||
info = BookMgr().books.get(bookId)
|
||||
if info:
|
||||
self.category = info.categories[::]
|
||||
|
||||
self.qtTool.checkBox.setChecked(Setting.IsOpenWaifu.value)
|
||||
self.qtTool.preDownWaifu2x.setChecked(Setting.PreDownWaifu2x.value)
|
||||
self.qtTool.curWaifu2x.setChecked(Setting.IsOpenWaifu.value)
|
||||
self.qtTool.SetData(isInit=True)
|
||||
self.qtTool.SetData()
|
||||
@ -329,7 +340,9 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
|
||||
if not p:
|
||||
p = QtFileData()
|
||||
self.pictureData[index] = p
|
||||
if st != Status.Ok:
|
||||
if st == Status.FileError:
|
||||
QtOwner().ShowError(Str.GetStr(st))
|
||||
elif st != Status.Ok:
|
||||
p.state = p.DownloadReset
|
||||
self.AddDownload(index)
|
||||
else:
|
||||
@ -496,20 +509,38 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
|
||||
return
|
||||
assert isinstance(info, QtFileData)
|
||||
path = ToolUtil.GetRealPath(i + 1, "book/{}/{}".format(self.bookId, self.epsId + 1))
|
||||
info.waifu2xTaskId = self.AddConvertTask(path, info.data, info.model, self.Waifu2xBack, i)
|
||||
if Setting.PreDownWaifu2x.value:
|
||||
filePath = QtOwner().downloadView.GetDownloadWaifu2xFilePath(self.bookId, self.epsId, i)
|
||||
else:
|
||||
filePath = ""
|
||||
info.waifu2xTaskId = self.AddConvertTask(path, info.data, info.model, self.Waifu2xBack, i, preDownPath=filePath)
|
||||
if i == self.curIndex:
|
||||
self.qtTool.SetData(waifuState=info.waifuState)
|
||||
self.frame.waifu2xProcess.show()
|
||||
|
||||
def InitDownload(self):
|
||||
self.AddDownloadBook(self.bookId, self.epsId, 0, statusBack=self.StartLoadPicUrlBack, backParam=0, isInit=True)
|
||||
if not self.isOffline:
|
||||
self.AddDownloadBook(self.bookId, self.epsId, 0, statusBack=self.StartLoadPicUrlBack, backParam=0, isInit=True)
|
||||
else:
|
||||
bookInfo = BookMgr().GetBook(self.bookId)
|
||||
downInfo = QtOwner().downloadView.GetDownloadEpsInfo(self.bookId, self.epsId)
|
||||
if not bookInfo or not downInfo:
|
||||
QtOwner().ShowError(Str.GetStr(Str.FileError))
|
||||
else:
|
||||
assert isinstance(bookInfo, Book)
|
||||
assert isinstance(downInfo, DownloadEpsItem)
|
||||
raw = {"st": Status.Ok, "maxPic": downInfo.picCnt, "title": downInfo.epsTitle}
|
||||
self.StartLoadPicUrlBack(raw, "")
|
||||
|
||||
def AddDownload(self, i):
|
||||
loadPath = QtOwner().downloadView.GetDownloadFilePath(self.bookId, self.epsId, i)
|
||||
self.AddDownloadBook(self.bookId, self.epsId, i,
|
||||
downloadCallBack=self.UpdateProcessBar,
|
||||
completeCallBack=self.CompleteDownloadPic,
|
||||
backParam=i, loadPath=loadPath)
|
||||
if not self.isOffline:
|
||||
self.AddDownloadBook(self.bookId, self.epsId, i,
|
||||
downloadCallBack=self.UpdateProcessBar,
|
||||
completeCallBack=self.CompleteDownloadPic,
|
||||
backParam=i, loadPath=loadPath)
|
||||
else:
|
||||
self.AddDownloadBookCache(loadPath, completeCallBack=self.CompleteDownloadPic, backParam=i)
|
||||
if i not in self.pictureData:
|
||||
data = QtFileData()
|
||||
self.pictureData[i] = data
|
||||
@ -526,4 +557,53 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
|
||||
self.frame.oldValue = 0
|
||||
self.qtTool.SetData(isInit=True)
|
||||
self.scrollArea.ResetScrollValue(self.curIndex)
|
||||
self.scrollArea.changeNextPage.emit(self.curIndex)
|
||||
self.scrollArea.changeNextPage.emit(self.curIndex)
|
||||
|
||||
def CopyFile(self):
|
||||
info = self.pictureData.get(self.curIndex)
|
||||
if not info:
|
||||
return
|
||||
assert isinstance(info, QtFileData)
|
||||
if not info.data and not info.waifuData:
|
||||
return
|
||||
|
||||
today = time.strftime("%Y%m%d%H%M%S", time.localtime(time.time()))
|
||||
if info.waifuData:
|
||||
path = "{}_waifu2x.jpg".format(today)
|
||||
data = info.waifuData
|
||||
else:
|
||||
path = "{}.jpg".format(today)
|
||||
data = info.data
|
||||
if not data:
|
||||
return
|
||||
try:
|
||||
filepath = QFileDialog.getSaveFileName(self, Str.GetStr(Str.Save), path, "Image Files(*.jpg *.png)")
|
||||
if filepath and len(filepath) >= 1:
|
||||
name = filepath[0]
|
||||
if not name:
|
||||
return
|
||||
f = open(name, "wb")
|
||||
f.write(data)
|
||||
f.close()
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.CopySuc))
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
|
||||
def CopyPicture(self):
|
||||
info = self.pictureData.get(self.curIndex)
|
||||
if not info:
|
||||
return
|
||||
assert isinstance(info, QtFileData)
|
||||
if not info.data and not info.waifuData:
|
||||
return
|
||||
if info.waifuData:
|
||||
data = info.waifuData
|
||||
else:
|
||||
data = info.data
|
||||
p = QImage()
|
||||
p.loadFromData(data)
|
||||
|
||||
clipboard = QApplication.clipboard()
|
||||
clipboard.setImage(p)
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.CopySuc))
|
||||
return
|
@ -124,6 +124,17 @@ class SearchView(QWidget, Ui_Search, QtTaskBase):
|
||||
if text and re.match('^[0-9a-zA-Z]+$',text) and len(text) == len("5d5d760774184679c1e63f4c"):
|
||||
QtOwner().OpenBookInfo(text)
|
||||
return
|
||||
isRecomend = not not kwargs.get("recoment")
|
||||
if isRecomend:
|
||||
self.bookList.clear()
|
||||
bookId = kwargs.get("bookId")
|
||||
self.bookList.UpdatePage(1, 1)
|
||||
self.spinBox.setValue(1)
|
||||
self.spinBox.setMaximum(1)
|
||||
self.label.setText(self.bookList.GetPageStr())
|
||||
QtOwner().ShowLoading()
|
||||
self.AddHttpTask(req.GetComicsRecommendation(bookId), self.OpenRecommendationBack)
|
||||
return
|
||||
|
||||
if categories is not None:
|
||||
self.categories = categories
|
||||
@ -168,6 +179,16 @@ class SearchView(QWidget, Ui_Search, QtTaskBase):
|
||||
self.sortKey.setVisible(isLocal)
|
||||
self.comboBox.setVisible(not isLocal)
|
||||
|
||||
def OpenRecommendationBack(self, raw):
|
||||
QtOwner().CloseLoading()
|
||||
data = raw.get("data")
|
||||
try:
|
||||
commentsData = json.loads(data)
|
||||
for v in commentsData.get("data").get("comics"):
|
||||
self.bookList.AddBookByDict(v)
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
|
||||
def SendSearchCategories(self, page):
|
||||
sort = ["dd", "da", "ld", "vd"]
|
||||
QtOwner().ShowLoading()
|
||||
|
@ -16,6 +16,7 @@ from qt_owner import QtOwner
|
||||
from tools.langconv import Converter
|
||||
from tools.log import Log
|
||||
from tools.str import Str
|
||||
from view.user.login_view import LoginView
|
||||
|
||||
|
||||
class SettingView(QtWidgets.QWidget, Ui_SettingNew):
|
||||
@ -46,6 +47,7 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
|
||||
self.checkBox_IsUpdate.clicked.connect(partial(self.CheckButtonEvent, Setting.IsUpdate, self.checkBox_IsUpdate))
|
||||
self.chatProxy.clicked.connect(partial(self.CheckButtonEvent, Setting.ChatProxy, self.chatProxy))
|
||||
self.readCheckBox.clicked.connect(partial(self.CheckButtonEvent, Setting.IsOpenWaifu, self.readCheckBox))
|
||||
self.preDownWaifu2x.clicked.connect(partial(self.CheckButtonEvent, Setting.PreDownWaifu2x, self.preDownWaifu2x))
|
||||
self.coverCheckBox.clicked.connect(partial(self.CheckButtonEvent, Setting.CoverIsOpenWaifu, self.coverCheckBox))
|
||||
self.downAuto.clicked.connect(partial(self.CheckButtonEvent, Setting.DownloadAuto, self.downAuto))
|
||||
self.titleBox.clicked.connect(partial(self.CheckButtonEvent, Setting.IsNotUseTitleBar, self.titleBox))
|
||||
@ -93,6 +95,7 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
|
||||
self.openCacheDir.clicked.connect(partial(self.OpenDir, self.cacheDir))
|
||||
self.openWaifu2xDir.clicked.connect(partial(self.OpenDir, self.waifu2xDir))
|
||||
|
||||
self.openProxy.clicked.connect(self.OpenProxy)
|
||||
# TODO
|
||||
self.languageButton3.setVisible(False)
|
||||
|
||||
@ -214,6 +217,7 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
|
||||
self.fontBox.setCurrentIndex(index)
|
||||
|
||||
self.readCheckBox.setChecked(Setting.IsOpenWaifu.value)
|
||||
self.preDownWaifu2x.setChecked(Setting.PreDownWaifu2x.value)
|
||||
self.readNoise.setCurrentIndex(Setting.LookNoise.value)
|
||||
self.readScale.setValue(Setting.LookScale.value)
|
||||
self.readModel.setCurrentIndex(Setting.LookModel.value)
|
||||
@ -229,6 +233,17 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
|
||||
self.downModel.setCurrentIndex(Setting.DownloadModel.value)
|
||||
self.SetDownloadLabel()
|
||||
|
||||
def OpenProxy(self):
|
||||
loginView = LoginView(QtOwner().owner, False)
|
||||
loginView.tabWidget.setCurrentIndex(3)
|
||||
loginView.tabWidget.removeTab(0)
|
||||
loginView.tabWidget.removeTab(0)
|
||||
loginView.tabWidget.removeTab(0)
|
||||
loginView.show()
|
||||
|
||||
loginView.closed.connect(QtOwner().owner.navigationWidget.UpdateProxyName)
|
||||
return
|
||||
|
||||
def retranslateUi(self, SettingNew):
|
||||
Ui_SettingNew.retranslateUi(self, SettingNew)
|
||||
self.SetDownloadLabel()
|
||||
|
@ -4,8 +4,8 @@ import time
|
||||
from PySide6 import QtWidgets, QtCore
|
||||
from PySide6.QtCore import Qt, QRectF, QPointF, QSizeF, QEvent
|
||||
from PySide6.QtGui import QPainter, QPixmap, QDoubleValidator, \
|
||||
QIntValidator, QMouseEvent
|
||||
from PySide6.QtWidgets import QFrame, QGraphicsPixmapItem, QGraphicsScene, QApplication, QFileDialog
|
||||
QIntValidator, QMouseEvent, QImage
|
||||
from PySide6.QtWidgets import QFrame, QGraphicsPixmapItem, QGraphicsScene, QApplication, QFileDialog, QLabel
|
||||
|
||||
from config import config
|
||||
from interface.ui_waifu2x_tool import Ui_Waifu2xTool
|
||||
@ -14,6 +14,7 @@ from task.qt_task import QtTaskBase
|
||||
from tools.log import Log
|
||||
from tools.str import Str
|
||||
from tools.tool import ToolUtil
|
||||
from view.read.read_qgraphics_proxy_widget import ReadQGraphicsProxyWidget
|
||||
|
||||
|
||||
class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
@ -49,7 +50,7 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
self.graphicsView.setCacheMode(self.graphicsView.CacheBackground)
|
||||
self.graphicsView.setViewportUpdateMode(self.graphicsView.SmartViewportUpdate)
|
||||
|
||||
self.graphicsItem = QGraphicsPixmapItem()
|
||||
self.graphicsItem = ReadQGraphicsProxyWidget()
|
||||
self.graphicsItem.setFlags(QGraphicsPixmapItem.ItemIsFocusable |
|
||||
QGraphicsPixmapItem.ItemIsMovable)
|
||||
self.setContextMenuPolicy(Qt.CustomContextMenu)
|
||||
@ -57,11 +58,15 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
|
||||
self.graphicsScene = QGraphicsScene(self) # 场景
|
||||
self.graphicsView.setScene(self.graphicsScene)
|
||||
self.graphicsItem.setTransformationMode(Qt.SmoothTransformation)
|
||||
self.graphicsItem.setWidget(QLabel())
|
||||
# self.graphicsItem.setPixmap(QPixmap())
|
||||
# self.graphicsItem.setTransformationMode(Qt.SmoothTransformation)
|
||||
self.graphicsScene.addItem(self.graphicsItem)
|
||||
self.graphicsItem.setPos(QPointF(0, 0))
|
||||
self.graphicsView.setMinimumSize(10, 10)
|
||||
self.pixMap = QPixmap(Str.GetStr(Str.LoadingPicture))
|
||||
self.graphicsItem.setPixmap(self.pixMap)
|
||||
# self.pixMapData = None
|
||||
self.pixMap = QImage(Str.GetStr(Str.LoadingPicture))
|
||||
# self.graphicsItem.setPixmap(self.pixMap)
|
||||
# self.radioButton.setChecked(True)
|
||||
self.isStripModel = False
|
||||
|
||||
@ -90,6 +95,8 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
self.comboBox.setEnabled(True)
|
||||
self.changeButton.setEnabled(True)
|
||||
self.changeButton.setText(Str.GetStr(Str.Convert))
|
||||
self.backStatus = ""
|
||||
self.CheckScaleRadio()
|
||||
|
||||
else:
|
||||
return
|
||||
@ -110,19 +117,21 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
def ShowImg(self, data):
|
||||
self.gpuLabel.setText(config.EncodeGpu)
|
||||
self.scaleCnt = 0
|
||||
p = QPixmap()
|
||||
p.loadFromData(data)
|
||||
# radio = self.devicePixelRatio()
|
||||
# p.setDevicePixelRatio(radio)
|
||||
self.pixMap = p
|
||||
# self.pixMapData = data
|
||||
self.show()
|
||||
self.graphicsItem.setPixmap(self.pixMap)
|
||||
self.pixMap = QImage()
|
||||
self.pixMap.loadFromData(data)
|
||||
|
||||
self.graphicsItem.SetGifData(data, self.pixMap.width(), self.pixMap.height())
|
||||
self.graphicsView.setSceneRect(QRectF(QPointF(0, 0), QPointF(self.pixMap.width(), self.pixMap.height())))
|
||||
# self.graphicsView.setSceneRect(QRectF(QPointF(0, 0), QPointF(self.pixMap.width()*radio, self.pixMap.height()*radio)))
|
||||
|
||||
size = ToolUtil.GetDownloadSize(len(data))
|
||||
self.sizeLabel.setText(size)
|
||||
weight, height, _ = ToolUtil.GetPictureSize(data)
|
||||
weight, height, mat = ToolUtil.GetPictureSize(data)
|
||||
self.format.setText(mat)
|
||||
self.resolutionLabel.setText(str(weight) + "x" + str(height))
|
||||
self.ScalePicture()
|
||||
self.CheckScaleRadio()
|
||||
@ -235,7 +244,7 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
|
||||
def CopyPicture(self):
|
||||
clipboard = QApplication.clipboard()
|
||||
clipboard.setPixmap(self.pixMap)
|
||||
clipboard.setImage(self.pixMap)
|
||||
QtOwner().ShowMsg(Str.GetStr(Str.CopySuc))
|
||||
return
|
||||
|
||||
@ -249,7 +258,7 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
|
||||
def OpenPicture(self):
|
||||
try:
|
||||
filename = QFileDialog.getOpenFileName(self, "Open Image", ".", "Image Files(*.jpg *.png)")
|
||||
filename = QFileDialog.getOpenFileName(self, "Open Image", ".", "Image Files(*.jpg *.png *.gif *.webp)")
|
||||
if filename and len(filename) >= 1:
|
||||
name = filename[0]
|
||||
if os.path.isfile(name):
|
||||
@ -331,7 +340,7 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
return
|
||||
try:
|
||||
today = time.strftime("%Y%m%d%H%M%S", time.localtime(time.time()))
|
||||
filepath = QFileDialog.getSaveFileName(self, Str.GetStr(Str.Save), "{}.jpg".format(today))
|
||||
filepath = QFileDialog.getSaveFileName(self, Str.GetStr(Str.Save), "{}.{}".format(today, self.format.text()))
|
||||
if filepath and len(filepath) >= 1:
|
||||
name = filepath[0]
|
||||
if not name:
|
||||
|
@ -2,6 +2,7 @@ import json
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
|
||||
from config.setting import Setting
|
||||
from interface.ui_favorite import Ui_Favorite
|
||||
from qt_owner import QtOwner
|
||||
from server import req, User, Log
|
||||
@ -107,7 +108,7 @@ class FavoriteView(QtWidgets.QWidget, Ui_Favorite, QtTaskBase):
|
||||
if info:
|
||||
info.isFavourite = False
|
||||
if self.isLocal:
|
||||
sql = "delete from favorite where id='{}' and user='{}';".format(bookId, User().userId)
|
||||
sql = "delete from favorite where id='{}' and user='{}';".format(bookId, Setting.UserId.value)
|
||||
self.AddSqlTask("book", sql, SqlServer.TaskTypeSql)
|
||||
if bookId in self.allFavoriteIds:
|
||||
self.allFavoriteIds.pop(bookId)
|
||||
@ -126,6 +127,8 @@ class FavoriteView(QtWidgets.QWidget, Ui_Favorite, QtTaskBase):
|
||||
self.RefreshData()
|
||||
|
||||
def LoadPage(self, page):
|
||||
if not User().userId:
|
||||
return
|
||||
Log.Info("load favorite page:{}".format(page))
|
||||
self.AddHttpTask(req.FavoritesReq(page, "da"), self.UpdatePagesBack, page)
|
||||
# QtOwner().ShowLoading()
|
||||
@ -142,7 +145,7 @@ class FavoriteView(QtWidgets.QWidget, Ui_Favorite, QtTaskBase):
|
||||
QtOwner().ShowLoading()
|
||||
sortId = self.sortIdCombox.currentIndex()
|
||||
sortKey = self.sortKeyCombox.currentIndex()
|
||||
if self.isLocal:
|
||||
if self.isLocal or QtOwner().isOfflineModel:
|
||||
sql = SqlServer.SearchFavorite(self.bookList.page, sortKey, sortId)
|
||||
self.AddSqlTask("book", sql, SqlServer.TaskTypeSelectBook, self.SearchLocalBack)
|
||||
else:
|
||||
@ -229,5 +232,5 @@ class FavoriteView(QtWidgets.QWidget, Ui_Favorite, QtTaskBase):
|
||||
delBookIds = set(self.allFavoriteIds.keys()) - self.reupdateBookIds
|
||||
for bookId in delBookIds:
|
||||
self.allFavoriteIds.pop(bookId)
|
||||
sql = "delete from favorite where id='{}' and user='{}';".format(bookId, User().userId)
|
||||
sql = "delete from favorite where id='{}' and user='{}';".format(bookId, Setting.UserId.value)
|
||||
self.AddSqlTask("book", sql, SqlServer.TaskTypeSql)
|
||||
|
@ -32,6 +32,7 @@ class LoginProxyWidget(QtWidgets.QWidget, Ui_LoginProxyWidget, QtTaskBase):
|
||||
self.buttonGroup_2.setId(self.proxy_0, 0)
|
||||
self.buttonGroup_2.setId(self.proxy_1, 1)
|
||||
self.buttonGroup_2.setId(self.proxy_2, 2)
|
||||
self.buttonGroup_2.setId(self.proxy_3, 3)
|
||||
|
||||
def Init(self):
|
||||
self.LoadSetting()
|
||||
@ -44,6 +45,7 @@ class LoginProxyWidget(QtWidgets.QWidget, Ui_LoginProxyWidget, QtTaskBase):
|
||||
self.proxy_0.setEnabled(enabled)
|
||||
self.proxy_1.setEnabled(enabled)
|
||||
self.proxy_2.setEnabled(enabled)
|
||||
self.proxy_3.setEnabled(enabled)
|
||||
self.httpLine.setEnabled(enabled)
|
||||
self.sockEdit.setEnabled(enabled)
|
||||
self.cdnIp.setEnabled(enabled)
|
||||
@ -101,10 +103,13 @@ class LoginProxyWidget(QtWidgets.QWidget, Ui_LoginProxyWidget, QtTaskBase):
|
||||
|
||||
request = req.SpeedTestPingReq()
|
||||
request.isUseHttps = self.httpsBox.isChecked()
|
||||
|
||||
if isHttpProxy and self.buttonGroup_2.checkedId() == 1:
|
||||
request.proxy = {"http": httpProxy, "https": httpProxy}
|
||||
else:
|
||||
elif isHttpProxy and self.buttonGroup_2.checkedId() == 3:
|
||||
request.proxy = ""
|
||||
else:
|
||||
request.proxy = {"http": None, "https": None}
|
||||
|
||||
if isHttpProxy and self.buttonGroup_2.checkedId() == 2:
|
||||
self.SetSock5Proxy(True)
|
||||
@ -117,11 +122,12 @@ class LoginProxyWidget(QtWidgets.QWidget, Ui_LoginProxyWidget, QtTaskBase):
|
||||
|
||||
def SpeedTestPingBack(self, raw, i):
|
||||
data = raw["data"]
|
||||
st = raw["st"]
|
||||
label = getattr(self, "label" + str(i))
|
||||
if float(data) > 0.0:
|
||||
label.setText("<font color=#7fb80e>{}</font>".format(str(int(float(data)*500)) + "ms") + "/")
|
||||
else:
|
||||
label.setText("<font color=#d71345>{}</font>".format("fail") + "/")
|
||||
label.setText("<font color=#d71345>{}</font>".format(Str.GetStr(st)) + "/")
|
||||
self.speedPingNum += 1
|
||||
self.StartSpeedPing()
|
||||
return
|
||||
@ -161,8 +167,9 @@ class LoginProxyWidget(QtWidgets.QWidget, Ui_LoginProxyWidget, QtTaskBase):
|
||||
|
||||
def SpeedTestBack(self, raw, i):
|
||||
data = raw["data"]
|
||||
st = raw["st"]
|
||||
if not data:
|
||||
data = "<font color=#d71345>fail</font>"
|
||||
data = "<font color=#d71345>{}</font>".format(Str.GetStr(st))
|
||||
else:
|
||||
data = "<font color=#7fb80e>{}</font>".format(data)
|
||||
label = getattr(self, "label" + str(i))
|
||||
|
315
ui/component/ui_fried_msg.ui
Normal file
315
ui/component/ui_fried_msg.ui
Normal file
@ -0,0 +1,315 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FriedMsg</class>
|
||||
<widget class="QWidget" name="FriedMsg">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>530</width>
|
||||
<height>591</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="HeadLabel" name="picLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="nameLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="indexLabel">
|
||||
<property name="text">
|
||||
<string>X楼</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="levelLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:#eeA2A4;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>LV</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="titleLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:#eeA2A4;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="commentLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="AutoPictureLabel" name="replayLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="infoLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
<pointsize>12</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
<underline>false</underline>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: #999999;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="likeButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(0)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="commentButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(0)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="UserListWidget" name="listWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>400</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QListWidget {background-color:transparent;}
|
||||
QListWidget::item { border-bottom: 1px solid black; }</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>HeadLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header location="global">component.label.head_label.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>UserListWidget</class>
|
||||
<extends>QListWidget</extends>
|
||||
<header location="global">component.list.user_list_widget.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>AutoPictureLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>component.label.auto_picture_label.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>commentButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>FriedMsg</receiver>
|
||||
<slot>OpenComment()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>258</x>
|
||||
<y>137</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>283</x>
|
||||
<y>185</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>OpenAudioPath()</slot>
|
||||
<slot>OpenComment()</slot>
|
||||
</slots>
|
||||
</ui>
|
@ -143,12 +143,33 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="proxy_3">
|
||||
<property name="text">
|
||||
<string>使用系统代理</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup_2</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="httpsBox">
|
||||
<property name="text">
|
||||
<string>启用HTTPS</string>
|
||||
<string>启用Https(如果出现连接被重置,建议关闭试试)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@ -157,6 +178,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
@ -293,41 +321,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>CDN设置请看说明获取</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCommandLinkButton" name="commandLinkButton">
|
||||
<property name="text">
|
||||
<string>说明</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string> CDN的IP地址 </string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="cdnIp"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
@ -362,6 +355,41 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string> CDN的IP地址 </string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="cdnIp"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>CDN设置请看说明获取</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCommandLinkButton" name="commandLinkButton">
|
||||
<property name="text">
|
||||
<string>说明</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -131,6 +131,38 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>分流:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="proxyName">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>离线模式:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SwitchButton" name="offlineButton" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
@ -149,7 +181,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>211</width>
|
||||
<height>654</height>
|
||||
<height>700</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
@ -623,6 +655,47 @@
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="friedButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>锅贴</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/images/menu/Contact.png</normaloff>:/images/menu/Contact.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
@ -837,15 +910,21 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>SmoothScrollArea</class>
|
||||
<extends>QScrollArea</extends>
|
||||
<header location="global">component.scroll_area.smooth_scroll_area.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>HeadLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header location="global">component.label.head_label.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SmoothScrollArea</class>
|
||||
<extends>QScrollArea</extends>
|
||||
<header location="global">component.scroll_area.smooth_scroll_area.h</header>
|
||||
<class>SwitchButton</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>component.button.switch_button.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
|
@ -42,8 +42,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>318</width>
|
||||
<height>815</height>
|
||||
<width>310</width>
|
||||
<height>825</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
@ -152,108 +152,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="waifu2xStatus">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QPushButton" name="waifu2xCancle">
|
||||
<property name="text">
|
||||
<string>保存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="scaleLabel">
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="WheelDoubleSpinBox" name="scaleBox">
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>32.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>2.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>转换模式:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="waifu2xSize">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>去噪等级:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="gpuLabel">
|
||||
<property name="text">
|
||||
<string>GPU</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="tickLabel">
|
||||
<property name="text">
|
||||
<string>耗时:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="waifu2xTick">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="stateWaifu">
|
||||
<property name="text">
|
||||
<string>状态:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>放大倍数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="modelLabel">
|
||||
@ -288,14 +187,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="sizeWaifu">
|
||||
<property name="text">
|
||||
<string>大小:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
@ -308,14 +200,156 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>放大倍数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>转换模式:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="tickLabel">
|
||||
<property name="text">
|
||||
<string>耗时:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="waifu2xTick">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="gpuLabel">
|
||||
<property name="text">
|
||||
<string>GPU</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="waifu2xRes">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QLabel" name="waifu2xStatus">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QPushButton" name="waifu2xSave">
|
||||
<property name="text">
|
||||
<string>修改参数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QPushButton" name="waifu2xCancle">
|
||||
<property name="text">
|
||||
<string>保存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="waifu2xSize">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>去噪等级:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>自动Waifu2x</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="curWaifu2x">
|
||||
<property name="text">
|
||||
<string>本张图开启Waifu2x (F2)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="stateWaifu">
|
||||
<property name="text">
|
||||
<string>状态:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="resolutionWaifu">
|
||||
<property name="text">
|
||||
<string>分辨率:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="5" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="scaleLabel">
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="WheelDoubleSpinBox" name="scaleBox">
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>32.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>2.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="sizeWaifu">
|
||||
<property name="text">
|
||||
<string>大小:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="noiseLabel">
|
||||
@ -355,37 +389,10 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="waifu2xRes">
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="preDownWaifu2x">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="waifu2xSave">
|
||||
<property name="text">
|
||||
<string>修改参数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="curWaifu2x">
|
||||
<property name="text">
|
||||
<string>本张图开启Waifu2x (F2)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>自动Waifu2x</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<string>优先使用下载转换好的</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -62,243 +62,6 @@ QScrollArea {background-color:transparent;}</string>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="HeadLabel" name="user_icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="user_name">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="updateTick">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="IconToolButton" name="starButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../res/images.qrc">
|
||||
<normaloff>:/png/icon/icon_bookmark_off.png</normaloff>
|
||||
<selectedon>:/png/icon/icon_bookmark_on.png</selectedon>:/png/icon/icon_bookmark_off.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="IconToolButton" name="favoriteButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../res/images.qrc">
|
||||
<normaloff>:/png/icon/icon_like_off.png</normaloff>
|
||||
<selectedon>:/png/icon/icon_bookmark_on.png</selectedon>:/png/icon/icon_like_off.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="IconToolButton" name="commentButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../res/images.qrc">
|
||||
<normaloff>:/png/icon/icon_comment.png</normaloff>:/png/icon/icon_comment.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="IconToolButton" name="downloadButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../res/images.qrc">
|
||||
<normaloff>:/png/icon/ic_get_app_black_36dp.png</normaloff>:/png/icon/ic_get_app_black_36dp.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="startRead">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>开始阅读</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="pageLabel">
|
||||
<property name="text">
|
||||
<string>分页:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="pageBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@ -587,16 +350,274 @@ QListWidget::item {
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCommandLinkButton" name="commandLinkButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>看了这边本子的人也在看</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="EpsListWidget" name="epsListWidget">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QListWidget {background-color:transparent;}
|
||||
<item row="1" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>阅读</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="HeadLabel" name="user_icon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="user_name">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="updateTick">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="IconToolButton" name="starButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../res/images.qrc">
|
||||
<normaloff>:/png/icon/icon_bookmark_off.png</normaloff>
|
||||
<selectedon>:/png/icon/icon_bookmark_on.png</selectedon>:/png/icon/icon_bookmark_off.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="IconToolButton" name="favoriteButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../res/images.qrc">
|
||||
<normaloff>:/png/icon/icon_like_off.png</normaloff>
|
||||
<selectedon>:/png/icon/icon_bookmark_on.png</selectedon>:/png/icon/icon_like_off.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="IconToolButton" name="commentButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../res/images.qrc">
|
||||
<normaloff>:/png/icon/icon_comment.png</normaloff>:/png/icon/icon_comment.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="IconToolButton" name="downloadButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../res/images.qrc">
|
||||
<normaloff>:/png/icon/ic_get_app_black_36dp.png</normaloff>:/png/icon/ic_get_app_black_36dp.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="startRead">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>开始阅读</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="pageLabel">
|
||||
<property name="text">
|
||||
<string>分页:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="pageBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="EpsListWidget" name="epsListWidget">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QListWidget {background-color:transparent;}
|
||||
QListWidget::item {
|
||||
background-color:rgb(251, 239, 243);
|
||||
color: rgb(196, 95, 125);
|
||||
@ -612,20 +633,117 @@ QListWidget::item {
|
||||
color: rgb(0, 0, 0);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideRight</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
</widget>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideRight</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>已下载章节</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>可离线阅读已下载的章节:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="readOffline">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>开始阅读</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="EpsListWidget" name="listWidget">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QListWidget {background-color:transparent;}
|
||||
QListWidget::item {
|
||||
background-color:rgb(251, 239, 243);
|
||||
color: rgb(196, 95, 125);
|
||||
border:2px solid red;
|
||||
border-radius: 10px;
|
||||
border-color:rgb(196, 95, 125);
|
||||
}
|
||||
/* 鼠标在按钮上时,按钮颜色 */
|
||||
QListWidget::item:hover
|
||||
{
|
||||
background-color:rgb(21, 85, 154);
|
||||
border-radius: 10px;
|
||||
color: rgb(0, 0, 0);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
191
ui/ui_fried.ui
Normal file
191
ui/ui_fried.ui
Normal file
@ -0,0 +1,191 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Fried</class>
|
||||
<widget class="QWidget" name="Fried">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>721</width>
|
||||
<height>325</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>锅贴</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>707</width>
|
||||
<height>273</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4"/>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>分页:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="pageLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1/1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>跳转</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>pushButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>Fried</receiver>
|
||||
<slot>JumpPage()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>490</x>
|
||||
<y>570</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>659</x>
|
||||
<y>516</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>SendMsg()</slot>
|
||||
<slot>OpenPicture()</slot>
|
||||
<slot>SetEnable1()</slot>
|
||||
<slot>SetEnable2()</slot>
|
||||
<slot>OpenIcon()</slot>
|
||||
<slot>JumpPage()</slot>
|
||||
</slots>
|
||||
</ui>
|
@ -106,6 +106,7 @@
|
||||
<widget class="GameView" name="gameView"/>
|
||||
<widget class="Waifu2xToolView" name="waifu2xToolView"/>
|
||||
<widget class="BookEpsView" name="bookEpsView"/>
|
||||
<widget class="FriedView" name="friedView"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -251,6 +252,12 @@
|
||||
<header location="global">view.help.help_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>FriedView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.fried.fried_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
@ -124,6 +124,7 @@
|
||||
<widget class="GameView" name="gameView"/>
|
||||
<widget class="Waifu2xToolView" name="waifu2xToolView"/>
|
||||
<widget class="BookEpsView" name="bookEpsView"/>
|
||||
<widget class="FriedView" name="friedView"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -268,6 +269,12 @@
|
||||
<header location="global">view.help.help_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>FriedView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.fried.fried_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TitleBarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
|
@ -95,9 +95,9 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<y>-980</y>
|
||||
<width>661</width>
|
||||
<height>2648</height>
|
||||
<height>2734</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
@ -1025,6 +1025,44 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_27">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="proxy3">
|
||||
<property name="text">
|
||||
<string>使用系统代理</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">proxyGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_28">
|
||||
<item>
|
||||
<widget class="QPushButton" name="openProxy">
|
||||
<property name="text">
|
||||
<string>打开分流设置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_26">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1260,6 +1298,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="preDownWaifu2x">
|
||||
<property name="text">
|
||||
<string>优先使用下载转换好的缓存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_21">
|
||||
<item>
|
||||
@ -2388,11 +2433,11 @@
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="languageGroup"/>
|
||||
<buttongroup name="saveNameGroup"/>
|
||||
<buttongroup name="logGroup"/>
|
||||
<buttongroup name="mainScaleGroup"/>
|
||||
<buttongroup name="themeGroup"/>
|
||||
<buttongroup name="mainScaleGroup"/>
|
||||
<buttongroup name="saveNameGroup"/>
|
||||
<buttongroup name="proxyGroup"/>
|
||||
<buttongroup name="languageGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
@ -13,7 +13,6 @@
|
||||
<property name="windowTitle">
|
||||
<string>图片查看</string>
|
||||
</property>
|
||||
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGraphicsView" name="graphicsView"/>
|
||||
@ -392,6 +391,33 @@
|
||||
<property name="text">
|
||||
<string>GPU</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>格式</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="format">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
Loading…
Reference in New Issue
Block a user