问题修复 #96
221
CHANGELOG
Normal file
@ -0,0 +1,221 @@
|
||||
# update log file.
|
||||
# tonquer<tonquer@qq.com>
|
||||
######################################################################################
|
||||
# Version: v1.3.0
|
||||
# 2021/12/05
|
||||
# 1)修复Win7无法运行
|
||||
# 2)修复windows中文用户名无法使用Waifu2x
|
||||
# 3)修改点击tag,同步修改搜索框文字
|
||||
# 4)修复排行榜切换重复加载
|
||||
# 5)修复切换漫画时没有清除上一个显示的图片
|
||||
# 6)搜索候选词添加上下按钮响应
|
||||
# 7)分类添加了最近更新快捷入口
|
||||
# 8)设置新增了分类图片的大小设置
|
||||
# 9)修复Waifu2x可能导致的闪退问题
|
||||
# 10)尝试修复看图滚动时可能出现画面割裂的问题
|
||||
|
||||
# Version: v1.2.9.1
|
||||
# 2021/11/28
|
||||
# 1)修复新UI图片模糊,字体锯齿问题
|
||||
# 2)设置新增界面缩放选项
|
||||
# 3)设置新增封面大小调整和Waifu2x转化
|
||||
# 4)多显示器记录关闭的位置
|
||||
# 5)修复调整缩放后,看图滚动模式错位
|
||||
|
||||
# Version: v1.2.8
|
||||
# 2021/11/21
|
||||
# 1)重新设计了UI,使用material主题
|
||||
# 2)代码重构
|
||||
# 3)聊天室新增悄悄话
|
||||
# 4)修复下载使用Waifu2x转换时,目录保存路径错误
|
||||
|
||||
# Version: v1.2.7
|
||||
# 2021/10/24
|
||||
# 1)Waifu2x支持了CPU模式
|
||||
# 2)看图模式新增自动滚屏翻页(在菜单中设置,在右键菜单开启)
|
||||
# 3)修复聊天室在黑色主题下,字体看不清的问题
|
||||
|
||||
# Version: v1.2.6
|
||||
# 2021/10/01
|
||||
# 1)urllib3降级,修复使用系统代理无法访问https,无法加载封面
|
||||
# 2)修复多屏幕扩展时,宽度判断问题。
|
||||
# 3)优化了部分界面布局,在低分辨率下界面拥挤的问题
|
||||
# 4)升级到最新的Qt6.1.3
|
||||
# 5)优化了看图模式滑动,支持触控
|
||||
# 6)部分Bug修复
|
||||
|
||||
# Version: v1.2.5
|
||||
# 2021/09/11
|
||||
# 1)Qt国际化支持,支持英文,繁体
|
||||
# 2)看图新增快捷右键菜单。
|
||||
# 3)修复漫画页无法发送评论
|
||||
# 4)Fix bug
|
||||
# 5)1.2.5.1 修复dpi过低时,界面显示不全,历史记录和收藏不显示删除
|
||||
|
||||
# Version: v1.2.4
|
||||
# 2021/08/28
|
||||
# 1)看图新增了双页模式
|
||||
# 2)添加了CDN分流选项,具体设置看这里https://github.com/tonquer/picacg-windows/discussions/48
|
||||
# 3)排行榜添加的骑士榜单,搜索新增了搜索上传者选项
|
||||
# 4)漫画详情可通过本地数据加载,防止网络差时无法加载
|
||||
# 5)修复了v1.2.3搜索无法正确显示漫画名
|
||||
|
||||
# Version: v1.2.3
|
||||
# 2021/08/28
|
||||
# 1)看图新增了双页模式
|
||||
# 2)添加了CDN分流选项,具体设置看这里https://github.com/tonquer/picacg-windows/discussions/48
|
||||
# 3)排行榜添加的骑士榜单,搜索新增了搜索上传者选项
|
||||
# 4)漫画详情可通过本地数据加载,防止网络差时无法加载
|
||||
# 5)fix bug
|
||||
|
||||
# Version: v1.2.2
|
||||
# 2021/08/14
|
||||
# 1)优化看大分辨率图片卡顿问题
|
||||
# 2)修复下载文件名出现单引号下载失败
|
||||
# 3)修复分类只能看第一页
|
||||
# 4)所有的列表都支持平滑滚动了
|
||||
# 5)修复看图模式滚动Bug,支持平滑滚动
|
||||
# 6)密码不再明文保存
|
||||
|
||||
# Version: v1.2.1
|
||||
# 2021/07/31
|
||||
# 1)waifu2x更新
|
||||
# 2)看图模式可以用滚动翻页了
|
||||
# 3)设置中新增了主题
|
||||
# 4)Fix bug
|
||||
|
||||
# Version: v1.2.0
|
||||
# 2021/07/18
|
||||
# 1)waifu2x更新
|
||||
# 2)优化了看图时下载和waifu2x的预加载,优先会加载当前页
|
||||
# 3)优化了收藏过多时更新太慢的问题
|
||||
# 4)现在设置可以设置更多waifu2x参数了
|
||||
# 5)优化了文本复制,大部分文本可用鼠标选择
|
||||
# 6)新增了我的历史评论
|
||||
# 7)修改子评论打开逻辑,不再是双击而需要点击评论按钮
|
||||
# 8)新增了评论和漫画点赞
|
||||
# 9)看图模式新增了缩放功能,可以+,-或者Ctrl+滚轮缩放图片
|
||||
|
||||
# Version: v1.1.9
|
||||
# 2021/07/04
|
||||
# 1)看图支持全屏模式
|
||||
# 2)本地库可以在线更新了,使用picacg-database项目
|
||||
# 3)新增了游戏区
|
||||
# 4)修复收藏按收藏时间排序可能出现错误的问题
|
||||
|
||||
# Version: v1.1.8
|
||||
# 2021/06/20
|
||||
# 1)优化了滚轮滚动列表
|
||||
# 2)聊天室快捷发送
|
||||
# 3)修改了看图加载进度条显示
|
||||
# 4)修改了看图上一章跳转到最后一页
|
||||
# 5)收藏本地化操作,支持多条件排序
|
||||
|
||||
# Version: v1.1.7
|
||||
# 2021/06/05
|
||||
# 1)更新本地搜索库。
|
||||
# 2)界面优化,滑动支持
|
||||
# 3)支持咔咔锅贴
|
||||
|
||||
# Version: v1.1.6
|
||||
# 2021/05/16
|
||||
# 1)更新本地搜索库。
|
||||
# 2)支持更换头像
|
||||
# 3)支持搜索多个词,'|'(与)和'&'(或)分割关键词
|
||||
|
||||
# Version: v1.1.5
|
||||
# 2021/04/30
|
||||
# 1)压缩编译了waifu2x功能,waifu2x小工具现在可以随意选择参数
|
||||
# 2)Linux支持了waifu2x,请安装vulkan相关驱动
|
||||
# 3)添加了本地数据库功能(搜索界面选择),支持本地搜索功能(所有文本均繁体)转中文,标题使用百度翻译日文,方便检索)
|
||||
# 4)搜索添加了联想词
|
||||
# 5)添加了调试版本,方便追踪问题
|
||||
|
||||
# Version: v1.1.4
|
||||
# 2021/04/18
|
||||
# 1)修复已经漫画浏览过了40章,有问题
|
||||
# 2)现在支持Linux下使用(测试使用deepin 20.2)
|
||||
|
||||
# Version: v1.1.3
|
||||
# 2021/04/06
|
||||
# 1)修复不支持vulkan的电脑,无法打开的问题
|
||||
|
||||
# Version: v1.1.2
|
||||
# 2021/04/04
|
||||
# 1)列表统一增加了右键菜单,快捷打开封面。
|
||||
# 2)修复了下载时容易出现错误的问题。
|
||||
# 3)聊天室支持回复,发送图片等。
|
||||
|
||||
|
||||
# Version: v1.1.1
|
||||
# 2021/03/27
|
||||
# 1)修复了聊天室不能发言(暂不支持发送图片和语音以及接受语音),设置中支持了开启代理选项
|
||||
# 2)主页添加了收缩按钮
|
||||
# 3)历史记录支持删除
|
||||
# 4)看图小工具支持了waifu2x,(左上角工具进入、点击评论头像、点击聊天室图片可以打开)
|
||||
|
||||
# Version: v1.1.0
|
||||
# 2021/03/20
|
||||
# 1)添加了哔咔留言板
|
||||
# 2)添加了哔咔聊天室
|
||||
# 3)添加了哔咔推荐和哔咔随机本子
|
||||
# 4)修改了漫画列表图片自适应
|
||||
# 5)评论列表显示优化
|
||||
|
||||
# Version: v1.0.9
|
||||
# 2021/03/07
|
||||
# 1)修复了部分图片waifu2x转换失败
|
||||
# 2)添加了waifu2x的anime_style_art_rgb和photo模型
|
||||
# 3)看图模式默认不再使用cunet模型(速度太慢),改为默认使用anime_style_art_rgb模型
|
||||
# 4)现在可以在看图模式工具栏或者设置里切换模型
|
||||
# 5)去掉了Pillow包的依赖,重写了jpg和png图长宽读取。
|
||||
|
||||
# Version: v1.0.8
|
||||
# 2021/02/27
|
||||
# 1)界面由PyQt迁移至PySide2,开源协议切换为LGPL
|
||||
# 2)修复历史记录只显示一页
|
||||
# 3)修改了看图工具栏的浮动效果,增加了进度条
|
||||
# 4)添加了分流测速
|
||||
# 5)评论功能支持楼中楼(双击打开),支持回复
|
||||
# 6)收藏添加了排序功能
|
||||
# 7)修复没有新建waifu2x目录,导致waifu2x无法使用
|
||||
|
||||
# Version: v1.0.7
|
||||
# 2021/02/20
|
||||
# 1)下载支持waifu2x转码
|
||||
# 2)修改了下载保存目录的结构分原图和waifu2x目录
|
||||
# 3)修改了下载保存的章节名字
|
||||
# 4)支持分章节下载
|
||||
# 5)修复看图模式占用大量的内存
|
||||
# 6)修复waifu2x内存泄漏问题
|
||||
# 7)看图模式可以看下载好的章节(章节显示绿色的)
|
||||
|
||||
# Version: v1.0.6
|
||||
# 2021/02/15
|
||||
# 1)新增热词功能
|
||||
# 2)新增屏蔽词条功能
|
||||
# 3)新增waifu2x设置GPU列表选择
|
||||
# 4)新增漫画详情分类和Tags可点击
|
||||
# 5)修复漫画详情每次打开会挡住关闭按钮
|
||||
# 6)去除了多余的waifu2x模型,只保留models-cunet
|
||||
# 7)修复models-cunet模式下,显存小于2G解码失败
|
||||
# 8)修复看图模式复制图片闪退
|
||||
|
||||
# Version: v1.0.5
|
||||
# 2021/02/12
|
||||
# 1)新增了waifu2x功能
|
||||
# 2)修复了从分类进入搜索重选排序后,分类失效的问题
|
||||
# 3)修改了看图操作逻辑
|
||||
|
||||
# Version: v1.0.4
|
||||
# 2021/02/7
|
||||
# 1)更新了看图模式,支持放大和拖拽
|
||||
# 2)修复了看图无法加载的问题
|
||||
# 3)修复了历史记录保存有问题
|
||||
# 4)修改了cache保存方式
|
||||
# 5)统一修改了文字提示框
|
||||
# 6)支持在线更新检测
|
||||
|
||||
# Version: 1.0.3
|
||||
# 2021/02/5
|
||||
# 1)初步完成版本
|
BIN
res/icon/cat_forum.jpg
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
res/icon/cat_latest.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
res/icon/cat_leaderboard.jpg
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
res/icon/cat_random.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
res/icon/ico.ico
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
res/icon/icon_empty.png
Normal file
After Width: | Height: | Size: 366 KiB |
BIN
res/icon/icon_exclamation_error.png
Normal file
After Width: | Height: | Size: 385 KiB |
BIN
res/icon/icon_leave.png
Normal file
After Width: | Height: | Size: 395 KiB |
BIN
res/icon/icon_no_comment.png
Normal file
After Width: | Height: | Size: 318 KiB |
BIN
res/icon/icon_question_error.png
Normal file
After Width: | Height: | Size: 354 KiB |
BIN
res/icon/icon_success.png
Normal file
After Width: | Height: | Size: 368 KiB |
BIN
res/icon/icon_unknown_error.png
Normal file
After Width: | Height: | Size: 452 KiB |
@ -1,4 +1,33 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>title_bar/close_button_hover_57_40.png</file>
|
||||
<file>title_bar/close_button_pressed_57_40.png</file>
|
||||
<file>title_bar/down_button_pressed_57_40.png</file>
|
||||
<file>title_bar/white_close_button_57_40.png</file>
|
||||
<file>title_bar/white_down_57_40.png</file>
|
||||
<file>title_bar/white_down_button_57_40.png</file>
|
||||
<file>title_bar/white_max_button_57_40.png</file>
|
||||
<file>title_bar/white_min_button_57_40.png</file>
|
||||
<file>title_bar/white_return_button_60_40.png</file>
|
||||
<file>title_bar/white_return_button_hover_60_40.png</file>
|
||||
<file>title_bar/white_return_button_pressed_60_40.png</file>
|
||||
<file>title_bar/green_down_button_hover_57_40.png</file>
|
||||
<file>title_bar/green_max_button_hover_57_40.png</file>
|
||||
<file>title_bar/green_min_button_hover_57_40.png</file>
|
||||
<file>title_bar/open_white_close_button_57_40.png</file>
|
||||
<file>title_bar/open_black_close_button_57_40.png</file>
|
||||
<file>title_bar/open_black_max_button_57_40.png</file>
|
||||
<file>title_bar/open_black_min_button_57_40.png</file>
|
||||
<file>title_bar/black_close_button_57_40.png</file>
|
||||
<file>title_bar/black_down_button_57_40.png</file>
|
||||
<file>title_bar/black_max_button_57_40.png</file>
|
||||
<file>title_bar/black_max_button_pressed_57_40.png</file>
|
||||
<file>title_bar/black_min_button_57_40.png</file>
|
||||
<file>title_bar/black_min_button_pressed_57_40.png</file>
|
||||
<file>title_bar/black_return_button_60_40.png</file>
|
||||
<file>title_bar/black_return_button_hover_60_40.png</file>
|
||||
<file>title_bar/black_return_button_pressed_60_40.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="png">
|
||||
<file>icon/audio.png</file>
|
||||
<file>icon/bubble_r_9.9.png</file>
|
||||
@ -41,6 +70,17 @@
|
||||
<file>icon/loading/loading_8.png</file>
|
||||
<file>icon/loading/loading_9.png</file>
|
||||
<file>icon/loading/loading_10.png</file>
|
||||
<file>icon/icon_unknown_error.png</file>
|
||||
<file>icon/icon_success.png</file>
|
||||
<file>icon/icon_question_error.png</file>
|
||||
<file>icon/icon_no_comment.png</file>
|
||||
<file>icon/icon_leave.png</file>
|
||||
<file>icon/icon_exclamation_error.png</file>
|
||||
<file>icon/icon_empty.png</file>
|
||||
<file>icon/cat_latest.jpg</file>
|
||||
<file>icon/cat_forum.jpg</file>
|
||||
<file>icon/cat_random.jpg</file>
|
||||
<file>icon/cat_leaderboard.jpg</file>
|
||||
</qresource>
|
||||
<qresource prefix="icon">
|
||||
<file>theme/dark_pink/disabled/base.svg</file>
|
||||
|
@ -38,6 +38,10 @@ QWidget {
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
|
||||
QWidget#MainWindows{
|
||||
border:2px solid rgb(177,177,177);border-radius:10px;
|
||||
}
|
||||
|
||||
QFrame {
|
||||
background-color: #f3f3f3;
|
||||
border: 1px solid #f5f5f5;
|
||||
|
BIN
res/title_bar/black_close_button_57_40.png
Normal file
After Width: | Height: | Size: 207 B |
BIN
res/title_bar/black_down_button_57_40.png
Normal file
After Width: | Height: | Size: 205 B |
BIN
res/title_bar/black_max_button_57_40.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
res/title_bar/black_max_button_pressed_57_40.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
res/title_bar/black_min_button_57_40.png
Normal file
After Width: | Height: | Size: 153 B |
BIN
res/title_bar/black_min_button_pressed_57_40.png
Normal file
After Width: | Height: | Size: 157 B |
BIN
res/title_bar/black_return_button_60_40.png
Normal file
After Width: | Height: | Size: 575 B |
BIN
res/title_bar/black_return_button_hover_60_40.png
Normal file
After Width: | Height: | Size: 429 B |
BIN
res/title_bar/black_return_button_pressed_60_40.png
Normal file
After Width: | Height: | Size: 441 B |
BIN
res/title_bar/close_button_hover_57_40.png
Normal file
After Width: | Height: | Size: 268 B |
BIN
res/title_bar/close_button_pressed_57_40.png
Normal file
After Width: | Height: | Size: 260 B |
BIN
res/title_bar/down_button_pressed_57_40.png
Normal file
After Width: | Height: | Size: 195 B |
BIN
res/title_bar/green_down_button_hover_57_40.png
Normal file
After Width: | Height: | Size: 197 B |
BIN
res/title_bar/green_max_button_hover_57_40.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
res/title_bar/green_min_button_hover_57_40.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
res/title_bar/open_black_close_button_57_40.png
Normal file
After Width: | Height: | Size: 184 B |
BIN
res/title_bar/open_black_max_button_57_40.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
res/title_bar/open_black_min_button_57_40.png
Normal file
After Width: | Height: | Size: 104 B |
BIN
res/title_bar/open_white_close_button_57_40.png
Normal file
After Width: | Height: | Size: 305 B |
BIN
res/title_bar/white_close_button_57_40.png
Normal file
After Width: | Height: | Size: 250 B |
BIN
res/title_bar/white_down_57_40.png
Normal file
After Width: | Height: | Size: 184 B |
BIN
res/title_bar/white_down_button_57_40.png
Normal file
After Width: | Height: | Size: 278 B |
BIN
res/title_bar/white_max_button_57_40.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
res/title_bar/white_min_button_57_40.png
Normal file
After Width: | Height: | Size: 107 B |
BIN
res/title_bar/white_return_button_60_40.png
Normal file
After Width: | Height: | Size: 358 B |
BIN
res/title_bar/white_return_button_hover_60_40.png
Normal file
After Width: | Height: | Size: 370 B |
BIN
res/title_bar/white_return_button_pressed_60_40.png
Normal file
After Width: | Height: | Size: 356 B |
@ -1,6 +1,5 @@
|
||||
from PySide6 import QtWidgets, QtCore
|
||||
from PySide6.QtCore import QTimer, QFile
|
||||
from PySide6.QtGui import QGuiApplication
|
||||
from PySide6.QtCore import QTimer
|
||||
from PySide6.QtWidgets import QGridLayout
|
||||
|
||||
from component.label.gif_group_label import GifGroupLabel
|
||||
|
@ -29,7 +29,7 @@ class SearchLineEdit(QLineEdit):
|
||||
self.help.setupUi(self.widget)
|
||||
|
||||
self.widget.setParent(self, Qt.Popup)
|
||||
self.widget.setFocusPolicy(Qt.NoFocus)
|
||||
# self.widget.setFocusPolicy(Qt.NoFocus)
|
||||
self.widget.setFocusProxy(self)
|
||||
# self.setFocusPolicy(proxy)
|
||||
# self.widget.setFocusPolicy(Qt.NoFocus)
|
||||
@ -53,6 +53,9 @@ class SearchLineEdit(QLineEdit):
|
||||
self.help.categoryWidget.SetState(False)
|
||||
self.isShowSearch = True
|
||||
|
||||
self.searchTag1 = "<font color=#232629>"
|
||||
self.searchTag2 = "</font>"
|
||||
|
||||
@property
|
||||
def listView(self):
|
||||
return self.help.listView
|
||||
@ -77,7 +80,9 @@ class SearchLineEdit(QLineEdit):
|
||||
|
||||
def SetText(self, index):
|
||||
item = self.model.itemData(index)
|
||||
self.setText(item.get(0))
|
||||
text = item.get(0)
|
||||
# self.setText(text.replace(self.searchTag1, "").replace(self.searchTag2, ""))
|
||||
self.setText(text)
|
||||
self.Search()
|
||||
return
|
||||
|
||||
@ -101,6 +106,7 @@ class SearchLineEdit(QLineEdit):
|
||||
if strings == data:
|
||||
isSelf = True
|
||||
elif strings in data:
|
||||
# datas.append(data.replace(strings, self.searchTag1+strings+self.searchTag2))
|
||||
datas.append(data)
|
||||
datas.sort()
|
||||
if isSelf:
|
||||
@ -121,7 +127,33 @@ class SearchLineEdit(QLineEdit):
|
||||
|
||||
def keyReleaseEvent(self, ev):
|
||||
# print(ev.key())
|
||||
count = self.listView.model().rowCount()
|
||||
currentIndex = self.listView.currentIndex()
|
||||
if ev.key() == Qt.Key_Up:
|
||||
if count > 0:
|
||||
if currentIndex.row() < 0:
|
||||
row = 0
|
||||
elif currentIndex.row() == 0:
|
||||
row = count - 1
|
||||
else:
|
||||
row = currentIndex.row() - 1 if currentIndex.row() > 0 else 0
|
||||
index = self.listView.model().index(row, 0)
|
||||
self.listView.setCurrentIndex(index)
|
||||
|
||||
elif ev.key() == Qt.Key_Down:
|
||||
if count > 0:
|
||||
if currentIndex.row() < 0:
|
||||
row = 0
|
||||
else:
|
||||
row = currentIndex.row() + 1 if currentIndex.row() + 1 < count else 0
|
||||
index = self.listView.model().index(row, 0)
|
||||
self.listView.setCurrentIndex(index)
|
||||
|
||||
if ev.key() == Qt.Key_Enter or ev.key() == Qt.Key_Return:
|
||||
currentIndex = self.listView.currentIndex()
|
||||
if currentIndex.row() >= 0:
|
||||
text = currentIndex.data()
|
||||
self.setText(text)
|
||||
self.Search()
|
||||
return QLineEdit.keyReleaseEvent(self, ev)
|
||||
|
||||
|
@ -40,7 +40,6 @@ class BaseListWidget(QListWidget, QtTaskBase):
|
||||
self.lastIndex = -1
|
||||
self.doubleClickType = 0
|
||||
|
||||
|
||||
def ClearWheelEvent(self):
|
||||
pass
|
||||
# self.vScrollBar.stop()
|
||||
|
@ -1,11 +1,14 @@
|
||||
from functools import partial
|
||||
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtGui import QColor
|
||||
from PySide6.QtWidgets import QListWidgetItem
|
||||
from PySide6.QtGui import QColor, QCursor
|
||||
from PySide6.QtWidgets import QListWidgetItem, QMenu
|
||||
|
||||
from component.list.base_list_widget import BaseListWidget
|
||||
from component.widget.comic_item_widget import ComicItemWidget
|
||||
from config import config
|
||||
from config.setting import Setting
|
||||
from qt_owner import QtOwner
|
||||
from tools.status import Status
|
||||
from tools.str import Str
|
||||
from tools.tool import ToolUtil
|
||||
@ -21,13 +24,53 @@ class CategoryListWidget(BaseListWidget):
|
||||
self.setWrapping(True)
|
||||
self.setResizeMode(self.Adjust)
|
||||
self.setContextMenuPolicy(Qt.CustomContextMenu)
|
||||
# self.customContextMenuRequested.connect(self.SelectMenuBook)
|
||||
self.customContextMenuRequested.connect(self.SelectMenuBook)
|
||||
# self.doubleClicked.connect(self.OpenBookInfo)
|
||||
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
|
||||
def SelectMenuBook(self, pos):
|
||||
index = self.indexAt(pos)
|
||||
widget = self.indexWidget(index)
|
||||
if index.isValid() and widget:
|
||||
popMenu = QMenu(self)
|
||||
action = popMenu.addAction(Str.GetStr(Str.LookCover))
|
||||
action.triggered.connect(partial(self.OpenPicture, index))
|
||||
action = popMenu.addAction(Str.GetStr(Str.ReDownloadCover))
|
||||
action.triggered.connect(partial(self.ReDownloadPicture, index))
|
||||
if config.CanWaifu2x and widget.picData:
|
||||
if not widget.isWaifu2x:
|
||||
action = popMenu.addAction(Str.GetStr(Str.Waifu2xConvert))
|
||||
action.triggered.connect(partial(self.Waifu2xPicture, index))
|
||||
if widget.isWaifu2xLoading or not config.CanWaifu2x:
|
||||
action.setEnabled(False)
|
||||
else:
|
||||
action = popMenu.addAction(Str.GetStr(Str.DelWaifu2xConvert))
|
||||
action.triggered.connect(partial(self.CancleWaifu2xPicture, index))
|
||||
popMenu.exec_(QCursor.pos())
|
||||
return
|
||||
|
||||
def OpenPicture(self, index):
|
||||
widget = self.indexWidget(index)
|
||||
if widget:
|
||||
QtOwner().OpenWaifu2xTool(widget.picData)
|
||||
return
|
||||
|
||||
def ReDownloadPicture(self, index):
|
||||
widget = self.indexWidget(index)
|
||||
if widget:
|
||||
if widget.url and config.IsLoadingPicture:
|
||||
widget.SetPicture("")
|
||||
item = self.itemFromIndex(index)
|
||||
count = self.row(item)
|
||||
widget.picLabel.setText(Str.GetStr(Str.LoadingPicture))
|
||||
self.AddDownloadTask(widget.url, widget.path, None, self.LoadingPictureComplete, True, count, False)
|
||||
pass
|
||||
|
||||
def AddBookItem(self, _id, title, url="", path=""):
|
||||
index = self.count()
|
||||
widget = ComicItemWidget()
|
||||
widget = ComicItemWidget(isCategory=True)
|
||||
widget.setFocusPolicy(Qt.NoFocus)
|
||||
widget.id = _id
|
||||
widget.url = url
|
||||
widget.path = path
|
||||
# widget.categoryLabel.setText(categories)
|
||||
@ -35,10 +78,7 @@ class CategoryListWidget(BaseListWidget):
|
||||
widget.starButton.hide()
|
||||
widget.timeLabel.hide()
|
||||
widget.nameLable.setText(title)
|
||||
widget.picLabel.setFixedSize(300, 300)
|
||||
widget.nameLable.setFixedSize(100, 25)
|
||||
widget.nameLable.setAlignment(Qt.AlignHCenter)
|
||||
widget.setFixedSize(400, 400)
|
||||
|
||||
item = QListWidgetItem(self)
|
||||
item.setSizeHint(widget.sizeHint())
|
||||
@ -57,7 +97,7 @@ class CategoryListWidget(BaseListWidget):
|
||||
if Setting.CoverIsOpenWaifu.value:
|
||||
item = self.item(index)
|
||||
indexModel = self.indexFromItem(item)
|
||||
self.Waifu2xPicture(indexModel)
|
||||
self.Waifu2xPicture(indexModel, True)
|
||||
pass
|
||||
pass
|
||||
else:
|
||||
@ -66,12 +106,13 @@ class CategoryListWidget(BaseListWidget):
|
||||
widget.SetPictureErr()
|
||||
return
|
||||
|
||||
def Waifu2xPicture(self, index):
|
||||
def Waifu2xPicture(self, index, isIfSize=False):
|
||||
widget = self.indexWidget(index)
|
||||
if widget and widget.picData:
|
||||
w, h = ToolUtil.GetPictureSize(widget.picData)
|
||||
if max(w, h) <= Setting.CoverMaxNum.value:
|
||||
if max(w, h) <= Setting.CoverMaxNum.value or not isIfSize:
|
||||
model = ToolUtil.GetModelByIndex(Setting.CoverLookNoise.value, Setting.CoverLookScale.value, Setting.CoverLookModel.value)
|
||||
widget.isWaifu2xLoading = True
|
||||
self.AddConvertTask(widget.path, widget.picData, model, self.Waifu2xPictureBack, index)
|
||||
|
||||
def CancleWaifu2xPicture(self, index):
|
||||
|
@ -46,6 +46,8 @@ class ComicListWidget(BaseListWidget):
|
||||
if not widget.isWaifu2x:
|
||||
action = popMenu.addAction(Str.GetStr(Str.Waifu2xConvert))
|
||||
action.triggered.connect(partial(self.Waifu2xPicture, index))
|
||||
if widget.isWaifu2xLoading or not config.CanWaifu2x:
|
||||
action.setEnabled(False)
|
||||
else:
|
||||
action = popMenu.addAction(Str.GetStr(Str.DelWaifu2xConvert))
|
||||
action.triggered.connect(partial(self.CancleWaifu2xPicture, index))
|
||||
@ -106,6 +108,7 @@ class ComicListWidget(BaseListWidget):
|
||||
def AddBookItem(self, _id, title, categoryStr="", url="", path="", likesCount="", updated_at="", pagesCount="", finished=""):
|
||||
index = self.count()
|
||||
widget = ComicItemWidget()
|
||||
widget.setFocusPolicy(Qt.NoFocus)
|
||||
widget.id = _id
|
||||
widget.url = url
|
||||
widget.path = path
|
||||
@ -197,6 +200,7 @@ class ComicListWidget(BaseListWidget):
|
||||
w, h = ToolUtil.GetPictureSize(widget.picData)
|
||||
if max(w, h) <= Setting.CoverMaxNum.value or not isIfSize:
|
||||
model = ToolUtil.GetModelByIndex(Setting.CoverLookNoise.value, Setting.CoverLookScale.value, Setting.CoverLookModel.value)
|
||||
widget.isWaifu2xLoading = True
|
||||
self.AddConvertTask(widget.path, widget.picData, model, self.Waifu2xPictureBack, index)
|
||||
|
||||
def CancleWaifu2xPicture(self, index):
|
||||
|
@ -1,8 +1,9 @@
|
||||
from PySide6.QtCore import Qt, QSize
|
||||
from PySide6.QtGui import QFont
|
||||
from PySide6.QtWidgets import QListWidgetItem, QLabel
|
||||
from PySide6.QtWidgets import QListWidgetItem, QLabel, QAbstractItemView
|
||||
|
||||
from component.list.base_list_widget import BaseListWidget
|
||||
from component.scroll.smooth_scroll_bar import SmoothScrollBar
|
||||
|
||||
|
||||
class TagListWidget(BaseListWidget):
|
||||
@ -14,6 +15,14 @@ class TagListWidget(BaseListWidget):
|
||||
self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.setMaximumHeight(30)
|
||||
self.setFocusPolicy(Qt.NoFocus)
|
||||
self.hScrollBar = SmoothScrollBar()
|
||||
self.hScrollBar.setOrientation(Qt.Horizontal)
|
||||
self.setHorizontalScrollBar(self.hScrollBar)
|
||||
self.setHorizontalScrollMode(QAbstractItemView.ScrollPerPixel)
|
||||
self.horizontalScrollBar().setSingleStep(30)
|
||||
|
||||
def wheelEvent(self, arg__1) -> None:
|
||||
self.hScrollBar.ScrollValue(-arg__1.angleDelta().y())
|
||||
|
||||
def AddItem(self, name, isSelectable=False):
|
||||
label = QLabel(name)
|
||||
|
@ -70,7 +70,7 @@ class UserListWidget(BaseListWidget):
|
||||
|
||||
index = self.count()
|
||||
iwidget = CommentItemWidget(self)
|
||||
|
||||
iwidget.setFocusPolicy(Qt.NoFocus)
|
||||
if isinstance(info.get("_comic"), dict):
|
||||
iwidget.linkId = info.get("_comic").get("_id")
|
||||
linkData = info.get("_comic").get("title", "")
|
||||
@ -143,6 +143,7 @@ class UserListWidget(BaseListWidget):
|
||||
|
||||
index = self.count()
|
||||
iwidget = CommentItemWidget(self)
|
||||
iwidget.setFocusPolicy(Qt.NoFocus)
|
||||
iwidget.killButton.hide()
|
||||
iwidget.nameLabel.setCursor(Qt.PointingHandCursor)
|
||||
iwidget.nameLabel.installEventFilter(iwidget)
|
||||
|
@ -8,8 +8,8 @@ from tools.str import Str
|
||||
|
||||
|
||||
class ComicItemWidget(QWidget, Ui_ComicItem):
|
||||
def __init__(self, parent=None):
|
||||
QWidget.__init__(self, parent)
|
||||
def __init__(self, isCategory=False):
|
||||
QWidget.__init__(self)
|
||||
Ui_ComicItem.__init__(self)
|
||||
self.setupUi(self)
|
||||
self.picData = None
|
||||
@ -17,9 +17,18 @@ class ComicItemWidget(QWidget, Ui_ComicItem):
|
||||
self.url = ""
|
||||
self.path = ""
|
||||
# TODO 如何自适应
|
||||
rate = Setting.CoverSize.value
|
||||
width = 250 * rate / 100
|
||||
height = 340 * rate / 100
|
||||
if not isCategory:
|
||||
rate = Setting.CoverSize.value
|
||||
baseW = 250
|
||||
baseH = 340
|
||||
else:
|
||||
rate = Setting.CategorySize.value
|
||||
baseW = 300
|
||||
baseH = 300
|
||||
|
||||
width = baseW * rate / 100
|
||||
height = baseH * rate / 100
|
||||
|
||||
self.picLabel.setFixedSize(width, height)
|
||||
# self.picLabel.setMinimumSize(300, 400)
|
||||
# self.picLabel.setMaximumSize(220, 308)
|
||||
@ -48,6 +57,7 @@ class ComicItemWidget(QWidget, Ui_ComicItem):
|
||||
self.nameLable.setFont(font)
|
||||
self.adjustSize()
|
||||
self.isWaifu2x = False
|
||||
self.isWaifu2xLoading = False
|
||||
|
||||
def GetTitle(self):
|
||||
return self.nameLable.text()
|
||||
@ -58,6 +68,7 @@ class ComicItemWidget(QWidget, Ui_ComicItem):
|
||||
if data:
|
||||
pic.loadFromData(data)
|
||||
self.isWaifu2x = False
|
||||
self.isWaifu2xLoading = False
|
||||
radio = self.devicePixelRatio()
|
||||
pic.setDevicePixelRatio(radio)
|
||||
newPic = pic.scaled(self.picLabel.width() * radio, self.picLabel.height() * radio, Qt.KeepAspectRatio,
|
||||
@ -69,6 +80,7 @@ class ComicItemWidget(QWidget, Ui_ComicItem):
|
||||
if not data:
|
||||
return
|
||||
self.isWaifu2x = True
|
||||
self.isWaifu2xLoading = False
|
||||
pic.loadFromData(data)
|
||||
radio = self.devicePixelRatio()
|
||||
pic.setDevicePixelRatio(radio)
|
||||
|
@ -1,6 +1,7 @@
|
||||
import json
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import QMessageBox
|
||||
|
||||
from interface.ui_comment import Ui_Comment
|
||||
|
36
src/component/widget/main_widget.py
Normal file
@ -0,0 +1,36 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
from tools.log import Log
|
||||
|
||||
MainType = 1
|
||||
|
||||
Main = None
|
||||
|
||||
# if sys.platform == "win32":
|
||||
# try:
|
||||
# from interface.ui_main_windows import Ui_MainWindows
|
||||
# from .windows.frame_less_widget import FrameLessWidget
|
||||
#
|
||||
# class MainWidget(FrameLessWidget, Ui_MainWindows):
|
||||
# def __init__(self):
|
||||
# FrameLessWidget.__init__(self)
|
||||
# Ui_MainWindows.__init__(self)
|
||||
# self.setupUi(self)
|
||||
# Main = MainWidget
|
||||
# except Exception as es:
|
||||
# Log.Error(es)
|
||||
|
||||
if not Main:
|
||||
from interface.ui_main import Ui_Main
|
||||
from PySide6.QtWidgets import QMainWindow
|
||||
|
||||
class MainWidget(QMainWindow, Ui_Main):
|
||||
def __init__(self):
|
||||
QMainWindow.__init__(self)
|
||||
Ui_Main.__init__(self)
|
||||
self.setupUi(self)
|
||||
|
||||
|
||||
Main = MainWidget
|
@ -36,7 +36,7 @@ class NavigationWidget(QWidget, Ui_Navigation, QtTaskBase):
|
||||
return
|
||||
|
||||
loginView = LoginView(QtOwner().owner)
|
||||
loginView.exec_()
|
||||
loginView.exec()
|
||||
|
||||
if User().isLogin:
|
||||
self.LoginSucBack()
|
||||
|
@ -14,20 +14,16 @@ class TitleBarWidget(QWidget, Ui_TitleBar):
|
||||
self.setupUi(self)
|
||||
self.setAttribute(Qt.WA_StyledBackground, True)
|
||||
self.resize(1360, 40)
|
||||
self.maxBt.clicked.connect(self._showRestoreWindow)
|
||||
self.closeButton.clicked.connect(self._close)
|
||||
self.minButton.clicked.connect(self._showMinimized)
|
||||
self.menuButton.clicked.connect(self._showMenu)
|
||||
self.maxBt.clicked.connect(self._ShowRestoreWindow)
|
||||
self.closeButton.clicked.connect(self._Close)
|
||||
self.minButton.clicked.connect(self._ShowMinimized)
|
||||
# self.setAttribute(Qt.WA_TranslucentBackground)
|
||||
|
||||
def _showRestoreWindow(self):
|
||||
def _ShowRestoreWindow(self):
|
||||
return
|
||||
|
||||
def _close(self):
|
||||
def _Close(self):
|
||||
return self.window().close()
|
||||
|
||||
def _showMinimized(self):
|
||||
def _ShowMinimized(self):
|
||||
return self.window().showMinimized()
|
||||
|
||||
def _showMenu(self):
|
||||
return
|
0
src/component/widget/windows/__init__.py
Normal file
126
src/component/widget/windows/c_structures.py
Normal file
@ -0,0 +1,126 @@
|
||||
# coding:utf-8
|
||||
|
||||
from ctypes import POINTER, Structure, c_int
|
||||
from ctypes.wintypes import DWORD, HWND, ULONG, POINT, RECT, UINT
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class WINDOWCOMPOSITIONATTRIB(Enum):
|
||||
WCA_UNDEFINED = 0,
|
||||
WCA_NCRENDERING_ENABLED = 1,
|
||||
WCA_NCRENDERING_POLICY = 2,
|
||||
WCA_TRANSITIONS_FORCEDISABLED = 3,
|
||||
WCA_ALLOW_NCPAINT = 4,
|
||||
WCA_CAPTION_BUTTON_BOUNDS = 5,
|
||||
WCA_NONCLIENT_RTL_LAYOUT = 6,
|
||||
WCA_FORCE_ICONIC_REPRESENTATION = 7,
|
||||
WCA_EXTENDED_FRAME_BOUNDS = 8,
|
||||
WCA_HAS_ICONIC_BITMAP = 9,
|
||||
WCA_THEME_ATTRIBUTES = 10,
|
||||
WCA_NCRENDERING_EXILED = 11,
|
||||
WCA_NCADORNMENTINFO = 12,
|
||||
WCA_EXCLUDED_FROM_LIVEPREVIEW = 13,
|
||||
WCA_VIDEO_OVERLAY_ACTIVE = 14,
|
||||
WCA_FORCE_ACTIVEWINDOW_APPEARANCE = 15,
|
||||
WCA_DISALLOW_PEEK = 16,
|
||||
WCA_CLOAK = 17,
|
||||
WCA_CLOAKED = 18,
|
||||
WCA_ACCENT_POLICY = 19,
|
||||
WCA_FREEZE_REPRESENTATION = 20,
|
||||
WCA_EVER_UNCLOAKED = 21,
|
||||
WCA_VISUAL_OWNER = 22,
|
||||
WCA_LAST = 23
|
||||
|
||||
|
||||
class ACCENT_STATE(Enum):
|
||||
""" 客户区状态枚举类 """
|
||||
ACCENT_DISABLED = 0,
|
||||
ACCENT_ENABLE_GRADIENT = 1,
|
||||
ACCENT_ENABLE_TRANSPARENTGRADIENT = 2,
|
||||
ACCENT_ENABLE_BLURBEHIND = 3, # Aero效果
|
||||
ACCENT_ENABLE_ACRYLICBLURBEHIND = 4, # 亚克力效果
|
||||
ACCENT_INVALID_STATE = 5
|
||||
|
||||
|
||||
class ACCENT_POLICY(Structure):
|
||||
""" 设置客户区的具体属性 """
|
||||
|
||||
_fields_ = [
|
||||
("AccentState", DWORD),
|
||||
("AccentFlags", DWORD),
|
||||
("GradientColor", DWORD),
|
||||
("AnimationId", DWORD),
|
||||
]
|
||||
|
||||
|
||||
class WINDOWCOMPOSITIONATTRIBDATA(Structure):
|
||||
_fields_ = [
|
||||
("Attribute", DWORD),
|
||||
# POINTER()接收任何ctypes类型,并返回一个指针类型
|
||||
("Data", POINTER(ACCENT_POLICY)),
|
||||
("SizeOfData", ULONG),
|
||||
]
|
||||
|
||||
|
||||
class DWMNCRENDERINGPOLICY(Enum):
|
||||
DWMNCRP_USEWINDOWSTYLE = 0
|
||||
DWMNCRP_DISABLED = 1
|
||||
DWMNCRP_ENABLED = 2
|
||||
DWMNCRP_LAS = 3
|
||||
|
||||
|
||||
class DWMWINDOWATTRIBUTE(Enum):
|
||||
DWMWA_NCRENDERING_ENABLED = 1
|
||||
DWMWA_NCRENDERING_POLICY = 2
|
||||
DWMWA_TRANSITIONS_FORCEDISABLED = 3
|
||||
DWMWA_ALLOW_NCPAINT = 4
|
||||
DWMWA_CAPTION_BUTTON_BOUNDS = 5
|
||||
DWMWA_NONCLIENT_RTL_LAYOUT = 6
|
||||
DWMWA_FORCE_ICONIC_REPRESENTATION = 7
|
||||
DWMWA_FLIP3D_POLICY = 8
|
||||
DWMWA_EXTENDED_FRAME_BOUNDS = 9
|
||||
DWMWA_HAS_ICONIC_BITMAP = 10
|
||||
DWMWA_DISALLOW_PEEK = 11
|
||||
DWMWA_EXCLUDED_FROM_PEEK = 12
|
||||
DWMWA_CLOAK = 13
|
||||
DWMWA_CLOAKED = 14
|
||||
DWMWA_FREEZE_REPRESENTATION = 25
|
||||
DWMWA_LAST = 16
|
||||
|
||||
|
||||
class MARGINS(Structure):
|
||||
_fields_ = [
|
||||
("cxLeftWidth", c_int),
|
||||
("cxRightWidth", c_int),
|
||||
("cyTopHeight", c_int),
|
||||
("cyBottomHeight", c_int),
|
||||
]
|
||||
|
||||
|
||||
class MINMAXINFO(Structure):
|
||||
_fields_ = [
|
||||
("ptReserved", POINT),
|
||||
("ptMaxSize", POINT),
|
||||
("ptMaxPosition", POINT),
|
||||
("ptMinTrackSize", POINT),
|
||||
("ptMaxTrackSize", POINT),
|
||||
]
|
||||
|
||||
|
||||
class PWINDOWPOS(Structure):
|
||||
_fields_ = [
|
||||
('hWnd', HWND),
|
||||
('hwndInsertAfter', HWND),
|
||||
('x', c_int),
|
||||
('y', c_int),
|
||||
('cx', c_int),
|
||||
('cy', c_int),
|
||||
('flags', UINT)
|
||||
]
|
||||
|
||||
|
||||
class NCCALCSIZE_PARAMS(Structure):
|
||||
_fields_ = [
|
||||
('rgrc', RECT*3),
|
||||
('lppos', POINTER(PWINDOWPOS))
|
||||
]
|
273
src/component/widget/windows/frame_less_widget.py
Normal file
@ -0,0 +1,273 @@
|
||||
# coding:utf-8
|
||||
import sys
|
||||
from enum import Enum
|
||||
from PySide6.QtCore import Qt
|
||||
|
||||
from ctypes import cast
|
||||
from ctypes.wintypes import MSG
|
||||
|
||||
from ctypes import POINTER
|
||||
|
||||
from PySide6.QtGui import QPainter
|
||||
from PySide6.QtWidgets import QWidget, QStyleOption, QStyle
|
||||
from win32 import win32api, win32gui
|
||||
from win32.win32gui import ReleaseCapture
|
||||
from win32.win32api import SendMessage
|
||||
from win32.lib import win32con
|
||||
|
||||
from .c_structures import MINMAXINFO, NCCALCSIZE_PARAMS
|
||||
from .window_effect import WindowEffect
|
||||
|
||||
|
||||
class MoveEnum(Enum):
|
||||
LEFT_TOP = 11
|
||||
TOP = 12
|
||||
RIGHT_TOP = 13
|
||||
LEFT = 21
|
||||
CENTER = 22
|
||||
RIGHT = 23
|
||||
LEFT_BOTTOM = 31
|
||||
BOTTOM = 32
|
||||
RIGHT_BOTTOM = 33
|
||||
|
||||
|
||||
class FrameLessWidget(QWidget):
|
||||
BORDER_WIDTH = 5
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
# self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowSystemMenuHint |
|
||||
# Qt.WindowMinimizeButtonHint | Qt.WindowMaximizeButtonHint)
|
||||
self.setWindowFlags(Qt.FramelessWindowHint)
|
||||
self.resize(500, 500)
|
||||
self.m_nBorder = 40
|
||||
# self.setMouseTracking(True)
|
||||
self.setAttribute(Qt.WA_Hover, True)
|
||||
self.m_bPress = False
|
||||
self.m_area = 0
|
||||
self.m_currentPos = 0
|
||||
plat = sys.platform
|
||||
self.isWin = False
|
||||
self.__monitorInfo = None
|
||||
self.windowEffect = WindowEffect()
|
||||
self.windowEffect.addWindowAnimation(self.winId())
|
||||
# self.setMouseTracking(True)
|
||||
|
||||
def paintEvent(self, event):
|
||||
# 解决QSS问题
|
||||
option = QStyleOption()
|
||||
option.initFrom(self)
|
||||
painter = QPainter(self)
|
||||
self.style().drawPrimitive(QStyle.PE_Widget, option, painter, self)
|
||||
QWidget.paintEvent(self, event)
|
||||
|
||||
def nativeEvent(self, eventType, message):
|
||||
""" 处理windows消息 """
|
||||
msg = MSG.from_address(message.__int__())
|
||||
if msg.message == win32con.WM_NCHITTEST:
|
||||
# 解决多屏下会出现鼠标一直为拖动状态的问题
|
||||
x = win32api.LOWORD(msg.lParam)
|
||||
y = win32api.HIWORD(msg.lParam)
|
||||
|
||||
radio = self.devicePixelRatio()
|
||||
xPos = (x-
|
||||
self.frameGeometry().x()*radio) % 65536
|
||||
yPos = y - self.frameGeometry().y()*radio
|
||||
# print(self.frameGeometry().x(), self.frameGeometry().y(), x, y, xPos, yPos)
|
||||
w, h = self.width()*radio, self.height()*radio
|
||||
lx = xPos < self.BORDER_WIDTH
|
||||
rx = xPos + 9 > w - self.BORDER_WIDTH
|
||||
ty = yPos < self.BORDER_WIDTH
|
||||
by = yPos > h - self.BORDER_WIDTH
|
||||
if lx and ty:
|
||||
return True, win32con.HTTOPLEFT
|
||||
elif rx and by:
|
||||
return True, win32con.HTBOTTOMRIGHT
|
||||
elif rx and ty:
|
||||
return True, win32con.HTTOPRIGHT
|
||||
elif lx and by:
|
||||
return True, win32con.HTBOTTOMLEFT
|
||||
elif ty:
|
||||
return True, win32con.HTTOP
|
||||
elif by:
|
||||
return True, win32con.HTBOTTOM
|
||||
elif lx:
|
||||
return True, win32con.HTLEFT
|
||||
elif rx:
|
||||
return True, win32con.HTRIGHT
|
||||
elif msg.message == win32con.WM_NCCALCSIZE:
|
||||
if self._isWindowMaximized(msg.hWnd):
|
||||
self.__monitorNCCALCSIZE(msg)
|
||||
return True, 0
|
||||
elif msg.message == win32con.WM_GETMINMAXINFO:
|
||||
if self._isWindowMaximized(msg.hWnd):
|
||||
window_rect = win32gui.GetWindowRect(msg.hWnd)
|
||||
if not window_rect:
|
||||
return False, 0
|
||||
# 获取显示器句柄
|
||||
monitor = win32api.MonitorFromRect(window_rect)
|
||||
if not monitor:
|
||||
return False, 0
|
||||
# 获取显示器信息
|
||||
__monitorInfo = win32api.GetMonitorInfo(monitor)
|
||||
monitor_rect = __monitorInfo['Monitor']
|
||||
work_area = __monitorInfo['Work']
|
||||
# 将lParam转换为MINMAXINFO指针
|
||||
info = cast(msg.lParam, POINTER(MINMAXINFO)).contents
|
||||
# 调整窗口大小
|
||||
info.ptMaxSize.x = work_area[2] - work_area[0]
|
||||
info.ptMaxSize.y = work_area[3] - work_area[1]
|
||||
info.ptMaxTrackSize.x = info.ptMaxSize.x
|
||||
info.ptMaxTrackSize.y = info.ptMaxSize.y
|
||||
# 修改左上角坐标
|
||||
info.ptMaxPosition.x = abs(window_rect[0] - monitor_rect[0])
|
||||
info.ptMaxPosition.y = abs(window_rect[1] - monitor_rect[1])
|
||||
return True, 1
|
||||
return QWidget.nativeEvent(self, eventType, message)
|
||||
|
||||
def _isWindowMaximized(self, hWnd) -> bool:
|
||||
""" 判断窗口是否最大化 """
|
||||
# 返回指定窗口的显示状态以及被恢复的、最大化的和最小化的窗口位置,返回值为元组
|
||||
windowPlacement = win32gui.GetWindowPlacement(hWnd)
|
||||
if not windowPlacement:
|
||||
return False
|
||||
return windowPlacement[1] == win32con.SW_MAXIMIZE
|
||||
|
||||
def __monitorNCCALCSIZE(self, msg: MSG):
|
||||
""" 调整窗口大小 """
|
||||
monitor = win32api.MonitorFromWindow(msg.hWnd)
|
||||
# 如果没有保存显示器信息就直接返回,否则接着调整窗口大小
|
||||
if monitor is None and not self.__monitorInfo:
|
||||
return
|
||||
elif monitor is not None:
|
||||
self.__monitorInfo = win32api.GetMonitorInfo(monitor)
|
||||
# 调整窗口大小
|
||||
params = cast(msg.lParam, POINTER(NCCALCSIZE_PARAMS)).contents
|
||||
params.rgrc[0].left = self.__monitorInfo['Work'][0]
|
||||
params.rgrc[0].top = self.__monitorInfo['Work'][1]
|
||||
params.rgrc[0].right = self.__monitorInfo['Work'][2]
|
||||
params.rgrc[0].bottom = self.__monitorInfo['Work'][3]
|
||||
|
||||
# def moveArea(self, pos: QPointF):
|
||||
# if pos.y() < self.m_nBorder:
|
||||
# k = 10
|
||||
# elif pos.y() > self.height() - self.m_nBorder:
|
||||
# k = 30
|
||||
# else:
|
||||
# k = 20
|
||||
#
|
||||
# if pos.x() < self.m_nBorder:
|
||||
# v = 1
|
||||
# elif pos.x() > self.width() - self.m_nBorder:
|
||||
# v = 3
|
||||
# else:
|
||||
# v = 2
|
||||
#
|
||||
# return k + v
|
||||
#
|
||||
# def setMouseStyle(self, moveArea):
|
||||
# if moveArea == MoveEnum.LEFT_TOP.value:
|
||||
# self.setCursor(Qt.SizeFDiagCursor)
|
||||
# elif moveArea == MoveEnum.TOP.value:
|
||||
# self.setCursor(Qt.ArrowCursor)
|
||||
# elif moveArea == MoveEnum.RIGHT_TOP.value:
|
||||
# self.setCursor(Qt.SizeBDiagCursor)
|
||||
# elif moveArea == MoveEnum.LEFT.value:
|
||||
# self.setCursor(Qt.SizeHorCursor)
|
||||
# elif moveArea == MoveEnum.CENTER.value:
|
||||
# self.setCursor(Qt.ArrowCursor)
|
||||
# elif moveArea == MoveEnum.RIGHT.value:
|
||||
# self.setCursor(Qt.SizeHorCursor)
|
||||
# elif moveArea == MoveEnum.LEFT_BOTTOM.value:
|
||||
# self.setCursor(Qt.SizeBDiagCursor)
|
||||
# elif moveArea == MoveEnum.BOTTOM.value:
|
||||
# self.setCursor(Qt.SizeVerCursor)
|
||||
# elif moveArea == MoveEnum.RIGHT_BOTTOM.value:
|
||||
# self.setCursor(Qt.SizeFDiagCursor)
|
||||
# else:
|
||||
# self.setCursor(Qt.ArrowCursor)
|
||||
#
|
||||
# def mouseMoveEvent(self, event):
|
||||
# # print(event.globalPos())
|
||||
# if self.isWin:
|
||||
# return QWidget.mousePressEvent(self, event)
|
||||
# area = self.moveArea(event.pos())
|
||||
# self.setMouseStyle(area)
|
||||
# if self.m_bPress:
|
||||
# tempPos = event.globalPos() - self.m_currentPos
|
||||
#
|
||||
# if self.m_area == MoveEnum.TOP.value:
|
||||
# self.move(self.pos() + tempPos)
|
||||
# self.m_currentPos = event.globalPos()
|
||||
# else:
|
||||
# tl = self.mapToGlobal(self.rect().topLeft())
|
||||
# rb = self.mapToGlobal(self.rect().bottomRight())
|
||||
# gloPoint = event.globalPos()
|
||||
# rMove = QRect(tl, rb)
|
||||
# if self.m_area == MoveEnum.LEFT_TOP.value:
|
||||
# if rb.x() - gloPoint.x() <= self.minimumWidth():
|
||||
# rMove.setX(tl.x())
|
||||
# else:
|
||||
# rMove.setX(gloPoint.x())
|
||||
# if rb.y() - gloPoint.y() <= self.minimumHeight():
|
||||
# rMove.setY(tl.y())
|
||||
# else:
|
||||
# rMove.setY(gloPoint.y())
|
||||
# elif self.m_area == MoveEnum.RIGHT_TOP.value:
|
||||
# rMove.setWidth(gloPoint.x()-tl.x())
|
||||
# rMove.setY(gloPoint.y())
|
||||
# elif self.m_area == MoveEnum.LEFT.value:
|
||||
# if rb.x() - gloPoint.x() <= self.minimumWidth():
|
||||
# rMove.setX(tl.x())
|
||||
# else:
|
||||
# rMove.setX(gloPoint.x())
|
||||
# elif self.m_area == MoveEnum.RIGHT.value:
|
||||
# rMove.setWidth(gloPoint.x()-tl.x())
|
||||
# elif self.m_area == MoveEnum.LEFT_BOTTOM.value:
|
||||
# rMove.setX(gloPoint.x())
|
||||
# rMove.setHeight(gloPoint.y()-tl.y())
|
||||
# elif self.m_area == MoveEnum.BOTTOM.value:
|
||||
# rMove.setHeight(gloPoint.y()-tl.y())
|
||||
# elif self.m_area == MoveEnum.RIGHT_BOTTOM.value:
|
||||
# rMove.setWidth(gloPoint.x()-tl.x())
|
||||
# rMove.setHeight(gloPoint.y()-tl.y())
|
||||
# self.setGeometry(rMove)
|
||||
# event.accept()
|
||||
#
|
||||
# def mousePressEvent(self, event):
|
||||
# if self.isWin:
|
||||
# return QWidget.mousePressEvent(self, event)
|
||||
# area = self.moveArea(event.pos())
|
||||
# self.setMouseStyle(area)
|
||||
# if event.buttons() == Qt.LeftButton:
|
||||
# self.m_bPress = True
|
||||
# self.m_area = area
|
||||
# self.m_currentPos = event.globalPos()
|
||||
# event.accept()
|
||||
#
|
||||
# def mouseReleaseEvent(self, event: QtGui.QMouseEvent) -> None:
|
||||
# if self.isWin:
|
||||
# return QWidget.mouseReleaseEvent(self, event)
|
||||
# self.m_bPress = False
|
||||
# self.setCursor(Qt.ArrowCursor)
|
||||
|
||||
def mousePressEvent(self, event):
|
||||
""" 移动窗口 """
|
||||
# 判断鼠标点击位置是否允许拖动
|
||||
if self.__isPointInDragRegion(event.pos()):
|
||||
ReleaseCapture()
|
||||
SendMessage(
|
||||
self.window().winId(),
|
||||
win32con.WM_SYSCOMMAND,
|
||||
win32con.SC_MOVE + win32con.HTCAPTION,
|
||||
0,
|
||||
)
|
||||
event.ignore()
|
||||
|
||||
def __isPointInDragRegion(self, pos) -> bool:
|
||||
""" 检查鼠标按下的点是否属于允许拖动的区域 """
|
||||
x = pos.x()
|
||||
left = 0
|
||||
# 如果最小化按钮看不见也意味着最大化按钮看不见
|
||||
right = self.width() - 57
|
||||
return left < x < right
|
61
src/component/widget/windows/window_effect.py
Normal file
@ -0,0 +1,61 @@
|
||||
# coding:utf-8
|
||||
|
||||
from ctypes import POINTER, WinDLL, byref, c_bool, c_int, pointer, sizeof
|
||||
from ctypes.wintypes import DWORD, LONG, LPCVOID
|
||||
|
||||
from win32 import win32api, win32gui
|
||||
from win32.lib import win32con
|
||||
|
||||
from .c_structures import (ACCENT_POLICY, ACCENT_STATE, DWMNCRENDERINGPOLICY,
|
||||
DWMWINDOWATTRIBUTE, MARGINS,
|
||||
WINDOWCOMPOSITIONATTRIB,
|
||||
WINDOWCOMPOSITIONATTRIBDATA)
|
||||
|
||||
|
||||
class WindowEffect:
|
||||
""" 调用windows api实现窗口效果 """
|
||||
|
||||
def __init__(self):
|
||||
# 调用api
|
||||
self.user32 = WinDLL("user32")
|
||||
self.dwmapi = WinDLL("dwmapi")
|
||||
self.SetWindowCompositionAttribute = self.user32.SetWindowCompositionAttribute
|
||||
self.DwmExtendFrameIntoClientArea = self.dwmapi.DwmExtendFrameIntoClientArea
|
||||
self.DwmSetWindowAttribute = self.dwmapi.DwmSetWindowAttribute
|
||||
self.SetWindowCompositionAttribute.restype = c_bool
|
||||
self.DwmExtendFrameIntoClientArea.restype = LONG
|
||||
self.DwmSetWindowAttribute.restype = LONG
|
||||
self.SetWindowCompositionAttribute.argtypes = [
|
||||
c_int,
|
||||
POINTER(WINDOWCOMPOSITIONATTRIBDATA),
|
||||
]
|
||||
self.DwmSetWindowAttribute.argtypes = [c_int, DWORD, LPCVOID, DWORD]
|
||||
self.DwmExtendFrameIntoClientArea.argtypes = [c_int, POINTER(MARGINS)]
|
||||
# 初始化结构体
|
||||
# self.accentPolicy = ACCENT_POLICY()
|
||||
# self.winCompAttrData = WINDOWCOMPOSITIONATTRIBDATA()
|
||||
# self.winCompAttrData.Attribute = WINDOWCOMPOSITIONATTRIB.WCA_ACCENT_POLICY.value[
|
||||
# 0
|
||||
# ]
|
||||
# self.winCompAttrData.SizeOfData = sizeof(self.accentPolicy)
|
||||
# self.winCompAttrData.Data = pointer(self.accentPolicy)
|
||||
|
||||
@staticmethod
|
||||
def addWindowAnimation(hWnd):
|
||||
""" 打开窗口动画效果
|
||||
|
||||
Parameters
|
||||
----------
|
||||
hWnd : int or `sip.voidptr`
|
||||
窗口句柄
|
||||
"""
|
||||
style = win32gui.GetWindowLong(hWnd, win32con.GWL_STYLE)
|
||||
win32gui.SetWindowLong(
|
||||
hWnd,
|
||||
win32con.GWL_STYLE,
|
||||
style
|
||||
| win32con.WS_MAXIMIZEBOX
|
||||
| win32con.WS_CAPTION
|
||||
| win32con.CS_DBLCLKS
|
||||
| win32con.WS_THICKFRAME,
|
||||
)
|
@ -35,8 +35,10 @@ DatabaseDownload = "https://raw.githubusercontent.com/bika-robot/picacg-database
|
||||
|
||||
DatabaseUpdate2 = "https://gitee.com/bika-robot/picacg-database/raw/main/version.txt"
|
||||
DatabaseDownload2 = "https://gitee.com/bika-robot/picacg-database/raw/main/data/"
|
||||
UpdateVersion = "v1.2.9"
|
||||
RealVersion = "v1.2.9.1"
|
||||
UpdateVersion = "v1.3.0"
|
||||
RealVersion = "v1.3.0"
|
||||
|
||||
Waifu2xVersion = "1.0.9"
|
||||
|
||||
# waifu2x
|
||||
CanWaifu2x = True
|
||||
@ -48,10 +50,6 @@ EncodeGpu = ""
|
||||
Format = "jpg"
|
||||
Waifu2xPath = "waifu2x"
|
||||
|
||||
ThemeText = "dark" # 主题
|
||||
ThemeIndex = 0 # 主题·
|
||||
CurrentSetTheme = 0
|
||||
|
||||
IsTips = 1
|
||||
|
||||
# ISSUES
|
||||
|
@ -64,6 +64,7 @@ class Setting:
|
||||
ThemeIndex = SettingValue("GeneraSetting", 0, False, ["Auto", "light", "dark"]) #
|
||||
LogIndex = SettingValue("GeneraSetting", 0, False, ["warn", "info", "debug"]) # Warn Info Debug
|
||||
CoverSize = SettingValue("GeneraSetting", 100, False) #
|
||||
CategorySize = SettingValue("GeneraSetting", 80, False) #
|
||||
ScaleLevel = SettingValue("GeneraSetting", 0, True, ["Auto", 100, 125, 150, 175, 200])
|
||||
|
||||
# 代理设置
|
||||
|
BIN
src/data/book.db
201112
src/images_rc.py
@ -76,6 +76,9 @@ class Ui_Comment(object):
|
||||
def retranslateUi(self, Comment):
|
||||
Comment.setWindowTitle(QCoreApplication.translate("Comment", u"\u8bc4\u8bba", None))
|
||||
self.pushButton.setText(QCoreApplication.translate("Comment", u"\u56de\u590d", None))
|
||||
#if QT_CONFIG(shortcut)
|
||||
self.pushButton.setShortcut(QCoreApplication.translate("Comment", u"Return", None))
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
self.nums.setText(QCoreApplication.translate("Comment", u"TextLabel", None))
|
||||
self.skipButton.setText(QCoreApplication.translate("Comment", u"\u8df3\u8f6c", None))
|
||||
# retranslateUi
|
||||
|
@ -16,7 +16,7 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QListView,
|
||||
QSizePolicy, QVBoxLayout, QWidget)
|
||||
QSizePolicy, QSpacerItem, QVBoxLayout, QWidget)
|
||||
|
||||
from component.button.switch_button import SwitchButton
|
||||
|
||||
@ -46,13 +46,19 @@ class Ui_LineEditHelp(object):
|
||||
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
||||
self.label_4 = QLabel(LineEditHelp)
|
||||
self.label_4.setObjectName(u"label_4")
|
||||
self.label_4.setMinimumSize(QSize(100, 0))
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.label_4)
|
||||
|
||||
self.localWidget = SwitchButton(LineEditHelp)
|
||||
self.localWidget.setObjectName(u"localWidget")
|
||||
self.localWidget.setMinimumSize(QSize(75, 35))
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.localWidget)
|
||||
self.horizontalLayout_2.addWidget(self.localWidget, 0, Qt.AlignLeft)
|
||||
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_2.addItem(self.horizontalSpacer)
|
||||
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
|
||||
@ -61,14 +67,20 @@ class Ui_LineEditHelp(object):
|
||||
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
|
||||
self.titleLabel = QLabel(LineEditHelp)
|
||||
self.titleLabel.setObjectName(u"titleLabel")
|
||||
self.titleLabel.setMinimumSize(QSize(100, 0))
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.titleLabel)
|
||||
|
||||
self.titleWidget = SwitchButton(LineEditHelp)
|
||||
self.titleWidget.setObjectName(u"titleWidget")
|
||||
self.titleWidget.setMinimumSize(QSize(75, 35))
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.titleWidget)
|
||||
|
||||
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_4.addItem(self.horizontalSpacer_2)
|
||||
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_4)
|
||||
|
||||
@ -76,13 +88,19 @@ class Ui_LineEditHelp(object):
|
||||
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
|
||||
self.desLabel = QLabel(LineEditHelp)
|
||||
self.desLabel.setObjectName(u"desLabel")
|
||||
self.desLabel.setMinimumSize(QSize(100, 0))
|
||||
|
||||
self.horizontalLayout_5.addWidget(self.desLabel)
|
||||
|
||||
self.desWidget = SwitchButton(LineEditHelp)
|
||||
self.desWidget.setObjectName(u"desWidget")
|
||||
self.desWidget.setMinimumSize(QSize(75, 35))
|
||||
|
||||
self.horizontalLayout_5.addWidget(self.desWidget)
|
||||
self.horizontalLayout_5.addWidget(self.desWidget, 0, Qt.AlignLeft)
|
||||
|
||||
self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_5.addItem(self.horizontalSpacer_3)
|
||||
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_5)
|
||||
@ -91,13 +109,19 @@ class Ui_LineEditHelp(object):
|
||||
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
|
||||
self.categoryLabel = QLabel(LineEditHelp)
|
||||
self.categoryLabel.setObjectName(u"categoryLabel")
|
||||
self.categoryLabel.setMinimumSize(QSize(100, 0))
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.categoryLabel)
|
||||
|
||||
self.categoryWidget = SwitchButton(LineEditHelp)
|
||||
self.categoryWidget.setObjectName(u"categoryWidget")
|
||||
self.categoryWidget.setMinimumSize(QSize(75, 35))
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.categoryWidget)
|
||||
self.horizontalLayout_3.addWidget(self.categoryWidget, 0, Qt.AlignLeft)
|
||||
|
||||
self.horizontalSpacer_4 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_3.addItem(self.horizontalSpacer_4)
|
||||
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
|
||||
@ -106,13 +130,19 @@ class Ui_LineEditHelp(object):
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.tagLabel = QLabel(LineEditHelp)
|
||||
self.tagLabel.setObjectName(u"tagLabel")
|
||||
self.tagLabel.setMinimumSize(QSize(100, 0))
|
||||
|
||||
self.horizontalLayout.addWidget(self.tagLabel)
|
||||
|
||||
self.tagWidget = SwitchButton(LineEditHelp)
|
||||
self.tagWidget.setObjectName(u"tagWidget")
|
||||
self.tagWidget.setMinimumSize(QSize(75, 35))
|
||||
|
||||
self.horizontalLayout.addWidget(self.tagWidget)
|
||||
self.horizontalLayout.addWidget(self.tagWidget, 0, Qt.AlignLeft)
|
||||
|
||||
self.horizontalSpacer_5 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout.addItem(self.horizontalSpacer_5)
|
||||
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||
@ -121,13 +151,19 @@ class Ui_LineEditHelp(object):
|
||||
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
|
||||
self.authorLabel = QLabel(LineEditHelp)
|
||||
self.authorLabel.setObjectName(u"authorLabel")
|
||||
self.authorLabel.setMinimumSize(QSize(100, 0))
|
||||
|
||||
self.horizontalLayout_6.addWidget(self.authorLabel)
|
||||
|
||||
self.authorWidget = SwitchButton(LineEditHelp)
|
||||
self.authorWidget.setObjectName(u"authorWidget")
|
||||
self.authorWidget.setMinimumSize(QSize(75, 35))
|
||||
|
||||
self.horizontalLayout_6.addWidget(self.authorWidget)
|
||||
self.horizontalLayout_6.addWidget(self.authorWidget, 0, Qt.AlignLeft)
|
||||
|
||||
self.horizontalSpacer_6 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_6.addItem(self.horizontalSpacer_6)
|
||||
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_6)
|
||||
|
@ -15,13 +15,12 @@ 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, QHBoxLayout, QLabel, QPushButton,
|
||||
QSizePolicy, QSpacerItem, QStackedWidget, QVBoxLayout,
|
||||
QWidget)
|
||||
from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QMainWindow,
|
||||
QPushButton, QSizePolicy, QSpacerItem, QStackedWidget,
|
||||
QVBoxLayout, QWidget)
|
||||
|
||||
from component.widget.animation_stack_widget import AnimationStackWidget
|
||||
from component.widget.navigation_widget import NavigationWidget
|
||||
from component.widget.title_bar_widget import TitleBarWidget
|
||||
from view.category.category_view import CategoryView
|
||||
from view.category.rank_view import RankView
|
||||
from view.chat.chat_view import ChatView
|
||||
@ -47,20 +46,13 @@ class Ui_Main(object):
|
||||
def setupUi(self, Main):
|
||||
if not Main.objectName():
|
||||
Main.setObjectName(u"Main")
|
||||
Main.resize(400, 300)
|
||||
self.verticalLayout_2 = QVBoxLayout(Main)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.verticalLayout_2.setContentsMargins(-1, 0, -1, -1)
|
||||
self.titleBar = TitleBarWidget(Main)
|
||||
self.titleBar.setObjectName(u"titleBar")
|
||||
self.titleBar.setMinimumSize(QSize(0, 40))
|
||||
self.titleBar.setMaximumSize(QSize(16777215, 40))
|
||||
|
||||
self.verticalLayout_2.addWidget(self.titleBar)
|
||||
|
||||
self.horizontalLayout = QHBoxLayout()
|
||||
Main.resize(800, 600)
|
||||
self.centralwidget = QWidget(Main)
|
||||
self.centralwidget.setObjectName(u"centralwidget")
|
||||
self.horizontalLayout = QHBoxLayout(self.centralwidget)
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.totalStackWidget = QStackedWidget(Main)
|
||||
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.totalStackWidget = QStackedWidget(self.centralwidget)
|
||||
self.totalStackWidget.setObjectName(u"totalStackWidget")
|
||||
self.subMainWindow = QWidget()
|
||||
self.subMainWindow.setObjectName(u"subMainWindow")
|
||||
@ -171,9 +163,7 @@ class Ui_Main(object):
|
||||
|
||||
self.horizontalLayout.addWidget(self.totalStackWidget)
|
||||
|
||||
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||
|
||||
Main.setCentralWidget(self.centralwidget)
|
||||
|
||||
self.retranslateUi(Main)
|
||||
|
||||
|
@ -15,12 +15,13 @@ 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, QHBoxLayout, QLabel, QMainWindow,
|
||||
QPushButton, QSizePolicy, QSpacerItem, QStackedWidget,
|
||||
QVBoxLayout, QWidget)
|
||||
from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QPushButton,
|
||||
QSizePolicy, QSpacerItem, QStackedWidget, QVBoxLayout,
|
||||
QWidget)
|
||||
|
||||
from component.widget.animation_stack_widget import AnimationStackWidget
|
||||
from component.widget.navigation_widget import NavigationWidget
|
||||
from component.widget.title_bar_widget import TitleBarWidget
|
||||
from view.category.category_view import CategoryView
|
||||
from view.category.rank_view import RankView
|
||||
from view.chat.chat_view import ChatView
|
||||
@ -42,17 +43,23 @@ from view.tool.waifu2x_tool_view import Waifu2xToolView
|
||||
from view.user.favorite_view import FavoriteView
|
||||
from view.user.history_view import HistoryView
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
if not MainWindow.objectName():
|
||||
MainWindow.setObjectName(u"MainWindow")
|
||||
MainWindow.resize(800, 600)
|
||||
self.centralwidget = QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName(u"centralwidget")
|
||||
self.horizontalLayout = QHBoxLayout(self.centralwidget)
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.totalStackWidget = QStackedWidget(self.centralwidget)
|
||||
class Ui_MainWindows(object):
|
||||
def setupUi(self, MainWindows):
|
||||
if not MainWindows.objectName():
|
||||
MainWindows.setObjectName(u"MainWindows")
|
||||
MainWindows.resize(903, 489)
|
||||
self.verticalLayout = QVBoxLayout(MainWindows)
|
||||
self.verticalLayout.setSpacing(0)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.verticalLayout.setContentsMargins(9, 9, 9, 9)
|
||||
self.widget = TitleBarWidget(MainWindows)
|
||||
self.widget.setObjectName(u"widget")
|
||||
self.widget.setMinimumSize(QSize(0, 40))
|
||||
self.widget.setMaximumSize(QSize(16777215, 40))
|
||||
|
||||
self.verticalLayout.addWidget(self.widget)
|
||||
|
||||
self.totalStackWidget = QStackedWidget(MainWindows)
|
||||
self.totalStackWidget.setObjectName(u"totalStackWidget")
|
||||
self.subMainWindow = QWidget()
|
||||
self.subMainWindow.setObjectName(u"subMainWindow")
|
||||
@ -65,8 +72,8 @@ class Ui_MainWindow(object):
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.navigationWidget)
|
||||
|
||||
self.verticalLayout = QVBoxLayout()
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.verticalLayout_2 = QVBoxLayout()
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.horizontalLayout_3 = QHBoxLayout()
|
||||
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
|
||||
self.menuLayout = QHBoxLayout()
|
||||
@ -89,7 +96,7 @@ class Ui_MainWindow(object):
|
||||
self.horizontalLayout_3.addItem(self.horizontalSpacer)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_3)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
|
||||
|
||||
self.subStackWidget = AnimationStackWidget(self.subMainWindow)
|
||||
self.subStackWidget.setObjectName(u"subStackWidget")
|
||||
@ -151,28 +158,27 @@ class Ui_MainWindow(object):
|
||||
self.bookEpsView.setObjectName(u"bookEpsView")
|
||||
self.subStackWidget.addWidget(self.bookEpsView)
|
||||
|
||||
self.verticalLayout.addWidget(self.subStackWidget)
|
||||
self.verticalLayout_2.addWidget(self.subStackWidget)
|
||||
|
||||
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout_2)
|
||||
|
||||
self.totalStackWidget.addWidget(self.subMainWindow)
|
||||
self.readView = ReadView()
|
||||
self.readView.setObjectName(u"readView")
|
||||
self.totalStackWidget.addWidget(self.readView)
|
||||
|
||||
self.horizontalLayout.addWidget(self.totalStackWidget)
|
||||
self.verticalLayout.addWidget(self.totalStackWidget)
|
||||
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.retranslateUi(MainWindows)
|
||||
|
||||
QMetaObject.connectSlotsByName(MainWindow)
|
||||
QMetaObject.connectSlotsByName(MainWindows)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"PicACG", None))
|
||||
self.menuButton.setText(QCoreApplication.translate("MainWindow", u"\u83dc\u5355", None))
|
||||
self.label.setText(QCoreApplication.translate("MainWindow", u">", None))
|
||||
def retranslateUi(self, MainWindows):
|
||||
MainWindows.setWindowTitle(QCoreApplication.translate("MainWindows", u"Form", None))
|
||||
self.menuButton.setText(QCoreApplication.translate("MainWindows", u"\u83dc\u5355", None))
|
||||
self.label.setText(QCoreApplication.translate("MainWindows", u">", None))
|
||||
# retranslateUi
|
||||
|
||||
|
@ -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, -1409, 661, 2154))
|
||||
self.scrollAreaWidgetContents.setGeometry(QRect(0, -372, 661, 2209))
|
||||
self.scrollAreaWidgetContents.setStyleSheet(u"")
|
||||
self.verticalLayout_4 = QVBoxLayout(self.scrollAreaWidgetContents)
|
||||
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
|
||||
@ -282,6 +282,31 @@ class Ui_SettingNew(object):
|
||||
|
||||
self.verticalLayout_17.addLayout(self.horizontalLayout_15)
|
||||
|
||||
self.label_29 = QLabel(self.frame_14)
|
||||
self.label_29.setObjectName(u"label_29")
|
||||
self.label_29.setFont(font1)
|
||||
|
||||
self.verticalLayout_17.addWidget(self.label_29)
|
||||
|
||||
self.horizontalLayout_22 = QHBoxLayout()
|
||||
self.horizontalLayout_22.setObjectName(u"horizontalLayout_22")
|
||||
self.categorySize = WheelSpinBox(self.frame_14)
|
||||
self.categorySize.setObjectName(u"categorySize")
|
||||
self.categorySize.setMinimumSize(QSize(140, 0))
|
||||
self.categorySize.setMinimum(30)
|
||||
self.categorySize.setMaximum(250)
|
||||
self.categorySize.setSingleStep(10)
|
||||
self.categorySize.setValue(80)
|
||||
|
||||
self.horizontalLayout_22.addWidget(self.categorySize)
|
||||
|
||||
self.horizontalSpacer_21 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_22.addItem(self.horizontalSpacer_21)
|
||||
|
||||
|
||||
self.verticalLayout_17.addLayout(self.horizontalLayout_22)
|
||||
|
||||
|
||||
self.verticalLayout_4.addWidget(self.frame_14)
|
||||
|
||||
@ -1017,6 +1042,7 @@ class Ui_SettingNew(object):
|
||||
self.mainScaleButton4.setText(QCoreApplication.translate("SettingNew", u"175%", None))
|
||||
self.mainScaleButton5.setText(QCoreApplication.translate("SettingNew", u"200%", None))
|
||||
self.label_2.setText(QCoreApplication.translate("SettingNew", u"\u5c01\u9762\u663e\u793a\u5927\u5c0f\uff08\u9ed8\u8ba4\u4e3a100%\uff09\uff1a", None))
|
||||
self.label_29.setText(QCoreApplication.translate("SettingNew", u"\u5206\u7c7b\u5c01\u9762\u5927\u5c0f\uff1a", None))
|
||||
self.label_10.setText(QCoreApplication.translate("SettingNew", u"\u65e5\u5fd7\u7b49\u7ea7\uff1a", None))
|
||||
self.logutton0.setText(QCoreApplication.translate("SettingNew", u"Warn", None))
|
||||
self.logutton1.setText(QCoreApplication.translate("SettingNew", u"Info", None))
|
||||
|
@ -16,41 +16,48 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QSizePolicy,
|
||||
QToolButton, QWidget)
|
||||
QSpacerItem, QToolButton, QWidget)
|
||||
import images_rc
|
||||
|
||||
class Ui_TitleBar(object):
|
||||
def setupUi(self, TitleBar):
|
||||
if not TitleBar.objectName():
|
||||
TitleBar.setObjectName(u"TitleBar")
|
||||
TitleBar.resize(1360, 78)
|
||||
TitleBar.resize(1360, 49)
|
||||
TitleBar.setStyleSheet(u"")
|
||||
self.horizontalLayout_2 = QHBoxLayout(TitleBar)
|
||||
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
||||
self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1)
|
||||
self.menuButton = QToolButton(TitleBar)
|
||||
self.menuButton.setObjectName(u"menuButton")
|
||||
self.menuButton.setMinimumSize(QSize(40, 40))
|
||||
self.menuButton.setStyleSheet(u"QToolButton{ border-image:url(:/images/navigation_interface/GlobalNavButton.png);}\n"
|
||||
"QToolButton:hover{ border-image:url(:/images/navigation_interface/GlobalNavButton.png);}\n"
|
||||
"QToolButton:pressed{ border-image:url(:/images/navigation_interface/GlobalNavButton.png);}\n"
|
||||
"border: none; margin: 0px")
|
||||
self.menuButton.setIconSize(QSize(60, 40))
|
||||
self.horizontalSpacer_2 = QSpacerItem(10, 20, QSizePolicy.Minimum, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.menuButton)
|
||||
self.horizontalLayout_2.addItem(self.horizontalSpacer_2)
|
||||
|
||||
self.label_2 = QLabel(TitleBar)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
self.label_2.setMinimumSize(QSize(25, 25))
|
||||
self.label_2.setMaximumSize(QSize(25, 25))
|
||||
self.label_2.setStyleSheet(u"border-image: url(:/png/icon/logo_round.png);")
|
||||
self.label_2.setAlignment(Qt.AlignBottom|Qt.AlignHCenter)
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.label_2, 0, Qt.AlignHCenter|Qt.AlignBottom)
|
||||
|
||||
self.label = QLabel(TitleBar)
|
||||
self.label.setObjectName(u"label")
|
||||
self.label.setMinimumSize(QSize(60, 40))
|
||||
self.label.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.label)
|
||||
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
|
||||
self.horizontalLayout_2.addItem(self.horizontalSpacer)
|
||||
|
||||
self.minButton = QToolButton(TitleBar)
|
||||
self.minButton.setObjectName(u"minButton")
|
||||
self.minButton.setMinimumSize(QSize(57, 40))
|
||||
self.minButton.setStyleSheet(u"QToolButton{ border-image:url(:/images/title_bar/open_black_min_button_57_40.png);}\n"
|
||||
"QToolButton:hover{ border-image:url(:/images/title_bar/green_min_button_hover_57_40.png);}\n"
|
||||
"QToolButton:pressed{ border-image:url(:/images/title_bar/black_min_button_pressed_57_40.png);}\n"
|
||||
self.minButton.setStyleSheet(u"QToolButton{ border-image:url(:/title_bar/open_black_min_button_57_40.png);}\n"
|
||||
"QToolButton:hover{ border-image:url(:/title_bar/green_min_button_hover_57_40.png);}\n"
|
||||
"QToolButton:pressed{ border-image:url(:/title_bar/black_min_button_pressed_57_40.png);}\n"
|
||||
"border: none; margin: 0px")
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.minButton)
|
||||
@ -58,12 +65,12 @@ class Ui_TitleBar(object):
|
||||
self.maxBt = QToolButton(TitleBar)
|
||||
self.maxBt.setObjectName(u"maxBt")
|
||||
self.maxBt.setMinimumSize(QSize(57, 40))
|
||||
self.maxBt.setStyleSheet(u"QToolButton[isMax=false]{ border-image:url(:/images/title_bar/open_black_max_button_57_40.png);}\n"
|
||||
"QToolButton:hover[isMax=false]{ border-image:url(:/images/title_bar/green_max_button_hover_57_40.png);}\n"
|
||||
"QToolButton:pressed[isMax=false]{ border-image:url(:/images/title_bar/black_max_button_pressed_57_40.png);}\n"
|
||||
"QToolButton[isMax=true]{ border-image:url(:/images/title_bar/black_down_button_57_40.png);}\n"
|
||||
"QToolButton:hover[isMax=true]{ border-image:url(:/images/title_bar/green_down_button_hover_57_40.png);}\n"
|
||||
"QToolButton:pressed[isMax=true]{ border-image:url(:/images/title_bar/down_button_pressed_57_40.png);}\n"
|
||||
self.maxBt.setStyleSheet(u"QToolButton[isMax=false]{ border-image:url(:/title_bar/open_black_max_button_57_40.png);}\n"
|
||||
"QToolButton:hover[isMax=false]{ border-image:url(:/title_bar/green_max_button_hover_57_40.png);}\n"
|
||||
"QToolButton:pressed[isMax=false]{ border-image:url(:/title_bar/black_max_button_pressed_57_40.png);}\n"
|
||||
"QToolButton[isMax=true]{ border-image:url(:/title_bar/black_down_button_57_40.png);}\n"
|
||||
"QToolButton:hover[isMax=true]{ border-image:url(:/title_bar/green_down_button_hover_57_40.png);}\n"
|
||||
"QToolButton:pressed[isMax=true]{ border-image:url(:/title_bar/down_button_pressed_57_40.png);}\n"
|
||||
"border: none;\n"
|
||||
"margin: 0px")
|
||||
self.maxBt.setProperty("isMax", False)
|
||||
@ -73,9 +80,9 @@ class Ui_TitleBar(object):
|
||||
self.closeButton = QToolButton(TitleBar)
|
||||
self.closeButton.setObjectName(u"closeButton")
|
||||
self.closeButton.setMinimumSize(QSize(57, 40))
|
||||
self.closeButton.setStyleSheet(u"QToolButton{ border-image:url(:/images/title_bar/open_black_close_button_57_40.png);}\n"
|
||||
"QToolButton:hover{ border-image:url(:/images/title_bar/close_button_hover_57_40.png);}\n"
|
||||
"QToolButton:pressed{ border-image:url(:/images/title_bar/close_button_pressed_57_40.png);}\n"
|
||||
self.closeButton.setStyleSheet(u"QToolButton{ border-image:url(:/title_bar/open_black_close_button_57_40.png);}\n"
|
||||
"QToolButton:hover{ border-image:url(:/title_bar/close_button_hover_57_40.png);}\n"
|
||||
"QToolButton:pressed{ border-image:url(:/title_bar/close_button_pressed_57_40.png);}\n"
|
||||
"border: none; margin: 0px")
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.closeButton)
|
||||
@ -88,7 +95,7 @@ class Ui_TitleBar(object):
|
||||
|
||||
def retranslateUi(self, TitleBar):
|
||||
TitleBar.setWindowTitle(QCoreApplication.translate("TitleBar", u"Form", None))
|
||||
self.menuButton.setText("")
|
||||
self.label_2.setText("")
|
||||
self.label.setText(QCoreApplication.translate("TitleBar", u"PicACG", None))
|
||||
self.minButton.setText("")
|
||||
self.maxBt.setText("")
|
||||
|
@ -1,5 +1,7 @@
|
||||
import weakref
|
||||
|
||||
from PySide6.QtCore import QFile
|
||||
|
||||
from component.label.msg_label import MsgLabel
|
||||
from tools.singleton import Singleton
|
||||
|
||||
@ -86,6 +88,13 @@ class QtOwner(Singleton):
|
||||
def searchView(self):
|
||||
return self.owner.searchView
|
||||
|
||||
def GetFileData(self, fileName):
|
||||
f = QFile(fileName)
|
||||
f.open(QFile.ReadOnly)
|
||||
data = f.readAll()
|
||||
f.close()
|
||||
return bytes(data)
|
||||
|
||||
def OpenComment(self, bookId):
|
||||
arg = {"bookId": bookId}
|
||||
self.owner.SwitchWidget(self.owner.commentView, **arg)
|
||||
@ -94,6 +103,14 @@ class QtOwner(Singleton):
|
||||
arg = {"bookId": commentId}
|
||||
self.owner.SwitchWidget(self.owner.gameCommentView, **arg)
|
||||
|
||||
def OpenRank(self):
|
||||
arg = {"refresh": True}
|
||||
self.owner.SwitchWidget(self.owner.rankView, **arg)
|
||||
|
||||
def OpenIndex(self):
|
||||
arg = {"refresh": True}
|
||||
self.owner.SwitchWidget(self.owner.indexView, **arg)
|
||||
|
||||
def OpenSubComment(self, commentId, widget):
|
||||
# self.owner.subCommentView.SetOpenEvent(commentId, widget)
|
||||
arg = {"bookId": commentId}
|
||||
@ -104,6 +121,10 @@ class QtOwner(Singleton):
|
||||
arg = {"text": text, "isLocal": isLocal, "isTitle": isTitle, "isDes": isDes, "isCategory": isCategory, "isTag":isTag, "isAuthor":isAuthor}
|
||||
self.owner.SwitchWidget(self.owner.searchView, **arg)
|
||||
|
||||
def OpenSearchByText(self, text):
|
||||
self.owner.searchView.lineEdit.setText(text)
|
||||
self.owner.searchView.lineEdit.Search()
|
||||
|
||||
def OpenReadView(self, bookId, index, name, pageIndex):
|
||||
self.owner.totalStackWidget.setCurrentIndex(1)
|
||||
self.owner.readView.OpenPage(bookId, index, name, pageIndex=pageIndex)
|
||||
|
@ -3,4 +3,5 @@ websocket-client==0.59.0
|
||||
requests==2.26.0
|
||||
urllib3==1.25.11
|
||||
pillow==8.3.2
|
||||
waifu2x-vulkan>=1.0.9
|
||||
waifu2x-vulkan>=1.0.9
|
||||
# pywin32==302
|
@ -77,33 +77,41 @@ class Server(Singleton):
|
||||
|
||||
for i in range(self.threadNum):
|
||||
thread = threading.Thread(target=self.Run)
|
||||
thread.setName("HTTP-"+str(i))
|
||||
thread.setDaemon(True)
|
||||
thread.start()
|
||||
|
||||
for i in range(self.downloadNum):
|
||||
thread = threading.Thread(target=self.RunDownload)
|
||||
thread.setName("Download-" + str(i))
|
||||
thread.setDaemon(True)
|
||||
thread.start()
|
||||
|
||||
def Run(self):
|
||||
while True:
|
||||
try:
|
||||
task = self._inQueue.get(True)
|
||||
except Exception as es:
|
||||
continue
|
||||
pass
|
||||
task = self._inQueue.get(True)
|
||||
self._inQueue.task_done()
|
||||
try:
|
||||
if task == "":
|
||||
break
|
||||
self._Send(task)
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
pass
|
||||
|
||||
def Stop(self):
|
||||
for i in range(self.threadNum):
|
||||
self._inQueue.put("")
|
||||
for i in range(self.downloadNum):
|
||||
self._downloadQueue.put("")
|
||||
|
||||
def RunDownload(self):
|
||||
while True:
|
||||
task = self._downloadQueue.get(True)
|
||||
self._downloadQueue.task_done()
|
||||
try:
|
||||
if task == "":
|
||||
break
|
||||
self._Download(task)
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
|
@ -61,6 +61,7 @@ class SqlServer(Singleton):
|
||||
for i in self.DbInfos.keys():
|
||||
self._inQueue[i] = Queue()
|
||||
thread = threading.Thread(target=self._Run, args=(i, ))
|
||||
thread.setName("DB-"+str(i))
|
||||
# thread.setDaemon(True)
|
||||
thread.start()
|
||||
|
||||
|
@ -72,5 +72,6 @@ if __name__ == "__main__":
|
||||
main.Close()
|
||||
if config.CanWaifu2x:
|
||||
waifu2x_vulkan.stop()
|
||||
time.sleep(1)
|
||||
time.sleep(2)
|
||||
print(sts)
|
||||
sys.exit(sts) # 运行程序
|
||||
|
@ -122,12 +122,17 @@ class TaskBase(Singleton):
|
||||
|
||||
def __init__(self):
|
||||
Singleton.__init__(self)
|
||||
self.thread = threading.Thread(target=self.Run)
|
||||
self.thread.setDaemon(True)
|
||||
self._inQueue = Queue()
|
||||
self.thread = threading.Thread(target=self.Run)
|
||||
self.thread.setName("Task-" + str(self.__class__.__name__))
|
||||
self.thread.setDaemon(True)
|
||||
self.tasks = {}
|
||||
self.flagToIds = {}
|
||||
|
||||
def Stop(self):
|
||||
self._inQueue.put("")
|
||||
return
|
||||
|
||||
def Run(self):
|
||||
return
|
||||
|
||||
|
@ -16,7 +16,10 @@ class TaskQImage(TaskBase):
|
||||
def Run(self):
|
||||
while True:
|
||||
try:
|
||||
taskId, data = self._inQueue.get(True)
|
||||
v = self._inQueue.get(True)
|
||||
if v == "":
|
||||
break
|
||||
taskId, data = v
|
||||
except Exception as es:
|
||||
continue
|
||||
self._inQueue.task_done()
|
||||
|
@ -19,14 +19,19 @@ class TaskWaifu2x(TaskBase):
|
||||
self.thread.start()
|
||||
|
||||
self.thread2 = threading.Thread(target=self.RunLoad2)
|
||||
self.thread2.setName("Task-" + str("Waifu2x"))
|
||||
self.thread2.setDaemon(True)
|
||||
|
||||
def Start(self):
|
||||
self.thread2.start()
|
||||
return
|
||||
|
||||
def Run(self):
|
||||
while True:
|
||||
try:
|
||||
taskId = self._inQueue.get(True)
|
||||
if taskId < 0:
|
||||
self._inQueue.task_done()
|
||||
if taskId == "":
|
||||
break
|
||||
|
||||
if taskId not in self.tasks:
|
||||
@ -68,10 +73,11 @@ class TaskWaifu2x(TaskBase):
|
||||
while True:
|
||||
info = self.LoadData()
|
||||
if not info:
|
||||
continue
|
||||
break
|
||||
t1 = CTime()
|
||||
data, convertId, taskId, tick = info
|
||||
if taskId not in self.tasks:
|
||||
info = self.tasks.get(taskId)
|
||||
if not info:
|
||||
continue
|
||||
if not data:
|
||||
lenData = 0
|
||||
@ -81,7 +87,6 @@ class TaskWaifu2x(TaskBase):
|
||||
Log.Warn("convert suc, taskId: {}, dataLen:{}, sts:{} tick:{}".format(str(taskId), lenData,
|
||||
str(convertId),
|
||||
str(tick)))
|
||||
info = self.tasks[taskId]
|
||||
assert isinstance(info, QtDownloadTask)
|
||||
info.saveData = data
|
||||
info.tick = tick
|
||||
|
@ -162,6 +162,10 @@ class Str:
|
||||
DailyUpdated = 109 # 今日已更新
|
||||
HaveUpdate = 110 # 有更新
|
||||
AlreadyUpdate = 111 # 已是最新
|
||||
AgoUpdate = 112 # 最近更新
|
||||
LeaveMsg = 113 # 留言板
|
||||
Rank = 114 # 排行榜
|
||||
RandomBook = 115 # 随机本子
|
||||
|
||||
@classmethod
|
||||
def Reload(cls):
|
||||
@ -310,7 +314,29 @@ class Str:
|
||||
cls.strDict[cls.DailyUpdated] = cls.obj.tr("今日已更新")
|
||||
cls.strDict[cls.HaveUpdate] = cls.obj.tr("有更新")
|
||||
cls.strDict[cls.AlreadyUpdate] = cls.obj.tr("已是最新")
|
||||
cls.strDict[cls.AgoUpdate] = cls.obj.tr("最近更新")
|
||||
cls.strDict[cls.LeaveMsg] = cls.obj.tr("留言板")
|
||||
cls.strDict[cls.Rank] = cls.obj.tr("排行版")
|
||||
cls.strDict[cls.RandomBook] = cls.obj.tr("随机本子")
|
||||
|
||||
@classmethod
|
||||
def GetStr(cls, enumType):
|
||||
return cls.strDict.get(enumType, "")
|
||||
return cls.strDict.get(enumType, "")
|
||||
|
||||
@classmethod
|
||||
def CheckStr(cls):
|
||||
allEnum = set()
|
||||
for name in dir(cls):
|
||||
value = getattr(cls, name)
|
||||
if not isinstance(value, int):
|
||||
continue
|
||||
if value in allEnum:
|
||||
raise Exception("Already exists str: " + name)
|
||||
allEnum.add(value)
|
||||
if value not in cls.strDict:
|
||||
raise Exception("Not Found str: " + name)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Str.Reload()
|
||||
Str.CheckStr()
|
@ -1,4 +1,5 @@
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6.QtCore import QFile
|
||||
from PySide6.QtWidgets import QListWidgetItem
|
||||
|
||||
from interface.ui_category import Ui_Category
|
||||
@ -30,6 +31,8 @@ class CategoryView(QtWidgets.QWidget, Ui_Category, QtTaskBase):
|
||||
st = raw["st"]
|
||||
if st == Status.Ok:
|
||||
self.bookList.clear()
|
||||
if len(CateGoryMgr().idToCateGoryBase) > 0:
|
||||
self.AddStaticCategory()
|
||||
for index, info in enumerate(CateGoryMgr().idToCateGoryBase):
|
||||
self.bookList.AddBookItem(info.id, info.title, info.thumb.get("fileServer"), info.thumb.get("path"))
|
||||
# QtOwner().owner.searchForm.InitCheckBox()
|
||||
@ -37,8 +40,27 @@ class CategoryView(QtWidgets.QWidget, Ui_Category, QtTaskBase):
|
||||
QtOwner().ShowError(Str.GetStr(st))
|
||||
return
|
||||
|
||||
def AddStaticCategory(self):
|
||||
self.bookList.AddBookItem("1", Str.GetStr(Str.Rank), "", "")
|
||||
self.bookList.LoadingPictureComplete(QtOwner().GetFileData(":/png/icon/cat_leaderboard.jpg"), Status.Ok, 0)
|
||||
self.bookList.AddBookItem("2", Str.GetStr(Str.LeaveMsg), "", "")
|
||||
self.bookList.LoadingPictureComplete(QtOwner().GetFileData(":/png/icon/cat_forum.jpg"), Status.Ok, 1)
|
||||
self.bookList.AddBookItem("3", Str.GetStr(Str.AgoUpdate), "", "")
|
||||
self.bookList.LoadingPictureComplete(QtOwner().GetFileData(":/png/icon/cat_latest.jpg"), Status.Ok, 2)
|
||||
self.bookList.AddBookItem("4", Str.GetStr(Str.RandomBook), "", "")
|
||||
self.bookList.LoadingPictureComplete(QtOwner().GetFileData(":/png/icon/cat_random.jpg"), Status.Ok, 3)
|
||||
|
||||
def SelectItem(self, item):
|
||||
assert isinstance(item, QListWidgetItem)
|
||||
widget = self.bookList.itemWidget(item)
|
||||
QtOwner().OpenSearchByCategory(widget.nameLable.text())
|
||||
if widget.id == "1":
|
||||
QtOwner().OpenRank()
|
||||
elif widget.id == "2":
|
||||
QtOwner().OpenComment("5822a6e3ad7ede654696e482")
|
||||
elif widget.id == "3":
|
||||
QtOwner().OpenSearchByText("")
|
||||
elif widget.id == "4":
|
||||
QtOwner().OpenIndex()
|
||||
else:
|
||||
QtOwner().OpenSearchByCategory(widget.nameLable.text())
|
||||
return
|
||||
|
@ -106,6 +106,9 @@ class ChatRoomWidget(QWidget, Ui_ChatRoom, QtTaskBase):
|
||||
self.resize(desktop.width() // 4 * 1, desktop.height() // 4 * 3)
|
||||
self.move(desktop.width() // 2, desktop.height() // 8)
|
||||
|
||||
def Stop(self):
|
||||
self.socket.Stop()
|
||||
|
||||
def CheckAction1(self):
|
||||
self.action2.setChecked(not self.action1.isChecked())
|
||||
Setting.ChatSendAction.SetValue(1)
|
||||
@ -145,7 +148,7 @@ class ChatRoomWidget(QWidget, Ui_ChatRoom, QtTaskBase):
|
||||
return super(self.__class__, self).keyPressEvent(event)
|
||||
|
||||
def closeEvent(self, event) -> None:
|
||||
self.socket.Stop()
|
||||
self.socket.Close()
|
||||
return super(self.__class__, self).closeEvent(event)
|
||||
|
||||
def GetName(self):
|
||||
|
@ -19,6 +19,9 @@ class ChatView(QWidget, Ui_Chat, QtTaskBase):
|
||||
self.listWidget.itemClicked.connect(self.OpenChatRoom)
|
||||
self.chatRoom = ChatRoomWidget()
|
||||
|
||||
def Stop(self):
|
||||
self.chatRoom.Stop()
|
||||
|
||||
def SwitchCurrent(self, **kwargs):
|
||||
if self.listWidget.count() > 0:
|
||||
return
|
||||
|
@ -13,25 +13,28 @@ class ChatWebSocket:
|
||||
def __init__(self, parent):
|
||||
self._parent = weakref.ref(parent)
|
||||
self.ws = None
|
||||
self._inQueue = Queue()
|
||||
self.sendThread = threading.Thread(target=self.SendDataRun)
|
||||
self.sendThread.setName("ChatSendThread")
|
||||
self.sendThread.setDaemon(True)
|
||||
self.sendThread.start()
|
||||
self._inQueue = Queue()
|
||||
pass
|
||||
|
||||
@property
|
||||
def parent(self):
|
||||
return self._parent()
|
||||
|
||||
def Stop(self):
|
||||
self._inQueue.put("")
|
||||
return
|
||||
|
||||
def SendDataRun(self):
|
||||
while True:
|
||||
try:
|
||||
task = self._inQueue.get(True)
|
||||
except Exception as es:
|
||||
continue
|
||||
pass
|
||||
task = self._inQueue.get(True)
|
||||
self._inQueue.task_done()
|
||||
try:
|
||||
if task == "":
|
||||
break
|
||||
self._SendData(task)
|
||||
except Exception as es:
|
||||
Log.Error(es)
|
||||
@ -102,7 +105,7 @@ class ChatWebSocket:
|
||||
thread.setDaemon(True)
|
||||
thread.start()
|
||||
|
||||
def Stop(self):
|
||||
def Close(self):
|
||||
if self.ws:
|
||||
self.ws.close()
|
||||
self.ws = None
|
||||
|
@ -121,9 +121,11 @@ class DownloadView(QtWidgets.QWidget, Ui_Download):
|
||||
def UpdateTable(self):
|
||||
for task in self.downloadingList:
|
||||
assert isinstance(task, DownloadInfo)
|
||||
self.UpdateTableItem(task)
|
||||
if task.status != task.Downloading:
|
||||
continue
|
||||
task.speedStr = ToolUtil.GetDownloadSize(task.speed) + "/s"
|
||||
task.speed = 0
|
||||
self.UpdateTableItem(task)
|
||||
|
||||
def AddDownload(self, bookId, downloadIds):
|
||||
if bookId not in self.downloadDict:
|
||||
@ -206,9 +208,11 @@ class DownloadView(QtWidgets.QWidget, Ui_Download):
|
||||
|
||||
def UpdateTableItem(self, info):
|
||||
assert isinstance(info, DownloadInfo)
|
||||
|
||||
self.tableWidget.setItem(info.tableRow, 0, QTableWidgetItem(info.bookId))
|
||||
self.tableWidget.setItem(info.tableRow, 1, QTableWidgetItem(info.title))
|
||||
item = QTableWidgetItem(info.title)
|
||||
item.setToolTip(info.title)
|
||||
self.tableWidget.setItem(info.tableRow, 1, item)
|
||||
|
||||
self.tableWidget.setItem(info.tableRow, 2, QTableWidgetItem(Str.GetStr(info.status)))
|
||||
self.tableWidget.setItem(info.tableRow, 3,
|
||||
QTableWidgetItem("{}/{}".format(str(info.curDownloadPic), str(info.maxDownloadPic))))
|
||||
|
@ -43,6 +43,7 @@ class HelpView(QWidget, Ui_Help, QtTaskBase):
|
||||
def retranslateUi(self, Help):
|
||||
Ui_Help.retranslateUi(self, Help)
|
||||
self.version.setText(config.RealVersion)
|
||||
self.waifu2x.setText(config.Waifu2xVersion)
|
||||
|
||||
def Init(self):
|
||||
self.CheckDb()
|
||||
|
@ -1,33 +1,31 @@
|
||||
import sys
|
||||
from functools import partial
|
||||
|
||||
from PySide6.QtCore import Qt, QUrl, QEvent, QPoint
|
||||
from PySide6.QtGui import QIcon, QMouseEvent, QGuiApplication, QDesktopServices, QPalette
|
||||
from PySide6.QtWidgets import QButtonGroup, QToolButton, QLabel, QMainWindow, QMessageBox, QApplication
|
||||
from PySide6.QtCore import Qt, QEvent, QPoint
|
||||
from PySide6.QtGui import QIcon, QMouseEvent, QGuiApplication
|
||||
from PySide6.QtWidgets import QButtonGroup, QToolButton, QLabel, QMainWindow, QApplication
|
||||
|
||||
from component.dialog.loading_dialog import LoadingDialog
|
||||
from component.label.msg_label import MsgLabel
|
||||
from component.widget.frame_less_widget import FrameLessWidget
|
||||
from component.widget.main_widget import Main
|
||||
from config import config
|
||||
from config.setting import Setting
|
||||
from interface.ui_main_windows import Ui_MainWindow
|
||||
from qt_owner import QtOwner
|
||||
from server import req
|
||||
from server.server import Server
|
||||
from server.sql_server import SqlServer
|
||||
from task.qt_task import QtTaskBase
|
||||
from task.task_qimage import TaskQImage
|
||||
from task.task_waifu2x import TaskWaifu2x
|
||||
from tools.log import Log
|
||||
from tools.str import Str
|
||||
from view.download.download_dir_view import DownloadDirView
|
||||
|
||||
|
||||
class MainView(QMainWindow, Ui_MainWindow, QtTaskBase):
|
||||
class MainView(Main, QtTaskBase):
|
||||
""" 主窗口 """
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
QtTaskBase.__init__(self)
|
||||
def __init__(self):
|
||||
QtOwner().SetOwner(self)
|
||||
self.setupUi(self)
|
||||
Main.__init__(self)
|
||||
QtTaskBase.__init__(self)
|
||||
self.resize(600, 600)
|
||||
self.setWindowTitle("PicACG")
|
||||
self.setWindowIcon(QIcon(":/png/icon/logo_round.png"))
|
||||
@ -44,7 +42,7 @@ class MainView(QMainWindow, Ui_MainWindow, QtTaskBase):
|
||||
self.resize(desktop.width() // 4 * 3, desktop.height() // 4 * 3)
|
||||
self.move(self.width() // 8+desktop.x(), max(0, desktop.height()-self.height()) // 2+desktop.y())
|
||||
print(desktop.size(), self.size())
|
||||
# self.setAttribute(Qt.WA_StyledBackground, True)
|
||||
self.setAttribute(Qt.WA_StyledBackground, True)
|
||||
|
||||
self.loadingDialog = LoadingDialog(self)
|
||||
self.__initWidget()
|
||||
@ -60,7 +58,28 @@ class MainView(QMainWindow, Ui_MainWindow, QtTaskBase):
|
||||
self.subStackWidget.setCurrentIndex(0)
|
||||
self.settingView.LoadSetting()
|
||||
# self.readView.LoadSetting()
|
||||
# QApplication.instance().installEventFilter(self)
|
||||
# QtOwner().app.paletteChanged.connect(self.CheckPaletteChanged)
|
||||
|
||||
# def eventFilter(self, watched, event) -> bool:
|
||||
# if watched == QtOwner().app:
|
||||
# print(event.type(), event)
|
||||
# return False
|
||||
|
||||
# def event(self, ev):
|
||||
# """Catch system events."""
|
||||
# # print(ev)
|
||||
# if ev.type() == QEvent.ApplicationPaletteChange: # detect theme switches
|
||||
# pass
|
||||
# # style = interface_style() # light or dark
|
||||
# # if style is not None:
|
||||
# # QIcon.setThemeName(style)
|
||||
# # else:
|
||||
# # QIcon.setThemeName("light") # fallback
|
||||
# return super().event(ev)
|
||||
#
|
||||
# def CheckPaletteChanged(self, data):
|
||||
# print(data)
|
||||
|
||||
@property
|
||||
def subStackList(self):
|
||||
@ -86,7 +105,7 @@ class MainView(QMainWindow, Ui_MainWindow, QtTaskBase):
|
||||
self.navigationWidget.helpButton.clicked.connect(partial(self.SwitchWidgetAndClear, self.subStackWidget.indexOf(self.helpView)))
|
||||
|
||||
def RetranslateUi(self):
|
||||
Ui_MainWindow.retranslateUi(self, self)
|
||||
Main.retranslateUi(self, self)
|
||||
self.indexView.retranslateUi(self.indexView)
|
||||
self.settingView.retranslateUi(self.settingView)
|
||||
self.downloadView.retranslateUi(self.downloadView)
|
||||
@ -125,8 +144,12 @@ class MainView(QMainWindow, Ui_MainWindow, QtTaskBase):
|
||||
# config.Encode = 0
|
||||
|
||||
sts = waifu2x_vulkan.initSet(config.Encode, Setting.Waifu2xThread.value)
|
||||
TaskWaifu2x().Start()
|
||||
version = waifu2x_vulkan.getVersion()
|
||||
config.Waifu2xVersion = version
|
||||
self.helpView.waifu2x.setText(config.Waifu2xVersion)
|
||||
Log.Info("waifu2x初始化: " + str(stat) + " encode: " + str(
|
||||
config.Encode) + " version:" + waifu2x_vulkan.getVersion() + " code:" + str(sts))
|
||||
config.Encode) + " version:" + version + " code:" + str(sts))
|
||||
else:
|
||||
pass
|
||||
# QtOwner().ShowError(self.tr("waifu2x无法启用, ") + config.ErrorMsg)
|
||||
@ -249,6 +272,10 @@ class MainView(QMainWindow, Ui_MainWindow, QtTaskBase):
|
||||
# self.adjustWidgetGeometry()
|
||||
|
||||
def closeEvent(self, a0) -> None:
|
||||
if self.totalStackWidget.currentIndex() == 1:
|
||||
self.totalStackWidget.setCurrentIndex(0)
|
||||
a0.ignore()
|
||||
return
|
||||
super().closeEvent(a0)
|
||||
# reply = QtOwner().ShowMsgBox(QMessageBox.Question, self.tr('提示'), self.tr('确定要退出吗?'))
|
||||
self.GetExitScreen()
|
||||
@ -310,7 +337,7 @@ class MainView(QMainWindow, Ui_MainWindow, QtTaskBase):
|
||||
|
||||
msg = ctypes.wintypes.MSG.from_address(message.__int__())
|
||||
# print(msg.message, self.GetWinSysColor())
|
||||
if msg.message == 26 and config.ThemeIndex == 0:
|
||||
if msg.message == 26 and Setting.ThemeIndex.value == 0:
|
||||
self.settingView.SetTheme()
|
||||
|
||||
return super(self.__class__, self).nativeEvent(eventType, message)
|
||||
@ -319,6 +346,10 @@ class MainView(QMainWindow, Ui_MainWindow, QtTaskBase):
|
||||
# TODO 停止所有的定时器以及线程
|
||||
self.loadingDialog.close()
|
||||
self.downloadView.Close()
|
||||
self.chatView.Stop()
|
||||
TaskWaifu2x().Stop()
|
||||
TaskQImage().Stop()
|
||||
Server().Stop()
|
||||
SqlServer().Stop()
|
||||
# QtTask().Stop()
|
||||
|
||||
|
@ -10,6 +10,7 @@ from component.scroll.read_scroll import ReadScroll
|
||||
from component.scroll.smooth_scroll import SmoothScroll
|
||||
from config import config
|
||||
from qt_owner import QtOwner
|
||||
from src.config.setting import Setting
|
||||
from tools.str import Str
|
||||
from view.read.read_enum import ReadMode, QtFileData
|
||||
from view.read.read_pool import QtReadImgPoolManager
|
||||
@ -41,20 +42,21 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
self.changeScale.connect(self.ChangeScale)
|
||||
|
||||
# self.setInteractive(False)
|
||||
self.setTransformationAnchor(self.AnchorUnderMouse)
|
||||
self.setResizeAnchor(self.AnchorUnderMouse)
|
||||
self.setTransformationAnchor(self.NoAnchor)
|
||||
self.setResizeAnchor(self.NoAnchor)
|
||||
self.setDragMode(self.NoDrag)
|
||||
self.setFrameStyle(QFrame.NoFrame)
|
||||
self.setObjectName("graphicsView")
|
||||
# self.graphicsView.setBackgroundBrush(QColor(Qt.white))
|
||||
# self.graphicsView.setCursor(Qt.OpenHandCursor)
|
||||
self.setResizeAnchor(self.AnchorViewCenter)
|
||||
self.setTransformationAnchor(self.AnchorViewCenter)
|
||||
|
||||
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.setRenderHints(QPainter.Antialiasing | QPainter.SmoothPixmapTransform)
|
||||
self.setCacheMode(QGraphicsView.CacheBackground)
|
||||
self.setViewportUpdateMode(QGraphicsView.SmartViewportUpdate)
|
||||
# self.setCacheMode(QGraphicsView.CacheNone)
|
||||
self.setViewportUpdateMode(QGraphicsView.FullViewportUpdate)
|
||||
# self.setViewportUpdateMode(QGraphicsView.SmartViewportUpdate)
|
||||
|
||||
# self.graphicsGroup = QGraphicsItemGroup()
|
||||
# self.graphicsGroup.setFlag(QGraphicsItem.ItemIsFocusable)
|
||||
@ -64,8 +66,8 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
# self.graphicsScene.addItem(self.graphicsGroup)
|
||||
self.graphicsItem1 = QGraphicsPixmapItem()
|
||||
self.graphicsItem2 = QGraphicsPixmapItem()
|
||||
self.graphicsItem1.setFlag(QGraphicsItem.ItemIsFocusable)
|
||||
self.graphicsItem2.setFlag(QGraphicsItem.ItemIsFocusable)
|
||||
# self.graphicsItem1.setFlag(QGraphicsItem.ItemIsFocusable)
|
||||
# self.graphicsItem2.setFlag(QGraphicsItem.ItemIsFocusable)
|
||||
|
||||
self.setMinimumSize(10, 10)
|
||||
self.graphicsScene.installEventFilter(self)
|
||||
@ -119,7 +121,7 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
@property
|
||||
def scaleCnt(self):
|
||||
return self.readImg.frame.scaleCnt
|
||||
|
||||
|
||||
def radioWidth(self):
|
||||
return int(self.devicePixelRatioF()*self.width())
|
||||
|
||||
@ -393,16 +395,21 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
if maxNum <= 0:
|
||||
return
|
||||
if self.initReadMode == ReadMode.RightLeftScroll:
|
||||
self.graphicsScene.setSceneRect(0, 0, self.labelSize.get(0), self.height())
|
||||
self.GetScrollBar().setMaximum(self.labelSize.get(0))
|
||||
maxSize = max(self.width(), self.labelSize.get(-1, 0) - self.width()) + 50
|
||||
|
||||
self.graphicsScene.setSceneRect(0, 0, maxSize, self.height())
|
||||
self.GetScrollBar().setMaximum(maxSize)
|
||||
self.GetOtherScrollBar().setMaximum(0)
|
||||
elif self.initReadMode in [ReadMode.LeftRightScroll]:
|
||||
self.graphicsScene.setSceneRect(0, 0, self.labelSize.get(maxNum - 1), self.height())
|
||||
self.GetScrollBar().setMaximum(self.labelSize.get(maxNum - 1, 0))
|
||||
maxSize = max(self.width(), self.labelSize.get(maxNum, 0) - self.width()) + 50
|
||||
|
||||
self.graphicsScene.setSceneRect(0, 0, maxSize, self.height())
|
||||
self.GetScrollBar().setMaximum(maxSize)
|
||||
self.GetOtherScrollBar().setMaximum(0)
|
||||
elif self.initReadMode in [ReadMode.UpDown]:
|
||||
self.graphicsScene.setSceneRect(0, 0, self.width(), self.labelSize.get(maxNum - 1))
|
||||
self.GetScrollBar().setMaximum(self.labelSize.get(maxNum - 1, 0))
|
||||
maxSize = max(self.height(), self.labelSize.get(maxNum, 0)-self.height()) + 50
|
||||
self.graphicsScene.setSceneRect(0, 0, self.width(), maxSize)
|
||||
self.GetScrollBar().setMaximum(maxSize)
|
||||
self.GetOtherScrollBar().setMaximum(0)
|
||||
else:
|
||||
self.graphicsScene.setSceneRect(0, 0, self.width(), max(self.height(), self.graphicsItem1.pixmap().height()//self.graphicsItem1.pixmap().devicePixelRatio()))
|
||||
@ -415,21 +422,27 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
height = 0
|
||||
if self.initReadMode != ReadMode.RightLeftScroll:
|
||||
labelIndex = list(range(0, size))
|
||||
labelIndex.append(size)
|
||||
else:
|
||||
labelIndex = list(range(size - 1, -1, -1))
|
||||
for i in labelIndex:
|
||||
proxy = self.allItems[i]
|
||||
self.labelSize[i] = height
|
||||
if self.initReadMode == ReadMode.UpDown:
|
||||
if isinstance(proxy, QGraphicsProxyWidget):
|
||||
height += proxy.widget().height()
|
||||
labelIndex.append(-1)
|
||||
if labelIndex:
|
||||
for lenSize, i in enumerate(labelIndex):
|
||||
self.labelSize[i] = height
|
||||
if lenSize == len(labelIndex)-1:
|
||||
continue
|
||||
|
||||
proxy = self.allItems[i]
|
||||
if self.initReadMode == ReadMode.UpDown:
|
||||
if isinstance(proxy, QGraphicsProxyWidget):
|
||||
height += proxy.widget().height()
|
||||
else:
|
||||
height += proxy.pixmap().height()//proxy.pixmap().devicePixelRatio()
|
||||
else:
|
||||
height += proxy.pixmap().height()//proxy.pixmap().devicePixelRatio()
|
||||
else:
|
||||
if isinstance(proxy, QGraphicsProxyWidget):
|
||||
height += proxy.widget().width()
|
||||
else:
|
||||
height += proxy.pixmap().width()//proxy.pixmap().devicePixelRatio()
|
||||
if isinstance(proxy, QGraphicsProxyWidget):
|
||||
height += proxy.widget().width()
|
||||
else:
|
||||
height += proxy.pixmap().width()//proxy.pixmap().devicePixelRatio()
|
||||
|
||||
self.ResetMaxNum()
|
||||
|
||||
@ -463,7 +476,7 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
p.fill(Qt.transparent)
|
||||
painter = QPainter(p)
|
||||
painter.setFont(font)
|
||||
if config.CurrentSetTheme == 1:
|
||||
if Setting.ThemeIndex.autoValue == 1:
|
||||
painter.setPen(Qt.white)
|
||||
else:
|
||||
painter.setPen(Qt.black)
|
||||
@ -519,6 +532,12 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
self.graphicsItem2.pixmap().height(), self.graphicsItem2.pixmap().width()
|
||||
return self.graphicsItem1.pixmap().height(), self.graphicsItem1.pixmap().width()
|
||||
|
||||
def ClearPixItem(self):
|
||||
self.SetPixIem(self.readImg.curIndex, None)
|
||||
if self.readImg.curIndex+1 < self.readImg.maxPic:
|
||||
self.SetPixIem(self.readImg.curIndex+1, None)
|
||||
return
|
||||
|
||||
def SetPixIem(self, index, data, isWaifu2x=False):
|
||||
if not self.allItems and self.readImg.stripModel in [ReadMode.UpDown, ReadMode.LeftRightScroll, ReadMode.RightLeftScroll]:
|
||||
return
|
||||
@ -563,6 +582,7 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
|
||||
if self.initReadMode == ReadMode.RightLeftScroll:
|
||||
indexList = list(range(index-1, -1, -1))
|
||||
indexList.append(-1)
|
||||
# TODO 需要重新定位
|
||||
curPixcurSize = self.labelSize.get(index)
|
||||
if curPixcurSize <= oldValue:
|
||||
@ -571,7 +591,7 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
|
||||
elif self.initReadMode in [ReadMode.LeftRightScroll, ReadMode.UpDown]:
|
||||
indexList = list(range(index+1, self.readImg.maxPic))
|
||||
|
||||
indexList.append(self.readImg.maxPic)
|
||||
curPixcurSize = self.labelSize.get(index)
|
||||
# TODO 需要重新定位
|
||||
if curPixcurSize <= oldValue:
|
||||
@ -582,10 +602,14 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
self.ResetMaxNum()
|
||||
return
|
||||
|
||||
for i in indexList:
|
||||
for lenSize, i in enumerate(indexList):
|
||||
|
||||
self.labelSize[i] += addHeight
|
||||
if lenSize == len(indexList) - 1:
|
||||
continue
|
||||
|
||||
proxy = self.allItems[i]
|
||||
oldPos = proxy.pos()
|
||||
|
||||
if self.initReadMode == ReadMode.UpDown:
|
||||
if isinstance(proxy, QGraphicsPixmapItem):
|
||||
radio = proxy.pixmap().devicePixelRatio()
|
||||
@ -598,7 +622,6 @@ class ReadGraphicsView(QGraphicsView, SmoothScroll):
|
||||
proxy.setPos(oldPos.x() + addHeight, max(0, self.height()//2 - proxy.pixmap().height()//radio//2))
|
||||
else:
|
||||
proxy.setPos(oldPos.x() + addHeight, oldPos.y())
|
||||
self.labelSize[i] += addHeight
|
||||
|
||||
self.ResetMaxNum()
|
||||
return
|
||||
|
@ -111,11 +111,12 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
|
||||
action = menu3.addAction(Str.GetStr(Str.NextChapter))
|
||||
action.triggered.connect(self.qtTool.OpenNextEps)
|
||||
|
||||
action = popMenu.addAction(Str.GetStr(Str.AutoScroll))
|
||||
action.triggered.connect(self.qtTool.SwitchScrollAndTurn)
|
||||
|
||||
action = popMenu.addAction(Str.GetStr(Str.Exit))
|
||||
action.triggered.connect(self.Close)
|
||||
|
||||
action = popMenu.addAction(Str.GetStr(Str.AutoScroll))
|
||||
action.triggered.connect(self.qtTool.SwitchScrollAndTurn)
|
||||
if self.qtTool.IsStartScrollAndTurn():
|
||||
action.setCheckable(True)
|
||||
action.setChecked(True)
|
||||
@ -129,6 +130,7 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
|
||||
|
||||
def Close(self):
|
||||
self.ReturnPage()
|
||||
self.frame.scrollArea.ClearPixItem()
|
||||
self.Clear()
|
||||
if QtOwner().owner.windowState() == Qt.WindowFullScreen:
|
||||
QtOwner().owner.showNormal()
|
||||
@ -137,7 +139,6 @@ class ReadView(QtWidgets.QWidget, QtTaskBase):
|
||||
def Clear(self):
|
||||
Setting.TurnSpeed.SetValue(int(self.qtTool.turnSpeed.value() * 1000))
|
||||
Setting.ScrollSpeed.SetValue(int(self.qtTool.scrollSpeed.value()))
|
||||
|
||||
self.qtTool.UpdateText("")
|
||||
self.frame.UpdateProcessBar(None)
|
||||
self.qtTool.CloseScrollAndTurn()
|
||||
|
@ -55,6 +55,7 @@ class SearchView(QWidget, Ui_Search, QtTaskBase):
|
||||
self.categories = kwargs.get("categories", "")
|
||||
|
||||
if self.categories:
|
||||
self.isLocal = False
|
||||
self.lineEdit.setText(self.categories)
|
||||
self.bookList.clear()
|
||||
self.SetEnable(self.isLocal)
|
||||
@ -88,6 +89,7 @@ class SearchView(QWidget, Ui_Search, QtTaskBase):
|
||||
|
||||
def SendSearchCategories(self, page):
|
||||
sort = ["dd", "da", "ld", "vd"]
|
||||
QtOwner().ShowLoading()
|
||||
sortId = sort[self.comboBox.currentIndex()]
|
||||
self.AddHttpTask(req.CategoriesSearchReq(page, self.categories, sortId), self.SendSearchBack)
|
||||
|
||||
|
@ -63,6 +63,7 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
|
||||
# spinBox
|
||||
# self.preDownNum.valueChanged.connect(partial(self.SpinBoxEvent, "", self.preDownNum))
|
||||
self.coverSize.valueChanged.connect(partial(self.SpinBoxEvent, Setting.CoverSize))
|
||||
self.categorySize.valueChanged.connect(partial(self.SpinBoxEvent, Setting.CategorySize))
|
||||
self.readScale.valueChanged.connect(partial(self.SpinBoxEvent, Setting.LookScale))
|
||||
self.coverScale.valueChanged.connect(partial(self.SpinBoxEvent, Setting.CoverLookScale))
|
||||
self.downScale.valueChanged.connect(partial(self.SpinBoxEvent, Setting.DownloadScale))
|
||||
@ -169,6 +170,7 @@ class SettingView(QtWidgets.QWidget, Ui_SettingNew):
|
||||
self.SetRadioGroup("languageButton", Setting.Language.value)
|
||||
self.SetRadioGroup("mainScaleButton", Setting.ScaleLevel.value)
|
||||
self.coverSize.setValue(Setting.CoverSize.value)
|
||||
self.categorySize.setValue(Setting.CategorySize.value)
|
||||
self.SetRadioGroup("logutton", Setting.LogIndex.value)
|
||||
self.httpProxy.setChecked(Setting.IsHttpProxy.value)
|
||||
self.httpEdit.setText(Setting.HttpProxy.value)
|
||||
|
@ -67,7 +67,9 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
|
||||
# self.radioButton.installEventFilter(self)
|
||||
# self.radioButton_2.installEventFilter(self)
|
||||
self.graphicsView.installEventFilter(self)
|
||||
# self.graphicsItem.installSceneEventFilter(self.graphicsItem)
|
||||
# self.graphicsView.installEventFilter(self)
|
||||
self.graphicsScene.installEventFilter(self)
|
||||
self.graphicsView.setWindowFlag(Qt.FramelessWindowHint)
|
||||
# tta有BUG,暂时屏蔽 TODO
|
||||
self.ttaModel.setEnabled(False)
|
||||
@ -123,6 +125,7 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
weight, height = ToolUtil.GetPictureSize(data)
|
||||
self.resolutionLabel.setText(str(weight) + "x" + str(height))
|
||||
self.ScalePicture()
|
||||
self.CheckScaleRadio()
|
||||
|
||||
def ScalePicture(self):
|
||||
rect = QRectF(self.graphicsItem.pos(), QSizeF(
|
||||
@ -158,7 +161,8 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
|
||||
def keyReleaseEvent(self, ev):
|
||||
if ev.key() == Qt.Key_Escape:
|
||||
self.hide()
|
||||
# self.hide()
|
||||
ev.ignore()
|
||||
return
|
||||
if ev.key() == Qt.Key_Plus or ev.key() == Qt.Key_Equal:
|
||||
self.zoomIn()
|
||||
@ -174,7 +178,20 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
|
||||
def eventFilter(self, obj, ev):
|
||||
if ev.type() == QEvent.KeyPress:
|
||||
|
||||
return True
|
||||
elif ev.type() == QEvent.GraphicsSceneMousePress:
|
||||
if ev.button() == Qt.ForwardButton:
|
||||
return True
|
||||
elif ev.button() == Qt.BackButton:
|
||||
return True
|
||||
return False
|
||||
elif ev.type() == QEvent.GraphicsSceneMouseRelease:
|
||||
if ev.button() == Qt.ForwardButton:
|
||||
return True
|
||||
elif ev.button() == Qt.BackButton:
|
||||
return True
|
||||
return False
|
||||
else:
|
||||
return super(self.__class__, self).eventFilter(obj, ev)
|
||||
|
||||
@ -242,6 +259,7 @@ class Waifu2xToolView(QtWidgets.QWidget, Ui_Waifu2xTool, QtTaskBase):
|
||||
self.data = data
|
||||
self.waifu2xData = None
|
||||
self.ClearConvert()
|
||||
self.backStatus = ""
|
||||
self.ShowImg(data)
|
||||
except Exception as ex:
|
||||
Log.Error(ex)
|
||||
|
@ -58,3 +58,6 @@ class LoginView(BaseMaskDialog, Ui_Login, QtTaskBase):
|
||||
def _ClickButton(self):
|
||||
index = self.tabWidget.currentIndex()
|
||||
self.tabWidget.widget(index).ClickButton()
|
||||
|
||||
# def event(self, event) -> bool:
|
||||
# return BaseMaskDialog.event(event)
|
@ -13,7 +13,6 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
@ -36,13 +35,39 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>使用本地库</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignLeft">
|
||||
<widget class="SwitchButton" name="localWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SwitchButton" name="localWidget" native="true"/>
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
@ -50,13 +75,39 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="titleLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>标题</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SwitchButton" name="titleWidget" native="true"/>
|
||||
<widget class="SwitchButton" name="titleWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</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>
|
||||
@ -64,13 +115,39 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="desLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>描述</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignLeft">
|
||||
<widget class="SwitchButton" name="desWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SwitchButton" name="desWidget" native="true"/>
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
@ -78,13 +155,39 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="categoryLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>分类</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignLeft">
|
||||
<widget class="SwitchButton" name="categoryWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SwitchButton" name="categoryWidget" native="true"/>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<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>
|
||||
@ -92,13 +195,39 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="tagLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TAG</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignLeft">
|
||||
<widget class="SwitchButton" name="tagWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SwitchButton" name="tagWidget" native="true"/>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<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>
|
||||
@ -106,13 +235,39 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="authorLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>作者</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignLeft">
|
||||
<widget class="SwitchButton" name="authorWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SwitchButton" name="authorWidget" native="true"/>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<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>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1360</width>
|
||||
<height>78</height>
|
||||
<height>49</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -21,27 +21,43 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="menuButton">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item alignment="Qt::AlignHCenter|Qt::AlignBottom">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
<width>25</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton{ border-image:url(:/images/navigation_interface/GlobalNavButton.png);}
|
||||
QToolButton:hover{ border-image:url(:/images/navigation_interface/GlobalNavButton.png);}
|
||||
QToolButton:pressed{ border-image:url(:/images/navigation_interface/GlobalNavButton.png);}
|
||||
border: none; margin: 0px</string>
|
||||
<string notr="true">border-image: url(:/png/icon/logo_round.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -56,8 +72,24 @@ border: none; margin: 0px</string>
|
||||
<property name="text">
|
||||
<string>PicACG</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</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="QToolButton" name="minButton">
|
||||
<property name="minimumSize">
|
||||
@ -67,9 +99,9 @@ border: none; margin: 0px</string>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton{ border-image:url(:/images/title_bar/open_black_min_button_57_40.png);}
|
||||
QToolButton:hover{ border-image:url(:/images/title_bar/green_min_button_hover_57_40.png);}
|
||||
QToolButton:pressed{ border-image:url(:/images/title_bar/black_min_button_pressed_57_40.png);}
|
||||
<string notr="true">QToolButton{ border-image:url(:/title_bar/open_black_min_button_57_40.png);}
|
||||
QToolButton:hover{ border-image:url(:/title_bar/green_min_button_hover_57_40.png);}
|
||||
QToolButton:pressed{ border-image:url(:/title_bar/black_min_button_pressed_57_40.png);}
|
||||
border: none; margin: 0px</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -86,12 +118,12 @@ border: none; margin: 0px</string>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton[isMax=false]{ border-image:url(:/images/title_bar/open_black_max_button_57_40.png);}
|
||||
QToolButton:hover[isMax=false]{ border-image:url(:/images/title_bar/green_max_button_hover_57_40.png);}
|
||||
QToolButton:pressed[isMax=false]{ border-image:url(:/images/title_bar/black_max_button_pressed_57_40.png);}
|
||||
QToolButton[isMax=true]{ border-image:url(:/images/title_bar/black_down_button_57_40.png);}
|
||||
QToolButton:hover[isMax=true]{ border-image:url(:/images/title_bar/green_down_button_hover_57_40.png);}
|
||||
QToolButton:pressed[isMax=true]{ border-image:url(:/images/title_bar/down_button_pressed_57_40.png);}
|
||||
<string notr="true">QToolButton[isMax=false]{ border-image:url(:/title_bar/open_black_max_button_57_40.png);}
|
||||
QToolButton:hover[isMax=false]{ border-image:url(:/title_bar/green_max_button_hover_57_40.png);}
|
||||
QToolButton:pressed[isMax=false]{ border-image:url(:/title_bar/black_max_button_pressed_57_40.png);}
|
||||
QToolButton[isMax=true]{ border-image:url(:/title_bar/black_down_button_57_40.png);}
|
||||
QToolButton:hover[isMax=true]{ border-image:url(:/title_bar/green_down_button_hover_57_40.png);}
|
||||
QToolButton:pressed[isMax=true]{ border-image:url(:/title_bar/down_button_pressed_57_40.png);}
|
||||
border: none;
|
||||
margin: 0px</string>
|
||||
</property>
|
||||
@ -112,9 +144,9 @@ margin: 0px</string>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton{ border-image:url(:/images/title_bar/open_black_close_button_57_40.png);}
|
||||
QToolButton:hover{ border-image:url(:/images/title_bar/close_button_hover_57_40.png);}
|
||||
QToolButton:pressed{ border-image:url(:/images/title_bar/close_button_pressed_57_40.png);}
|
||||
<string notr="true">QToolButton{ border-image:url(:/title_bar/open_black_close_button_57_40.png);}
|
||||
QToolButton:hover{ border-image:url(:/title_bar/close_button_hover_57_40.png);}
|
||||
QToolButton:pressed{ border-image:url(:/title_bar/close_button_pressed_57_40.png);}
|
||||
border: none; margin: 0px</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -13,7 +13,6 @@
|
||||
<property name="windowTitle">
|
||||
<string>评论</string>
|
||||
</property>
|
||||
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="UserListWidget" name="listWidget"/>
|
||||
@ -28,6 +27,9 @@
|
||||
<property name="text">
|
||||
<string>回复</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Return</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
256
ui/ui_main.ui
Normal file
@ -0,0 +1,256 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Main</class>
|
||||
<widget class="QMainWindow" name="Main">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>PicACG</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="totalStackWidget">
|
||||
<widget class="QWidget" name="subMainWindow">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="NavigationWidget" name="navigationWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>240</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>280</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="menuLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="menuButton">
|
||||
<property name="text">
|
||||
<string>菜单</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="AnimationStackWidget" name="subStackWidget">
|
||||
<widget class="IndexView" name="indexView"/>
|
||||
<widget class="HelpView" name="helpView"/>
|
||||
<widget class="MyCommentView" name="myCommentView"/>
|
||||
<widget class="SettingView" name="settingView"/>
|
||||
<widget class="DownloadView" name="downloadView"/>
|
||||
<widget class="CategoryView" name="categoryView"/>
|
||||
<widget class="SearchView" name="searchView"/>
|
||||
<widget class="RankView" name="rankView"/>
|
||||
<widget class="CommentView" name="commentView"/>
|
||||
<widget class="SubCommentView" name="subCommentView"/>
|
||||
<widget class="ChatView" name="chatView"/>
|
||||
<widget class="FavoriteView" name="favorityView"/>
|
||||
<widget class="HistoryView" name="historyView"/>
|
||||
<widget class="BookInfoView" name="bookInfoView"/>
|
||||
<widget class="GameCommentView" name="gameCommentView"/>
|
||||
<widget class="GameInfoView" name="gameInfoView"/>
|
||||
<widget class="GameView" name="gameView"/>
|
||||
<widget class="Waifu2xToolView" name="waifu2xToolView"/>
|
||||
<widget class="BookEpsView" name="bookEpsView"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="ReadView" name="readView"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ReadView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.read.read_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>IndexView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.index.index_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SettingView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.setting.setting_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>DownloadView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.download.download_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>CategoryView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.category.category_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>NavigationWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">component.widget.navigation_widget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>AnimationStackWidget</class>
|
||||
<extends>QStackedWidget</extends>
|
||||
<header location="global">component.widget.animation_stack_widget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SearchView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.search.search_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RankView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.category.rank_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>CommentView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.comment.comment_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SubCommentView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.comment.sub_comment_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ChatView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.chat.chat_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>FavoriteView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.user.favorite_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>HistoryView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.user.history_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BookInfoView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>view.info.book_info_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>GameCommentView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.comment.game_comment_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Waifu2xToolView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.tool.waifu2x_tool_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>GameInfoView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.info.game_info_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>GameView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.game.game_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MyCommentView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.comment.my_comment_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BookEpsView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.info.book_eps_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>HelpView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">view.help.help_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,121 +1,138 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<class>MainWindows</class>
|
||||
<widget class="QWidget" name="MainWindows">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
<width>903</width>
|
||||
<height>489</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>PicACG</string>
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="totalStackWidget">
|
||||
<widget class="QWidget" name="subMainWindow">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="NavigationWidget" name="navigationWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>240</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>280</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="menuLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="menuButton">
|
||||
<property name="text">
|
||||
<string>菜单</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="AnimationStackWidget" name="subStackWidget">
|
||||
<widget class="IndexView" name="indexView"/>
|
||||
<widget class="HelpView" name="helpView"/>
|
||||
<widget class="MyCommentView" name="myCommentView"/>
|
||||
<widget class="SettingView" name="settingView"/>
|
||||
<widget class="DownloadView" name="downloadView"/>
|
||||
<widget class="CategoryView" name="categoryView"/>
|
||||
<widget class="SearchView" name="searchView"/>
|
||||
<widget class="RankView" name="rankView"/>
|
||||
<widget class="CommentView" name="commentView"/>
|
||||
<widget class="SubCommentView" name="subCommentView"/>
|
||||
<widget class="ChatView" name="chatView"/>
|
||||
<widget class="FavoriteView" name="favorityView"/>
|
||||
<widget class="HistoryView" name="historyView"/>
|
||||
<widget class="BookInfoView" name="bookInfoView"/>
|
||||
<widget class="GameCommentView" name="gameCommentView"/>
|
||||
<widget class="GameInfoView" name="gameInfoView"/>
|
||||
<widget class="GameView" name="gameView"/>
|
||||
<widget class="Waifu2xToolView" name="waifu2xToolView"/>
|
||||
<widget class="BookEpsView" name="bookEpsView"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="ReadView" name="readView"/>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="TitleBarWidget" name="widget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="totalStackWidget">
|
||||
<widget class="QWidget" name="subMainWindow">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="NavigationWidget" name="navigationWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>240</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>280</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="menuLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="menuButton">
|
||||
<property name="text">
|
||||
<string>菜单</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="AnimationStackWidget" name="subStackWidget">
|
||||
<widget class="IndexView" name="indexView"/>
|
||||
<widget class="HelpView" name="helpView"/>
|
||||
<widget class="MyCommentView" name="myCommentView"/>
|
||||
<widget class="SettingView" name="settingView"/>
|
||||
<widget class="DownloadView" name="downloadView"/>
|
||||
<widget class="CategoryView" name="categoryView"/>
|
||||
<widget class="SearchView" name="searchView"/>
|
||||
<widget class="RankView" name="rankView"/>
|
||||
<widget class="CommentView" name="commentView"/>
|
||||
<widget class="SubCommentView" name="subCommentView"/>
|
||||
<widget class="ChatView" name="chatView"/>
|
||||
<widget class="FavoriteView" name="favorityView"/>
|
||||
<widget class="HistoryView" name="historyView"/>
|
||||
<widget class="BookInfoView" name="bookInfoView"/>
|
||||
<widget class="GameCommentView" name="gameCommentView"/>
|
||||
<widget class="GameInfoView" name="gameInfoView"/>
|
||||
<widget class="GameView" name="gameView"/>
|
||||
<widget class="Waifu2xToolView" name="waifu2xToolView"/>
|
||||
<widget class="BookEpsView" name="bookEpsView"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="ReadView" name="readView"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
@ -250,6 +267,12 @@
|
||||
<header location="global">view.help.help_view.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TitleBarWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">component.widget.title_bar_widget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
@ -95,9 +95,9 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-1409</y>
|
||||
<y>-372</y>
|
||||
<width>661</width>
|
||||
<height>2154</height>
|
||||
<height>2209</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
@ -440,6 +440,57 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_29">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>分类封面大小:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_22">
|
||||
<item>
|
||||
<widget class="WheelSpinBox" name="categorySize">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>250</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>80</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_21">
|
||||
<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>
|
||||
@ -1928,9 +1979,9 @@
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="languageGroup"/>
|
||||
<buttongroup name="mainScaleGroup"/>
|
||||
<buttongroup name="logGroup"/>
|
||||
<buttongroup name="themeGroup"/>
|
||||
<buttongroup name="languageGroup"/>
|
||||
<buttongroup name="logGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|